org.annotation.wordfreak.scheme
Class AnnotationSchemeAdapter

java.lang.Object
  extended byorg.annotation.wordfreak.scheme.AnnotationSchemeAdapter
All Implemented Interfaces:
AnnotationSchemeListener

public class AnnotationSchemeAdapter
extends java.lang.Object
implements AnnotationSchemeListener


Constructor Summary
AnnotationSchemeAdapter()
           
 
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 f)
           
 void addProperty(java.lang.String f, 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 removeAnnotatedFile(AnnotationFile af)
           
 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 annotations)
          Notifies the listener that the specified selection should be displayed as selected.
 void select(Span s)
          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 f)
          Designates that the specified property should be used for displaying label information about annotations handled by the caller.
 void setProperty(java.lang.String f, java.lang.String s)
           
 void setSortCriteria(SortCriteria s)
          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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationSchemeAdapter

public AnnotationSchemeAdapter()
Method Detail

outcomes

public void outcomes(java.lang.String[] names)
Description copied from interface: AnnotationSchemeListener
This allows an AnnotationScheme to change the outcomes presented to the user.

Specified by:
outcomes in interface AnnotationSchemeListener
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)
Description copied from interface: AnnotationSchemeListener
This allows an AnnotationScheme to change the outcomes presented to the user.

Specified by:
outcomes in interface AnnotationSchemeListener
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)
Description copied from interface: AnnotationSchemeListener
This allows an AnnotationScheme to change the outcomes presented to the user.

Specified by:
outcomes in interface AnnotationSchemeListener
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)
Specified by:
setIcons in interface AnnotationSchemeListener

file

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

Specified by:
file in interface AnnotationSchemeListener

annotation

public void annotation(Annotation a)
Description copied from interface: AnnotationSchemeListener
Notifies the listener to focus display the specified annotation. This may be the annotation that is currently being displayed.

Specified by:
annotation in interface AnnotationSchemeListener
Parameters:
a - The annotation to be displayed.

refresh

public void refresh(Annotation a)
Description copied from interface: AnnotationSchemeListener
Notifies the listen that the specified annotation needs to be redrawn.

Specified by:
refresh in interface AnnotationSchemeListener
Parameters:
a - The annotation that needs to be refreshed.

select

public void select(Annotation a)
Description copied from interface: AnnotationSchemeListener
Notifies the listner that the specified annotation should be displayed as selected.

Specified by:
select in interface AnnotationSchemeListener
Parameters:
a - the annotation to be selected.

select

public void select(Span s)
Description copied from interface: AnnotationSchemeListener
Notifies the listner that the specified selection span should be displayed as selected.

Specified by:
select in interface AnnotationSchemeListener
Parameters:
s - the span to be selected.

select

public void select(AnnotationSelection annotations)
Description copied from interface: AnnotationSchemeListener
Notifies the listener that the specified selection should be displayed as selected.

Specified by:
select in interface AnnotationSchemeListener
Parameters:
annotations - the selection to be selected.

addStyle

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

Specified by:
addStyle in interface AnnotationSchemeListener

setAnnotationStyle

public void setAnnotationStyle(Annotation a,
                               java.lang.String name)
Specified by:
setAnnotationStyle in interface AnnotationSchemeListener

setBackgroundColor

public void setBackgroundColor(Annotation a,
                               java.awt.Color c)
Specified by:
setBackgroundColor in interface AnnotationSchemeListener

highlightAnnotation

public void highlightAnnotation(Annotation a,
                                java.awt.Color c)
Specified by:
highlightAnnotation in interface AnnotationSchemeListener

clearAnnotationHighlights

public void clearAnnotationHighlights()
Specified by:
clearAnnotationHighlights in interface AnnotationSchemeListener

showRelations

public void showRelations(boolean b)
Description copied from interface: AnnotationSchemeListener
Specifies whether the scheme wants relations to be displayed based on the specified parameter.

Specified by:
showRelations in interface AnnotationSchemeListener
Parameters:
b - indicates that relations should or shouldn't be displayed.

updateAnnotation

public void updateAnnotation(Annotation a)
Description copied from interface: AnnotationSchemeListener
Designates that the specified annotation has been changed.

Specified by:
updateAnnotation in interface AnnotationSchemeListener
Parameters:
a - The changed annotation.

addAnnotation

public void addAnnotation(Annotation a)
Description copied from interface: AnnotationSchemeListener
Designates that the specified annotation has been added

Specified by:
addAnnotation in interface AnnotationSchemeListener
Parameters:
a - The added annotation.

addAnnotation

public void addAnnotation(Annotation a,
                          Annotation p)
Specified by:
addAnnotation in interface AnnotationSchemeListener

