|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.annotation.Annotation
public abstract class Annotation
An abstract base class for all annotations.
Field Summary | |
---|---|
protected Date |
createdAt
|
protected String |
createdBy
|
protected boolean |
doFireAnnotationEvents
Flag whether annotation events should be fired. |
protected String |
id
anno id |
protected AnnotationInitializer |
initializer
|
protected boolean |
isModified
|
protected Date |
lastModifiedAt
|
protected String |
lastModifiedBy
|
Constructor Summary | |
---|---|
Annotation()
|
Method Summary | |
---|---|
void |
clearModified()
Clears the modified-flag. |
abstract Annotation |
clone()
|
protected void |
copyAttributesTo(Annotation annotation)
Copy annotation type related attributes to new annotation. |
Memento |
createMemento()
|
protected void |
fireAnnotationChange(Annotation previousState,
AnnotationPageSegmentEvent.EventType eventType,
Object oldValue,
Object newValue)
Handle an annotation change |
abstract Rectangle2D |
getBounds()
Returns a Rectangle2D that completely encloses the annotation. |
com.levigo.jadice.annotation.internal.AnnotationChangeHandler |
getChangeHandler()
Returns the annotation change handler |
Date |
getCreatedAt()
|
String |
getCreatedBy()
|
String |
getID()
Returns annotations id. |
AnnotationInitializer |
getInitializer()
|
Date |
getLastModifiedAt()
|
String |
getLastModifiedBy()
|
int |
getModCount()
|
Permissions<Annotation> |
getPermissions()
Provides an instance of Permissions . |
Map<String,Object> |
getProperties()
Return a map of user properties. |
AnnotationType |
getType()
Get the type profile. |
void |
initialize(Page page)
|
boolean |
isDoFireAnnotationEvents()
Return whether this annotation instance propagates annotation events |
boolean |
isInitialized()
|
boolean |
isModified()
Returns modify status of the annotation. |
void |
restoreFrom(AnnotationMemento memento)
This method is called back from AnnotationMemento upon Memento.restore() |
void |
setChangeHandler(com.levigo.jadice.annotation.internal.AnnotationChangeHandler changeHandler)
Changes the annotation change handler. |
void |
setCreatedBy(String originatorName)
|
void |
setCreationTimestamp(Date creationTimestamp)
|
void |
setDoFireAnnotationEvents(boolean doFireAnnotationEvents)
Changes the annotation event propagation mode. |
void |
setID(String id)
Set annotation id. |
void |
setInitializer(AnnotationInitializer initializer)
|
void |
setLastModifiedBy(String userName)
|
abstract void |
setLocation(double x,
double y)
Set the location (upper-left corner) of the annotation to the given point. |
void |
setModified()
Sets modified-flag. |
void |
setModifyTimestamp(Date modifyTimestamp)
|
abstract void |
setSize(double width,
double height)
Set the size of the annotation to the given size. |
void |
setType(AnnotationType typeProfile)
Set the type profile. |
abstract void |
translate(double dx,
double dy)
Translates this Annotation the indicated distance, to the right along the x
coordinate axis, and downward along the y coordinate axis. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String createdBy
protected String lastModifiedBy
protected Date createdAt
protected Date lastModifiedAt
protected AnnotationInitializer initializer
protected boolean isModified
protected String id
protected boolean doFireAnnotationEvents
false
until this annotation instance is initialized and the creation process is
finished.
Constructor Detail |
---|
public Annotation()
Method Detail |
---|
public abstract void translate(double dx, double dy)
Annotation
the indicated distance, to the right along the x
coordinate axis, and downward along the y coordinate axis.
dx
- the distance to move this Rectangle
along the x axisdy
- the distance to move this Rectangle
along the y axispublic abstract void setSize(double width, double height)
IllegalArgumentException
is thrown in this case.
Caveat: it is currently necessary, to force a repaint on the viewer
in order to make the results of the modification visible. Moreover there
are no modification events fired on the page and document. This will change
in the future.
width
- height
- public abstract void setLocation(double x, double y)
x
- X-positiony
- Y-positionpublic abstract Rectangle2D getBounds()
Rectangle2D
that completely encloses the annotation.
protected void fireAnnotationChange(Annotation previousState, AnnotationPageSegmentEvent.EventType eventType, Object oldValue, Object newValue)
public void setID(String id)
id
- Id to set.public String getID()
public void setModified()
public void clearModified()
public boolean isModified()
public abstract Annotation clone()
clone
in class Object
Object.clone()
protected void copyAttributesTo(Annotation annotation)
annotation
- Annotation to set attributespublic boolean isDoFireAnnotationEvents()
true
if this annotation propagates its internal changes as annotation
event, otherwise false
will be returnedpublic void setDoFireAnnotationEvents(boolean doFireAnnotationEvents)
doFireAnnotationEvents
- true
if this annotation should propagate its
internal changes as annotation event, otherwise false
should be set.public Map<String,Object> getProperties()
PropertiesProvider
getProperties
in interface PropertiesProvider
public void setInitializer(AnnotationInitializer initializer)
public AnnotationInitializer getInitializer()
public boolean isInitialized()
public void initialize(Page page)
public String getCreatedBy()
public void setCreatedBy(String originatorName)
public String getLastModifiedBy()
public void setLastModifiedBy(String userName)
public Date getCreatedAt()
public void setCreationTimestamp(Date creationTimestamp)
public Date getLastModifiedAt()
public void setModifyTimestamp(Date modifyTimestamp)
public int getModCount()
public void setType(AnnotationType typeProfile)
typeProfile
- the typeProfile to setpublic AnnotationType getType()
public void setChangeHandler(com.levigo.jadice.annotation.internal.AnnotationChangeHandler changeHandler)
changeHandler
- public com.levigo.jadice.annotation.internal.AnnotationChangeHandler getChangeHandler()
AnnotationChangeHandler
public Permissions<Annotation> getPermissions()
PermissionsProvider
Permissions
. Must never return null
.
getPermissions
in interface PermissionsProvider<Annotation>
Permissions
object.public Memento createMemento()
createMemento
in interface MementoOriginator
public void restoreFrom(AnnotationMemento memento)
AnnotationMemento
upon Memento.restore()
memento
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |