org.annotation.wordfreak.scheme
Class ConstituentAnnotationScheme

java.lang.Object
  extended byorg.annotation.wordfreak.scheme.AnnotationScheme
      extended byorg.annotation.wordfreak.scheme.DerivativeAnnotationScheme
          extended byorg.annotation.wordfreak.scheme.ConstituentAnnotationScheme
All Implemented Interfaces:
java.awt.event.ActionListener, AnnotatedFileListener, ChooserListener, java.util.EventListener, Plugin, javax.swing.event.TreeModelListener, UndoListener, ViewerListener, WordFreakKeyboardFocusManager.HotKeyListener

public class ConstituentAnnotationScheme
extends DerivativeAnnotationScheme
implements java.awt.event.ActionListener


Nested Class Summary
 
Nested classes inherited from class org.annotation.wordfreak.scheme.AnnotationScheme
AnnotationScheme.POSFeature
 
Field Summary
static java.lang.String ADDTRACE
           
static java.lang.String GAPREF
           
static java.lang.String LINKTRACE
           
static java.lang.String NPSBJ
           
static java.lang.String REMREF
           
static java.lang.String REMROLES
           
static java.lang.String ROLES
           
static java.lang.String TRACEREF
           
 
Fields inherited from class org.annotation.wordfreak.scheme.DerivativeAnnotationScheme
canCreateChains, deleteParagraphs, matcher, pattern, preprocess, recursive
 
Fields inherited from class org.annotation.wordfreak.scheme.AnnotationScheme
_ADD, _MOVE, _RELOAD, _REMOVE, _UPDATE, ANNOTATE, annotationFilter, annotator, annotatorName, canCreateAnnotations, chooser, chooserWidth, COADJUST, COADJUSTLEFT, COADJUSTRIGHT, codes, coloredWords, colors, colorTable, COMMENT, config, configLoaded, confineToBase, currentFile, DEFAULT_ACTION, defaultType, END, files, findIndex, FLATLEFT, FLATNEXT, FLATPREV, FLATRIGHT, GROWLEFT, GROWRIGHT, guiListener, HOME, icons, index, INSERT, JUMP, L2R, LEFT, listeners, navigator, NEXT, NEXTCHUNK, NORM, one2one, one2oneFeature, one2oneValue, orientation, OUTCOME_CODES, OUTCOME_COLORS, OUTCOME_NAMES, outcomes, PREV, PREVCHUNK, R2L, REMOVE, RIGHT, selectedAnnotations, selEnd, selStart, SHRINKLEFT, SHRINKRIGHT, sortCriteria, sorted, sortedIndex, SPLIT, splita, splitb, type, typeMap, typeName, types, update, UPDATE, view, views
 
Constructor Summary
ConstituentAnnotationScheme(java.lang.String type)
           
ConstituentAnnotationScheme(java.lang.String type, Chooser c)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addAnnotationSchemeListener(AnnotationSchemeListener al)
          Registers the specified listener for annotation scheme callbacks.
 boolean adjudicationMatch(Annotation a, java.lang.Object ao, Annotation b, java.lang.Object bo)
           
protected  void createChooser()
          Instantiates a new chooser if one does not already exist and registers the chooser for scheme events and the scheme for chooser events.
static java.lang.String[] getNames()
          Returns the list of Strings that can be passed to the contsructor to specify which scheme behavior to use.
 boolean handlesAnnotation(Annotation ann)
           
 boolean handlesBaseAnnotation(Annotation ann)
           
protected  void initOutcomes()
          Initalizes the set of outcomes that this scheme can assign an annotation.
 boolean isOutcome(java.lang.String choice)
           
 boolean linkAnnotation(Annotation source, Annotation target, int modifiers)
          Requests that the specified source annotation be linked to the specified target annotation given the modifiers.
protected  void process(Annotation a)
           
 void removeAnnotationSchemeListener(AnnotationSchemeListener al)
          Unregisters the specified listener from the annotation scheme callbacks.
 void set(java.lang.String choice, int modifiers, boolean jump)
          Specifies that the specified choice has been selected with the specified modifier and that the next annotation should be shown.
 void setSelection(AnnotationSelection anns, boolean validate)
          Requests that the specified annotation selection should be set as the current selection and adjusted if the specified validate condition is true.
 void trackAnnotation(Annotation ann)
           
 void updateOutcomes(Annotation a)
          Changes the possible outcomes or their order as appropiate.
 
Methods inherited from class org.annotation.wordfreak.scheme.DerivativeAnnotationScheme
addAnnotation, addAnnotation, annotatedFile, annotationFromMouse, findExpression, findExpressionAgain, getInsertCommandFromSelection, getPreprocessing, makeVisible, moveAnnotation, next, offsetToIndex, prev, process, removeAnnotation, removeAnnotation, removeRedundantChildren, replaceChildrenWithParent, selectCurrentAnnotation, set, setAnnotation, setPreprocessing, setSelection, unstyleAnnotation
 
