Class JWTImageAnnotationWrangler
java.lang.Object
com.levigo.jadice.annotation.AnnotationWrangler
com.levigo.jadice.web.client.internal.annotation.Wrangler<JWTImageAnnotation>
com.levigo.jadice.web.client.internal.annotation.wrangler.DefaultWrangler<JWTImageAnnotation>
com.levigo.jadice.web.client.internal.annotation.wrangler.JWTImageAnnotationWrangler
Handles the behavior of the modification of a JWTImageAnnotation: Makes images clickable and set
the annotations' size to the native size of the image.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
This is a callback for an set load flag callback.Nested classes/interfaces inherited from class com.levigo.jadice.web.client.internal.annotation.wrangler.DefaultWrangler
DefaultWrangler.CreationMode
-
Field Summary
Fields inherited from class com.levigo.jadice.web.client.internal.annotation.wrangler.DefaultWrangler
boundsType, createAnno, createEnd, createStart, EMPTY_HANDLE_LIST, MINIMUM_HEIGHT, MINIMUM_WIDTH, minimumHeight, minimumWidth, selectionInspector
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterCreate
(EditEvent editEvent, JWTImageAnnotation createdAnnotation, Object... params) Default implementation.getHandles
(PageView pageView, Page page, JWTImageAnnotation annotation) Creates handles for a specific annotation.boolean
isSelectionPoint
(Annotation annotation, Point2D mousePoint, int tolerance, boolean b, int lineWidthFactor) static void
registerLoadedCallback
(JWTImageAnnotationWrangler.LoadedCallback loadedCallback, String domImgID) Registers a JavaScript MutationObserver to the image element that is currently loading.Methods inherited from class com.levigo.jadice.web.client.internal.annotation.wrangler.DefaultWrangler
calcMinWidth, contribute, getCreationMode, getCursor, getMinimumHeight, getMinimumWidth, handleCreateEditEvent, handleEditEvent, isSelectionTouchPoint, setCreationMode, setMinimumHeight, setMinimumWidth, updateCreated
-
Constructor Details
-
JWTImageAnnotationWrangler
public JWTImageAnnotationWrangler()
-
-
Method Details
-
getHandles
public List<? extends Handle> getHandles(PageView pageView, Page page, JWTImageAnnotation annotation) Description copied from class:Wrangler
Creates handles for a specific annotation.- Overrides:
getHandles
in classDefaultWrangler<JWTImageAnnotation>
- 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
-
isSelectionPoint
public boolean isSelectionPoint(Annotation annotation, Point2D mousePoint, int tolerance, boolean b, int lineWidthFactor) - Overrides:
isSelectionPoint
in classDefaultWrangler<JWTImageAnnotation>
-
afterCreate
public void afterCreate(EditEvent editEvent, JWTImageAnnotation createdAnnotation, Object... params) Description copied from class:DefaultWrangler
Default implementation.Does nothing. May be overwritten in subclasses.
- Overrides:
afterCreate
in classDefaultWrangler<JWTImageAnnotation>
- Parameters:
editEvent
- The last mouse event that is related to the creation.createdAnnotation
- The created annotation.params
- An optional array containing parameters.
-
registerLoadedCallback
public static void registerLoadedCallback(JWTImageAnnotationWrangler.LoadedCallback loadedCallback, String domImgID) Registers a JavaScript MutationObserver to the image element that is currently loading. Once the class loaded was set it notify its' given callback, by callingJWTImageAnnotationWrangler.LoadedCallback.onLoaded()
. Finally, the observer disconnects from the image element.- Parameters:
loadedCallback
-- See Also:
-