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 interfaceThis 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, DefaultWrangler.ForceAnnotationUpright -
Field Summary
Fields inherited from class com.levigo.jadice.web.client.internal.annotation.wrangler.DefaultWrangler
boundsType, createAnno, createEnd, createStart, EMPTY_HANDLE_LIST, forceAnnotationUpright, MINIMUM_HEIGHT, MINIMUM_WIDTH, minimumHeight, minimumWidth, selectionInspector -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterCreate(EditEvent editEvent, JWTImageAnnotation createdAnnotation, Object... params) Default implementation.getHandles(PageView pageView, Page page, JWTImageAnnotation annotation) Creates handles for a specific annotation.booleanisSelectionPoint(Annotation annotation, Point2D mousePoint, int tolerance, boolean b, int lineWidthFactor) static voidregisterLoadedCallback(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, getForceAnnotationUpright, getMinimumHeight, getMinimumWidth, handleCreateEditEvent, handleEditEvent, isSelectionTouchPoint, setCreationMode, setForceAnnotationUpright, 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:WranglerCreates handles for a specific annotation.- Overrides:
getHandlesin 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:
isSelectionPointin classDefaultWrangler<JWTImageAnnotation>
-
afterCreate
public void afterCreate(EditEvent editEvent, JWTImageAnnotation createdAnnotation, Object... params) Description copied from class:DefaultWranglerDefault implementation.Does nothing. May be overwritten in subclasses.
- Overrides:
afterCreatein 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:
-