public final class PointAnnotation extends AbstractAnnotation
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BORDER_WIDTH
Default point annotation border width, 2.
|
static double |
DEFAULT_RADIUS
Default point annotation radius, 10.0.
|
DEFAULT_ADJUST_SCALE_RANGE, DEFAULT_DISPLAY
Constructor and Description |
---|
PointAnnotation()
Creates a line annotation to be added to an
AnnotationOptions instance.The annotation id is calculated automatically. |
PointAnnotation(AnnotationId id)
Creates a line annotation to be added to an
AnnotationOptions instance, using the ID passed as argument. |
PointAnnotation(AnnotationId id,
IsChart chart)
Creates a line annotation to be added to an
AnnotationOptions instance, using the ID passed as argument.The chart instance, passed as argument, must be the chart where the annotations will be applied and is used to get the whole default options in order to get the default for this object. |
PointAnnotation(String id)
Creates a line annotation to be added to an
AnnotationOptions instance, using the ID passed as argument. |
PointAnnotation(String id,
IsChart chart)
Creates a line annotation to be added to an
AnnotationOptions instance, using the ID passed as argument.The chart instance, passed as argument, must be the chart where the annotations will be applied and is used to get the whole default options in order to get the default for this object. |
Modifier and Type | Method and Description |
---|---|
default AdjustScaleRangeCallback |
getAdjustScaleRangeCallback()
Returns the callback called to set whether the scale range should be adjusted if this annotation is out of range.
|
default IsColor |
getBackgroundColor()
Returns the color of the background of annotation.
|
default String |
getBackgroundColorAsString()
Returns the color of the background of annotation.
|
default ColorCallback<AnnotationContext> |
getBackgroundColorCallback()
Returns the callback called to set the color of the background of annotation.
|
org.pepstock.charba.client.annotation.BackgroundColorHandler |
getBackgroundColorHandler()
Returns a background color handler instance to use in the default methods of this interface.
|
default String |
getBorderColorAsString()
Returns the color of the border of annotation.
|
default ColorCallback<AnnotationContext> |
getBorderColorCallback()
Returns the callback called to set the color of the border of annotation.
|
default List<Integer> |
getBorderDash()
Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
|
default BorderDashCallback<AnnotationContext> |
getBorderDashCallback()
Returns the callback called to set the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which
describe the pattern.
|
default double |
getBorderDashOffset()
Returns the line dash pattern offset.
|
default BorderDashOffsetCallback<AnnotationContext> |
getBorderDashOffsetCallback()
Returns the callback called to set the line dash pattern offset.
|
default int |
getBorderWidth()
Returns the width of the border in pixels.
|
default WidthCallback<AnnotationContext> |
getBorderWidthCallback()
Returns the callback called to set the width of the border in pixels.
|
default ClickCallback |
getClickCallback()
Returns the callback called when a "click" event is occurring.
|
default DisplayCallback<AnnotationContext> |
getDisplayCallback()
Returns the callback called to set the display options.
|
default DoubleClickCallback |
getDoubleClickCallback()
Returns the callback called when a "dblclick" event is occurring.
|
default DrawTime |
getDrawTime()
Returns the draw time which defines when the annotations are drawn.
|
default DrawTimeCallback |
getDrawTimeCallback()
Returns the callback called to set the draw time which defines when the annotations are drawn.
|
default EnterCallback |
getEnterCallback()
Returns the callback called when a "enter" event is occurring.
|
default LeaveCallback |
getLeaveCallback()
Returns the callback called when a "leave" event is occurring.
|
double |
getRadius()
Returns the radius of the point.
|
RadiusCallback<AnnotationContext> |
getRadiusCallback()
Returns the callback called to set the radius.
|
AnnotationType |
getType()
Returns the type of annotation.
|
ScaleId |
getXScaleID()
Returns the ID of the X scale to bind onto.
|
Date |
getXValueAsDate()
Returns the data X value to draw the line at.
|
double |
getXValueAsDouble()
Returns the data X value to draw the line at.
|
String |
getXValueAsString()
Returns the data X value to draw the line at.
|
ValueCallback |
getXValueCallback()
Returns the callback called to set the data X value to draw the line at.
|
ScaleId |
getYScaleID()
Returns the ID of the Y scale to bind onto.
|
Date |
getYValueAsDate()
Returns the data Y value to draw the line at.
|
double |
getYValueAsDouble()
Returns the data Y value to draw the line at.
|
String |
getYValueAsString()
Returns the data Y value to draw the line at.
|
ValueCallback |
getYValueCallback()
Returns the callback called to set the data Y value to draw the line at.
|
default boolean |
isAdjustScaleRange()
Returns
true whether the scale range should be adjusted if this annotation is out of range. |
default boolean |
isDisplay()
Returns
true whether the annotation should be displayed. |
default void |
setBackgroundColor(ColorCallback<AnnotationContext> backgroundColorCallback)
Sets the callback to set the color of the background of annotation.
|
default void |
setBackgroundColor(IsColor backgroundColor)
Sets the color of the background of annotation.
|
default void |
setBackgroundColor(NativeCallback backgroundColorCallback)
Sets the callback to set the color of the background of annotation.
|
default void |
setBackgroundColor(String backgroundColor)
Sets the color of the background of annotation.
|
void |
setRadius(double radius)
Sets the radius of the point shape.
If set to 0, the point is not rendered. |
void |
setRadius(NativeCallback radiusCallback)
Sets the callback to set the radius.
|
void |
setRadius(RadiusCallback<AnnotationContext> radiusCallback)
Sets the callback to set the radius.
|
void |
setXScaleID(ScaleId scaleId)
Sets the ID of the X scale to bind onto.
|
void |
setXScaleID(String scaleId)
Sets the ID of the X scale to bind onto.
|
void |
setXValue(Date value)
Sets the data X value to draw the line at.
|
void |
setXValue(double value)
Sets the data X value to draw the line at.
|
void |
setXValue(NativeCallback valueCallback)
Sets the callback to set the data X value to draw the line at.
|
void |
setXValue(String value)
Sets the data X value to draw the line at.
|
void |
setXValue(ValueCallback valueCallback)
Sets the callback to set the data X value to draw the line at.
|
void |
setYScaleID(ScaleId scaleId)
Sets the ID of the Y scale to bind onto.
|
void |
setYScaleID(String scaleId)
Sets the ID of the Y scale to bind onto.
|
void |
setYValue(Date value)
Sets the data Y value to draw the line at.
|
void |
setYValue(double value)
Sets the data Y value to draw the line at.
|
void |
setYValue(NativeCallback valueCallback)
Sets the callback to set the data Y value to draw the line at.
|
void |
setYValue(String value)
Sets the data Y value to draw the line at.
|
void |
setYValue(ValueCallback valueCallback)
Sets the callback to set the data Y value to draw the line at.
|
getAdjustScaleRangeCallback, getBorderColor, getBorderColorCallback, getBorderDash, getBorderDashCallback, getBorderDashOffset, getBorderDashOffsetCallback, getBorderWidthCallback, getClickCallback, getDisplayCallback, getDoubleClickCallback, getDrawTime, getDrawTimeCallback, getEnterCallback, getId, getLeaveCallback, getType, isAdjustScaleRange, isDisplay, setAdjustScaleRange, setAdjustScaleRange, setAdjustScaleRange, setBorderColor, setBorderColor, setBorderColor, setBorderColor, setBorderDash, setBorderDash, setBorderDash, setBorderDashOffset, setBorderDashOffset, setBorderDashOffset, setBorderWidth, setBorderWidth, setBorderWidth, setClickCallback, setDisplay, setDisplay, setDisplay, setDoubleClickCallback, setDrawTime, setDrawTime, setDrawTime, setEnterCallback, setLeaveCallback
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public static final int DEFAULT_BORDER_WIDTH
public static final double DEFAULT_RADIUS
public PointAnnotation()
AnnotationOptions
instance.AnnotationType.createId()
public PointAnnotation(String id)
AnnotationOptions
instance, using the ID passed as argument.id
- annotation id to apply to the object, as stringpublic PointAnnotation(AnnotationId id)
AnnotationOptions
instance, using the ID passed as argument.id
- annotation id to apply to the objectpublic PointAnnotation(String id, IsChart chart)
AnnotationOptions
instance, using the ID passed as argument.id
- annotation id to apply to the object, as stringchart
- chart instance related to the plugin optionspublic PointAnnotation(AnnotationId id, IsChart chart)
AnnotationOptions
instance, using the ID passed as argument.id
- annotation id to apply to the objectchart
- chart instance related to the plugin optionspublic org.pepstock.charba.client.annotation.BackgroundColorHandler getBackgroundColorHandler()
public void setRadius(double radius)
radius
- array of the radius of the point shape.public double getRadius()
public void setYScaleID(String scaleId)
scaleId
- the ID of the Y scale to bind ontopublic void setYScaleID(ScaleId scaleId)
scaleId
- the ID of the Y scale to bind ontopublic ScaleId getYScaleID()
public void setXScaleID(String scaleId)
scaleId
- the ID of the X scale to bind ontopublic void setXScaleID(ScaleId scaleId)
scaleId
- the ID of the X scale to bind ontopublic ScaleId getXScaleID()
public void setXValue(String value)
value
- the data X value to draw the line atpublic void setXValue(double value)
value
- the data X value to draw the line atpublic void setXValue(Date value)
value
- the data X value to draw the line atpublic String getXValueAsString()
public double getXValueAsDouble()
public Date getXValueAsDate()
public void setYValue(String value)
value
- the data Y value to draw the line atpublic void setYValue(double value)
value
- the data Y value to draw the line atpublic void setYValue(Date value)
value
- the data Y value to draw the line atpublic String getYValueAsString()
public double getYValueAsDouble()
public Date getYValueAsDate()
public RadiusCallback<AnnotationContext> getRadiusCallback()
public void setRadius(RadiusCallback<AnnotationContext> radiusCallback)
radiusCallback
- to set the radiuspublic void setRadius(NativeCallback radiusCallback)
radiusCallback
- to set the radiuspublic ValueCallback getXValueCallback()
public void setXValue(ValueCallback valueCallback)
valueCallback
- to set the data X value to draw the line atpublic void setXValue(NativeCallback valueCallback)
valueCallback
- to set the data X value to draw the line atpublic ValueCallback getYValueCallback()
public void setYValue(ValueCallback valueCallback)
valueCallback
- to set the data Y value to draw the line atpublic void setYValue(NativeCallback valueCallback)
valueCallback
- to set the data Y value to draw the line atpublic int getBorderWidth()
public AnnotationType getType()
public boolean isDisplay()
true
whether the annotation should be displayed.true
whether the annotation should be displayedpublic boolean isAdjustScaleRange()
true
whether the scale range should be adjusted if this annotation is out of range.true
whether the scale range should be adjusted if this annotation is out of rangepublic DrawTime getDrawTime()
public String getBorderColorAsString()
public List<Integer> getBorderDash()
public double getBorderDashOffset()
public EnterCallback getEnterCallback()
public LeaveCallback getLeaveCallback()
public ClickCallback getClickCallback()
public DoubleClickCallback getDoubleClickCallback()
public DrawTimeCallback getDrawTimeCallback()
public DisplayCallback<AnnotationContext> getDisplayCallback()
public ColorCallback<AnnotationContext> getBorderColorCallback()
public WidthCallback<AnnotationContext> getBorderWidthCallback()
public BorderDashCallback<AnnotationContext> getBorderDashCallback()
public BorderDashOffsetCallback<AnnotationContext> getBorderDashOffsetCallback()
public AdjustScaleRangeCallback getAdjustScaleRangeCallback()
public void setBackgroundColor(IsColor backgroundColor)
backgroundColor
- the color of the background of annotationpublic void setBackgroundColor(String backgroundColor)
backgroundColor
- the color of the background of annotationpublic String getBackgroundColorAsString()
public IsColor getBackgroundColor()
public ColorCallback<AnnotationContext> getBackgroundColorCallback()
public void setBackgroundColor(ColorCallback<AnnotationContext> backgroundColorCallback)
backgroundColorCallback
- to set the color of the background of annotationpublic void setBackgroundColor(NativeCallback backgroundColorCallback)
backgroundColorCallback
- to set the color of the background of annotation