org.icepdf.core.pobjects.annotations
Class AnnotationState
java.lang.Object
org.icepdf.core.pobjects.annotations.AnnotationState
- All Implemented Interfaces:
- Memento
public class AnnotationState
- extends java.lang.Object
- implements Memento
Stores state paramaters for annotation objects to be used in conjuction
with a care taker as part of the memento pattern.
- Since:
- 4.0
|
Constructor Summary |
AnnotationState(AnnotationComponent annotationComponent)
Stores the annotation state associated with the AnnotationComponents
annotation object. |
AnnotationState(java.lang.Integer linkType,
java.lang.String highlightStyle,
float lineThickness,
java.lang.String lineStyle,
java.awt.Color color)
|
|
Method Summary |
void |
apply(AnnotationState applyState)
|
void |
restore()
Restores the AnnotationComponents state to the state stored during the
construction of this object. |
void |
restore(Annotation annotation)
Restores the annotation state in this instance to the Annotation
specified as a param. |
void |
synchronizeState()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
linkType
protected java.lang.Integer linkType
highlightStyle
protected java.lang.String highlightStyle
lineThickness
protected float lineThickness
lineStyle
protected java.lang.String lineStyle
color
protected java.awt.Color color
userSpaceRectangle
protected java.awt.geom.Rectangle2D.Float userSpaceRectangle
annotationComponent
protected AnnotationComponent annotationComponent
AnnotationState
public AnnotationState(AnnotationComponent annotationComponent)
- Stores the annotation state associated with the AnnotationComponents
annotation object. When a new instance of this object is created
the annotation's proeprties are saved.
- Parameters:
annotationComponent - annotation component who's state will be stored.
AnnotationState
public AnnotationState(java.lang.Integer linkType,
java.lang.String highlightStyle,
float lineThickness,
java.lang.String lineStyle,
java.awt.Color color)
apply
public void apply(AnnotationState applyState)
restore
public void restore()
- Restores the AnnotationComponents state to the state stored during the
construction of this object.
- Specified by:
restore in interface Memento
restore
public void restore(Annotation annotation)
- Restores the annotation state in this instance to the Annotation
specified as a param. This method is ment to bue used in
AnnotationState(Integer, String, float, String, java.awt.Color)
- Parameters:
annotation - annotation to retore state to.
synchronizeState
public void synchronizeState()