edu.northwestern.at.wordhoard.model.annotations
Class TextAnnotation

java.lang.Object
  extended by edu.northwestern.at.wordhoard.model.annotations.Annotation
      extended by edu.northwestern.at.wordhoard.model.annotations.TextAnnotation
All Implemented Interfaces:
Attachment, TextAttachment, PersistentObject

public class TextAnnotation
extends Annotation
implements TextAttachment

A text annotation.

Each text annotation has the following attributes in addition to those defined for annotations in general.


Field Summary
protected  TextRange target
          The target of the annotation - the range of text to which it is attached.
protected  WorkPart workPart
          The work part to which this annotation is attached.
 
Fields inherited from class edu.northwestern.at.wordhoard.model.annotations.Annotation
category, id, text
 
Constructor Summary
TextAnnotation()
          Creates a new text annotation.
 
Method Summary
 TextRange getTarget()
          Gets the target.
 WorkPart getWorkPart()
          Gets the work part.
 void setTarget(TextRange target)
          Sets the target.
 void setWorkPart(WorkPart workPart)
          Sets the work part.
 
Methods inherited from class edu.northwestern.at.wordhoard.model.annotations.Annotation
equals, getCategory, getId, getText, hashCode, setCategory, setText
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.northwestern.at.wordhoard.model.annotations.Attachment
equals, getCategory, getId, getText, hashCode, setCategory, setText
 

Field Detail

workPart

protected WorkPart workPart
The work part to which this annotation is attached.


target

protected TextRange target
The target of the annotation - the range of text to which it is attached.

Constructor Detail

TextAnnotation

public TextAnnotation()
Creates a new text annotation.

Method Detail

getWorkPart

public WorkPart getWorkPart()
Gets the work part.

Specified by:
getWorkPart in interface TextAttachment
Returns:
The work part.

setWorkPart

public void setWorkPart(WorkPart workPart)
Sets the work part.

Specified by:
setWorkPart in interface TextAttachment
Parameters:
workPart - The work part.

getTarget

public TextRange getTarget()
Gets the target.

Specified by:
getTarget in interface TextAttachment
Returns:
The target - the range of text to which this annotation is attached.

setTarget

public void setTarget(TextRange target)
Sets the target.

Specified by:
setTarget in interface TextAttachment
Parameters:
target - The target - the range of text to which this annotation is attached.