org.annotation.wordfreak.scheme
Interface AnnotationSchemeListener

All Known Implementing Classes:
AnnotationSchemeAdapter, ChooserComponent, Viewer, WordFreakKeyboardFocusManager

public interface AnnotationSchemeListener

This interface defines how an AnnotationScheme communicates with listening objects. Once registered with the scheme, listeners will be notified of scheme events via the methods in this interface. viewers and chooser components typically implement this interface.

See Also:
Viewer, ChooserComponent

Method Summary
 void addAnnotation(Annotation a)
          Designates that the specified annotation has been added
 void addAnnotation(Annotation a, Annotation p)
           
 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 file(AnnotationFile af)
          Notifies the listener that the specified annotation file should be presented to the user.
 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[] codes, java.awt.Color c)
           
 void markOutcomes(java.lang.String[] codes, 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[] names)
          This allows an AnnotationScheme to change the outcomes presented to the user.
 void outcomes(java.lang.String[] names, java.lang.String[] codes)
          This allows an AnnotationScheme to change the outcomes presented to the user.
 void outcomes(java.lang.String[] names, java.lang.String[] codes, java.util.Map groups)
          This allows an AnnotationScheme to change the outcomes presented to the user.
 void progress(double p)
           
 void progress(int x, int n)
           
 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 removeAnnotation(Annotation a)
          Designates that the specified annotation has been removed.
 void removeContextualMenuItems(javax.swing.JMenuItem[] menus)
           
 void select(Annotation a)
          Notifies the listner that the specified annotation should be displayed as selected.
 void select(AnnotationSelection selection)
          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 view)
          Indicates that annotations from the specified view should be processed.
 void setBackgroundColor(Annotation a, java.awt.Color c)
           
 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 setIcons(javax.swing.Icon[] icons)
           
 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 property)
          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 showRelations)
          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.
 

Method Detail

outcomes

public void outcomes(java.lang.String[] names)
This allows an AnnotationScheme to change the outcomes presented to the user.

Parameters:
names - The names for the outcome to be displayed to the user and used in the file..

outcomes

public void outcomes(java.lang.String[] names,
                     java.lang.String[] codes)
This allows an AnnotationScheme to change the outcomes presented to the user.

Parameters:
names - The names for the outcome to be displayed to the user.
codes - The string to be stored in the file for this selection.

outcomes

public void outcomes(java.lang.String[] names,
                     java.lang.String[] codes,
                     java.util.Map groups)
This allows an AnnotationScheme to change the outcomes presented to the user.

Parameters:
names - The names for the outcome to be displayed to the user.
codes - 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.

setIcons

public void setIcons(javax.swing.Icon[] icons)

file

public void file(AnnotationFile af)
Notifies the listener that the specified annotation file should be presented to the user. This may be the file that is already displayed.


annotation

public void annotation(Annotation a)
Notifies the listener to focus display the specified annotation. This may be the annotation that is currently being displayed.

Parameters:
a - The annotation to be displayed.

refresh

public void refresh(Annotation a)
Notifies the listen that the specified annotation needs to be redrawn.

Parameters:
a - The annotation that needs to be refreshed.

select

public void select(Annotation a)
Notifies the listner that the specified annotation should be displayed as selected.

Parameters:
a - the annotation to be selected.

select

public void select(Span selectionSpan)
Notifies the listner that the specified selection span should be displayed as selected.

Parameters:
selectionSpan - the span to be selected.

select

public void select(AnnotationSelection selection)
Notifies the listener that the specified selection should be displayed as selected.

Parameters:
selection - the selection to be selected.

makeVisible

public void makeVisible(Annotation a)
Notifies the listener to make sure the annotation is visible

Parameters:
a - the annotation to make visible

addStyle

public void addStyle(java.lang.String name,
                     javax.swing.text.AttributeSet as)
This allows an AnnotationScheme to change the background color for a particular annotation


setAnnotationStyle

public void setAnnotationStyle(Annotation a,
                               java.lang.String name)

setBackgroundColor

public void setBackgroundColor(Annotation a,
                               java.awt.Color c)

highlightAnnotation

public void highlightAnnotation(Annotation a,
                                java.awt.Color c)

clearAnnotationHighlights

public void clearAnnotationHighlights()

showRelations

public void showRelations(boolean showRelations)
Specifies whether the scheme wants relations to be displayed based on the specified parameter.

Parameters:
showRelations - indicates that relations should or shouldn't be displayed.

updateAnnotation

public void updateAnnotation(Annotation a)
Designates that the specified annotation has been changed.

Parameters:
a - The changed annotation.

addAnnotation

public void addAnnotation(Annotation a)
Designates that the specified annotation has been added

Parameters:
a - The added annotation.

addAnnotation

public void addAnnotation(Annotation a,
                          Annotation p)

removeAnnotation

public void removeAnnotation(Annotation a)
Designates that the specified annotation has been removed.

Parameters:
a - The annotation which is being removed.

moveAnnotation

public void moveAnnotation(Annotation a)
Designates that the specified annotation is about to be moved.

Parameters:
a - The annotation which is being moved.

progress

public void progress(int x,
                     int n)

progress

public void progress(double p)

markOutcomes

public void markOutcomes(java.lang.String[] codes,
                         java.awt.Color c)
Specifies a set of outcomes for this annotation and designates the color that should be used to disply them.


markOutcomes

public void markOutcomes(Annotation[] codes,
                         java.awt.Color c)

setColorScheme

public void setColorScheme(java.util.Map cs)
Provides a mapping between outcomes and colors for display purposes.


setProperty

public void setProperty(java.lang.String property)
Designates that the specified property should be used for displaying label information about annotations handled by the caller. By default the "type" property is used for such purposes.

Parameters:
property - the name of the property to be used as the default label property.

setProperty

public void setProperty(java.lang.String p,
                        java.lang.String s)

addProperty

public void addProperty(java.lang.String p)

addProperty

public void addProperty(java.lang.String p,
                        java.lang.String s)

setProperty

public void setProperty(DynamicFeature f)

setProperty

public void setProperty(DynamicFeature f,
                        java.lang.String s)

setProperty

public void setProperty(DynamicFeature f,
                        java.lang.String l,
                        java.lang.String s)

addProperty

public void addProperty(DynamicFeature f)

addProperty

public void addProperty(DynamicFeature f,
                        java.lang.String s)

addProperty

public void addProperty(DynamicFeature f,
                        java.lang.String l,
                        java.lang.String s)

reloadedFiles

public void reloadedFiles()
Notifies the listener that annotated files have been reloaded in the scheme and may have been changed in arbitrary ways.


refresh

public void refresh()
Notifies the listener that annotated files have been filtered in the scheme and may need to be redisplayed


setSortCriteria

public void setSortCriteria(SortCriteria sortCriteria)
Indicates that the annotations will be sorted based on the specified sort criteria.

Parameters:
sortCriteria -

setAnnotationView

public void setAnnotationView(AnnotationView view)
Indicates that annotations from the specified view should be processed. If the specified view is null then there are currently no annotations to process. Typically processing entails displaying the annotations.

Parameters:
view - The current view for the scheme.

setContextualMenuItems

public void setContextualMenuItems(javax.swing.JMenuItem[] menus)

setContextualMenuItems

public void setContextualMenuItems(javax.swing.JMenuItem[] menus,
                                   java.lang.String[] alt_names,
                                   int[] mods)

removeContextualMenuItems

public void removeContextualMenuItems(javax.swing.JMenuItem[] menus)


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