T
- The type of annotation to placeprotected static class AxisMarkerAnnotation.CartesianAnnotationPlacementStrategy<T extends AxisMarkerAnnotation> extends AnchorPointAnnotation.CartesianAnchorPointAnnotationPlacementStrategyBase<T>
AxisMarkerAnnotation
instanceselectionPath
annotation
Modifier | Constructor and Description |
---|---|
protected |
CartesianAnnotationPlacementStrategy(T annotation,
boolean clipAdornerToAnnotationSurface)
Creates a new instance of
AnnotationPlacementStrategyBase class |
Modifier and Type | Method and Description |
---|---|
protected IAnnotationAdornerAction |
createAdornerActionForResizingGripWithIndex(int resizingGripIndex,
int resizingGripXOffset,
int resizingGripYOffset)
Creates
IAnnotationAdornerAction which is used in case of hit on annotation's resizing grip |
protected void |
drawResizingGrips(android.graphics.Canvas canvas,
AnnotationCoordinates annotationCoordinates)
Draws resizing grips for parent annotation
|
protected int |
getResizingGripHitIndex(float hitPointX,
float hitPointY,
AnnotationCoordinates annotationCoordinates)
Gets the index of
IResizingGrip for parent annotation at specified point on screen |
protected void |
internalMoveAnnotationTo(AnnotationCoordinates coordinates,
float horizontalOffset,
float verticalOffset,
IAnnotationSurface annotationSurface)
Moves parent annotation in X, Y direction with specified offset in pixels
|
boolean |
isInBounds(AnnotationCoordinates coordinates,
IAnnotationSurface annotationsSurface)
Checks whether coordinates are within canvas bounds
|
void |
placeAnnotation(AnnotationCoordinates coordinates,
CanvasLayout.LayoutParams layoutParams)
Places annotation with specific annotation coordinates
|
createAdornerActionForAnnotationHit, drawAdorner, drawAdornerInternal, drawSelectionOverlayInternal, isCoordinateValid, moveAnnotationTo, moveBasePointTo, selectAdornerActionForPoint, updateSelectionOverlay
protected CartesianAnnotationPlacementStrategy(T annotation, boolean clipAdornerToAnnotationSurface)
AnnotationPlacementStrategyBase
classannotation
- The annotation to placeclipAdornerToAnnotationSurface
- If true adorner for annotation should be clipped to its parent IAnnotationSurface
public void placeAnnotation(AnnotationCoordinates coordinates, CanvasLayout.LayoutParams layoutParams)
placeAnnotation
in interface IAnnotationPlacementStrategy
placeAnnotation
in class AnchorPointAnnotation.CartesianAnchorPointAnnotationPlacementStrategyBase<T extends AxisMarkerAnnotation>
coordinates
- The annotation coordinateslayoutParams
- The annotation layout paramspublic boolean isInBounds(AnnotationCoordinates coordinates, IAnnotationSurface annotationsSurface)
isInBounds
in interface IAnnotationPlacementStrategy
isInBounds
in class AnnotationBase.CartesianAnnotationPlacementStrategyBase<T extends AxisMarkerAnnotation>
coordinates
- The annotation coordinatesannotationsSurface
- The parent annotation surfaceprotected void internalMoveAnnotationTo(AnnotationCoordinates coordinates, float horizontalOffset, float verticalOffset, IAnnotationSurface annotationSurface)
internalMoveAnnotationTo
in class AnchorPointAnnotation.CartesianAnchorPointAnnotationPlacementStrategyBase<T extends AxisMarkerAnnotation>
coordinates
- The AnnotationCoordinates
instance associated with parent annotationhorizontalOffset
- The horizontal offset in pixelsverticalOffset
- The vertical offset in pixelsannotationSurface
- The parent IAnnotationSurface
protected void drawResizingGrips(android.graphics.Canvas canvas, AnnotationCoordinates annotationCoordinates)
drawResizingGrips
in class AnchorPointAnnotation.CartesianAnchorPointAnnotationPlacementStrategyBase<T extends AxisMarkerAnnotation>
canvas
- The Canvas
to draw resizing grips onannotationCoordinates
- The AnnotationCoordinates
instance associated with parent annotationprotected IAnnotationAdornerAction createAdornerActionForResizingGripWithIndex(int resizingGripIndex, int resizingGripXOffset, int resizingGripYOffset)
IAnnotationAdornerAction
which is used in case of hit on annotation's resizing gripcreateAdornerActionForResizingGripWithIndex
in class AnnotationBase.CartesianAnnotationPlacementStrategyBase<T extends AxisMarkerAnnotation>
resizingGripIndex
- The index of resizing grip which was hitresizingGripXOffset
- The initial x offset for resizing gripresizingGripYOffset
- The initial y offset for resizing gripIAnnotationAdornerAction
instance to handle resizing grip hit with specified indexprotected int getResizingGripHitIndex(float hitPointX, float hitPointY, AnnotationCoordinates annotationCoordinates)
IResizingGrip
for parent annotation at specified point on screengetResizingGripHitIndex
in class AnchorPointAnnotation.CartesianAnchorPointAnnotationPlacementStrategyBase<T extends AxisMarkerAnnotation>
hitPointX
- The x coordinate of hit test point in pixelshitPointY
- The y coordinate of hit test point in pixelsannotationCoordinates
- The AnnotationCoordinates
instance associated with parent annotationIResizingGrip
which lies below hit test point, otherwise returns -1 which indicates that there is not IResizingGrip
at specified hit test point