Class CrosshairOptionsBuilder
- java.lang.Object
- 
- org.pepstock.charba.client.commons.AbstractBaseBuilder
- 
- org.pepstock.charba.client.impl.plugins.CrosshairOptionsBuilder
 
 
- 
- All Implemented Interfaces:
- IsBuilder
 
 public final class CrosshairOptionsBuilder extends AbstractBaseBuilder Comfortable object to createCrosshair.IDplugin options by a builder.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CrosshairOptionsbuild()Returns a configured plugin options.static CrosshairOptionsBuildercreate()Returns new builder instance.static CrosshairOptionsBuildercreate(IsChart chart)Returns new builder instance using the chart global options.CrosshairOptionsBuildersetEnabled(boolean enabled)Setstrueif plugin is enabled.CrosshairOptionsBuildersetGroup(String group)Sets the group name used to synchronized more chart instances.CrosshairOptionsBuildersetLabelsBackgroundColor(String color)Sets, for both labels, the background color.CrosshairOptionsBuildersetLabelsBackgroundColor(IsColor color)Sets, for both labels, the background color.CrosshairOptionsBuildersetLabelsBorderColor(String borderColor)Sets the border color.CrosshairOptionsBuildersetLabelsBorderColor(IsColor borderColor)Sets the border color.CrosshairOptionsBuildersetLabelsBorderRadius(int borderRadius)Sets, for both labels, the label border radius (in pixels).CrosshairOptionsBuildersetLabelsBorderWidth(int borderWidth)Sets the border width.CrosshairOptionsBuildersetLabelsColor(String color)Sets, for both labels, the crosshair label font color.CrosshairOptionsBuildersetLabelsColor(IsColor color)Set the crosshair label font color.CrosshairOptionsBuildersetLabelsDisplay(boolean display)Sets, for both labels,trueif label will be applied in the chart, otherwisefalse.CrosshairOptionsBuildersetLabelsPadding(int padding)Sets, for both labels, the padding of crosshair label.CrosshairOptionsBuildersetLineColor(String color)Sets the color of the line.CrosshairOptionsBuildersetLineColor(IsColor color)Sets the color of the line.CrosshairOptionsBuildersetLineDash(int... lineDash)Sets 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.CrosshairOptionsBuildersetLineDashOffset(double lineDashOffset)Sets the line dash pattern offset.CrosshairOptionsBuildersetLineWidth(int lineWidth)Sets the width of the line.CrosshairOptionsBuildersetMode(InteractionAxis mode)Sets the interaction axis mode.CrosshairOptionsBuildersetModifierKey(ModifierKey modifierKey)Sets the modifier key to activate the crosshair.CrosshairOptionsBuildersetXLabelBackgroundColor(String color)Sets, for X label, the background color.CrosshairOptionsBuildersetXLabelBackgroundColor(IsColor color)Sets, for X label, the background color.CrosshairOptionsBuildersetXLabelBorderColor(String borderColor)Sets the border color.CrosshairOptionsBuildersetXLabelBorderColor(IsColor borderColor)Sets the border color.CrosshairOptionsBuildersetXLabelBorderRadius(int borderRadius)Sets, for X label, the label border radius (in pixels).CrosshairOptionsBuildersetXLabelBorderWidth(int borderWidth)Sets the border width.CrosshairOptionsBuildersetXLabelColor(String color)Sets, for X label, the crosshair label font color.CrosshairOptionsBuildersetXLabelColor(IsColor color)Set the crosshair label font color.CrosshairOptionsBuildersetXLabelDisplay(boolean display)Sets, for X label,trueif label will be applied in the chart, otherwisefalse.CrosshairOptionsBuildersetXLabelFormatter(CrosshairFormatterCallback formatterCallback)Sets, for X label, the callback which can be implemented to change the text of label.CrosshairOptionsBuildersetXLabelPadding(int padding)Sets, for X label, the padding of crosshair label.CrosshairOptionsBuildersetXScaleID(String scaleId)Sets the ID of the X scale to bind onto.CrosshairOptionsBuildersetXScaleID(ScaleId scaleId)Sets the ID of the X scale to bind onto.CrosshairOptionsBuildersetYLabelBackgroundColor(String color)Sets, for Y label, the background color.CrosshairOptionsBuildersetYLabelBackgroundColor(IsColor color)Sets, for Y label, the background color.CrosshairOptionsBuildersetYLabelBorderColor(String borderColor)Sets the border color.CrosshairOptionsBuildersetYLabelBorderColor(IsColor borderColor)Sets the border color.CrosshairOptionsBuildersetYLabelBorderRadius(int borderRadius)Sets, for Y label, the label border radius (in pixels).CrosshairOptionsBuildersetYLabelBorderWidth(int borderWidth)Sets the border width.CrosshairOptionsBuildersetYLabelColor(String color)Sets, for Y label, the crosshair label font color.CrosshairOptionsBuildersetYLabelColor(IsColor color)Set the crosshair label font color.CrosshairOptionsBuildersetYLabelDisplay(boolean display)Sets, for Y label,trueif label will be applied in the chart, otherwisefalse.CrosshairOptionsBuildersetYLabelFormatter(CrosshairFormatterCallback formatterCallback)Sets, for Y label, the callback which can be implemented to change the text of label.CrosshairOptionsBuildersetYLabelPadding(int padding)Sets, for Y label, the padding of crosshair label.CrosshairOptionsBuildersetYScaleID(String scaleId)Sets the ID of the Y scale to bind onto.CrosshairOptionsBuildersetYScaleID(ScaleId scaleId)Sets the ID of the Y scale to bind onto.- 
