Class LineAnnotationWrangler
java.lang.Object
com.levigo.jadice.annotation.AnnotationWrangler
com.levigo.jadice.web.client.internal.annotation.Wrangler<LineAnnotation>
com.levigo.jadice.web.client.internal.annotation.wrangler.DefaultWrangler<LineAnnotation>
com.levigo.jadice.web.client.internal.annotation.wrangler.LineAnnotationWrangler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classGesture for resizing the line.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 TypeMethodDescriptionprotected voidensureMinimumLength(Point2D start, Point2D end, double minLength, Grid.SnapTo snapTo, Page page, Grid grid) Makes sure the line length does not fall below the minimum length by maintaining a minimum distance between the edited point and its opposite.protected voidensureMinimumLength(Point2D start, Point2D end, Grid.SnapTo snapTo, Page page, Grid grid) getHandles(PageView pageView, Page page, LineAnnotation annotation) Creates handles for a specific annotation.doubleReturns the minimum line length in millimeters.voidsetMinimumLineLength(double minimumLineLength) Sets the minimum line length of an annotation in millimeters.protected voidupdateCreated(EditEvent e, LineAnnotation createAnno, Point2D createStart, Point2D createEnd) Methods inherited from class com.levigo.jadice.web.client.internal.annotation.wrangler.DefaultWrangler
afterCreate, calcMinWidth, contribute, getCreationMode, getCursor, getForceAnnotationUpright, getMinimumHeight, getMinimumWidth, handleCreateEditEvent, handleEditEvent, isSelectionPoint, isSelectionTouchPoint, setCreationMode, setForceAnnotationUpright, setMinimumHeight, setMinimumWidth
-
Constructor Details
-
LineAnnotationWrangler
public LineAnnotationWrangler()
-
-
Method Details
-
getHandles
Description copied from class:WranglerCreates handles for a specific annotation.- Overrides:
getHandlesin classDefaultWrangler<LineAnnotation>- 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
-
updateCreated
protected void updateCreated(EditEvent e, LineAnnotation createAnno, Point2D createStart, Point2D createEnd) - Overrides:
updateCreatedin classDefaultWrangler<LineAnnotation>
-
ensureMinimumLength
protected void ensureMinimumLength(Point2D start, Point2D end, Grid.SnapTo snapTo, Page page, Grid grid) -
ensureMinimumLength
protected void ensureMinimumLength(Point2D start, Point2D end, double minLength, Grid.SnapTo snapTo, Page page, Grid grid) Makes sure the line length does not fall below the minimum length by maintaining a minimum distance between the edited point and its opposite.- Parameters:
start- the edited point. This is the point which is re-located if neededend- the other end of the lineminLength- defines the maximum length of the linesnapTo- theGrid.SnapToused to align the line points to the gridpage- the current pagegrid- the grid attached to the document
-
setMinimumLineLength
public void setMinimumLineLength(double minimumLineLength) Sets the minimum line length of an annotation in millimeters. Used to inject the value defined in an underlying annotation profile.- Parameters:
minimumLineLength- the minimum line length
-
getMinimumLineLength
public double getMinimumLineLength()Returns the minimum line length in millimeters.- Returns:
- the minimum line length
-