|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.wordhoard.swing.annotations.AnnotationModel
public class AnnotationModel
An annotation model.
Each
annotation window has a model which maintains the following state
information for the annotations in the window:
Window components register
listeners on the model to listen for and react appropriately to changes
in the annotation state.
| Constructor Summary | |
|---|---|
AnnotationModel()
Creates a new annotation model. |
|
| Method Summary | |
|---|---|
void |
addListener(AnnotationListener listener)
Adds a listener. |
void |
clear()
Clears the annotations. |
Attachment[] |
getAnnotations()
Gets the annotations. |
java.lang.String |
getExtraMessage()
Gets the extra message. |
int |
getIndex()
Gets the index of the current annotation. |
java.lang.String |
getNoAnnotationsMessage()
Gets the no annotations message. |
int |
getNumAnnotations()
Gets the number of annotations. |
boolean |
markersShown()
Returns true if markers are shown. |
void |
next()
Goes to to the next annotation. |
boolean |
panelShown()
Returns true if the annotation panel is shown. |
void |
prev()
Goes to the previous annotation. |
void |
removeListener(AnnotationListener listener)
Removes a listener. |
void |
resetAnnotations()
resets the annotations. |
void |
setAnnotations(Attachment[] annotations)
Sets the annotations. |
void |
setExtraMessage(java.lang.String message)
Sets the extra message. |
void |
setIndex(int index)
Sets the index of the current annotation. |
void |
setNoAnnotationsMessage(java.lang.String message)
Sets the no annotations message. |
void |
showMarkers(boolean show)
Shows or hides annnotation markers. |
void |
showPanel(boolean show)
Shows or hides the annotation panel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationModel()
| Method Detail |
|---|
public boolean markersShown()
public void showMarkers(boolean show)
throws PersistenceException
show - True to show markers, false to hide them.
PersistenceException public boolean panelShown()
public void showPanel(boolean show)
show - True to show the panel, false to hide it. public Attachment[] getAnnotations()
public void setAnnotations(Attachment[] annotations)
annotations - Array of annotations, or null. public void resetAnnotations()
public int getNumAnnotations()
public void clear()
public int getIndex()
public void setIndex(int index)
index - Index of the current annotation. public void next()
public void prev()
public java.lang.String getNoAnnotationsMessage()
public void setNoAnnotationsMessage(java.lang.String message)
message - The no annotations message. public java.lang.String getExtraMessage()
public void setExtraMessage(java.lang.String message)
message - The extra message. public void addListener(AnnotationListener listener)
listener - Annotation listener. public void removeListener(AnnotationListener listener)
listener - Annotation listener.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||