protected static class AxisLabelAnnotation.CartesianAnnotationPlacementStrategy extends TextAnnotationBase.CartesianTextAnnotationPlacementStrategyBase<AxisLabelAnnotation>
TextAnnotation
instanceselectionPath
annotation
Modifier | Constructor and Description |
---|---|
protected |
CartesianAnnotationPlacementStrategy(AxisLabelAnnotation annotation,
boolean clipAdornerToAnnotationSurface)
Creates a new instance of
AxisLabelAnnotation.CartesianAnnotationPlacementStrategy 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(AxisLabelAnnotation annotation, boolean clipAdornerToAnnotationSurface)
AxisLabelAnnotation.CartesianAnnotationPlacementStrategy
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<AxisLabelAnnotation>
coordinates
- The annotation coordinateslayoutParams
- The annotation layout paramsprotected void drawResizingGrips(android.graphics.Canvas canvas, AnnotationCoordinates annotationCoordinates)
drawResizingGrips
in class AnchorPointAnnotation.CartesianAnchorPointAnnotationPlacementStrategyBase<AxisLabelAnnotation>
canvas
- The Canvas
to draw resizing grips onannotationCoordinates
- The AnnotationCoordinates
instance associated with parent annotationprotected int getResizingGripHitIndex(float hitPointX, float hitPointY, AnnotationCoordinates annotationCoordinates)
IResizingGrip
for parent annotation at specified point on screengetResizingGripHitIndex
in class AnchorPointAnnotation.CartesianAnchorPointAnnotationPlacementStrategyBase<AxisLabelAnnotation>
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 pointprotected 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<AxisLabelAnnotation>
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 indexpublic boolean isInBounds(AnnotationCoordinates coordinates, IAnnotationSurface annotationsSurface)
isInBounds
in interface IAnnotationPlacementStrategy
isInBounds
in class AnnotationBase.CartesianAnnotationPlacementStrategyBase<AxisLabelAnnotation>
coordinates
- The annotation coordinatesannotationsSurface
- The parent annotation surfaceprotected void internalMoveAnnotationTo(AnnotationCoordinates coordinates, float horizontalOffset, float verticalOffset, IAnnotationSurface annotationSurface)
internalMoveAnnotationTo
in class AnchorPointAnnotation.CartesianAnchorPointAnnotationPlacementStrategyBase<AxisLabelAnnotation>
coordinates
- The AnnotationCoordinates
instance associated with parent annotationhorizontalOffset
- The horizontal offset in pixelsverticalOffset
- The vertical offset in pixelsannotationSurface
- The parent IAnnotationSurface