wt.clients.beans.explorer
Class WTToolBar

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bysymantec.itools.awt.BorderPanel
                  extended bysymantec.itools.awt.util.ToolBarPanel
                      extended bywt.clients.beans.explorer.WTToolBar
All Implemented Interfaces:
Accessible, ActionListener, symantec.itools.awt.AlignStyle, symantec.itools.awt.BevelStyle, ContainerListener, EventListener, ImageObserver, MenuContainer, Serializable

public class WTToolBar
extends symantec.itools.awt.util.ToolBarPanel
implements ActionListener

WTToolbar is a ToolBar class used by the WTExplorer.

It has methods to add toolbar buttons based on a short name of gif image to display on the toolbar. It will use the image found in the wt.clients.images package with the specified name.

It broadcasts action events when the toolbar buttons are pressed. The broadcast event uses the short name of the toolbar gif to identify the button pressed.

Supported API: true

Extendable: false

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class symantec.itools.awt.util.ToolBarPanel
 
Nested classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
(package private)  HelpContext helpContext
           
(package private)  Label infoLabel
           
static String SPACER
          Contant used to indicate a blank space in the toolbar
 
Fields inherited from class symantec.itools.awt.util.ToolBarPanel
errors, HORIZONTAL, orientation, VERTICAL
 
Fields inherited from class symantec.itools.awt.BorderPanel
bevelDarkerColor, bevelLighterColor, borderColor, cachedBackground, internalInsets, ixPad, iyPadBottom, iyPadTop, label, labelAlignment, labelColor, labelipadx, labelpadx, padbottom, padleft, padright, padtop, panel, style
 
Fields inherited from class java.awt.Panel
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface symantec.itools.awt.AlignStyle
ALIGN_CENTERED, ALIGN_LEFT, ALIGN_RIGHT
 
Fields inherited from interface symantec.itools.awt.BevelStyle
BEVEL_LINE, BEVEL_LOWERED, BEVEL_NONE, BEVEL_RAISED
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
WTToolBar()
          Constructs a default WTToolBar.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Handle action events
 void addButton(String aButton)
          Adds a button to this toolbar.
 void addButton(String aButton, ActionListener aListener)
          Adds a button to this toolbar with the specified ActionListener
 void addButton(String name, int image_style, ActionListener action_listener)
          Adds a button to this toolbar.
(package private)  HelpContext getHelpContext()
          Get the help context for this component.
private  void initializeHelp()
          Initialize the help system for this component.
 void setEnabled(String button, boolean enable)
           
(package private)  void setHelpContext(HelpContext aHelpContext)
          Set the help context for this component.
 void setText(String aString)
          Sets the text displayed at the end of this toolbar.
 
Methods inherited from class symantec.itools.awt.util.ToolBarPanel
addNotify, addOrientationListener, addOrientationListener, addPropertyChangeListener, addVetoableChangeListener, getOrientation, getPreferredSize, isValidOrientation, removeNotify, removeOrientationListener, removeOrientationListener, removePropertyChangeListener, removeVetoableChangeListener, setLayout, setOrientation
 
Methods inherited from class symantec.itools.awt.BorderPanel
addBevelStyleListener, addBevelStyleListener, addContainerListener, addImpl, calculateHilightColors, componentAdded, componentRemoved, countComponents, draw, drawBorder, drawLabel, getAlignStyle, getBevelStyle, getBorderColor, getComponent, getComponentCount, getComponents, getInternalInsets, getIPadBottom, getIPadSides, getIPadTop, getLabel, getLabelColor, getLabelTopMargin, getLabelWidthMargin, getLayout, getMinimumSize, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, insets, isValidBevelStyle, layout, minimumSize, paint, preferredSize, remove, remove, removeAll, removeBevelStyleListener, removeBevelStyleListener, removeContainerListener, reshape, setAlignStyle, setBackground, setBevelStyle, setBorderColor, setBorderColor, setBounds, setInternalInsets, setIPadBottom, setIPadSides, setIPadTop, setLabel, setLabelColor, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, sizepanel, update
 
Methods inherited from class java.awt.Panel
getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getListeners, getMaximumSize, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, list, list, locate, paintComponents, paramString, print, printComponents, processContainerEvent, processEvent, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SPACER

public static String SPACER
Contant used to indicate a blank space in the toolbar


helpContext

HelpContext helpContext

infoLabel

Label infoLabel
Constructor Detail

WTToolBar

public WTToolBar()
Constructs a default WTToolBar.

Method Detail

addButton

public void addButton(String aButton)
Adds a button to this toolbar.

It will use the image found in the wt.clients.images package with the specified name. If no image is found, a button will be displayed with the request name as its label instead of displaying an image button.

Parameters:
aButton - the name of the .gif file to use on the toolbar button

setText

public void setText(String aString)
Sets the text displayed at the end of this toolbar.

Parameters:
aString - the string to display on the toolbar

addButton

public void addButton(String aButton,
                      ActionListener aListener)
Adds a button to this toolbar with the specified ActionListener

Parameters:
aButton - the name of the .gif file to use on the toolbar button
aListener - the ActionListener for the button

addButton

public void addButton(String name,
                      int image_style,
                      ActionListener action_listener)
Adds a button to this toolbar. The image used for the button is built from the given name. The image style is taken from the given integer, and the given ActionListener is added as a listener to ActionEvents of the button.

Parameters:
name - used as both the name of the button an an action event and for determining the image to display
image_style - specifies how the image should be placed on the button
action_listener - registered as an ActionListener to events fired by the button

initializeHelp

private void initializeHelp()
Initialize the help system for this component.


getHelpContext

HelpContext getHelpContext()
Get the help context for this component.


setHelpContext

void setHelpContext(HelpContext aHelpContext)
Set the help context for this component.


actionPerformed

public void actionPerformed(ActionEvent e)
Handle action events

Specified by:
actionPerformed in interface ActionListener
Parameters:
e - the ActionEvent to process

setEnabled

public void setEnabled(String button,
                       boolean enable)