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.IDplugin options by a builder.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DatasetsItemsSelectorOptionsbuild()Returns a configured plugin options.static DatasetsItemsSelectorOptionsBuildercreate()Returns new builder instance.static DatasetsItemsSelectorOptionsBuildercreate(IsChart chart)Returns new builder instance using the chart global options.DatasetsItemsSelectorOptionsBuildersetAlign(Align align)Sets the selection cleaner align.DatasetsItemsSelectorOptionsBuildersetBorderColor(String color)Sets the color.DatasetsItemsSelectorOptionsBuildersetBorderColor(IsColor color)Sets the color.DatasetsItemsSelectorOptionsBuildersetBorderDash(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.DatasetsItemsSelectorOptionsBuildersetBorderWidth(int borderWidth)Sets the border width of the selection.DatasetsItemsSelectorOptionsBuildersetColor(String color)Sets the color.DatasetsItemsSelectorOptionsBuildersetColor(IsColor color)Sets the color.DatasetsItemsSelectorOptionsBuildersetDisplay(boolean display)Setstrueif clear of selection label will be applied in the chart, otherwisefalse.DatasetsItemsSelectorOptionsBuildersetEnabled(boolean enabled)Setstrueif plugin is enabled.DatasetsItemsSelectorOptionsBuildersetFontColor(String color)Sets the selection cleaner label font color.DatasetsItemsSelectorOptionsBuildersetFontColor(IsColor color)Set the selection cleaner label font color.DatasetsItemsSelectorOptionsBuildersetFontFamily(String fontFamily)Sets the font family, follows CSS font-family in selection cleaner.DatasetsItemsSelectorOptionsBuildersetFontSize(int fontSize)Sets the font size.DatasetsItemsSelectorOptionsBuildersetFontStyle(FontStyle fontStyle)Sets the font style, follows CSS font-style options (i.e.DatasetsItemsSelectorOptionsBuildersetImage(Img image)Sets the selection cleaner image.DatasetsItemsSelectorOptionsBuildersetLabel(String label)Sets the selection cleaner label.DatasetsItemsSelectorOptionsBuildersetMargin(int margin)Sets the margin from canvas border.DatasetsItemsSelectorOptionsBuildersetModifierKey(ModifierKey modifierKey)Sets the modifier key to activate selection.DatasetsItemsSelectorOptionsBuildersetPadding(int padding)Sets the padding of selection cleaner element.DatasetsItemsSelectorOptionsBuildersetPosition(Position position)Sets the selection cleaner label position.DatasetsItemsSelectorOptionsBuildersetRender(Render render)Sets the selection cleaner render.DatasetsItemsSelectorOptionsBuildersetSpacing(int spacing)Sets the spacing between label and image for selection cleaner element.DatasetsItemsSelectorOptionsBuildersetUseSelectionStyle(boolean useSelectionStyle)Setstrueif clear of selection label will be applied in the chart, otherwisefalse.DatasetsItemsSelectorOptionsBuildersetXAxisID(String xAxisID)Sets the ID of the x axis to plot this dataset on.DatasetsItemsSelectorOptionsBuildersetXAxisID(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)
Setstrueif plugin is enabled.- Parameters:
enabled-trueif 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)
Setstrueif clear of selection label will be applied in the chart, otherwisefalse.- Parameters:
display-trueif clear of selection label will be 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)
Setstrueif clear of selection label will be applied in the chart, otherwisefalse.- Parameters:
useSelectionStyle-trueif clear of selection label will be applied in the chart, otherwisefalse- Returns:
- builder instance
-
-