dsto.dfc.swing.status
Class StatusManager

java.lang.Object
  extended by dsto.dfc.util.BasicPropertyEventSource
      extended by dsto.dfc.swing.status.StatusManager
All Implemented Interfaces:
Copyable, JavaBean, PropertyEventSource, Serializable, Cloneable

public class StatusManager
extends BasicPropertyEventSource

Manages a stack of status messages. Used as the underlying 'model' for the StatusBar control.

See Also:
StatusBar, MenuStatusAdapter, LogStatusAdapter, Serialized Form

Constructor Summary
StatusManager()
           
 
Method Summary
static StatusManager getOrCreateStatusManager(Component c)
          Get or create a status manager for the window containing a given component.
 Object getStatus()
          The current top of the status stack (null if the stack is empty).
 String getStatusMessage()
          The string value of the top of the status stack ("" if the stack is empty).
 Object popStatus()
          Pop the current status object off the stack.
 void pushStatus(Object status)
           
 void pushStatus(Object status, boolean soft)
          Push a new status object (usually a String or Iconic value) onto the status stack.
 
Methods inherited from class dsto.dfc.util.BasicPropertyEventSource
addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener, setPropertyChangeSource
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatusManager

public StatusManager()
Method Detail

getOrCreateStatusManager

public static StatusManager getOrCreateStatusManager(Component c)
                                              throws IllegalArgumentException
Get or create a status manager for the window containing a given component.

Throws:
IllegalArgumentException

pushStatus

public void pushStatus(Object status)

pushStatus

public void pushStatus(Object status,
                       boolean soft)
Push a new status object (usually a String or Iconic value) onto the status stack. Fires a 'status' property change event

Parameters:
status - The new status.
soft - If true, the new status is marked 'soft' and will be automatically replaced by the next call to pushStatus ().

popStatus

public Object popStatus()
Pop the current status object off the stack. Fires a 'status' property change event

Returns:
The old status (or null if the stack is empty).

getStatus

public Object getStatus()
The current top of the status stack (null if the stack is empty).

See Also:
getStatusMessage()

getStatusMessage

public String getStatusMessage()
The string value of the top of the status stack ("" if the stack is empty).

See Also:
getStatus()


Copyright © 2008 Commonwealth of Australia