public abstract class Tool
extends javax.swing.JPanel
Modifier and Type | Class and Description |
---|---|
static interface |
Tool.Observer
An observer interface for use by those that wishing to monitor changes
to a tool.
|
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected UIFactory |
uif
The UI factory used to create GUI components.
|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Modifier | Constructor and Description |
---|---|
protected |
Tool(ToolManager m,
java.lang.String uiKey)
Create a tool object.
|
protected |
Tool(ToolManager m,
java.lang.String uiKey,
java.lang.String helpID)
Create a tool object.
|
Modifier and Type | Method and Description |
---|---|
void |
addObserver(Tool.Observer o)
Add an observer to be notified of changes to a tool.
|
void |
dispose()
Release any resources this tool may be referencing.
|
protected java.lang.String[] |
getCloseAlerts()
Get a list (if any) of the reasons why it might be inadvisable
to close the tool at this point.
|
long |
getCreationTime()
Get the creation time for this tool.
|
Desktop |
getDesktop()
Get the desktop for this tool.
|
javax.help.HelpBroker |
getHelpBroker()
Get the help broker used to provide help for this tool.
|
TestSuite[] |
getLoadedTestSuites()
Get a list of any test suites that are being used by this tool.
|
WorkDirectory[] |
getLoadedWorkDirectories()
Get a list of any work directories that are being used by this tool.
|
ToolManager |
getManager()
Get the manager for this tool.
|
abstract javax.swing.JMenuBar |
getMenuBar()
Get the menu bar for a tool.
|
java.lang.String |
getShortTitle()
Get a short title for the tool.
|
java.lang.String |
getTitle()
Get the title string for the tool.
|
ToolDialog[] |
getToolDialogs()
Get an array containing the set of ToolDialogs owned by this tool.
|
void |
removeObserver(Tool.Observer o)
Remove a previously registered observer so that it will no longer
be notified of changes to a tool.
|
protected abstract void |
restore(java.util.Map m)
Restore information about a tool from a map, and configure
the tool according this information.
|
protected abstract void |
save(java.util.Map m)
Save information about a tool in a map, so that the
tool can be restored in a later invocation of JT Harness.
|
protected void |
setHelp(java.awt.Component comp,
java.lang.String helpID)
Set the helpID for a specific component.
|
protected void |
setHelp(java.lang.String helpID)
Set the helpID for this component.
|
protected void |
setHelpOnButton(java.awt.Component comp,
java.lang.String helpID)
Set a button to be a Help button and to invoke the help
view set to a specific helpID.
|
protected void |
setI18NTitle(java.lang.String key)
Set the title string for the tool.
|
protected void |
setI18NTitle(java.lang.String key,
java.lang.Object arg)
Set the title string for the tool.
|
protected void |
setI18NTitle(java.lang.String key,
java.lang.Object[] args)
Set the title string for the tool.
|
void |
setShortTitle(java.lang.String newShortTitle)
Set a short title for the tool.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected final UIFactory uif
protected Tool(ToolManager m, java.lang.String uiKey)
uiKey.name | accessible name text |
m
- the manager for this tooluiKey
- the component name for this toolprotected Tool(ToolManager m, java.lang.String uiKey, java.lang.String helpID)
m
- the manager for this tooluiKey
- the component name for this toolhelpID
- the help ID for context-sensitive help for this toolpublic void addObserver(Tool.Observer o)
o
- the observer to be addedremoveObserver(com.sun.javatest.tool.Tool.Observer)
public void removeObserver(Tool.Observer o)
o
- the observer to be removedaddObserver(com.sun.javatest.tool.Tool.Observer)
public abstract javax.swing.JMenuBar getMenuBar()
protected void setI18NTitle(java.lang.String key)
key
- key to be used to get title text from resource bundlegetTitle()
protected void setI18NTitle(java.lang.String key, java.lang.Object arg)
key
- key to be used to get title text from resource bundlearg
- item for substitution into string from resource bundleI18NResourceBundle
,
getTitle()
protected void setI18NTitle(java.lang.String key, java.lang.Object[] args)
key
- key to be used to get title text from resource bundleargs
- items for substitution into string from resource bundleI18NResourceBundle
,
getTitle()
public java.lang.String getTitle()
setI18NTitle(String)
,
setI18NTitle(String,Object)
,
setI18NTitle(String,Object[])
public void setShortTitle(java.lang.String newShortTitle)
newShortTitle
- the short title string for the toolgetShortTitle()
public java.lang.String getShortTitle()
setShortTitle(java.lang.String)
public TestSuite[] getLoadedTestSuites()
public WorkDirectory[] getLoadedWorkDirectories()
public long getCreationTime()
public void dispose()
public ToolManager getManager()
public Desktop getDesktop()
public javax.help.HelpBroker getHelpBroker()
protected abstract void save(java.util.Map m)
public static Tool restore(Map m)
which will be invoked to recreate the tool.m
- the map in which to store the significant state
of the toolprotected abstract void restore(java.util.Map m)
m
- the map in which to store the significant state
of the toolprotected java.lang.String[] getCloseAlerts()
protected void setHelp(java.lang.String helpID)
helpID
- the ID for the help to be displayedprotected void setHelp(java.awt.Component comp, java.lang.String helpID)
comp
- the component in questionhelpID
- the ID for the help to be displayedprotected void setHelpOnButton(java.awt.Component comp, java.lang.String helpID)
comp
- the button to be made into a help buttonhelpID
- the ID for the help to be displayed when the
button is pressedpublic ToolDialog[] getToolDialogs()
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.