Class DatasetsItemsSelectorOptionsBuilder
- java.lang.Object
-
- org.pepstock.charba.client.commons.AbstractBaseBuilder
-
- org.pepstock.charba.client.impl.plugins.DatasetsItemsSelectorOptionsBuilder
-
- All Implemented Interfaces:
IsBuilder
public final class DatasetsItemsSelectorOptionsBuilder extends AbstractBaseBuilder
Comfortable object to createDatasetsItemsSelector.ID
plugin options by a builder.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DatasetsItemsSelectorOptions
build()
Returns a configured plugin options.static DatasetsItemsSelectorOptionsBuilder
create()
Returns new builder instance.static DatasetsItemsSelectorOptionsBuilder
create(IsChart chart)
Returns new builder instance using the chart global options.DatasetsItemsSelectorOptionsBuilder
setAlign(Align align)
Sets the selection cleaner align.DatasetsItemsSelectorOptionsBuilder
setBorderColor(String color)
Sets the color.DatasetsItemsSelectorOptionsBuilder
setBorderColor(IsColor color)
Sets the color.DatasetsItemsSelectorOptionsBuilder
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.DatasetsItemsSelectorOptionsBuilder
setBorderWidth(int borderWidth)
Sets the border width of the selection.DatasetsItemsSelectorOptionsBuilder
setColor(String color)
Sets the color.DatasetsItemsSelectorOptionsBuilder
setColor(IsColor color)
Sets the color.DatasetsItemsSelectorOptionsBuilder
setDisplay(boolean display)
Setstrue
if clear of selection label will e applied in the chart, otherwisefalse
.DatasetsItemsSelectorOptionsBuilder
setEnabled(boolean enabled)
Setstrue
if plugin is enabled.DatasetsItemsSelectorOptionsBuilder
setFontColor(String color)
Sets the selection cleaner label font color.DatasetsItemsSelectorOptionsBuilder
setFontColor(IsColor color)
Set the selection cleaner label font color.DatasetsItemsSelectorOptionsBuilder
setFontFamily(String fontFamily)
Sets the font family, follows CSS font-family in selection cleaner.DatasetsItemsSelectorOptionsBuilder
setFontSize(int fontSize)
Sets the font size.DatasetsItemsSelectorOptionsBuilder
setFontStyle(FontStyle fontStyle)
Sets the font style, follows CSS font-style options (i.e.DatasetsItemsSelectorOptionsBuilder
setImage(Img image)
Sets the selection cleaner image.DatasetsItemsSelectorOptionsBuilder
setLabel(String label)
Sets the selection cleaner label.DatasetsItemsSelectorOptionsBuilder
setMargin(int margin)
Sets the margin from canvas border.DatasetsItemsSelectorOptionsBuilder
setModifierKey(ModifierKey modifierKey)
Sets the modifier key to activate selection.DatasetsItemsSelectorOptionsBuilder
setPadding(int padding)
Sets the padding of selection cleaner element.DatasetsItemsSelectorOptionsBuilder
setPosition(Position position)
Sets the selection cleaner label position.DatasetsItemsSelectorOptionsBuilder
setRender(Render render)
Sets the selection cleaner render.DatasetsItemsSelectorOptionsBuilder
setSpacing(int spacing)
Sets the spacing between label and image for selection cleaner element.DatasetsItemsSelectorOptionsBuilder
setUseSelectionStyle(boolean useSelectionStyle)
Setstrue
if clear of selection label will e applied in the chart, otherwisefalse
.DatasetsItemsSelectorOptionsBuilder
setXAxisID(String xAxisID)
Sets the ID of the x axis to plot this dataset on.DatasetsItemsSelectorOptionsBuilder
setXAxisID(ScaleId xAxisID)
Sets the ID of the x axis to plot this dataset on.-
Methods inherited from class org.pepstock.charba.client.commons.AbstractBaseBuilder
isBuilt, setBuilt
-
-
-
-
Method Detail
-
create
public static DatasetsItemsSelectorOptionsBuilder create()
Returns new builder instance.- Returns:
- new builder instance
-
create
public static DatasetsItemsSelectorOptionsBuilder 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
-
build
public DatasetsItemsSelectorOptions build()
Returns a configured plugin options.- Returns:
- a configured plugin options.
-
setEnabled
public DatasetsItemsSelectorOptionsBuilder setEnabled(boolean enabled)
Setstrue
if plugin is enabled.- Parameters:
enabled
-true
if plugin is enabled.- Returns:
- builder instance
-
setXAxisID
public DatasetsItemsSelectorOptionsBuilder 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.- Returns:
- builder instance
-
setXAxisID
public DatasetsItemsSelectorOptionsBuilder 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.- Returns:
- builder instance
-
setColor
public DatasetsItemsSelectorOptionsBuilder setColor(String color)
Sets the color.- Parameters:
color
- the color.- Returns:
- builder instance
-
setColor
public DatasetsItemsSelectorOptionsBuilder setColor(IsColor color)
Sets the color.- Parameters:
color
- the color.- Returns:
- builder instance
-
setBorderDash
public DatasetsItemsSelectorOptionsBuilder 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- Returns:
- builder instance
-
setBorderWidth
public DatasetsItemsSelectorOptionsBuilder setBorderWidth(int borderWidth)
Sets the border width of the selection.- Parameters:
borderWidth
- the border width of the selection.- Returns:
- builder instance
-
setBorderColor
public DatasetsItemsSelectorOptionsBuilder setBorderColor(String color)
Sets the color.- Parameters:
color
- the color.- Returns:
- builder instance
-
setBorderColor
public DatasetsItemsSelectorOptionsBuilder setBorderColor(IsColor color)
Sets the color.- Parameters:
color
- the color.- Returns:
- builder instance
-
setModifierKey
public DatasetsItemsSelectorOptionsBuilder setModifierKey(ModifierKey modifierKey)
Sets the modifier key to activate selection.- Parameters:
modifierKey
- the modifier key to activate selection- Returns:
- builder instance
-
setDisplay
public DatasetsItemsSelectorOptionsBuilder setDisplay(boolean display)
Setstrue
if clear of selection label will e applied in the chart, otherwisefalse
.- Parameters:
display
-true
if clear of selection label will e applied in the chart, otherwisefalse
- Returns:
- builder instance
-
setLabel
public DatasetsItemsSelectorOptionsBuilder setLabel(String label)
Sets the selection cleaner label.- Parameters:
label
- the selection cleaner label- Returns:
- builder instance
-
setFontSize
public DatasetsItemsSelectorOptionsBuilder setFontSize(int fontSize)
Sets the font size.- Parameters:
fontSize
- the font size.- Returns:
- builder instance
-
setFontStyle
public DatasetsItemsSelectorOptionsBuilder setFontStyle(FontStyle fontStyle)
Sets the font style, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).- Parameters:
fontStyle
- Font style, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).- Returns:
- builder instance
-
setFontFamily
public DatasetsItemsSelectorOptionsBuilder setFontFamily(String fontFamily)
Sets the font family, follows CSS font-family in selection cleaner.- Parameters:
fontFamily
- Font family, follows CSS font-family in selection cleaner.- Returns:
- builder instance
-
setFontColor
public DatasetsItemsSelectorOptionsBuilder setFontColor(String color)
Sets the selection cleaner label font color.- Parameters:
color
- the selection cleaner label font color.- Returns:
- builder instance
-
setFontColor
public DatasetsItemsSelectorOptionsBuilder setFontColor(IsColor color)
Set the selection cleaner label font color.- Parameters:
color
- the selection cleaner label font color.- Returns:
- builder instance
-
setAlign
public DatasetsItemsSelectorOptionsBuilder setAlign(Align align)
Sets the selection cleaner align.- Parameters:
align
- the selection cleaner align- Returns:
- builder instance
-
setRender
public DatasetsItemsSelectorOptionsBuilder setRender(Render render)
Sets the selection cleaner render.- Parameters:
render
- the selection cleaner render- Returns:
- builder instance
-
setPosition
public DatasetsItemsSelectorOptionsBuilder setPosition(Position position)
Sets the selection cleaner label position.- Parameters:
position
- the selection cleaner label position- Returns:
- builder instance
-
setImage
public DatasetsItemsSelectorOptionsBuilder setImage(Img image)
Sets the selection cleaner image.- Parameters:
image
- the selection cleaner image- Returns:
- builder instance
-
setMargin
public DatasetsItemsSelectorOptionsBuilder setMargin(int margin)
Sets the margin from canvas border.- Parameters:
margin
- margin from canvas border- Returns:
- builder instance
-
setPadding
public DatasetsItemsSelectorOptionsBuilder setPadding(int padding)
Sets the padding of selection cleaner element.- Parameters:
padding
- padding of selection cleaner element- Returns:
- builder instance
-
setSpacing
public DatasetsItemsSelectorOptionsBuilder setSpacing(int spacing)
Sets the spacing between label and image for selection cleaner element.- Parameters:
spacing
- spacing between label and image for selection cleaner element- Returns:
- builder instance
-
setUseSelectionStyle
public DatasetsItemsSelectorOptionsBuilder setUseSelectionStyle(boolean useSelectionStyle)
Setstrue
if clear of selection label will e applied in the chart, otherwisefalse
.- Parameters:
useSelectionStyle
-true
if clear of selection label will e applied in the chart, otherwisefalse
- Returns:
- builder instance
-
-