Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.javatest.tool
Class ToolManager

    java.lang.Object
      com.sun.javatest.tool.ToolManager

Direct Known Subclasses:
  ExecToolManager

    public abstract class ToolManager

extends java.lang.Object

Tool managers are relatively lightweight managers for tools that provide end-user GUI functionality.

See Also:
  `Tool`

Nested Class Summary
`static class` | `ToolManager.Fault` This exception is used to report problems while using a tool manager.

Field Summary
`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.

Constructor Summary
`protected` | `ToolManager(Desktop desktop)` Create a tool manager to manage tools on a desktop.

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### i18n

    protected final I18NResourceBundle i18n

  The standard resource bundle for this tool manager, defined in the file `i18n.properties` in the same package as the tool manager.

Constructor Detail

### ToolManager

    protected ToolManager(Desktop desktop)

  Create a tool manager to manage tools on a desktop.

  Parameters:
    `desktop` - the desktop for which this manager should manage tools

Method Detail

### getDesktop

    public Desktop getDesktop()

  Get the desktop for which this manager is managing tools.

  Returns:
    the desktop for which this manager should manage tools

### getPrefsPane

    public Preferences.Pane getPrefsPane()

  Get details about any user preferences supported by this tool manager.

  Returns:
    an object to handle preferences supported by this tool manager, or null if no preferences are supported.

### getFileOpeners

    public FileOpener[] getFileOpeners()

  Get handlers for any files that can be opened by this tool manager.

  Returns:
    a set of handlers for files that can be opened by this tool manager, or null if none available.

### getFileMenuActions

    public javax.swing.Action[] getFileMenuActions()

  Get actions for any items to appear in the main section of the desktop File menu.

  Returns:
    an array of Actions to appear on the File menu, or null if none are required.

### getFileMenuPrimaries

    public javax.swing.JMenuItem[] getFileMenuPrimaries()

  Get primary file menu opereations for this tool. These are placed after the actions. They will be shown in the order given in the array. There are none provided by default (null).

  Returns:
    Array of menu items to be shown for this tool. Nill if none.
  See Also:
    `getFileMenuActions()`

### getFileMenuSecondaries

    public javax.swing.JMenuItem[] getFileMenuSecondaries()

  Get secondary file menu opereations for this tool. These are placed after all primary actions from all tools, but before the global operations like preferences, close and exit. They will be shown in the order given in the array. There are none provided by default (null).

  Returns:
    Array of menu items to be shown for this tool. Nill if none.
  See Also:
    `getFileMenuActions()`

### getHelpPrimaryMenus

    public javax.swing.JMenuItem[] getHelpPrimaryMenus()

### getHelpTestSuiteMenus

    public javax.swing.JMenuItem[] getHelpTestSuiteMenus()

### getHelpAboutMenus

    public javax.swing.JMenuItem[] getHelpAboutMenus()

### getTaskMenuActions

    public javax.swing.Action[] getTaskMenuActions()

  Deprecated. There is no tasks menu anymore.

  Get actions for any items to appear in the desktop Tasks menu.

  Returns:
    an array of Actions to appear on the Tasks menu, or null if none are required.

### getWindowOpenMenuActions

    public javax.swing.Action[] getWindowOpenMenuActions()

  Deprecated.

  Get actions to open any windows for this tool.

  Returns:
    an array of Actions that open windows for this tool, or null if none are required.

### startTool

    public abstract Tool startTool()

  Start a default instance of a tool.

  Returns:
    the tool that was started

### restoreTool

    public abstract Tool restoreTool(java.util.Map m)
                              throws ToolManager.Fault

  Restore a tool from previously saved information.

  Parameters:
    `m` - a map containing the previously saved information
  Returns:
    the tool that was started
  Throws:
    `ToolManager.Fault` - if there is a problem restoring the tool

### createIcon

    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.

  Parameters:
    `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`"
  Returns:
    an icon containing the specified image

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.