Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.awt.toolbar
Class ToolBar  view ToolBar download ToolBar.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bycom.flexstor.common.awt.toolbar.ToolBar
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.awt.event.ContainerListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.util.Observer, java.io.Serializable

public class ToolBar
extends java.awt.Panel
implements java.util.Observer, java.awt.event.ActionListener, java.awt.event.ContainerListener


Nested Class Summary
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  com.flexstor.common.awt.ActionMulticaster actionMulticaster
           
private static int BUTTON_WIDTH
           
private static int CB_WIDTH
           
private static int CHOICE_WIDTH
           
protected  com.flexstor.common.awt.ActionCheckerI controller
           
private static int DEFAULT_WIDTH
           
private static int LABEL_WIDTH
           
private static int SPACE_WIDTH
           
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ToolBar()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Fire action events.
 void addActionListener(java.awt.event.ActionListener l)
          Add ActionListeners.
 void componentAdded(java.awt.event.ContainerEvent e)
          Track component additions and add itself as a listener.
 void componentRemoved(java.awt.event.ContainerEvent e)
          Track component removals and unregister as a listener.
 void dispose()
           
 void doLayout()
          Layout the components in this container.
 java.awt.Dimension getMinimumSize()
          Returns the minimum size of this container.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of this container.
 void paint(java.awt.Graphics g)
          Paints this container.
 void removeActionListener(java.awt.event.ActionListener l)
          Remove ActionListeners.
protected  void setController(com.flexstor.common.awt.ActionCheckerI c)
          If enable/disable is not triggered by an observer pattern, which sets the controller to the observable, this method allows to set the controler explicitly.
 void setEnabled(com.flexstor.common.awt.ActionCheckerI ac, boolean bEnabled)
          Enables or disables all IActionComponents on this toolbar in correspondance to the return values of the ActionCheckerI.
 void setEnabled(boolean bEnabled)
          Enables or disables all IActionComponents on this toolbar in correspondance to the return values of the ActionCheckerI.
 void update(java.util.Observable c, java.lang.Object notifyCommand)
          Responds to a controller notification to update the enabled state of each toolbar button
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusDownCycle, update, 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, firePropertyChange, firePropertyChange, firePropertyChange, 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, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

actionMulticaster

protected com.flexstor.common.awt.ActionMulticaster actionMulticaster

controller

protected com.flexstor.common.awt.ActionCheckerI controller

BUTTON_WIDTH

private static final int BUTTON_WIDTH
See Also:
Constant Field Values

CHOICE_WIDTH

private static final int CHOICE_WIDTH
See Also:
Constant Field Values

LABEL_WIDTH

private static final int LABEL_WIDTH
See Also:
Constant Field Values

CB_WIDTH

private static final int CB_WIDTH
See Also:
Constant Field Values

DEFAULT_WIDTH

private static final int DEFAULT_WIDTH
See Also:
Constant Field Values

SPACE_WIDTH

private static final int SPACE_WIDTH
See Also:
Constant Field Values
Constructor Detail

ToolBar

public ToolBar()
Method Detail

dispose

public void dispose()

setController

protected void setController(com.flexstor.common.awt.ActionCheckerI c)
If enable/disable is not triggered by an observer pattern, which sets the controller to the observable, this method allows to set the controler explicitly.


update

public void update(java.util.Observable c,
                   java.lang.Object notifyCommand)
Responds to a controller notification to update the enabled state of each toolbar button

Specified by:
update in interface java.util.Observer

setEnabled

public void setEnabled(boolean bEnabled)
Enables or disables all IActionComponents on this toolbar in correspondance to the return values of the ActionCheckerI.


setEnabled

public void setEnabled(com.flexstor.common.awt.ActionCheckerI ac,
                       boolean bEnabled)
Enables or disables all IActionComponents on this toolbar in correspondance to the return values of the ActionCheckerI.


componentAdded

public void componentAdded(java.awt.event.ContainerEvent e)
Track component additions and add itself as a listener.

Specified by:
componentAdded in interface java.awt.event.ContainerListener

componentRemoved

public void componentRemoved(java.awt.event.ContainerEvent e)
Track component removals and unregister as a listener.

Specified by:
componentRemoved in interface java.awt.event.ContainerListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Fire action events.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

addActionListener

public void addActionListener(java.awt.event.ActionListener l)
Add ActionListeners.


removeActionListener

public void removeActionListener(java.awt.event.ActionListener l)
Remove ActionListeners.


paint

public void paint(java.awt.Graphics g)
Description copied from class: java.awt.Container
Paints this container. The implementation of this method in this class forwards to any lightweight components in this container. If this method is subclassed, this method should still be invoked as a superclass method so that lightweight components are properly drawn.


doLayout

public void doLayout()
Description copied from class: java.awt.Container
Layout the components in this container.


getPreferredSize

public java.awt.Dimension getPreferredSize()
Description copied from class: java.awt.Container
Returns the preferred size of this container.


getMinimumSize

public java.awt.Dimension getMinimumSize()
Description copied from class: java.awt.Container
Returns the minimum size of this container.