Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.ide.view
Class MultiManager

java.lang.Object
  extended by oracle.ide.view.MultiManager
All Implemented Interfaces:
Addin, Controller
Direct Known Subclasses:
NavigatorManager, PinnableManager

public abstract class MultiManager
extends java.lang.Object
implements Controller, Addin

The MultiManager class is a base class for other managers that can support support either a singleton view or multiple views based on a configurable setting. It is assumed that the view(s) are extensions of AbstractPinnable.


Field Summary
 
Fields inherited from interface oracle.ide.controller.Controller
UPDATE_FROM_ACTION_PERFORMED, UPDATE_FROM_ACTIVE_VIEW_CHANGED, UPDATE_FROM_UNDO, UPDATE_FROM_USER_EXTENSION, UPDATE_FROM_VIEW_SELECTION_CHANGED
 
Constructor Summary
MultiManager()
           
 
Method Summary
protected abstract  DockableView createDockableView(Context ctx, ViewId viewId)
           
protected abstract  IdeAction createShowAction()
           
protected  IdeAction createToggleToolbarAction()
          Subclasses should override this method to return the IdeAction that is responsible for toggling the visibility of this manager's toolbar.
protected  DockableView findOrCreateView(Context context)
           
protected  DockableView findView(ViewId viewId)
           
protected  java.lang.String getAcceleratorFile()
          the name of the accelerator file to register
protected abstract  java.lang.String getDefaultName()
          Get the name of the default View instance managed by this manager as it would appear in a ViewId instance.
 ViewId getDefaultViewId()
           
protected abstract  DockableFactory getDockableFactory()
           
 DockableView getLastView()
          Get the last managed View to have been active.
 DockableView getNewView(Context context, ViewId viewId)
          Get a new View instance rooted on the given Context and having the given ViewId.
protected  int getOrientation(ViewId viewId, DockableView relative)
           
protected  DockableView getRelativeView(Context context, ViewId viewId)
           
 IdeAction getShowAction()
          Get the IdeAction to be associated with a menu item used for raising the last managed View to the top of the z-order.
protected  float getToggleToolbarMenuWeight()
           
protected abstract  java.lang.String getViewCategory()
          Get the name of the View type managed by this manager as it would appear in a ViewId instance.
protected  ViewId getViewId(Context context)
           
 java.util.Collection getViews()
           
 boolean handleEvent(IdeAction action, Context context)
          This method is called when a user interaction with a View triggers the execution of a command.
 void initialize()
          Perform any necessary initialization.
protected  boolean isToolbarVisible()
           
protected  void setToolbarVisible(boolean visible)
           
 DockableView showLastView(Context context)
          Show the last managed View.
 DockableView showView(Context context)
          Show the View for the given Context, creating a new View instance as necessary.
 boolean update(IdeAction action, Context context)
          This method updates the enabled status of the specified action within the specified context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiManager

public MultiManager()
Method Detail

initialize

public void initialize()
Perform any necessary initialization. This method is called during Ide initialization and is typically the pont at which the implementation would register its DockableFactory with the docking subsystem.

Specified by:
initialize in interface Addin
See Also:
DockableFactory

getShowAction

public final IdeAction getShowAction()
Get the IdeAction to be associated with a menu item used for raising the last managed View to the top of the z-order. This method is called during initialization of the IdeMainWindow.

See Also:
IdeMainWindow, showLastView(oracle.ide.Context)

showLastView

public DockableView showLastView(Context context)
Show the last managed View. This method is called in response to the IdeAction returned by getAction. The value returned may be dependant upon the Context provided (e.g. if context already refers to the last managed View, might return the next to last managed View thereby allowing round robin View activation by continually showing the managed View previous to the current managed View).

See Also:
#getAction

showView

public DockableView showView(Context context)
Show the View for the given Context, creating a new View instance as necessary. This method is called in response to the IdeAction returned by getNewAction.

See Also:
#getNewAction

getLastView

public DockableView getLastView()
Get the last managed View to have been active. This method is called in response showView where a new View instance is created that needs to be docked relative to an existing managed View.


getNewView

public DockableView getNewView(Context context,
                               ViewId viewId)
Get a new View instance rooted on the given Context and having the given ViewId. This method is typically called by showView when it has been determined that a new instance is required. Likewise, it is called by the DockableFactory during install in order to construct any initial View instances associated with a given docking layout.

See Also:
showView(oracle.ide.Context), DockableFactory.install()

getViews

public java.util.Collection getViews()
Returns:
the views that are currently open.

getDefaultViewId

public ViewId getDefaultViewId()
Returns:
the default ViewId associated with this manager.

getViewCategory

protected abstract java.lang.String getViewCategory()
Get the name of the View type managed by this manager as it would appear in a ViewId instance.

See Also:
ViewId, getDefaultName()

getDefaultName

protected abstract java.lang.String getDefaultName()
Get the name of the default View instance managed by this manager as it would appear in a ViewId instance.

See Also:
ViewId, getViewCategory()

getAcceleratorFile

protected java.lang.String getAcceleratorFile()
the name of the accelerator file to register

See Also:
KeyStrokeContextRegistry.addAcceleratorDefinitionFile(java.lang.ClassLoader, java.lang.String)

createDockableView

protected abstract DockableView createDockableView(Context ctx,
                                                   ViewId viewId)

createShowAction

protected abstract IdeAction createShowAction()

getDockableFactory

protected abstract DockableFactory getDockableFactory()

createToggleToolbarAction

protected IdeAction createToggleToolbarAction()
Subclasses should override this method to return the IdeAction that is responsible for toggling the visibility of this manager's toolbar. If the manager does not have a toolbar, this method should return null.


getToggleToolbarMenuWeight

protected float getToggleToolbarMenuWeight()

getViewId

protected ViewId getViewId(Context context)

findView

protected DockableView findView(ViewId viewId)

findOrCreateView

protected DockableView findOrCreateView(Context context)

getRelativeView

protected DockableView getRelativeView(Context context,
                                       ViewId viewId)

getOrientation

protected int getOrientation(ViewId viewId,
                             DockableView relative)

isToolbarVisible

protected boolean isToolbarVisible()

setToolbarVisible

protected void setToolbarVisible(boolean visible)

handleEvent

public boolean handleEvent(IdeAction action,
                           Context context)
Description copied from interface: Controller
This method is called when a user interaction with a View triggers the execution of a command.

Specified by:
handleEvent in interface Controller
Parameters:
action - action whose command is to be executed.
Returns:
true if the controller handles the specified command.

update

public boolean update(IdeAction action,
                      Context context)
Description copied from interface: Controller
This method updates the enabled status of the specified action within the specified context. It should generally be called on the controller associated with the active view to allow that controller to take the first crack at determining its enabled status. If that controller wants to update its enabled status, it does so and returns true to indicate that further controllers do not need to be consulted. If the controller does not deal with setting the enabled status of an action, it delegates the request to its supervising controller, all the way up to the Ide. The Ide has a special implementation of update(xx) that further delegates the request to root controllers, until one of them returns true indicating the request was handled by the controller.

Specified by:
update in interface Controller
Parameters:
action - action whose command is to be executed.
context - the current context
Returns:
true if the controller handles the specified command.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.