|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.annotation.wordfreak.viewer.Viewer
Abstract component which can be extended for creating most visual displays of the source media on which annotation are being made.
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 | |
protected Annotation |
currentAnnotation
The annotation currently being displayed. |
static java.lang.String |
FEATURE_NAME
|
protected java.util.List |
features
The features which should be displayed to the user by this viewer. |
protected java.lang.String |
fontName
The name of the font currently being used. |
protected java.util.Map |
groups
A mapping from group labels to the outcomes in those groups. |
static int |
HORIZONTAL
|
protected java.util.List |
labels
The strings used to label the features display by this viewer. |
static int |
NONE
|
protected java.lang.String[] |
outcomes
The display values for the choices for annotation specified by the scheme. |
static java.awt.Color |
relationColor
|
protected AnnotationSelection |
selection
The annotations which are currently selected in this viewer. |
protected java.util.List |
separators
The strings used to separate the features display by this viewer. |
protected boolean |
showRelations
Specifies whether or not this viewer should show relations. |
protected SortCriteria |
sortCriteria
The criteria by which the annotations are sorted in the view. |
protected StatusBar |
statusBar
The status bar for the viewer. |
protected int |
swipe
|
static int |
VERTICAL
|
protected AnnotationView |
view
The current view. |
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 | |
Viewer(java.lang.String type)
|
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
addAnnotation(Annotation a)
Designates that the specified annotation has been added |
void |
addAnnotation(Annotation a,
Annotation p)
|
void |
addListener(ViewerListener vl)
|
void |
addProperty(DynamicFeature f)
|
void |
addProperty(DynamicFeature f,
java.lang.String s)
|
void |
addProperty(DynamicFeature f,
java.lang.String l,
java.lang.String s)
|
void |
addProperty(java.lang.String p)
|
void |
addProperty(java.lang.String p,
java.lang.String s)
|
void |
addStyle(java.lang.String name,
javax.swing.text.AttributeSet as)
This allows an AnnotationScheme to change the
background color for a particular annotation |
void |
annotation(Annotation a)
Notifies the listener to focus display the specified annotation. |
void |
clearAnnotationHighlights()
|
void |
clearKeyMaps(javax.swing.JComponent c)
|
boolean |
colorAttributeSet(Annotation a,
javax.swing.text.SimpleAttributeSet as)
|
protected void |
copy()
|
protected void |
cut()
|
void |
deflag()
Request viewer to deflag any previously flagged attributes. |
void |
dispose()
|
boolean |
eventTranspired(java.lang.String com,
java.lang.Object source)
|
void |
file(AnnotationFile af)
Notifies the listener that the specified annotation file should be presented to the user. |
void |
flagSpan()
Request viewer to indicate that the span of the current annotation should be flaged. |
void |
flagType()
Request viewer to indicate that the type of the current annotation should be flaged. |
javax.swing.JPanel |
getContentPane()
|
java.util.Iterator |
getFeaturesIterator()
|
javax.swing.JPopupMenu |
getPopup()
Returns a viewer specific popup menu. |
int |
getSplitType()
|
void |
highlightAnnotation(Annotation a,
java.awt.Color c)
|
void |
makeVisible(Annotation a)
Notifies the listener to make sure the annotation is visible |
void |
markOutcomes(Annotation[] outs,
java.awt.Color c)
|
void |
markOutcomes(java.lang.String[] outs,
java.awt.Color c)
Specifies a set of outcomes for this annotation and designates the color that should be used to disply them. |
void |
moveAnnotation(Annotation a)
Designates that the specified annotation is about to be moved. |
void |
outcomes(java.lang.String[] codes)
This allows an AnnotationScheme to change the
outcomes presented to the user. |
void |
outcomes(java.lang.String[] o,
java.lang.String[] c)
This allows an AnnotationScheme to change the
outcomes presented to the user. |
void |
outcomes(java.lang.String[] o,
java.lang.String[] c,
java.util.Map groups)
This allows an AnnotationScheme to change the
outcomes presented to the user. |
protected void |
paste(int modifiers)
|
void |
progress(double p)
|
void |
progress(int x,
int n)
|
void |
rebuild()
Instructs the viewer to rebuild itself because the annotations have changed in arbitrary ways. |
abstract void |
refresh()
Notifies the listener that annotated files have been filtered in the scheme and may need to be redisplayed |
void |
refresh(Annotation a)
Notifies the listen that the specified annotation needs to be redrawn. |
void |
reloadedFiles()
Notifies the listener that annotated files have been reloaded in the scheme and may have been changed in arbitrary ways. |
void |
removeAnnotatedFile(AnnotationFile af)
|
void |
removeAnnotation(Annotation a)
Designates that the specified annotation has been removed. |
void |
removeContextualMenuItems(javax.swing.JMenuItem[] menus)
|
void |
removeListener(ViewerListener vl)
|
void |
select(Annotation a)
Notifies the listner that the specified annotation should be displayed as selected. |
void |
select(AnnotationSelection anns)
Notifies the listener that the specified selection should be displayed as selected. |
void |
select(Span selectionSpan)
Notifies the listner that the specified selection span should be displayed as selected. |
void |
setAnnotationStyle(Annotation a,
java.lang.String name)
|
void |
setAnnotationView(AnnotationView v)
Indicates that annotations from the specified view should be processed. |
void |
setBackgroundColor(Annotation a,
java.awt.Color c)
|
void |
setClipboard(java.lang.String str)
|
void |
setColorScheme(java.util.Map cs)
Provides a mapping between outcomes and colors for display purposes. |
void |
setContextualMenuItems(javax.swing.JMenuItem[] menus)
|
void |
setContextualMenuItems(javax.swing.JMenuItem[] menus,
java.lang.String[] alt_names,
int[] mods)
|
void |
setFontSize(int size)
Sets the font used by the viewer to the specified size. |
void |
setFontType(java.lang.String fontName)
Set the name of the font used by the viewer to the specified font name. |
void |
setGuiListener(GuiListener gl)
|
void |
setIcons(javax.swing.Icon[] icons)
|
void |
setKeyboardComponent(java.awt.Component c)
|
void |
setKeyBuffer(java.lang.String s)
|
void |
setLayout(java.awt.LayoutManager lm)
|
void |
setProperty(DynamicFeature f)
|
void |
setProperty(DynamicFeature f,
java.lang.String s)
|
void |
setProperty(DynamicFeature f,
java.lang.String l,
java.lang.String s)
|
void |
setProperty(java.lang.String p)
Designates that the specified property should be used for displaying label information about annotations handled by the caller. |
void |
setProperty(java.lang.String p,
java.lang.String s)
|
void |
setSortCriteria(SortCriteria sortCriteria)
Indicates that the annotations will be sorted based on the specified sort criteria. |
void |
showRelations(boolean b)
Specifies whether the scheme wants relations to be displayed based on the specified parameter. |
void |
updateAnnotation(Annotation a)
Designates that the specified annotation has been changed. |
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, 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 |
Field Detail |
protected java.util.List features
protected java.util.List separators
protected java.util.List labels
protected AnnotationSelection selection
protected int swipe
protected java.lang.String[] outcomes
protected boolean showRelations
public static final java.awt.Color relationColor
protected AnnotationView view
protected java.lang.String fontName
protected SortCriteria sortCriteria
protected Annotation currentAnnotation
protected java.util.Map groups
public static final java.lang.String FEATURE_NAME
public static final int HORIZONTAL
public static final int VERTICAL
public static final int NONE
protected StatusBar statusBar
Constructor Detail |
public Viewer(java.lang.String type)
Method Detail |
public void dispose()
public int getSplitType()
public javax.swing.JPopupMenu getPopup()
public void clearKeyMaps(javax.swing.JComponent c)
public void setKeyboardComponent(java.awt.Component c)
public void setLayout(java.awt.LayoutManager lm)
public void setColorScheme(java.util.Map cs)
AnnotationSchemeListener
setColorScheme
in interface AnnotationSchemeListener
public boolean colorAttributeSet(Annotation a, javax.swing.text.SimpleAttributeSet as)
public void setProperty(java.lang.String p)
AnnotationSchemeListener
setProperty
in interface AnnotationSchemeListener
p
- the name of the property to be used as the default label property.public void setProperty(java.lang.String p, java.lang.String s)
setProperty
in interface AnnotationSchemeListener
public void addProperty(java.lang.String p)
addProperty
in interface AnnotationSchemeListener
public void addProperty(java.lang.String p, java.lang.String s)
addProperty
in interface AnnotationSchemeListener
public void setProperty(DynamicFeature f)
setProperty
in interface AnnotationSchemeListener
public void setProperty(DynamicFeature f, java.lang.String s)
setProperty
in interface AnnotationSchemeListener
public void setProperty(DynamicFeature f, java.lang.String l, java.lang.String s)
setProperty
in interface AnnotationSchemeListener
public void addProperty(DynamicFeature f)
addProperty
in interface AnnotationSchemeListener
public void addProperty(DynamicFeature f, java.lang.String s)
addProperty
in interface AnnotationSchemeListener
public void addProperty(DynamicFeature f, java.lang.String l, java.lang.String s)
addProperty
in interface AnnotationSchemeListener
public java.util.Iterator getFeaturesIterator()
public void setSortCriteria(SortCriteria sortCriteria)
AnnotationSchemeListener
setSortCriteria
in interface AnnotationSchemeListener
sortCriteria
- public abstract void refresh()
AnnotationSchemeListener
refresh
in interface AnnotationSchemeListener
public void refresh(Annotation a)
AnnotationSchemeListener
refresh
in interface AnnotationSchemeListener
a
- The annotation that needs to be refreshed.public void file(AnnotationFile af)
AnnotationSchemeListener
file
in interface AnnotationSchemeListener
public void annotation(Annotation a)
AnnotationSchemeListener
annotation
in interface AnnotationSchemeListener
a
- The annotation to be displayed.public void flagType()
flagSpan()
,
deflag()
public void flagSpan()
flagType()
,
deflag()
public void deflag()
flagType()
,
flagSpan()
public void select(Annotation a)
AnnotationSchemeListener
select
in interface AnnotationSchemeListener
a
- the annotation to be selected.public void select(Span selectionSpan)
AnnotationSchemeListener
select
in interface AnnotationSchemeListener
selectionSpan
- the span to be selected.public void select(AnnotationSelection anns)
AnnotationSchemeListener
select
in interface AnnotationSchemeListener
anns
- the selection to be selected.public void makeVisible(Annotation a)
AnnotationSchemeListener
makeVisible
in interface AnnotationSchemeListener
a
- the annotation to make visiblepublic void addStyle(java.lang.String name, javax.swing.text.AttributeSet as)
AnnotationSchemeListener
AnnotationScheme
to change the
background color for a particular annotation
addStyle
in interface AnnotationSchemeListener
public void setAnnotationStyle(Annotation a, java.lang.String name)
setAnnotationStyle
in interface AnnotationSchemeListener
public void setBackgroundColor(Annotation a, java.awt.Color c)
setBackgroundColor
in interface AnnotationSchemeListener
public void highlightAnnotation(Annotation a, java.awt.Color c)
highlightAnnotation
in interface AnnotationSchemeListener
public void clearAnnotationHighlights()
clearAnnotationHighlights
in interface AnnotationSchemeListener
public void showRelations(boolean b)
AnnotationSchemeListener
showRelations
in interface AnnotationSchemeListener
b
- indicates that relations should or shouldn't be displayed.public void updateAnnotation(Annotation a)
AnnotationSchemeListener
updateAnnotation
in interface AnnotationSchemeListener
a
- The changed annotation.public void addAnnotation(Annotation a, Annotation p)
addAnnotation
in interface AnnotationSchemeListener
public void addAnnotation(Annotation a)
AnnotationSchemeListener
addAnnotation
in interface AnnotationSchemeListener
a
- The added annotation.public void removeAnnotation(Annotation a)
AnnotationSchemeListener
removeAnnotation
in interface AnnotationSchemeListener
a
- The annotation which is being removed.public void moveAnnotation(Annotation a)
AnnotationSchemeListener
moveAnnotation
in interface AnnotationSchemeListener
a
- The annotation which is being moved.public void removeAnnotatedFile(AnnotationFile af)
public void reloadedFiles()
AnnotationSchemeListener
reloadedFiles
in interface AnnotationSchemeListener
public void rebuild()
public void setAnnotationView(AnnotationView v)
AnnotationSchemeListener
null
then there are currently no annotations to process.
Typically processing entails displaying the annotations.
setAnnotationView
in interface AnnotationSchemeListener
v
- The current view for the scheme.public void progress(int x, int n)
progress
in interface AnnotationSchemeListener
public void progress(double p)
progress
in interface AnnotationSchemeListener
public javax.swing.JPanel getContentPane()
public void addListener(ViewerListener vl)
public void removeListener(ViewerListener vl)
public void setGuiListener(GuiListener gl)
public void setIcons(javax.swing.Icon[] icons)
setIcons
in interface AnnotationSchemeListener
public void outcomes(java.lang.String[] codes)
AnnotationSchemeListener
AnnotationScheme
to change the
outcomes presented to the user.
outcomes
in interface AnnotationSchemeListener
codes
- The names for the outcome to be displayed to the user and used in the file..public void outcomes(java.lang.String[] o, java.lang.String[] c)
AnnotationSchemeListener
AnnotationScheme
to change the
outcomes presented to the user.
outcomes
in interface AnnotationSchemeListener
o
- The names for the outcome to be displayed to the user.c
- The string to be stored in the file for this selection.public void outcomes(java.lang.String[] o, java.lang.String[] c, java.util.Map groups)
AnnotationSchemeListener
AnnotationScheme
to change the
outcomes presented to the user.
outcomes
in interface AnnotationSchemeListener
o
- The names for the outcome to be displayed to the user.c
- The string to be stored in the file for this selection.groups
- A mapping from group labels to a set of names for that group.public void setContextualMenuItems(javax.swing.JMenuItem[] menus)
setContextualMenuItems
in interface AnnotationSchemeListener
public void setContextualMenuItems(javax.swing.JMenuItem[] menus, java.lang.String[] alt_names, int[] mods)
setContextualMenuItems
in interface AnnotationSchemeListener
public void removeContextualMenuItems(javax.swing.JMenuItem[] menus)
removeContextualMenuItems
in interface AnnotationSchemeListener
public void markOutcomes(java.lang.String[] outs, java.awt.Color c)
AnnotationSchemeListener
markOutcomes
in interface AnnotationSchemeListener
public void markOutcomes(Annotation[] outs, java.awt.Color c)
markOutcomes
in interface AnnotationSchemeListener
public void setFontSize(int size)
public void setFontType(java.lang.String fontName)
fontName
- The name of the font that the viewer should use.protected void cut()
protected void copy()
protected void paste(int modifiers)
public void setClipboard(java.lang.String str)
public void setKeyBuffer(java.lang.String s)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public boolean eventTranspired(java.lang.String com, java.lang.Object source)
eventTranspired
in interface EventListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |