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.ID
plugin 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 Align
DEFAULT_ALIGN
Default selection cleaner box alignment,Align.RIGHT
.static boolean
DEFAULT_DISPLAY
Default flag if selection cleaner must be showed in the chart, value is false.static String
DEFAULT_LABEL
Default label for selection cleaner element, value is "Reset selection".static int
DEFAULT_MARGIN
Default margin from canvas for selection cleaner element, value is 2.static int
DEFAULT_PADDING
Default padding for selection cleaner element, value is 4.static Position
DEFAULT_POSITION
Default selection cleaner box position,Position.BOTTOM
.static Render
DEFAULT_RENDER
Default selection cleaner rendering,Render.IMAGE_LABEL
.static int
DEFAULT_SPACING
Default spacing between label and image for selection cleaner element, value is 3.static boolean
DEFAULT_USE_SELECTION_STYLE
Default 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 Align
getAlign()
Returns the selection cleaner align.IsColor
getColor()
Returns the selection cleaner label font color.String
getColorAsString()
Returns the selection cleaner label font color.IsFont
getFont()
Returns the font object.Img
getImage()
Returns the selection cleaner image.String
getLabel()
Returns the selection cleaner label.int
getMargin()
Returns the margin from canvas border.int
getPadding()
Returns the padding of selection cleaner element.Position
getPosition()
Returns the selection cleaner label position.Render
getRender()
Returns the selection cleaner render.int
getSpacing()
Returns the spacing between label and image for selection cleaner element.boolean
isDisplay()
Returnstrue
if clear of selection label will be applied in the chart, otherwisefalse
.boolean
isUseSelectionStyle()
Returnstrue
if selection cleaner element will apply style of selection area, otherwisefalse
.void
setAlign(Align align)
Sets the selection cleaner align.void
setColor(String color)
Sets the selection cleaner label font color.void
setColor(IsColor color)
Set the selection cleaner label font color.void
setDisplay(boolean display)
Setstrue
if clear of selection label will e applied in the chart, otherwisefalse
.void
setImage(Img image)
Sets the selection cleaner image.void
setLabel(String label)
Sets the selection cleaner label.void
setMargin(int margin)
Sets the margin from canvas border.void
setPadding(int padding)
Sets the padding of selection cleaner element.void
setPosition(Position position)
Sets the selection cleaner label position.void
setRender(Render render)
Sets the selection cleaner render.void
setSpacing(int spacing)
Sets the spacing between label and image for selection cleaner element.void
setUseSelectionStyle(boolean useSelectionStyle)
Setstrue
if clear of selection label will e applied in the chart, otherwisefalse
.-
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, 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, 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)
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
-
isDisplay
public boolean isDisplay()
Returnstrue
if clear of selection label will be applied in the chart, otherwisefalse
.- Returns:
true
if 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
null
if 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)
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
-
isUseSelectionStyle
public boolean isUseSelectionStyle()
Returnstrue
if selection cleaner element will apply style of selection area, otherwisefalse
.- Returns:
true
if selection cleaner element will apply style of selection area, otherwisefalse
-
-