Methods inherited from class org.pepstock.charba.client.commons.AbstractBaseBuilderisBuilt, setBuilt
 
- 
 
- 
- 
- 
Method Detail- 
createpublic static CrosshairOptionsBuilder create() Returns new builder instance.- Returns:
- new builder instance
 
 - 
createpublic static CrosshairOptionsBuilder create(IsChart chart) Returns new builder instance using the chart global options.- Parameters:
- chart- chart instance related to the plugin options
- Returns:
- new builder instance
 
 - 
buildpublic CrosshairOptions build() Returns a configured plugin options.- Returns:
- a configured plugin options.
 
 - 
setEnabledpublic CrosshairOptionsBuilder setEnabled(boolean enabled) Setstrueif plugin is enabled.- Parameters:
- enabled-- trueif plugin is enabled.
- Returns:
- new builder instance
 
 - 
setModepublic CrosshairOptionsBuilder setMode(InteractionAxis mode) Sets the interaction axis mode.- Parameters:
- mode- the interaction axis mode
- Returns:
- new builder instance
 
 - 
setGrouppublic CrosshairOptionsBuilder setGroup(String group) Sets the group name used to synchronized more chart instances.- Parameters:
- group- the group name used to synchronized more chart instances
- Returns:
- new builder instance
 
 - 
setLineColorpublic CrosshairOptionsBuilder setLineColor(IsColor color) Sets the color of the line.- Parameters:
- color- the color of the line.
- Returns:
- new builder instance
 
 - 
setLineColorpublic CrosshairOptionsBuilder setLineColor(String color) Sets the color of the line.- Parameters:
- color- the color of the line.
- Returns:
- new builder instance
 
 - 
setLineWidthpublic CrosshairOptionsBuilder setLineWidth(int lineWidth) Sets the width of the line.- Parameters:
- lineWidth- the width of the line
- Returns:
- new builder instance
 
 - 
setLineDashpublic CrosshairOptionsBuilder setLineDash(int... lineDash) Sets 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.- Parameters:
- lineDash- the line dash pattern used when stroking lines
- Returns:
- new builder instance
 
 - 
setLineDashOffsetpublic CrosshairOptionsBuilder setLineDashOffset(double lineDashOffset) Sets the line dash pattern offset.- Parameters:
- lineDashOffset- Offset for line dashes.
- Returns:
- new builder instance
 
 - 
setXScaleIDpublic CrosshairOptionsBuilder setXScaleID(String scaleId) Sets the ID of the X scale to bind onto.- Parameters:
- scaleId- the ID of the X scale to bind onto
- Returns:
- new builder instance
 
 - 
setXScaleIDpublic CrosshairOptionsBuilder setXScaleID(ScaleId scaleId) Sets the ID of the X scale to bind onto.- Parameters:
- scaleId- the ID of the X scale to bind onto
- Returns:
- new builder instance
 
 - 
