Class SelectionCleaner
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.impl.plugins.SelectionCleaner
-
public final class SelectionCleaner extends NativeObjectContainer
DatasetsItemsSelector.IDplugin configuration element in order to have in the chart a clickable element to clear the selection.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static AlignDEFAULT_ALIGNDefault selection cleaner box alignment,Align.RIGHT.static booleanDEFAULT_DISPLAYDefault flag if selection cleaner must be showed in the chart, value is false.static StringDEFAULT_LABELDefault label for selection cleaner element, value is "Reset selection".static intDEFAULT_MARGINDefault margin from canvas for selection cleaner element, value is 2.static intDEFAULT_PADDINGDefault padding for selection cleaner element, value is 4.static PositionDEFAULT_POSITIONDefault selection cleaner box position,Position.BOTTOM.static RenderDEFAULT_RENDERDefault selection cleaner rendering,Render.IMAGE_LABEL.static intDEFAULT_SPACINGDefault spacing between label and image for selection cleaner element, value is 3.static booleanDEFAULT_USE_SELECTION_STYLEDefault flag if selection cleaner will use selection area style, value is false.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AligngetAlign()Returns the selection cleaner align.IsColorgetColor()Returns the selection cleaner label font color.StringgetColorAsString()Returns the selection cleaner label font color.IsFontgetFont()Returns the font object.ImggetImage()Returns the selection cleaner image.StringgetLabel()Returns the selection cleaner label.intgetMargin()Returns the margin from canvas border.intgetPadding()Returns the padding of selection cleaner element.PositiongetPosition()Returns the selection cleaner label position.RendergetRender()Returns the selection cleaner render.intgetSpacing()Returns the spacing between label and image for selection cleaner element.booleanisDisplay()Returnstrueif clear of selection label will be applied in the chart, otherwisefalse.booleanisUseSelectionStyle()Returnstrueif selection cleaner element will apply style of selection area, otherwisefalse.voidsetAlign(Align align)Sets the selection cleaner align.voidsetColor(String color)Sets the selection cleaner label font color.voidsetColor(IsColor color)Set the selection cleaner label font color.voidsetDisplay(boolean display)Setstrueif clear of selection label will be applied in the chart, otherwisefalse.voidsetImage(Img image)Sets the selection cleaner image.voidsetLabel(String label)Sets the selection cleaner label.voidsetMargin(int margin)Sets the margin from canvas border.voidsetPadding(int padding)Sets the padding of selection cleaner element.voidsetPosition(Position position)Sets the selection cleaner label position.voidsetRender(Render render)Sets the selection cleaner render.voidsetSpacing(int spacing)Sets the spacing between label and image for selection cleaner element.voidsetUseSelectionStyle(boolean useSelectionStyle)Setstrueif clear of selection label will be applied in the chart, otherwisefalse.-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, 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_DISPLAY
public static final boolean DEFAULT_DISPLAY
Default flag if selection cleaner must be showed in the chart, value is false.- See Also:
- Constant Field Values
-
DEFAULT_LABEL
public static final String DEFAULT_LABEL
Default label for selection cleaner element, value is "Reset selection".- See Also:
- Constant Field Values
-
DEFAULT_MARGIN
public static final int DEFAULT_MARGIN
Default margin from canvas for selection cleaner element, value is 2.- See Also:
- Constant Field Values
-
DEFAULT_PADDING
public static final int DEFAULT_PADDING
Default padding for selection cleaner element, value is 4.- See Also:
- Constant Field Values
-
DEFAULT_SPACING
public static final int DEFAULT_SPACING
Default spacing between label and image for selection cleaner element, value is 3.- See Also:
- Constant Field Values
-
DEFAULT_USE_SELECTION_STYLE
public static final boolean DEFAULT_USE_SELECTION_STYLE
Default flag if selection cleaner will use selection area style, value is false.- See Also:
- Constant Field Values
-
DEFAULT_ALIGN
public static final Align DEFAULT_ALIGN
Default selection cleaner box alignment,Align.RIGHT.
-
DEFAULT_RENDER
public static final Render DEFAULT_RENDER
Default selection cleaner rendering,Render.IMAGE_LABEL.
-
DEFAULT_POSITION
public static final Position DEFAULT_POSITION
Default selection cleaner box position,Position.BOTTOM.
-
-
Method Detail
-
getFont
public IsFont getFont()
Returns the font object.- Returns:
- the font object.
-
setDisplay
public void 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
-
isDisplay
public boolean isDisplay()
Returnstrueif clear of selection label will be applied in the chart, otherwisefalse.- Returns:
trueif clear of selection label will be applied in the chart, otherwisefalse
-
setLabel
public void setLabel(String label)
Sets the selection cleaner label.- Parameters:
label- the selection cleaner label
-
getLabel
public String getLabel()
Returns the selection cleaner label.- Returns:
- the selection cleaner label
-
getColorAsString
public String getColorAsString()
Returns the selection cleaner label font color.- Returns:
- the selection cleaner label font color.
-
getColor
public IsColor getColor()
Returns the selection cleaner label font color.- Returns:
- the selection cleaner label font color.
-
setColor
public void setColor(String color)
Sets the selection cleaner label font color.- Parameters:
color- the selection cleaner label font color.
-
setColor
public void setColor(IsColor color)
Set the selection cleaner label font color.- Parameters:
color- the selection cleaner label font color.
-
setAlign
public void setAlign(Align align)
Sets the selection cleaner align.- Parameters:
align- the selection cleaner align
-
getAlign
public Align getAlign()
Returns the selection cleaner align.- Returns:
- the selection cleaner align
-
setRender
public void setRender(Render render)
Sets the selection cleaner render.- Parameters:
render- the selection cleaner render
-
getRender
public Render getRender()
Returns the selection cleaner render.- Returns:
- the selection cleaner render
-
setPosition
public void setPosition(Position position)
Sets the selection cleaner label position.- Parameters:
position- the selection cleaner label position
-
getPosition
public Position getPosition()
Returns the selection cleaner label position.- Returns:
- the selection cleaner label position
-
setImage
public void setImage(Img image)
Sets the selection cleaner image.- Parameters:
image- the selection cleaner image
-
getImage
public Img getImage()
Returns the selection cleaner image.- Returns:
- the selection cleaner image or
nullif not set
-
setMargin
public void setMargin(int margin)
Sets the margin from canvas border.- Parameters:
margin- margin from canvas border
-
getMargin
public int getMargin()
Returns the margin from canvas border.- Returns:
- the margin from canvas border
-
setPadding
public void setPadding(int padding)
Sets the padding of selection cleaner element.- Parameters:
padding- padding of selection cleaner element
-
getPadding
public int getPadding()
Returns the padding of selection cleaner element.- Returns:
- the padding of selection cleaner element
-
setSpacing
public void 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
-
getSpacing
public int getSpacing()
Returns the spacing between label and image for selection cleaner element.- Returns:
- the spacing between label and image for selection cleaner element
-
setUseSelectionStyle
public void 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
-
isUseSelectionStyle
public boolean isUseSelectionStyle()
Returnstrueif selection cleaner element will apply style of selection area, otherwisefalse.- Returns:
trueif selection cleaner element will apply style of selection area, otherwisefalse
-
-