Methods inherited from class org.annotation.wordfreak.scheme.AnnotationScheme
adjudicationMatch, annotationFromMouse, annotationFromMouse, buildSwatches, closeAnnotatedFile, colorize, createView, dispose, down, end, filter, flatNext, flatPrev, getAdjudicationData, getAnnotation, getAnnotation, getAnnotationFilter, getAnnotationsFromFile, getAnnotationsFromOffsets, getAnnotationSize, getChooser, getColorScheme, getConfineToBase, getCurrentAnnotation, getDefaultType, getPropertyName, getSelectionMode, getSortedIndex, getValuesForFeature, handlesRelation, hilightChunk, home, hotKeyPressed, indexOfAnnotation, jumpToMark, nextFile, nextOutcome, notifyListeners, notifyListeners, prevFile, prevOutcome, redoPerformed, reload, reloadFiles, removeAllAnnotationSchemeListeners, set, set, setAnnotatedFile, setAnnotationFilter, setAnnotationView, setAnnotator, setAnnotatorName, setChooser, setChunkNavigation, setConfig, setConfineToBase, setFeature, setGuiListener, setJumpAfterAnnotation, setMark, setNavigator, setOneToOne, setOneToOne, setOrientation, setSelectionEnd, setSelectionMode, setSelectionStart, setSelEnd, setSortedIndex, setSortScheme, setTypeName, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged, undoPerformed, up, viewCreated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLES

public static final java.lang.String ROLES
See Also:
Constant Field Values

TRACEREF

public static final java.lang.String TRACEREF
See Also:
Constant Field Values

GAPREF

public static final java.lang.String GAPREF
See Also:
Constant Field Values

ADDTRACE

public static final java.lang.String ADDTRACE
See Also:
Constant Field Values

NPSBJ

public static final java.lang.String NPSBJ
See Also:
Constant Field Values

LINKTRACE

public static final java.lang.String LINKTRACE
See Also:
Constant Field Values

REMREF

public static final java.lang.String REMREF
See Also:
Constant Field Values

REMROLES

public static final java.lang.String REMROLES
See Also:
Constant Field Values
Constructor Detail

ConstituentAnnotationScheme

public ConstituentAnnotationScheme(java.lang.String type)

ConstituentAnnotationScheme

public ConstituentAnnotationScheme(java.lang.String type,
                                   Chooser c)
Method Detail

getNames

public static java.lang.String[] getNames()
Description copied from class: AnnotationScheme
Returns the list of Strings that can be passed to the contsructor to specify which scheme behavior to use.


initOutcomes

protected void initOutcomes()
Description copied from class: AnnotationScheme
Initalizes the set of outcomes that this scheme can assign an annotation.

Specified by:
initOutcomes in class AnnotationScheme

createChooser

protected void createChooser()
Description copied from class: AnnotationScheme
Instantiates a new chooser if one does not already exist and registers the chooser for scheme events and the scheme for chooser events.

Overrides:
createChooser in class DerivativeAnnotationScheme

addAnnotationSchemeListener

public void addAnnotationSchemeListener(AnnotationSchemeListener al)
Description copied from class: AnnotationScheme
Registers the specified listener for annotation scheme callbacks.

Overrides:
addAnnotationSchemeListener in class AnnotationScheme
Parameters:
al - The object that will recieve the callbacks.

removeAnnotationSchemeListener

public void removeAnnotationSchemeListener(AnnotationSchemeListener al)
Description copied from class: AnnotationScheme
Unregisters the specified listener from the annotation scheme callbacks.

Overrides:
removeAnnotationSchemeListener in class AnnotationScheme
Parameters:
al - The object which will no longer recieve annotation scheme callbacks.

linkAnnotation

public boolean linkAnnotation(Annotation source,
                              Annotation target,
                              int modifiers)
Description copied from interface: ViewerListener
Requests that the specified source annotation be linked to the specified target annotation given the modifiers. This behavior can be used for arbitray actions in viewers which involve two annotations. Currently it is used for annotating traces in ConstituentAnnotaitonScheme.

Specified by:
linkAnnotation in interface ViewerListener
Overrides:
linkAnnotation in class AnnotationScheme

trackAnnotation

public void trackAnnotation(Annotation ann)
Overrides:
trackAnnotation in class AnnotationScheme

handlesAnnotation

public boolean handlesAnnotation(Annotation ann)
Overrides:
handlesAnnotation in class AnnotationScheme

handlesBaseAnnotation

public boolean handlesBaseAnnotation(Annotation ann)
Overrides:
handlesBaseAnnotation in class DerivativeAnnotationScheme

adjudicationMatch

public boolean adjudicationMatch(Annotation a,
                                 java.lang.Object ao,
                                 Annotation b,
                                 java.lang.Object bo)
Overrides:
adjudicationMatch in class AnnotationScheme

setSelection

public void setSelection(AnnotationSelection anns,
                         boolean validate)
Description copied from interface: ViewerListener
Requests that the specified annotation selection should be set as the current selection and adjusted if the specified validate condition is true.

Specified by:
setSelection in interface ViewerListener
Overrides:
setSelection in class DerivativeAnnotationScheme

process

protected void process(Annotation a)
Overrides:
process in class AnnotationScheme

isOutcome

public boolean isOutcome(java.lang.String choice)
Overrides:
isOutcome in class AnnotationScheme

set

public void set(java.lang.String choice,
                int modifiers,
                boolean jump)
Description copied from interface: ChooserListener
Specifies that the specified choice has been selected with the specified modifier and that the next annotation should be shown.

Specified by:
set in interface ChooserListener
Overrides:
set in class AnnotationScheme

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

updateOutcomes

public void updateOutcomes(Annotation a)
Description copied from class: AnnotationScheme
Changes the possible outcomes or their order as appropiate.

Overrides:
updateOutcomes in class AnnotationScheme


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