setYScaleIDpublic CrosshairOptionsBuilder setYScaleID(String scaleId) Sets the ID of the Y scale to bind onto.- Parameters:
- scaleId- the ID of the Y scale to bind onto
- Returns:
- new builder instance
 
 - 
setYScaleIDpublic CrosshairOptionsBuilder setYScaleID(ScaleId scaleId) Sets the ID of the Y scale to bind onto.- Parameters:
- scaleId- the ID of the Y scale to bind onto
- Returns:
- new builder instance
 
 - 
setModifierKeypublic CrosshairOptionsBuilder setModifierKey(ModifierKey modifierKey) Sets the modifier key to activate the crosshair.- Parameters:
- modifierKey- the modifier key to activate the crosshair
- Returns:
- new builder instance
 
 - 
setXLabelDisplaypublic CrosshairOptionsBuilder setXLabelDisplay(boolean display) Sets, for X label,trueif label will be applied in the chart, otherwisefalse.- Parameters:
- display-- trueif label will be applied in the chart, otherwise- false
- Returns:
- new builder instance
 
 - 
setXLabelColorpublic CrosshairOptionsBuilder setXLabelColor(String color) Sets, for X label, the crosshair label font color.- Parameters:
- color- the crosshair label font color.
- Returns:
- new builder instance
 
 - 
setXLabelColorpublic CrosshairOptionsBuilder setXLabelColor(IsColor color) Set the crosshair label font color.- Parameters:
- color- the crosshair label font color.
- Returns:
- new builder instance
 
 - 
setXLabelPaddingpublic CrosshairOptionsBuilder setXLabelPadding(int padding) Sets, for X label, the padding of crosshair label.- Parameters:
- padding- padding of crosshair label
- Returns:
- new builder instance
 
 - 
setXLabelBackgroundColorpublic CrosshairOptionsBuilder setXLabelBackgroundColor(String color) Sets, for X label, the background color.- Parameters:
- color- the background color.
- Returns:
- new builder instance
 
 - 
setXLabelBackgroundColorpublic CrosshairOptionsBuilder setXLabelBackgroundColor(IsColor color) Sets, for X label, the background color.- Parameters:
- color- the background color.
- Returns:
- new builder instance
 
 - 
setXLabelBorderRadiuspublic CrosshairOptionsBuilder setXLabelBorderRadius(int borderRadius) Sets, for X label, the label border radius (in pixels).- Parameters:
- borderRadius- the label border radius (in pixels).
- Returns:
- new builder instance
 
 - 
setXLabelFormatterpublic CrosshairOptionsBuilder setXLabelFormatter(CrosshairFormatterCallback formatterCallback) Sets, for X label, the callback which can be implemented to change the text of label.- Parameters:
- formatterCallback- the callback which can be implemented to change the text of label
- Returns:
- new builder instance
 
 - 
setXLabelBorderColorpublic CrosshairOptionsBuilder setXLabelBorderColor(IsColor borderColor) Sets the border color.- Parameters:
- borderColor- the border color.
- Returns:
- new builder instance
 
 - 
setXLabelBorderColorpublic CrosshairOptionsBuilder setXLabelBorderColor(String borderColor) Sets the border color.- Parameters:
- borderColor- the border color.
- Returns:
- new builder instance
 
 - 
setXLabelBorderWidthpublic CrosshairOptionsBuilder setXLabelBorderWidth(int borderWidth) Sets the border width.- Parameters:
- borderWidth- the border width.
- Returns:
- new builder instance
 
 - 
setYLabelDisplaypublic CrosshairOptionsBuilder setYLabelDisplay(boolean display) Sets, for Y label,trueif label will be applied in the chart, otherwisefalse.- Parameters:
- display-- trueif label will be applied in the chart, otherwise- false
- Returns:
- new builder instance
 
 - 
setYLabelColorpublic CrosshairOptionsBuilder setYLabelColor(String color) Sets, for Y label, the crosshair label font color.- Parameters:
- color- the crosshair label font color.
- Returns:
- new builder instance
 
 - 
setYLabelColorpublic CrosshairOptionsBuilder setYLabelColor(IsColor color) Set the crosshair label font color.- Parameters:
- color- the crosshair label font color.
- Returns:
- new builder instance
 
 - 
