All Implemented Interfaces:
HasShadow<Label>, HasText<Label>, HasPadding<Label>, Serializable

public class Label extends AbstractText<Label> implements HasShadow<Label>, HasPadding<Label>
General label for components.
See Also:
  • Field Details

    • show

      protected Boolean show
    • precision

      protected Integer precision
    • formatter

      protected String formatter
    • formatterFunction

      protected JsFunction formatterFunction
    • margin

      protected Integer margin
    • padding

      protected Padding padding
    • backgroundColor

      protected Color backgroundColor
    • borderColor

      protected Color borderColor
    • borderWidth

      protected Integer borderWidth
    • shadowBlur

      protected Integer shadowBlur
    • shadowColor

      protected Color shadowColor
    • shadowOffsetX

      protected Integer shadowOffsetX
    • shadowOffsetY

      protected Integer shadowOffsetY
  • Constructor Details

    • Label

      public Label()
  • Method Details

    • getShow

      public Boolean getShow()
    • setShow

      public void setShow(Boolean show)
    • getPrecision

      public Integer getPrecision()
    • setPrecision

      public void setPrecision(Integer precision)
    • getFormatter

      public String getFormatter()
    • setFormatter

      public void setFormatter(String formatter)
    • getFormatterFunction

      public JsFunction getFormatterFunction()
    • setFormatterFunction

      public void setFormatterFunction(JsFunction formatterFunction)
    • setFormatterFunction

      public void setFormatterFunction(String formatterFunction)
    • getMargin

      public Integer getMargin()
    • setMargin

      public void setMargin(Integer margin)
    • getPadding

      public Padding getPadding()
      Specified by:
      getPadding in interface HasPadding<Label>
      Returns:
      space around content
    • setPadding

      public void setPadding(Integer padding)
      Description copied from interface: HasPadding
      Sets padding on each of the four sides or replaces an existing one. The unit is px.
      Specified by:
      setPadding in interface HasPadding<Label>
      Parameters:
      padding - padding to set
    • setPadding

      public void setPadding(Integer vertical, Integer horizontal)
      Description copied from interface: HasPadding
      Sets the top/bottom and left/right paddings or replaces an existing one. The unit is px.
      Specified by:
      setPadding in interface HasPadding<Label>
      Parameters:
      vertical - top and bottom padding to set
      horizontal - left and right padding to set
    • setPadding

      public void setPadding(Integer top, Integer right, Integer bottom, Integer left)
      Description copied from interface: HasPadding
      Sets each of the four paddings separately. The unit is px.
      Specified by:
      setPadding in interface HasPadding<Label>
      Parameters:
      top - top padding to set
      right - right padding to set
      bottom - bottom padding to set
      left - left padding to set
    • getBackgroundColor

      public Color getBackgroundColor()
    • setBackgroundColor

      public void setBackgroundColor(Color backgroundColor)
    • getBorderColor

      public Color getBorderColor()
    • setBorderColor

      public void setBorderColor(Color borderColor)
    • getBorderWidth

      public Integer getBorderWidth()
    • setBorderWidth

      public void setBorderWidth(Integer borderWidth)
    • getShadowBlur

      public Integer getShadowBlur()
      Specified by:
      getShadowBlur in interface HasShadow<Label>
      Returns:
      depth of shadow blur
    • setShadowBlur

      public void setShadowBlur(Integer shadowBlur)
      Description copied from interface: HasShadow
      Sets depth of shadow blur or replaces an existing one.
      Specified by:
      setShadowBlur in interface HasShadow<Label>
      Parameters:
      shadowBlur - depth of shadow blur
    • getShadowColor

      public Color getShadowColor()
      Specified by:
      getShadowColor in interface HasShadow<Label>
      Returns:
      shadow color
    • setShadowColor

      public void setShadowColor(Color shadowColor)
      Description copied from interface: HasShadow
      Sets a color for shadow or replaces an existing one.
      Specified by:
      setShadowColor in interface HasShadow<Label>
      Parameters:
      shadowColor - color to set
    • getShadowOffsetX

      public Integer getShadowOffsetX()
      Specified by:
      getShadowOffsetX in interface HasShadow<Label>
      Returns:
      horizontal offset for shadow in pixels
    • setShadowOffsetX

      public void setShadowOffsetX(Integer shadowOffsetX)
      Description copied from interface: HasShadow
      Sets horizontal offset for shadow or replaces an existing one.
      Specified by:
      setShadowOffsetX in interface HasShadow<Label>
      Parameters:
      shadowOffsetX - offset to set in pixels
    • getShadowOffsetY

      public Integer getShadowOffsetY()
      Specified by:
      getShadowOffsetY in interface HasShadow<Label>
      Returns:
      vertical offset for shadow in pixels
    • setShadowOffsetY

      public void setShadowOffsetY(Integer shadowOffsetY)
      Description copied from interface: HasShadow
      Sets vertical offset for shadow or replaces an existing one.
      Specified by:
      setShadowOffsetY in interface HasShadow<Label>
      Parameters:
      shadowOffsetY - offset to set in pixels
    • withShow

      public Label withShow(Boolean show)
    • withPrecision

      public Label withPrecision(Integer precision)
    • withFormatter

      public Label withFormatter(String formatter)
    • withFormatterFunction

      public Label withFormatterFunction(JsFunction formatterFunction)
    • withFormatterFunction

      public Label withFormatterFunction(String formatterFunctionCode)
    • withMargin

      public Label withMargin(Integer margin)
    • withBackgroundColor

      public Label withBackgroundColor(Color backgroundColor)
    • withBorderColor

      public Label withBorderColor(Color borderColor)
    • withBorderWidth

      public Label withBorderWidth(Integer borderWidth)