org.graffiti.editor
Class StatusBar

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.graffiti.editor.StatusBar
All Implemented Interfaces:
MouseMotionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, GraphListener, TransactionListener, SelectionListener, SessionListener

public class StatusBar
extends JPanel
implements SessionListener, SelectionListener, GraphListener, MouseMotionListener

Represents a status line ui component, which can display info and error messages.

Version:
$Revision: 5768 $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
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
StatusBar()
          Constructs a new status bar.
 
Method Summary
 void clear()
          Clears the current text of the status bar.
 void mouseDragged(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void postEdgeAdded(GraphEvent e)
          Called after an edge has been added to the graph.
 void postEdgeRemoved(GraphEvent e)
          Called after an edge has been removed from the graph.
 void postGraphCleared(GraphEvent e)
          Called after method clear() has been called on a graph.
 void postNodeAdded(GraphEvent e)
          Called after an edge has been added to the graph.
 void postNodeRemoved(GraphEvent e)
          Called after a node has been removed from the graph.
 void preEdgeAdded(GraphEvent e)
          Called just before an edge is added to the graph.
 void preEdgeRemoved(GraphEvent e)
          Called just before an edge is removed from the graph.
 void preGraphCleared(GraphEvent e)
          Called before method clear() is called on a graph.
 void preNodeAdded(GraphEvent e)
          Called just before a node is added to the graph.
 void preNodeRemoved(GraphEvent e)
          Called just before a node is removed from the graph.
 void selectionChanged(SelectionEvent e)
          Is called, if something in the selection model changed.
 void selectionListChanged(SelectionEvent e)
          Is called, if a named selection is added or removed.
 void sessionChanged(Session session)
          This method is called when the session changes.
 void sessionDataChanged(Session s)
          This method is called when the data (except the graph data) are changed.
 void showError(String status)
          Shows the given error message in the status bar for DELAY seconds.
 void showError(String status, int timeMillis)
          Shows the given error message in the status bar for the given interval.
 void showInfo(String message)
          Shows the given message in the status bar for DELAY seconds.
 void showInfo(String message, int timeMillis)
          Shows the given message in the status bar for the given interval.
 void transactionFinished(TransactionEvent e)
          Called when a transaction has stopped.
 void transactionStarted(TransactionEvent e)
          Called when a transaction has started.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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
 
Methods inherited from class java.awt.Container
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
 
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, 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, hide, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatusBar

public StatusBar()
Constructs a new status bar.

Method Detail

clear

public void clear()
Clears the current text of the status bar.


postEdgeAdded

public void postEdgeAdded(GraphEvent e)
Description copied from interface: GraphListener
Called after an edge has been added to the graph.

Specified by:
postEdgeAdded in interface GraphListener
Parameters:
e - the GraphEvent detailing the changes.
See Also:
GraphListener.postEdgeAdded(GraphEvent)

postEdgeRemoved

public void postEdgeRemoved(GraphEvent e)
Description copied from interface: GraphListener
Called after an edge has been removed from the graph.

Specified by:
postEdgeRemoved in interface GraphListener
Parameters:
e - the GraphEvent detailing the changes.
See Also:
GraphListener.postEdgeRemoved(GraphEvent)

postGraphCleared

public void postGraphCleared(GraphEvent e)
Description copied from interface: GraphListener
Called after method clear() has been called on a graph. No other events (like remove events) are generated.

Specified by:
postGraphCleared in interface GraphListener
Parameters:
e - the GraphEvent detailing the changes.
See Also:
GraphListener.postGraphCleared(GraphEvent)

postNodeAdded

public void postNodeAdded(GraphEvent e)
Description copied from interface: GraphListener
Called after an edge has been added to the graph.

Specified by:
postNodeAdded in interface GraphListener
Parameters:
e - the GraphEvent detailing the changes.
See Also:
GraphListener.postNodeAdded(GraphEvent)

postNodeRemoved

public void postNodeRemoved(GraphEvent e)
Description copied from interface: GraphListener
Called after a node has been removed from the graph. All edges incident to this node have already been removed (preEdgeRemoved and postEdgeRemoved have been called).

Specified by:
postNodeRemoved in interface GraphListener
Parameters:
e - the GraphEvent detailing the changes.
See Also:
GraphListener.postNodeRemoved(GraphEvent)

preEdgeAdded

public void preEdgeAdded(GraphEvent e)
Description copied from interface: GraphListener
Called just before an edge is added to the graph.

Specified by:
preEdgeAdded in interface GraphListener
Parameters:
e - the GraphEvent detailing the changes.
See Also:
GraphListener.preEdgeAdded(GraphEvent)

preEdgeRemoved

public void preEdgeRemoved(GraphEvent e)
Description copied from interface: GraphListener
Called just before an edge is removed from the graph.

Specified by:
preEdgeRemoved in interface GraphListener
Parameters:
e - the GraphEvent detailing the changes.
See Also:
GraphListener.preEdgeRemoved(GraphEvent)

preGraphCleared

public void preGraphCleared(GraphEvent e)
Description copied from interface: GraphListener
Called before method clear() is called on a graph. No other events (like remove events) are generated.

Specified by:
preGraphCleared in interface GraphListener
Parameters:
e - the GraphEvent detailing the changes.
See Also:
GraphListener.preGraphCleared(GraphEvent)

preNodeAdded

public void preNodeAdded(GraphEvent e)
Description copied from interface: GraphListener
Called just before a node is added to the graph.

Specified by:
preNodeAdded in interface GraphListener
Parameters:
e - the GraphEvent detailing the changes.
See Also:
GraphListener.preNodeAdded(GraphEvent)

preNodeRemoved

public void preNodeRemoved(GraphEvent e)
Description copied from interface: GraphListener
Called just before a node is removed from the graph. This method is called before the incident edges are deleted.

Specified by:
preNodeRemoved in interface GraphListener
Parameters:
e - the GraphEvent detailing the changes.
See Also:
GraphListener.preNodeRemoved(GraphEvent)

selectionChanged

public void selectionChanged(SelectionEvent e)
Description copied from interface: SelectionListener
Is called, if something in the selection model changed.

Specified by:
selectionChanged in interface SelectionListener
See Also:
SelectionListener.selectionChanged(SelectionEvent)

selectionListChanged

public void selectionListChanged(SelectionEvent e)
Description copied from interface: SelectionListener
Is called, if a named selection is added or removed.

Specified by:
selectionListChanged in interface SelectionListener
See Also:
SelectionListener.selectionListChanged(org.graffiti.selection.SelectionEvent)

sessionChanged

public void sessionChanged(Session session)
Description copied from interface: SessionListener
This method is called when the session changes.

Specified by:
sessionChanged in interface SessionListener
Parameters:
session - the new Session.
See Also:
SessionListener.sessionChanged(Session)

sessionDataChanged

public void sessionDataChanged(Session s)
Description copied from interface: SessionListener
This method is called when the data (except the graph data) are changed.

Specified by:
sessionDataChanged in interface SessionListener
See Also:
SessionListener.sessionDataChanged(Session)

showError

public void showError(String status)
Shows the given error message in the status bar for DELAY seconds.

Parameters:
status - the message to display in the status bar.

showError

public void showError(String status,
                      int timeMillis)
Shows the given error message in the status bar for the given interval.

Parameters:
status - the message to display in the status bar.
timeMillis - DOCUMENT ME!

showInfo

public void showInfo(String message)
Shows the given message in the status bar for DELAY seconds.

Parameters:
message - the message to display in the status bar.

showInfo

public void showInfo(String message,
                     int timeMillis)
Shows the given message in the status bar for the given interval.

Parameters:
message - the message to display in the status bar.
timeMillis - DOCUMENT ME!

transactionFinished

public void transactionFinished(TransactionEvent e)
Description copied from interface: TransactionListener
Called when a transaction has stopped.

Specified by:
transactionFinished in interface TransactionListener
Parameters:
e - the EdgeEvent detailing the changes.
See Also:
TransactionListener.transactionFinished(TransactionEvent)

transactionStarted

public void transactionStarted(TransactionEvent e)
Description copied from interface: TransactionListener
Called when a transaction has started.

Specified by:
transactionStarted in interface TransactionListener
Parameters:
e - the EdgeEvent detailing the changes.
See Also:
TransactionListener.transactionStarted(TransactionEvent)

mouseDragged

public void mouseDragged(MouseEvent e)
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Specified by:
mouseMoved in interface MouseMotionListener


Generated at 2012-05-30 11:00:36 PM CEST