com.tensegrity.gui.swing.control
Class SwingStatusBar

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.tensegrity.gui.swing.control.SwingStatusBar
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, BasicComponent, Evaluable, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, StatusBar

public class SwingStatusBar
extends javax.swing.JPanel
implements java.awt.event.ActionListener, StatusBar

the state bar displays the following informations:
- a message text that is displayed for a certain time

Version:
$Id: SwingStatusBar.java,v 1.17 2006/02/16 09:51:25 BurkhardWick Exp $
Author:
MichaelKegel
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
static int DISPLAY_TIME
          constant that determine the time a message is displayed in the status bar
protected  javax.swing.JLabel message
          instance variable for the message to display
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
SwingStatusBar()
          Default constructor for the StateBar class.
SwingStatusBar(boolean isDoubleBuffered)
          Constructor for StateBar.
SwingStatusBar(boolean isDoubleBuffered, boolean useProgress)
          Constructor for StateBar
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Called when the time a message should be displayed is elapsed.
 void applyEvList()
          Tells the component to apply its UIItemEvaluationList.
 BasicComponent getParentComponent()
          Returns the parent Component of this instance.
 ProgressBar getProgressBar()
          Returns The integrated progress bar of the StatusBar.
protected  void init(boolean useProgress)
          initializes the StateBar. this means
- setting the appropriate layout manager
- creation of the instance objects
 void installEvList()
          Tells the component to setup its internal state.
 void setMessage(java.lang.String message)
          sets the message displayed in the state bar.
 void useTimer(boolean b)
          Sets the useTimer flag.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.tensegrity.gui.component.BasicComponent
getHeight, getWidth, repaint
 

Field Detail

DISPLAY_TIME

public static final int DISPLAY_TIME
constant that determine the time a message is displayed in the status bar

See Also:
Constant Field Values

message

protected javax.swing.JLabel message
instance variable for the message to display

Constructor Detail

SwingStatusBar

public SwingStatusBar(boolean isDoubleBuffered)
Constructor for StateBar.

Parameters:
isDoubleBuffered - true if double buffering is to be enabled, otherwise false.

SwingStatusBar

public SwingStatusBar()
Default constructor for the StateBar class.

See Also:
init(boolean)

SwingStatusBar

public SwingStatusBar(boolean isDoubleBuffered,
                      boolean useProgress)
Constructor for StateBar

See Also:
init(boolean)
Method Detail

init

protected void init(boolean useProgress)
initializes the StateBar. this means
- setting the appropriate layout manager
- creation of the instance objects

Parameters:
useProgress - true, to add a progress bar

setMessage

public void setMessage(java.lang.String message)
sets the message displayed in the state bar.

Specified by:
setMessage in interface StatusBar
Parameters:
message - the message text to display

getProgressBar

public ProgressBar getProgressBar()
Description copied from interface: StatusBar
Returns The integrated progress bar of the StatusBar.

Specified by:
getProgressBar in interface StatusBar
Returns:
ProgressBar

useTimer

public void useTimer(boolean b)
Sets the useTimer flag. Turn the timer on by passing true to this method.

Parameters:
b - the flag to toggle timer usage.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Called when the time a message should be displayed is elapsed.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
event - the ActionEvent.

applyEvList

public void applyEvList()
Description copied from interface: Evaluable
Tells the component to apply its UIItemEvaluationList.

Specified by:
applyEvList in interface Evaluable

installEvList

public void installEvList()
Description copied from interface: Evaluable
Tells the component to setup its internal state.

Specified by:
installEvList in interface Evaluable

getParentComponent

public BasicComponent getParentComponent()
Description copied from interface: BasicComponent
Returns the parent Component of this instance.

Specified by:
getParentComponent in interface BasicComponent
Returns:
the parent component or null if no parent exists.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.