setYLabelPaddingpublic CrosshairOptionsBuilder setYLabelPadding(int padding) Sets, for Y label, the padding of crosshair label.- Parameters:
- padding- padding of crosshair label
- Returns:
- new builder instance
 
 - 
setYLabelBackgroundColorpublic CrosshairOptionsBuilder setYLabelBackgroundColor(String color) Sets, for Y label, the background color.- Parameters:
- color- the background color.
- Returns:
- new builder instance
 
 - 
setYLabelBackgroundColorpublic CrosshairOptionsBuilder setYLabelBackgroundColor(IsColor color) Sets, for Y label, the background color.- Parameters:
- color- the background color.
- Returns:
- new builder instance
 
 - 
setYLabelBorderRadiuspublic CrosshairOptionsBuilder setYLabelBorderRadius(int borderRadius) Sets, for Y label, the label border radius (in pixels).- Parameters:
- borderRadius- the label border radius (in pixels).
- Returns:
- new builder instance
 
 - 
setYLabelFormatterpublic CrosshairOptionsBuilder setYLabelFormatter(CrosshairFormatterCallback formatterCallback) Sets, for Y label, the callback which can be implemented to change the text of label.- Parameters:
- formatterCallback- the callback which can be implemented to change the text of label
- Returns:
- new builder instance
 
 - 
setYLabelBorderColorpublic CrosshairOptionsBuilder setYLabelBorderColor(IsColor borderColor) Sets the border color.- Parameters:
- borderColor- the border color.
- Returns:
- new builder instance
 
 - 
setYLabelBorderColorpublic CrosshairOptionsBuilder setYLabelBorderColor(String borderColor) Sets the border color.- Parameters:
- borderColor- the border color.
- Returns:
- new builder instance
 
 - 
setYLabelBorderWidthpublic CrosshairOptionsBuilder setYLabelBorderWidth(int borderWidth) Sets the border width.- Parameters:
- borderWidth- the border width.
- Returns:
- new builder instance
 
 - 
setLabelsDisplaypublic CrosshairOptionsBuilder setLabelsDisplay(boolean display) Sets, for both labels,trueif label will be applied in the chart, otherwisefalse.- Parameters:
- display-- trueif label will be applied in the chart, otherwise- false
- Returns:
- new builder instance
 
 - 
setLabelsColorpublic CrosshairOptionsBuilder setLabelsColor(String color) Sets, for both labels, the crosshair label font color.- Parameters:
- color- the crosshair label font color.
- Returns:
- new builder instance
 
 - 
setLabelsColorpublic CrosshairOptionsBuilder setLabelsColor(IsColor color) Set the crosshair label font color.- Parameters:
- color- the crosshair label font color.
- Returns:
- new builder instance
 
 - 
setLabelsPaddingpublic CrosshairOptionsBuilder setLabelsPadding(int padding) Sets, for both labels, the padding of crosshair label.- Parameters:
- padding- padding of crosshair label
- Returns:
- new builder instance
 
 - 
setLabelsBackgroundColorpublic CrosshairOptionsBuilder setLabelsBackgroundColor(String color) Sets, for both labels, the background color.- Parameters:
- color- the background color.
- Returns:
- new builder instance
 
 - 
setLabelsBackgroundColorpublic CrosshairOptionsBuilder setLabelsBackgroundColor(IsColor color) Sets, for both labels, the background color.- Parameters:
- color- the background color.
- Returns:
- new builder instance
 
 - 
setLabelsBorderRadiuspublic CrosshairOptionsBuilder setLabelsBorderRadius(int borderRadius) Sets, for both labels, the label border radius (in pixels).- Parameters:
- borderRadius- the label border radius (in pixels).
- Returns:
- new builder instance
 
 - 
setLabelsBorderColorpublic CrosshairOptionsBuilder setLabelsBorderColor(IsColor borderColor) Sets the border color.- Parameters:
- borderColor- the border color.
- Returns:
- new builder instance
 
 - 
setLabelsBorderColorpublic CrosshairOptionsBuilder setLabelsBorderColor(String borderColor) Sets the border color.- Parameters:
- borderColor- the border color.
- Returns:
- new builder instance
 
 - 
setLabelsBorderWidthpublic CrosshairOptionsBuilder setLabelsBorderWidth(int borderWidth) Sets the border width.- Parameters:
- borderWidth- the border width.
- Returns:
- new builder instance
 
 
- 
 
-