removeAnnotation

public void removeAnnotation(Annotation a)
Description copied from interface: AnnotationSchemeListener
Designates that the specified annotation has been removed.

Specified by:
removeAnnotation in interface AnnotationSchemeListener
Parameters:
a - The annotation which is being removed.

moveAnnotation

public void moveAnnotation(Annotation a)
Description copied from interface: AnnotationSchemeListener
Designates that the specified annotation is about to be moved.

Specified by:
moveAnnotation in interface AnnotationSchemeListener
Parameters:
a - The annotation which is being moved.

removeAnnotatedFile

public void removeAnnotatedFile(AnnotationFile af)

progress

public void progress(int x,
                     int n)
Specified by:
progress in interface AnnotationSchemeListener

progress

public void progress(double p)
Specified by:
progress in interface AnnotationSchemeListener

markOutcomes

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

Specified by:
markOutcomes in interface AnnotationSchemeListener

markOutcomes

public void markOutcomes(Annotation[] codes,
                         java.awt.Color c)
Specified by:
markOutcomes in interface AnnotationSchemeListener

setColorScheme

public void setColorScheme(java.util.Map cs)
Description copied from interface: AnnotationSchemeListener
Provides a mapping between outcomes and colors for display purposes.

Specified by:
setColorScheme in interface AnnotationSchemeListener

setProperty

public void setProperty(java.lang.String f)
Description copied from interface: AnnotationSchemeListener
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.

Specified by:
setProperty in interface AnnotationSchemeListener
Parameters:
f - the name of the property to be used as the default label property.

setProperty

public void setProperty(java.lang.String f,
                        java.lang.String s)
Specified by:
setProperty in interface AnnotationSchemeListener

addProperty

public void addProperty(java.lang.String f)
Specified by:
addProperty in interface AnnotationSchemeListener

addProperty

public void addProperty(java.lang.String f,
                        java.lang.String s)
Specified by:
addProperty in interface AnnotationSchemeListener

setProperty

public void setProperty(DynamicFeature f)
Specified by:
setProperty in interface AnnotationSchemeListener

setProperty

public void setProperty(DynamicFeature f,
                        java.lang.String s)
Specified by:
setProperty in interface AnnotationSchemeListener

setProperty

public void setProperty(DynamicFeature f,
                        java.lang.String l,
                        java.lang.String s)
Specified by:
setProperty in interface AnnotationSchemeListener

addProperty

public void addProperty(DynamicFeature f)
Specified by:
addProperty in interface AnnotationSchemeListener

addProperty

public void addProperty(DynamicFeature f,
                        java.lang.String s)
Specified by:
addProperty in interface AnnotationSchemeListener

addProperty

public void addProperty(DynamicFeature f,
                        java.lang.String l,
                        java.lang.String s)
Specified by:
addProperty in interface AnnotationSchemeListener

reloadedFiles

public void reloadedFiles()
Description copied from interface: AnnotationSchemeListener
Notifies the listener that annotated files have been reloaded in the scheme and may have been changed in arbitrary ways.

Specified by:
reloadedFiles in interface AnnotationSchemeListener

refresh

public void refresh()
Description copied from interface: AnnotationSchemeListener
Notifies the listener that annotated files have been filtered in the scheme and may need to be redisplayed

Specified by:
refresh in interface AnnotationSchemeListener

setSortCriteria

public void setSortCriteria(SortCriteria s)
Description copied from interface: AnnotationSchemeListener
Indicates that the annotations will be sorted based on the specified sort criteria.

Specified by:
setSortCriteria in interface AnnotationSchemeListener
Parameters:
s -

setAnnotationView

public void setAnnotationView(AnnotationView view)
Description copied from interface: AnnotationSchemeListener
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.

Specified by:
setAnnotationView in interface AnnotationSchemeListener
Parameters:
view - The current view for the scheme.

setContextualMenuItems

public void setContextualMenuItems(javax.swing.JMenuItem[] menus)
Specified by:
setContextualMenuItems in interface AnnotationSchemeListener

setContextualMenuItems

public void setContextualMenuItems(javax.swing.JMenuItem[] menus,
                                   java.lang.String[] alt_names,
                                   int[] mods)
Specified by:
setContextualMenuItems in interface AnnotationSchemeListener

removeContextualMenuItems

public void removeContextualMenuItems(javax.swing.JMenuItem[] menus)
Specified by:
removeContextualMenuItems in interface AnnotationSchemeListener

makeVisible

public void makeVisible(Annotation a)
Description copied from interface: AnnotationSchemeListener
Notifies the listener to make sure the annotation is visible

Specified by:
makeVisible in interface AnnotationSchemeListener
Parameters:
a - the annotation to make visible


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