org.icepdf.ri.common.views.annotations
Class AnnotationState

java.lang.Object
  extended by org.icepdf.ri.common.views.annotations.AnnotationState
All Implemented Interfaces:
org.icepdf.core.Memento

public class AnnotationState
extends java.lang.Object
implements org.icepdf.core.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

Field Summary
protected  AnnotationComponent annotationComponent
           
protected  java.awt.geom.Rectangle2D.Float userSpaceRectangle
           
 
Constructor Summary
AnnotationState(AnnotationComponent annotationComponent)
          Stores the annotation state associated with the AnnotationComponents annotation object.
 
Method Summary
 void apply(AnnotationState applyState)
           
 void restore()
          Restores the AnnotationComponents state to the state stored during the construction of this object.
 void restore(org.icepdf.core.pobjects.annotations.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
 

Field Detail

userSpaceRectangle

protected java.awt.geom.Rectangle2D.Float userSpaceRectangle

annotationComponent

protected AnnotationComponent annotationComponent
Constructor Detail

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.
Method Detail

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 org.icepdf.core.Memento

restore

public void restore(org.icepdf.core.pobjects.annotations.Annotation annotation)
Restores the annotation state in this instance to the Annotation specified as a param. This method is ment to bue used in

Parameters:
annotation - annotation to retore state to.

synchronizeState

public void synchronizeState()