public abstract class ToolManager
extends java.lang.Object
Tool
Modifier and Type | Class and Description |
---|---|
static class |
ToolManager.Fault
This exception is used to report problems while using a tool manager.
|
Modifier and Type | Field and Description |
---|---|
protected I18NResourceBundle |
i18n
The standard resource bundle for this tool manager, defined in the
file
i18n.properties in the same package as the tool manager. |
Modifier | Constructor and Description |
---|---|
protected |
ToolManager(Desktop desktop)
Create a tool manager to manage tools on a desktop.
|
Modifier and Type | Method and Description |
---|---|
protected javax.swing.Icon |
createIcon(java.lang.String key)
Create an icon from a resource specified in the standard resource bundle
for this tool manager.
|
Desktop |
getDesktop()
Get the desktop for which this manager is managing tools.
|
javax.swing.Action[] |
getFileMenuActions()
Get actions for any items to appear in the main section of the desktop
File menu.
|
javax.swing.JMenuItem[] |
getFileMenuPrimaries()
Get primary file menu opereations for this tool.
|
javax.swing.JMenuItem[] |
getFileMenuSecondaries()
Get secondary file menu opereations for this tool.
|
FileOpener[] |
getFileOpeners()
Get handlers for any files that can be opened by this tool manager.
|
javax.swing.JMenuItem[] |
getHelpAboutMenus() |
javax.swing.JMenuItem[] |
getHelpPrimaryMenus() |
javax.swing.JMenuItem[] |
getHelpTestSuiteMenus() |
Preferences.Pane |
getPrefsPane()
Get details about any user preferences supported by this tool manager.
|
javax.swing.Action[] |
getTaskMenuActions()
Deprecated.
There is no tasks menu anymore.
|
javax.swing.Action[] |
getWindowOpenMenuActions()
Deprecated.
|
abstract Tool |
restoreTool(java.util.Map m)
Restore a tool from previously saved information.
|
abstract Tool |
startTool()
Start a default instance of a tool.
|
protected final I18NResourceBundle i18n
i18n.properties
in the same package as the tool manager.protected ToolManager(Desktop desktop)
desktop
- the desktop for which this manager should manage toolspublic Desktop getDesktop()
public Preferences.Pane getPrefsPane()
public FileOpener[] getFileOpeners()
public javax.swing.Action[] getFileMenuActions()
public javax.swing.JMenuItem[] getFileMenuPrimaries()
getFileMenuActions()
public javax.swing.JMenuItem[] getFileMenuSecondaries()
getFileMenuActions()
public javax.swing.JMenuItem[] getHelpPrimaryMenus()
public javax.swing.JMenuItem[] getHelpTestSuiteMenus()
public javax.swing.JMenuItem[] getHelpAboutMenus()
public javax.swing.Action[] getTaskMenuActions()
public javax.swing.Action[] getWindowOpenMenuActions()
public abstract Tool startTool()
public abstract Tool restoreTool(java.util.Map m) throws ToolManager.Fault
m
- a map containing the previously saved informationToolManager.Fault
- if there is a problem restoring the toolprotected javax.swing.Icon createIcon(java.lang.String key)
key
- the base name for the resource specifying the image file for the
icon. The actual name of the resource is formed as follows:
key ".icon
"Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.