public final class BoxAnnotation extends AbstractAnnotation
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BORDER_WIDTH
Default box annotation border width, 1.
|
static int |
DEFAULT_CORNER_RADIUS
Default box annotation corner radius, 0.
|
DEFAULT_ADJUST_SCALE_RANGE, DEFAULT_DISPLAY
Constructor and Description |
---|
BoxAnnotation()
Creates a box annotation to be added to an
AnnotationOptions instance.The annotation id is calculated automatically. |
BoxAnnotation(AnnotationId id)
Creates a box annotation to be added to an
AnnotationOptions instance, using the ID passed as argument. |
BoxAnnotation(AnnotationId id,
IsChart chart)
Creates a box 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. |
BoxAnnotation(String id)
Creates a box annotation to be added to an
AnnotationOptions instance, using the ID passed as argument. |
BoxAnnotation(String id,
IsChart chart)
Creates a box 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.
|
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.
|
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.
|
int |
getCornerRadius()
Returns the border radius.
|
CornerRadiusCallback<AnnotationContext> |
getCornerRadiusCallback()
Returns the callback called to set the corner radius.
|
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.
|
default AnnotationType |
getType()
Returns the type of annotation.
|
default Date |
getXMaxAsDate()
Returns the right edge of the box.
|
Date |
getXMaxAsDate()
Returns the right edge of the box.
|
default double |
getXMaxAsDouble()
Returns the right edge of the box.
|
double |
getXMaxAsDouble()
Returns the right edge of the box.
|
default String |
getXMaxAsString()
Returns the right edge of the box.
|
String |
getXMaxAsString()
Returns the right edge of the box.
|
default ValueCallback |
getXMaxCallback()
Returns the callback called to set the right edge of the box.
|
ValueCallback |
getXMaxCallback()
Returns the callback called to set the right edge of the box.
|
default Date |
getXMinAsDate()
Returns the left edge of the box, in units along the x axis.
|
Date |
getXMinAsDate()
Returns the left edge of the box, in units along the x axis.
|
default double |
getXMinAsDouble()
Returns the left edge of the box, in units along the x axis.
|
double |
getXMinAsDouble()
Returns the left edge of the box, in units along the x axis.
|
default String |
getXMinAsString()
Returns the left edge of the box, in units along the x axis.
|
String |
getXMinAsString()
Returns the left edge of the box, in units along the x axis.
|
default ValueCallback |
getXMinCallback()
Returns the callback called to set the left edge of the box, in units along the x axis.
|
ValueCallback |
getXMinCallback()
Returns the callback called to set the left edge of the box, in units along the x axis.
|
default ScaleId |
getXScaleID()
Returns the ID of the X scale to bind onto.
|
ScaleId |
getXScaleID()
Returns the ID of the X scale to bind onto.
|
default Date |
getYMaxAsDate()
Returns the top edge of the box in units along the y axis.
|
Date |
getYMaxAsDate()
Returns the top edge of the box in units along the y axis.
|
default double |
getYMaxAsDouble()
Returns the top edge of the box in units along the y axis.
|
double |
getYMaxAsDouble()
Returns the top edge of the box in units along the y axis.
|
default String |
getYMaxAsString()
Returns the top edge of the box in units along the y axis.
|
String |
getYMaxAsString()
Returns the top edge of the box in units along the y axis.
|
default ValueCallback |
getYMaxCallback()
Returns the callback called to set the right edge of the box.
|
ValueCallback |
getYMaxCallback()
Returns the callback called to set the top edge of the box in units along the y axis.
|
default Date |
getYMinAsDate()
Returns the bottom edge of the box.
|
Date |
getYMinAsDate()
Returns the bottom edge of the box.
|
default double |
getYMinAsDouble()
Returns the bottom edge of the box.
|
double |
getYMinAsDouble()
Returns the bottom edge of the box.
|
default String |
getYMinAsString()
Returns the bottom edge of the box.
|
String |
getYMinAsString()
Returns the bottom edge of the box.
|
default ValueCallback |
getYMinCallback()
Returns the callback called to set the left edge of the box, in units along the x axis.
|
ValueCallback |
getYMinCallback()
Returns the callback called to set the bottom edge of the box.
|
default ScaleId |
getYScaleID()
Returns the ID of the Y scale to bind onto.
|
ScaleId |
getYScaleID()
Returns the ID of the Y scale to bind onto.
|
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 |
setCornerRadius(CornerRadiusCallback<AnnotationContext> cornerRadiusCallback)
Sets the callback to set the corner radius.
|
void |
setCornerRadius(int corner)
Sets the corner radius.
|
void |
setCornerRadius(NativeCallback cornerRadiusCallback)
Sets the callback to set the corner radius.
|
void |
setXMax(Date max)
Sets the right edge of the box.
|
void |
setXMax(double max)
Sets the right edge of the box.
|
void |
setXMax(NativeCallback valueCallback)
Sets the callback to set the right edge of the box.
|
void |
setXMax(String max)
Sets the right edge of the box.
|
void |
setXMax(ValueCallback valueCallback)
Sets the callback to set the right edge of the box.
|
void |
setXMin(Date min)
Sets the left edge of the box, in units along the x axis.
|
void |
setXMin(double min)
Sets the left edge of the box, in units along the x axis.
|
void |
setXMin(NativeCallback valueCallback)
Sets the callback to set the left edge of the box, in units along the x axis.
|
void |
setXMin(String min)
Sets the left edge of the box, in units along the x axis.
|
void |
setXMin(ValueCallback valueCallback)
Sets the callback to set the left edge of the box, in units along the x axis.
|
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 |
setYMax(Date max)
Sets the top edge of the box in units along the y axis.
|
void |
setYMax(double max)
Sets the top edge of the box in units along the y axis.
|
void |
setYMax(NativeCallback valueCallback)
Sets the callback to set the top edge of the box in units along the y axis.
|
void |
setYMax(String max)
Sets the top edge of the box in units along the y axis.
|
void |
setYMax(ValueCallback valueCallback)
Sets the callback to set the top edge of the box in units along the y axis.
|
void |
setYMin(Date min)
Sets the bottom edge of the box.
|
void |
setYMin(double min)
Sets the bottom edge of the box.
|
void |
setYMin(NativeCallback valueCallback)
Sets the callback to set the bottom edge of the box.
|
void |
setYMin(String min)
Sets the bottom edge of the box.
|
void |
setYMin(ValueCallback valueCallback)
Sets the callback to set the bottom edge of the box.
|
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.
|
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 int DEFAULT_CORNER_RADIUS
public BoxAnnotation()
AnnotationOptions
instance.AnnotationType.createId()
public BoxAnnotation(String id)
AnnotationOptions
instance, using the ID passed as argument.id
- annotation id to apply to the object, as stringpublic BoxAnnotation(AnnotationId id)
AnnotationOptions
instance, using the ID passed as argument.id
- annotation id to apply to the objectpublic BoxAnnotation(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 BoxAnnotation(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 final String getBorderColorAsString()
public final int getBorderWidth()
public void setCornerRadius(int corner)
corner
- the border radius.public int getCornerRadius()
public CornerRadiusCallback<AnnotationContext> getCornerRadiusCallback()
public void setCornerRadius(CornerRadiusCallback<AnnotationContext> cornerRadiusCallback)
cornerRadiusCallback
- to set the corner radiuspublic void setCornerRadius(NativeCallback cornerRadiusCallback)
cornerRadiusCallback
- to set the corner radiuspublic AnnotationType getType()
public ScaleId getXScaleID()
public String getXMaxAsString()
public double getXMaxAsDouble()
public Date getXMaxAsDate()
public String getXMinAsString()
public double getXMinAsDouble()
public Date getXMinAsDate()
public ScaleId getYScaleID()
public String getYMaxAsString()
public double getYMaxAsDouble()
public Date getYMaxAsDate()
public String getYMinAsString()
public double getYMinAsDouble()
public Date getYMinAsDate()
public ValueCallback getXMinCallback()
public ValueCallback getXMaxCallback()
public ValueCallback getYMinCallback()
public ValueCallback getYMaxCallback()
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 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 annotationpublic final void setXScaleID(String scaleId)
scaleId
- the ID of the X scale to bind ontopublic final void setXScaleID(ScaleId scaleId)
scaleId
- the ID of the X scale to bind ontopublic final ScaleId getXScaleID()
public final void setXMax(String max)
max
- the right edge of the boxpublic final void setXMax(double max)
max
- the right edge of the boxpublic final void setXMax(Date max)
max
- the right edge of the boxpublic final String getXMaxAsString()
public final double getXMaxAsDouble()
public final Date getXMaxAsDate()
public final void setXMin(String min)
min
- the left edge of the boxpublic final void setXMin(double min)
min
- the left edge of the boxpublic final void setXMin(Date min)
min
- the left edge of the boxpublic final String getXMinAsString()
public final double getXMinAsDouble()
public final Date getXMinAsDate()
public final void setYScaleID(String scaleId)
scaleId
- the ID of the Y scale to bind ontopublic final void setYScaleID(ScaleId scaleId)
scaleId
- the ID of the Y scale to bind ontopublic final ScaleId getYScaleID()
public final void setYMax(String max)
max
- the top edge of the box in units along the y axispublic final void setYMax(double max)
max
- the top edge of the box in units along the y axispublic final void setYMax(Date max)
max
- the top edge of the box in units along the y axispublic final String getYMaxAsString()
public final double getYMaxAsDouble()
public final Date getYMaxAsDate()
public final void setYMin(String min)
min
- the bottom edge of the boxpublic final void setYMin(double min)
min
- the bottom edge of the boxpublic final void setYMin(Date min)
min
- the bottom edge of the boxpublic final String getYMinAsString()
public final double getYMinAsDouble()
public final Date getYMinAsDate()
public final ValueCallback getXMinCallback()
public final void setXMin(ValueCallback valueCallback)
valueCallback
- to set the left edge of the box, in units along the x axispublic final void setXMin(NativeCallback valueCallback)
valueCallback
- to set the left edge of the box, in units along the x axispublic final ValueCallback getXMaxCallback()
public final void setXMax(ValueCallback valueCallback)
valueCallback
- to set the right edge of the boxpublic final void setXMax(NativeCallback valueCallback)
valueCallback
- to set the right edge of the boxpublic final ValueCallback getYMinCallback()
public final void setYMin(ValueCallback valueCallback)
valueCallback
- to set the bottom edge of the boxpublic final void setYMin(NativeCallback valueCallback)
valueCallback
- to set the bottom edge of the boxpublic final ValueCallback getYMaxCallback()
public final void setYMax(ValueCallback valueCallback)
valueCallback
- to set the top edge of the box in units along the y axispublic final void setYMax(NativeCallback valueCallback)
valueCallback
- to set the top edge of the box in units along the y axis