org.annotation.wordfreak.viewer
Class StatusBar

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byorg.annotation.wordfreak.viewer.StatusBar
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class StatusBar
extends javax.swing.JPanel

Represents the status bar used in viewers.

See Also:
Viewer, 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
 
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(javax.swing.JPopupMenu popup)
          Creates a new status bar with the specified popup menu button.
 
Method Summary
 void deflagSpan()
          Tells this status bar that the type is currently being flagged.
 void deflagType()
          Tells this status bar to deflag the type.
 void flagSpan()
          Tells this status bar that the span is currently being flagged.
 void flagType()
          Tells this status bar to flag the type.
 void resetKeyStrokes()
          Tells this status bar that keys are no longer being typed into the viewer.
 void setAnnotation(Annotation annotation, AnnotationView view, java.util.List features, java.util.List separators)
          Tells the status bar that the specified annotation is the currently displayed annotation.
 void setAnnotator(java.lang.String annotator)
          Tells this status bar that the annotation currently being displayed has the specified annotator.
 void setConfidence(double confidence)
          Tells this status bar that the annotation currently being displayed has the specified confidence.
 void setFileIcon(javax.swing.Icon fileIcon)
          Tells this status bar to that the specified file icon is associated with the file currently being displayed.
 void setFileName(java.lang.String fileName)
          Tells this status bar that the specified file name is the one currently being displayed.
 void setKeyStrokes(java.lang.String keys)
          Tells this status bar that the specified keys are being typed in to the viewer.
 void setProgress(double percentage)
          Tells this status bar that the annotation currently being displayed is locatated at specified percentage in the view.
 void setProgress(int x, int n)
          Tells the status bar that the currently display annotation is the xth annotation of n in the view.
 void setSelection(Span selection)
          Tells this status bar that the specific span is currently being selected.
 void setSpan(Annotation[] chain)
          Tells this status bar that the annotation currently being displayed has the specified chain.
 void setSpan(Span span)
          Tells this status bar that the annotation currently being displayed has the specified span.
 void setType(java.lang.String type)
          Tells this status bar that the annotation currently being displayed has the specified type.
 
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
 

Constructor Detail

StatusBar

public StatusBar(javax.swing.JPopupMenu popup)
Creates a new status bar with the specified popup menu button.

Parameters:
popup - The popup menu which will be displayed from the status bar popup button. If this value is null then no pop up button will be added to the status bar.
Method Detail

setFileName

public void setFileName(java.lang.String fileName)
Tells this status bar that the specified file name is the one currently being displayed. The status bar may adjust the text of the name to best fit its size constraints.

Parameters:
fileName - The file name of the current file.

setFileIcon

public void setFileIcon(javax.swing.Icon fileIcon)
Tells this status bar to that the specified file icon is associated with the file currently being displayed.

Parameters:
fileIcon - The file icon of the current file.

setKeyStrokes

public void setKeyStrokes(java.lang.String keys)
Tells this status bar that the specified keys are being typed in to the viewer.

Parameters:
keys - The keys being typed in the viewer.

resetKeyStrokes

public void resetKeyStrokes()
Tells this status bar that keys are no longer being typed into the viewer.


setSpan

public void setSpan(Span span)
Tells this status bar that the annotation currently being displayed has the specified span.

Parameters:
span - The span of the annotation begin displayed.

setSpan

public void setSpan(Annotation[] chain)
Tells this status bar that the annotation currently being displayed has the specified chain.

Parameters:
chain - The chain of the annotation begin displayed.

setSelection

public void setSelection(Span selection)
Tells this status bar that the specific span is currently being selected.

Parameters:
selection - The span of the current selection.

flagSpan

public void flagSpan()
Tells this status bar that the span is currently being flagged.


deflagSpan

public void deflagSpan()
Tells this status bar that the type is currently being flagged.


setType

public void setType(java.lang.String type)
Tells this status bar that the annotation currently being displayed has the specified type.

Parameters:
type - The type of the annotation currently being displayed.

setAnnotator

public void setAnnotator(java.lang.String annotator)
Tells this status bar that the annotation currently being displayed has the specified annotator.

Parameters:
annotator - The annotator of the annotation currently being displayed.

setConfidence

public void setConfidence(double confidence)
Tells this status bar that the annotation currently being displayed has the specified confidence.

Parameters:
confidence - The confidence of the annotation currently being displayed.

setProgress

public void setProgress(double percentage)
Tells this status bar that the annotation currently being displayed is locatated at specified percentage in the view.

Parameters:
percentage - The percentage of annotations out of all annotation in the view which come before and include the currently displayed annotation.

setProgress

public void setProgress(int x,
                        int n)
Tells the status bar that the currently display annotation is the xth annotation of n in the view.

Parameters:
x - The index of the currently displayed annotation.
n - The number of annotations in the view.

setAnnotation

public void setAnnotation(Annotation annotation,
                          AnnotationView view,
                          java.util.List features,
                          java.util.List separators)
Tells the status bar that the specified annotation is the currently displayed annotation.

Parameters:
annotation - The currently display annotation.
view - The currently displayed view.
features - The list of annotation features to be displayed.
separators - The list if separator to be used in the display of features.

flagType

public void flagType()
Tells this status bar to flag the type.


deflagType

public void deflagType()
Tells this status bar to deflag the type.



Copyright © 2004 Thomas Morton and Jeremy LaCivita. All Rights Reserved.