Class DatasetsItemsSelectorOptions
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.plugins.AbstractPluginOptions
-
- org.pepstock.charba.client.impl.plugins.DatasetsItemsSelectorOptions
-
- All Implemented Interfaces:
IsDefaultEventHandler
,HasEvents
public final class DatasetsItemsSelectorOptions extends AbstractPluginOptions
Configuration options ofDatasetsItemsSelector.ID
plugin.
It is managing:
- the X axis ID
- the selection color
- the border color
- the border width
- the border dash
- the border dash offset
- flag to fire event on update
- "clear" options
- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_ALPHA
Default alpha of selecting/selection colors, 0.3.static DefaultScaleId
DEFAULT_AXIS_ID
Default X axis id,DefaultScaleId.X
.static IsColor
DEFAULT_BORDER_COLOR
Default border color for area,GwtMaterialColor.GREY_DARKEN_2
.static double
DEFAULT_BORDER_DASH_OFFSET
Default border dash offset of selection area, 0.0.static int
DEFAULT_BORDER_WIDTH
Default border width of selection area, 0.static IsColor
DEFAULT_COLOR
Default color for area,GwtMaterialColor.ORANGE_LIGHTEN_3
, alpha 0.3.static boolean
DEFAULT_ENABLED
Default enabled options, true.
-
Constructor Summary
Constructors Constructor Description DatasetsItemsSelectorOptions()
Builds the object with new java script object setting the default value of plugin.
The global plugin options is used, if exists, as defaults values.DatasetsItemsSelectorOptions(IsChart chart)
Builds the object with a chart instance in order to get the right defaults.
If the plugin options have not been set by chart type, it will use the global.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsColor
getBorderColor()
Returns the color.String
getBorderColorAsString()
Returns the color.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.double
getBorderDashOffset()
Returns the line dash pattern offset.int
getBorderWidth()
Returns the border width of the selection.IsColor
getColor()
Returns the color.String
getColorAsString()
Returns the color.ModifierKey
getModifierKey()
Returns the modifier key to activate selection.SelectionCleaner
getSelectionCleaner()
Returns the selection cleaner element.ScaleId
getXAxisID()
Returns the ID of the x axis to plot this dataset on.boolean
isEnabled()
Returnstrue
if plugin is enabled.void
setBorderColor(String color)
Sets the color.void
setBorderColor(IsColor color)
Sets the color.void
setBorderDash(int... borderDash)
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.void
setBorderDashOffset(double borderDashOffset)
Sets the line dash pattern offset.void
setBorderWidth(int borderWidth)
Sets the border width of the selection.void
setColor(String color)
Sets the color.void
setColor(IsColor color)
Sets the color.void
setEnabled(boolean enabled)
Setstrue
if plugin is enabled.void
setEvents(Set<IsEvent> events)
Sets the browser events that the legend should listen to.void
setEvents(IsEvent... events)
Sets the browser events that the chart should listen to.void
setModifierKey(ModifierKey modifierKey)
Sets the modifier key to activate selection.void
setXAxisID(String xAxisID)
Sets the ID of the x axis to plot this dataset on.void
setXAxisID(ScaleId xAxisID)
Sets the ID of the x axis to plot this dataset on.-
Methods inherited from class org.pepstock.charba.client.plugins.AbstractPluginOptions
applyingDefaults, applyingDefaults, getEventsOptionHandler, getId, getPluginId, loadGlobalsPluginOptions, store, store, store, store
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, 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
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
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, 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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Field Detail
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED
Default enabled options, true.- See Also:
- Constant Field Values
-
DEFAULT_ALPHA
public static final double DEFAULT_ALPHA
Default alpha of selecting/selection colors, 0.3.- See Also:
- Constant Field Values
-
DEFAULT_COLOR
public static final IsColor DEFAULT_COLOR
Default color for area,GwtMaterialColor.ORANGE_LIGHTEN_3
, alpha 0.3.
-
DEFAULT_AXIS_ID
public static final DefaultScaleId DEFAULT_AXIS_ID
Default X axis id,DefaultScaleId.X
.
-
DEFAULT_BORDER_WIDTH
public static final int DEFAULT_BORDER_WIDTH
Default border width of selection area, 0.- See Also:
- Constant Field Values
-
DEFAULT_BORDER_DASH_OFFSET
public static final double DEFAULT_BORDER_DASH_OFFSET
Default border dash offset of selection area, 0.0.- See Also:
- Constant Field Values
-
DEFAULT_BORDER_COLOR
public static final IsColor DEFAULT_BORDER_COLOR
Default border color for area,GwtMaterialColor.GREY_DARKEN_2
.
-
-
Constructor Detail
-
DatasetsItemsSelectorOptions
public DatasetsItemsSelectorOptions()
Builds the object with new java script object setting the default value of plugin.
The global plugin options is used, if exists, as defaults values.
-
DatasetsItemsSelectorOptions
public DatasetsItemsSelectorOptions(IsChart chart)
Builds the object with a chart instance in order to get the right defaults.
If the plugin options have not been set by chart type, it will use the global.- Parameters:
chart
- chart instance related to the plugin options
-
-
Method Detail
-
setEvents
public void setEvents(IsEvent... events)
Description copied from interface:HasEvents
Sets the browser events that the chart should listen to.
-
setEvents
public void setEvents(Set<IsEvent> events)
Description copied from interface:HasEvents
Sets the browser events that the legend should listen to.
-
getSelectionCleaner
public SelectionCleaner getSelectionCleaner()
Returns the selection cleaner element.- Returns:
- the selection cleaner element
-
setEnabled
public void setEnabled(boolean enabled)
Setstrue
if plugin is enabled.- Parameters:
enabled
-true
if plugin is enabled.
-
isEnabled
public boolean isEnabled()
Returnstrue
if plugin is enabled.- Returns:
true
if plugin is enabled.
-
setXAxisID
public void setXAxisID(String xAxisID)
Sets the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.- Parameters:
xAxisID
- the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
-
setXAxisID
public void setXAxisID(ScaleId xAxisID)
Sets the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.- Parameters:
xAxisID
- the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
-
getXAxisID
public ScaleId getXAxisID()
Returns the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.- Returns:
- the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
-
getColorAsString
public String getColorAsString()
Returns the color.- Returns:
- the color.
-
getColor
public IsColor getColor()
Returns the color.- Returns:
- the color.
-
setColor
public void setColor(String color)
Sets the color.- Parameters:
color
- the color.
-
setColor
public void setColor(IsColor color)
Sets the color.- Parameters:
color
- the color.
-
setBorderDash
public void setBorderDash(int... borderDash)
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:
borderDash
- the line dash pattern used when stroking lines
-
getBorderDash
public 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.- Returns:
- the line dash pattern used when stroking lines.
-
setBorderDashOffset
public void setBorderDashOffset(double borderDashOffset)
Sets the line dash pattern offset.- Parameters:
borderDashOffset
- the line dash pattern offset.
-
getBorderDashOffset
public double getBorderDashOffset()
Returns the line dash pattern offset.- Returns:
- the line dash pattern offset.
-
setBorderWidth
public void setBorderWidth(int borderWidth)
Sets the border width of the selection.- Parameters:
borderWidth
- the border width of the selection.
-
getBorderWidth
public int getBorderWidth()
Returns the border width of the selection.- Returns:
- list of the border width of the selection.
-
getBorderColorAsString
public String getBorderColorAsString()
Returns the color.- Returns:
- the color.
-
getBorderColor
public IsColor getBorderColor()
Returns the color.- Returns:
- the color.
-
setBorderColor
public void setBorderColor(String color)
Sets the color.- Parameters:
color
- the color.
-
setBorderColor
public void setBorderColor(IsColor color)
Sets the color.- Parameters:
color
- the color.
-
setModifierKey
public void setModifierKey(ModifierKey modifierKey)
Sets the modifier key to activate selection.- Parameters:
modifierKey
- the modifier key to activate selection
-
getModifierKey
public ModifierKey getModifierKey()
Returns the modifier key to activate selection.- Returns:
- the modifier key to activate selection
-
-