Package org.jppf.ui.options.docking
Class DockingManager
java.lang.Object
org.jppf.ui.options.docking.DockingManager
This class handles the docking / undocking of of the tabs in all tabbed views.
- Author:
- Laurent Cohen
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidattach(OptionElement element, String viewId) Attach a new component to the specvified view.Create a new view.voidDock a component to its initial container.Search all esiting views for an eklement with the specified name.getComponent(Component comp) Get the detachable component for the specified AWT component.Get the detachable component for the specified AWT component on which the mouse listener is registered.static DockingManagerGet the docking manager for the JVM.org.jppf.ui.options.docking.DockingMouseAdapterGet the mouse listener for the popup menu on right-click.Get the view with the specified id.getViewIdForContainer(OptionContainer container) Get the id of the view that contains the specified container.Get the Mapping of view ids to the corresponding UI frame.booleanisRegistered(OptionElement element) Add a new component to the map of detachable components.voidregister(OptionElement element, Component listenerComponent) Add a new component to the map of detachable components.voidsetMainView(Frame frame, OptionContainer container) Set the main view for the application.voidupdate(OptionElement element, Component listenerComponent) Add a new component to the map of detachable components.
-
Field Details
-
VIEW_PREFIX
Prefix for the name of each view. -
INITIAL_VIEW
Name of the initial / main view.
-
-
Method Details
-
getInstance
Get the docking manager for the JVM.- Returns:
- an instance of
DockingManager.
-
setMainView
Set the main view for the application.- Parameters:
frame- theFrameto set as the main view.container- the option container for the view.
-
register
Add a new component to the map of detachable components.- Parameters:
element- the component to add.listenerComponent- the UI component which has the mouse listener.
-
update
Add a new component to the map of detachable components.- Parameters:
element- the component to add.listenerComponent- the UI component which has the mouse listener.
-
isRegistered
Add a new component to the map of detachable components.- Parameters:
element- the component to add.- Returns:
trueif the component is already registered,falseotherwise.
-
attach
Attach a new component to the specvified view.- Parameters:
element- the component to qttqch to the viez.viewId- the id of the viez to zhcih to attach the co;ponent.
-
createView
Create a new view.- Returns:
- the id of the view.
-
getView
Get the view with the specified id.- Parameters:
viewId- the id of the view to find.- Returns:
- a
ViewDescriptorobject.
-
getComponent
Get the detachable component for the specified AWT component.- Parameters:
comp- the component for which to find a descriptor.- Returns:
- a
DetachableComponentDescriptorobject.
-
getComponentFromListenerComp
Get the detachable component for the specified AWT component on which the mouse listener is registered.- Parameters:
comp- the component for which to find a descriptor.- Returns:
- a
DetachableComponentDescriptorobject.
-
getViewIdForContainer
Get the id of the view that contains the specified container.- Parameters:
container- the container tolook for.- Returns:
- the id of the view which has the container as main container.
-
getMouseAdapter
public org.jppf.ui.options.docking.DockingMouseAdapter getMouseAdapter()Get the mouse listener for the popup menu on right-click.- Returns:
- an
DockingMouseAdapterobject.
-
dockToInitialContainer
Dock a component to its initial container.- Parameters:
comp- the component to move.
-
getViewMap
Get the Mapping of view ids to the corresponding UI frame.- Returns:
- a map of string ids to
ViewDescriptorinstances.
-
findFirstElementWithName
Search all esiting views for an eklement with the specified name.- Parameters:
name- the name of the element to find.- Returns:
- an
OptionElementinstance representing the element.
-