Package docking
Interface DockingTool
-
- All Known Subinterfaces:
Tool
- All Known Implementing Classes:
AbstractDockingTool
,DummyPluginTool
,FakeDockingTool
,FrontEndTool
,GhidraTool
,ModalPluginTool
,PluginTool
,StandAlonePluginTool
,TestFrontEndTool
,TestTool
public interface DockingTool
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAction(DockingActionIf action)
Adds the action to the tool.void
addComponentProvider(ComponentProvider componentProvider, boolean show)
Adds the ComponentProvider to the tool, optionally making it visible.void
addLocalAction(ComponentProvider componentProvider, DockingActionIf action)
Adds the action to the given provider as a local action.void
contextChanged(ComponentProvider provider)
Signals to the tool that the provider's context has changed.java.util.List<DockingActionIf>
getAllActions()
Return a list of all actions in the tool.ComponentProvider
getComponentProvider(java.lang.String name)
Gets the ComponentProvider with the given name.java.util.List<DockingActionIf>
getDockingActionsByFullActionName(java.lang.String fullActionName)
Return an list of actions with the given full namejava.util.List<DockingActionIf>
getDockingActionsByOwnerName(java.lang.String owner)
Returns all actions for the given ownerjavax.swing.ImageIcon
getIcon()
Get the icon that the tool is using.java.lang.String
getName()
Returns a combination of the tool name and the instance name of the form tool name(instance name), e.g., SomeTool(2)ToolOptions
getOptions(java.lang.String categoryName)
Get the options for the given category name; if no options exist with the given name, then one is created.java.awt.Window
getProviderWindow(ComponentProvider componentProvider)
Returns the parent window for the given providerDockingWindowManager
getWindowManager()
Returns the DockingWindowManger for this tool.boolean
hasConfigChanged()
Return true if the tool's configuration has changed.boolean
isActive(ComponentProvider componentProvider)
Returns true if the ComponentProvider is the currently active provider.boolean
isVisible()
Returns true if tool is visible.boolean
isVisible(ComponentProvider componentProvider)
Returns true if the given ComponentProvider is currently visible.void
removeAction(DockingActionIf action)
Removes the given action from the toolvoid
removeComponentProvider(ComponentProvider componentProvider)
Removes the given ComponentProvider from the tool.void
removeLocalAction(ComponentProvider componentProvider, DockingActionIf action)
Removes the action from the providervoid
setConfigChanged(boolean changed)
Toggles the "change" state of the tool...void
setStatusInfo(java.lang.String text)
Set the status informationvoid
setVisible(boolean visibility)
Sets the tool visible or invisible.void
showComponentProvider(ComponentProvider componentProvider, boolean visible)
Shows or hides the component provider in the toolvoid
showDialog(DialogComponentProvider dialogComponent)
Shows the dialog using the tool's root frame as a parent.void
toFront()
Brings this tool to the front.void
toFront(ComponentProvider componentProvider)
Makes the given ComponentProvider move to the front if it is tabbed with other components.void
updateTitle(ComponentProvider componentProvider)
Indicates to the tool that the given componentProvider's title has changed.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns a combination of the tool name and the instance name of the form tool name(instance name), e.g., SomeTool(2)
-
isVisible
boolean isVisible()
Returns true if tool is visible.
-
setVisible
void setVisible(boolean visibility)
Sets the tool visible or invisible. This method is used by the Project to make it's tools visible or invisible depending on whether this tool is in is the active workspace.- Parameters:
visibility
- true specifies that the tool should be visible
-
toFront
void toFront()
Brings this tool to the front. Places this tool at the top of the stacking order and shows it in front of any other tools.
-
getIcon
javax.swing.ImageIcon getIcon()
Get the icon that the tool is using.
-
addComponentProvider
void addComponentProvider(ComponentProvider componentProvider, boolean show)
Adds the ComponentProvider to the tool, optionally making it visible.- Parameters:
componentProvider
- the provider to add to the toolshow
- if true, the component is made visible.
-
removeComponentProvider
void removeComponentProvider(ComponentProvider componentProvider)
Removes the given ComponentProvider from the tool.- Parameters:
componentProviderAdapter
- the provider to remove from the tool.
-
getComponentProvider
ComponentProvider getComponentProvider(java.lang.String name)
Gets the ComponentProvider with the given name.- Parameters:
name
- the name of the provider to get- Returns:
- the provider
-
setStatusInfo
void setStatusInfo(java.lang.String text)
Set the status information- Parameters:
text
- string to be displayed in the Status display area
-
addAction
void addAction(DockingActionIf action)
Adds the action to the tool.- Parameters:
action
- the action to be added.
-
removeAction
void removeAction(DockingActionIf action)
Removes the given action from the tool- Parameters:
action
- the action to be removed.
-
addLocalAction
void addLocalAction(ComponentProvider componentProvider, DockingActionIf action)
Adds the action to the given provider as a local action.- Parameters:
componentProvider
- the provider to add the action to.action
- the DockingAction to add to the componentProvider.
-
removeLocalAction
void removeLocalAction(ComponentProvider componentProvider, DockingActionIf action)
Removes the action from the provider- Parameters:
componentProvider
- the component provider from which to remove the action.action
- the action to remove.
-
getAllActions
java.util.List<DockingActionIf> getAllActions()
Return a list of all actions in the tool.- Returns:
- list of all actions
-
getDockingActionsByOwnerName
java.util.List<DockingActionIf> getDockingActionsByOwnerName(java.lang.String owner)
Returns all actions for the given owner- Parameters:
owner
- the action owner's name- Returns:
- the actions
-
getDockingActionsByFullActionName
java.util.List<DockingActionIf> getDockingActionsByFullActionName(java.lang.String fullActionName)
Return an list of actions with the given full name- Parameters:
fullActionName
- action name that includes the owner's name in parentheses, e.g. "MyAction (MyPlugin)"- Returns:
- the actions
-
showComponentProvider
void showComponentProvider(ComponentProvider componentProvider, boolean visible)
Shows or hides the component provider in the tool- Parameters:
componentProvider
- the provider to either show or hide.visible
- true to show the provider, false to hide it.
-
showDialog
void showDialog(DialogComponentProvider dialogComponent)
Shows the dialog using the tool's root frame as a parent. Also, remembers any size and location adjustments made by the user for the next time the dialog is shown.- Parameters:
dialogComponent
- the DialogComponentProvider object to be shown in a dialog.
-
getProviderWindow
java.awt.Window getProviderWindow(ComponentProvider componentProvider)
Returns the parent window for the given provider- Parameters:
componentProvider
- the provider- Returns:
- the window
-
toFront
void toFront(ComponentProvider componentProvider)
Makes the given ComponentProvider move to the front if it is tabbed with other components.- Parameters:
componentProvider
- the provider to move to the top of its stacking order.
-
isVisible
boolean isVisible(ComponentProvider componentProvider)
Returns true if the given ComponentProvider is currently visible.- Parameters:
componentProvider
- the provider to check for visibility.- Returns:
- true if the given ComponentProvider is currently visible.
-
isActive
boolean isActive(ComponentProvider componentProvider)
Returns true if the ComponentProvider is the currently active provider. The active provider is the provider that has keyboard focus and provides the current action context.- Parameters:
componentProvider
- the provider to check for active.- Returns:
- true if the ComponentProvider is the currently active provider.
-
updateTitle
void updateTitle(ComponentProvider componentProvider)
Indicates to the tool that the given componentProvider's title has changed.- Parameters:
componentProvider
- the componentProvider whose title has changed.
-
contextChanged
void contextChanged(ComponentProvider provider)
Signals to the tool that the provider's context has changed. This lets toolbar actions update enablement based on current context.- Parameters:
provider
- the provider whose context changed.
-
getWindowManager
DockingWindowManager getWindowManager()
Returns the DockingWindowManger for this tool.- Returns:
- the DockingWindowManger for this tool.
-
getOptions
ToolOptions getOptions(java.lang.String categoryName)
Get the options for the given category name; if no options exist with the given name, then one is created.
-
setConfigChanged
void setConfigChanged(boolean changed)
Toggles the "change" state of the tool...- Parameters:
changed
- true indicates that the tool config has changed.
-
hasConfigChanged
boolean hasConfigChanged()
Return true if the tool's configuration has changed.
-
-