Package org.graffiti.editor
Class StatusBar
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.graffiti.editor.StatusBar
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,EventListener,Accessible,GraphListener,TransactionListener,SelectionListener,SessionListener
public class StatusBar extends JPanel implements SessionListener, SelectionListener, GraphListener
Represents a status line ui component, which can display info and error
messages. It also let's the user scroll through the selected nodes and edges,
which will be zoomed into the view
- Version:
- $Revision: 1.23.2.1.2.2 $
- See Also:
- Serialized Form
- Recent revisions:
- 2.7.0
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior -
Field Summary
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors Constructor Description StatusBar(StringBundle sBundle)Constructs a new status bar. -
Method Summary
Modifier and Type Method Description voidclear()Clears the current text of the status bar.StringgetCurrentText()voidpostEdgeAdded(GraphEvent e)Called after an edge has been added to the graph.voidpostEdgeRemoved(GraphEvent e)Called after an edge has been removed from the graph.voidpostGraphCleared(GraphEvent e)Called after methodclear()has been called on a graph.voidpostNodeAdded(GraphEvent e)Called after an edge has been added to the graph.voidpostNodeRemoved(GraphEvent e)Called after a node has been removed from the graph.voidpreEdgeAdded(GraphEvent e)Called just before an edge is added to the graph.voidpreEdgeRemoved(GraphEvent e)Called just before an edge is removed from the graph.voidpreGraphCleared(GraphEvent e)Called before methodclear()is called on a graph.voidpreNodeAdded(GraphEvent e)Called just before a node is added to the graph.voidpreNodeRemoved(GraphEvent e)Called just before a node is removed from the graph.voidselectionChanged(SelectionEvent e)Is called, if something in the selection model changed.voidselectionListChanged(SelectionEvent e)Is called, if a named selection is added or removed.voidsessionChanged(Session session)This method is called when the session changes.voidsessionDataChanged(Session s)This method is called when the data (except the graph data) are changed.voidshowError(String status)Shows the given error message in the status bar for DELAY seconds.voidshowError(String val, int timeMillis)Shows the given error message in the status bar for the given interval.voidshowInfo(String message)Shows the given message in the status bar for DELAY seconds.voidshowInfo(String val, int timeMillis)Shows the given message in the status bar for the given interval.voidtransactionFinished(TransactionEvent e, BackgroundTaskStatusProviderSupportingExternalCall status)Called when a transaction has stopped.voidtransactionStarted(TransactionEvent e)Called when a transaction has started.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUIMethods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
StatusBar
Constructs a new status bar.- Parameters:
sBundle- DOCUMENT ME!
-
-
Method Details
-
clear
public void clear()Clears the current text of the status bar. -
postEdgeAdded
Description copied from interface:GraphListenerCalled after an edge has been added to the graph.- Specified by:
postEdgeAddedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
postEdgeRemoved
Description copied from interface:GraphListenerCalled after an edge has been removed from the graph.- Specified by:
postEdgeRemovedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
postGraphCleared
Description copied from interface:GraphListenerCalled after methodclear()has been called on a graph. No other events (like remove events) are generated.- Specified by:
postGraphClearedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
postNodeAdded
Description copied from interface:GraphListenerCalled after an edge has been added to the graph.- Specified by:
postNodeAddedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
postNodeRemoved
Description copied from interface:GraphListenerCalled 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:
postNodeRemovedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
preEdgeAdded
Description copied from interface:GraphListenerCalled just before an edge is added to the graph.- Specified by:
preEdgeAddedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
preEdgeRemoved
Description copied from interface:GraphListenerCalled just before an edge is removed from the graph.- Specified by:
preEdgeRemovedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
preGraphCleared
Description copied from interface:GraphListenerCalled before methodclear()is called on a graph. No other events (like remove events) are generated.- Specified by:
preGraphClearedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
preNodeAdded
Description copied from interface:GraphListenerCalled just before a node is added to the graph.- Specified by:
preNodeAddedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
preNodeRemoved
Description copied from interface:GraphListenerCalled just before a node is removed from the graph. This method is called before the incident edges are deleted.- Specified by:
preNodeRemovedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
selectionChanged
Description copied from interface:SelectionListenerIs called, if something in the selection model changed.- Specified by:
selectionChangedin interfaceSelectionListener
-
selectionListChanged
Description copied from interface:SelectionListenerIs called, if a named selection is added or removed.- Specified by:
selectionListChangedin interfaceSelectionListener
-
sessionChanged
Description copied from interface:SessionListenerThis method is called when the session changes.- Specified by:
sessionChangedin interfaceSessionListener- Parameters:
session- the new Session.
-
sessionDataChanged
Description copied from interface:SessionListenerThis method is called when the data (except the graph data) are changed.- Specified by:
sessionDataChangedin interfaceSessionListener
-
showError
Shows the given error message in the status bar for DELAY seconds.- Parameters:
status- the message to display in the status bar.
-
showError
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
Shows the given message in the status bar for DELAY seconds.- Parameters:
message- the message to display in the status bar.
-
showInfo
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, BackgroundTaskStatusProviderSupportingExternalCall status)Description copied from interface:TransactionListenerCalled when a transaction has stopped.
The classTransactionHashMapmerges duplicateAttributeEvents. In case the Attribute path for the sameAttributableis not equal, detailed information about Attribute path is lost. Instead a genericAttributeEventcontaining just theAttributableis in the list of changed Objects (seeTransactionEvent).
In case no detailed information about an Attribute change is available, your code should completely re-process the affectedAttributable.- Specified by:
transactionFinishedin interfaceTransactionListener- Parameters:
e- the EdgeEvent detailing the changes.
-
transactionStarted
Description copied from interface:TransactionListenerCalled when a transaction has started.- Specified by:
transactionStartedin interfaceTransactionListener- Parameters:
e- the EdgeEvent detailing the changes.
-
getCurrentText
-