Class StampAnnotationWrangler
java.lang.Object
com.levigo.jadice.annotation.AnnotationWrangler
com.levigo.jadice.web.client.internal.annotation.Wrangler<TextAnnotation>
com.levigo.jadice.web.client.internal.annotation.wrangler.DefaultWrangler<TextAnnotation>
com.levigo.jadice.web.client.internal.annotation.wrangler.TextAnnotationWrangler
com.levigo.jadice.web.client.internal.annotation.wrangler.StampAnnotationWrangler
Manages the creation of stamp annotations.
This class is referenced in annotation profiles by its full classname. It supports parameterization via annotation profiles.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.levigo.jadice.web.client.internal.annotation.wrangler.TextAnnotationWrangler
TextAnnotationWrangler.CursorPosition, TextAnnotationWrangler.EditorBehaviorOnOutsideClick, TextAnnotationWrangler.ExpandHeight, TextAnnotationWrangler.RotateHandle, TextAnnotationWrangler.TextSelectionNested classes/interfaces inherited from class com.levigo.jadice.web.client.internal.annotation.wrangler.DefaultWrangler
DefaultWrangler.CreationMode, DefaultWrangler.ForceAnnotationUpright -
Field Summary
Fields inherited from class com.levigo.jadice.web.client.internal.annotation.wrangler.TextAnnotationWrangler
cursorPosition, editorBehaviorOnOutsideClick, editorHeight, editorWidth, executeActionAfterCreation, expandHeight, forceAnnotationUpright, showRotationHandle, textSelectionFields inherited from class com.levigo.jadice.web.client.internal.annotation.wrangler.DefaultWrangler
boundsType, createEnd, createStart, EMPTY_HANDLE_LIST, MINIMUM_HEIGHT, MINIMUM_WIDTH, minimumHeight, minimumWidth, selectionInspector -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static Point2DcalcPos(StampAnnotation annotation, Point2D positionDocp) protected RectanglecalculateEditorBounds(PageView pageView, Page page, TextAnnotation selected) Calculates the editor bounds which should be the same size and position as the text annotation.getHandles(PageView pageView, Page page, TextAnnotation annotation) Creates handles for a specific annotation.booleanhandleCreateEditEvent(EditEvent e, TextAnnotation annotation) Invoked during the creation of an annotation.booleanisSelectionPoint(Annotation annotation, Point2D mousePoint, int tolerance, boolean b, int lineWidthFactor) booleanThis can be overriden by any subclass to disable the initial resizing when an annotation is added with a single click.Methods inherited from class com.levigo.jadice.web.client.internal.annotation.wrangler.TextAnnotationWrangler
afterCreate, contribute, createTextEditor, getCursorPosition, getEditorBehaviorOnOutsideClick, getEditorHeight, getEditorWidth, getForceAnnotationUpright, getIcon, getIconFont, getMultiplier, getTextSelection, handleEditEvent, isExecuteActionAfterCreation, isShowRotationHandle, openTextEditor, setCursorPosition, setEditorBehaviorOnOutsideClick, setEditorHeight, setEditorWidth, setExecuteActionAfterCreation, setExpandHeight, setForceAnnotationUpright, setShowRotationHandle, setTextSelection, updateCreatedMethods inherited from class com.levigo.jadice.web.client.internal.annotation.wrangler.DefaultWrangler
calcMinWidth, getCreationMode, getCursor, getMinimumHeight, getMinimumWidth, isSelectionTouchPoint, setCreationMode, setMinimumHeight, setMinimumWidth
-
Constructor Details
-
StampAnnotationWrangler
public StampAnnotationWrangler()
-
-
Method Details
-
calcPos
-
getHandles
Description copied from class:WranglerCreates handles for a specific annotation.- Overrides:
getHandlesin classTextAnnotationWrangler- Parameters:
pageView- PageView the annotation is shown on (for example for repaint calls)page- The page that contains the annotationannotation- The annotation the wrangler should create handles for- Returns:
- Handles that can be used to edit the annotation
-
handleCreateEditEvent
Description copied from class:WranglerInvoked during the creation of an annotation.Can be invoked multiple times. For example during the creation of a polygon based annotation each mouse down event could indicate a new corner of the polygon at the current mouse position.
- Overrides:
handleCreateEditEventin classDefaultWrangler<TextAnnotation>- Parameters:
e- an edit event representing a mouse actionannotation- the new annotation- Returns:
- true, when the event finishes the annotation creation
-
isSelectionPoint
public boolean isSelectionPoint(Annotation annotation, Point2D mousePoint, int tolerance, boolean b, int lineWidthFactor) - Overrides:
isSelectionPointin classTextAnnotationWrangler
-
calculateEditorBounds
Description copied from class:TextAnnotationWranglerCalculates the editor bounds which should be the same size and position as the text annotation. After that the position will be slightly adapted according to the line width of the annotation.- Overrides:
calculateEditorBoundsin classTextAnnotationWrangler- Parameters:
pageView- thePageViewcontaining theAnnotationpage- the page containing theAnnotationselected- the selectedAnnotation- Returns:
- the calculated editor bounds
-
scaleByEditorWidth
public boolean scaleByEditorWidth()Description copied from class:TextAnnotationWranglerThis can be overriden by any subclass to disable the initial resizing when an annotation is added with a single click.- Overrides:
scaleByEditorWidthin classTextAnnotationWrangler
-