Class TooltipLabelColor


  • public final class TooltipLabelColor
    extends NativeObjectContainer
    This object contains the color info when a label in the tooltip.
    It must be used in the label tooltip callback.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • TooltipLabelColor

        public TooltipLabelColor()
        Creates the object with an empty native object.
      • TooltipLabelColor

        public TooltipLabelColor​(IsColor backgroundColor)
        Creates the object with initial colors.
        Parameters:
        backgroundColor - background color to be set
      • TooltipLabelColor

        public TooltipLabelColor​(IsColor backgroundColor,
                                 IsColor borderColor)
        Creates the object with initial colors.
        Parameters:
        backgroundColor - background color to be set
        borderColor - border color to be set
      • TooltipLabelColor

        public TooltipLabelColor​(String backgroundColor)
        Creates the object with initial colors.
        Parameters:
        backgroundColor - background color to be set
      • TooltipLabelColor

        public TooltipLabelColor​(String backgroundColor,
                                 String borderColor)
        Creates the object with initial colors.
        Parameters:
        backgroundColor - background color to be set
        borderColor - border color to be set
    • Method Detail

      • setBackgroundColor

        public void setBackgroundColor​(String backgroundColor)
        Sets the background color of the tooltip item as string.
        Parameters:
        backgroundColor - the background color of the tooltip item
      • setBackgroundColor

        public void setBackgroundColor​(IsColor backgroundColor)
        Sets the background color of the tooltip item.
        Parameters:
        backgroundColor - the background color of the tooltip item
      • setBackgroundColor

        public void setBackgroundColor​(TooltipItem tooltipItem,
                                       Pattern pattern)
        Sets the background color of the tooltip item as pattern
        Parameters:
        tooltipItem - tooltip item related to this label
        pattern - the background color of the tooltip item as pattern
      • setBackgroundColor

        public void setBackgroundColor​(TooltipItem tooltipItem,
                                       Gradient gradient)
        Sets the background color of the tooltip item as gradient.
        Parameters:
        tooltipItem - tooltip item related to this label
        gradient - the background color of the tooltip item as gradient
      • isBackgroundColorAsColor

        public boolean isBackgroundColorAsColor()
        Returns true if the background color of the tooltip item is defined as color.
        Returns:
        true if the background color of the tooltip item is defined as color
      • isBackgroundColorAsGradient

        public boolean isBackgroundColorAsGradient()
        Returns true if the background color of the tooltip item is defined as gradient.
        Returns:
        true if the background color of the tooltip item is defined as gradient
      • isBackgroundColorAsPattern

        public boolean isBackgroundColorAsPattern()
        Returns true if the background color of the tooltip item is defined as canvas pattern.
        Returns:
        true if the background color of the tooltip item is defined as canvas pattern
      • getBackgroundColorAsString

        public String getBackgroundColorAsString()
        Returns the background color of the label.
        Returns:
        the background color of the label.
      • getBackgroundColor

        public IsColor getBackgroundColor()
        Returns the background color of the label.
        Returns:
        the background color of the label.
      • getBackgroundColorAsPattern

        public Pattern getBackgroundColorAsPattern()
        Returns the background color as pattern.
        Returns:
        the background color or null if is not a pattern
      • getBackgroundColorAsCanvasPattern

        public CanvasPatternItem getBackgroundColorAsCanvasPattern()
        Returns the background color as canvas pattern.
        Returns:
        the background color or null if is not a canvas pattern
      • getBackgroundColorAsGradient

        public Gradient getBackgroundColorAsGradient()
        Returns the background color as gradient.
        Returns:
        the background color or null if is not a gradient
      • getBackgroundColorAsCanvasGradient

        public CanvasGradientItem getBackgroundColorAsCanvasGradient()
        Returns the background color as canvas gradient.
        Returns:
        the background color or null if is not a canvas gradient
      • isBorderColorAsColor

        public boolean isBorderColorAsColor()
        Returns true if the border color of the tooltip item is defined as color.
        Returns:
        true if the border color of the tooltip item is defined as color
      • isBorderColorAsGradient

        public boolean isBorderColorAsGradient()
        Returns true if the border color of the tooltip item is defined as gradient.
        Returns:
        true if the border color of the tooltip item is defined as gradient
      • setBorderColor

        public void setBorderColor​(String borderColor)
        Sets border color as string
        Parameters:
        borderColor - border color
      • setBorderColor

        public void setBorderColor​(IsColor borderColor)
        Sets border color
        Parameters:
        borderColor - border color
      • setBorderColor

        public void setBorderColor​(CanvasGradientItem gradient)
        Sets the border color of the tooltip item as canvas gradient.
        Parameters:
        gradient - the border color of the tooltip item as canvas gradient
      • setBorderColor

        public void setBorderColor​(TooltipItem tooltipItem,
                                   Gradient gradient)
        Sets the border color of the tooltip item as gradient.
        Parameters:
        tooltipItem - tooltip item related to this label
        gradient - the border color of the tooltip item as gradient
      • getBorderColorAsString

        public String getBorderColorAsString()
        Returns the border color of the label.
        Returns:
        the border color of the label.
      • getBorderColor

        public IsColor getBorderColor()
        Returns the border color of the label.
        Returns:
        the border color of the label.
      • getBorderColorAsGradient

        public Gradient getBorderColorAsGradient()
        Returns the border color as gradient.
        Returns:
        the border color or null if is not a gradient
      • getBorderColorAsCanvasGradient

        public CanvasGradientItem getBorderColorAsCanvasGradient()
        Returns the border color as canvas gradient.
        Returns:
        the border color or null if is not a canvas gradient
      • setBorderWidth

        public void setBorderWidth​(int borderWidth)
        Sets the border width.
        Parameters:
        borderWidth - the border width.
      • getBorderWidth

        public int getBorderWidth()
        Returns the border width.
        Returns:
        the border width.
      • setBorderRadius

        public void setBorderRadius​(int borderRadius)
        Sets the bar border radius (in pixels).
        Parameters:
        borderRadius - the bar border radius (in pixels).
      • getBorderRadius

        public int getBorderRadius()
        Returns the bar border radius (in pixels).
        Returns:
        the bar border radius (in pixels).
      • setBorderDash

        public void setBorderDash​(int... borderDash)
        Sets the line dash pattern used when stroking borders, 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 borders, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
      • getBorderDash

        public List<Integer> getBorderDash()
        Returns the line dash pattern used when stroking borders, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
        Returns:
        the line dash pattern used when stroking borders, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
      • nativeObject

        public NativeObject nativeObject()
        Wraps the protected method to get the java script object in order to consume it.
        Returns:
        the java script object in order to consume it.