Class 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 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_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)
        Sets true if clear of selection label will be applied in the chart, otherwise false.
        Parameters:
        display - true if clear of selection label will be applied in the chart, otherwise false
      • isDisplay

        public boolean isDisplay()
        Returns true if clear of selection label will be applied in the chart, otherwise false.
        Returns:
        true if clear of selection label will be applied in the chart, otherwise false
      • 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)
        Sets true if clear of selection label will be applied in the chart, otherwise false.
        Parameters:
        useSelectionStyle - true if clear of selection label will be applied in the chart, otherwise false
      • isUseSelectionStyle

        public boolean isUseSelectionStyle()
        Returns true if selection cleaner element will apply style of selection area, otherwise false.
        Returns:
        true if selection cleaner element will apply style of selection area, otherwise false