java.lang.Object
io.jmix.chartsflowui.kit.component.model.ChartObservableObject
io.jmix.chartsflowui.kit.component.model.shared.RichStyle
All Implemented Interfaces:
HasAlign<RichStyle>, HasBorder<RichStyle>, HasShadow<RichStyle>, HasText<RichStyle>, HasPadding<RichStyle>, Serializable

Common rich text styles. Can be used in labels of series, axis or other components. More detailed information is provided in the documentation.
See Also:
  • Field Details

    • color

      protected Color color
    • fontStyle

      protected FontStyle fontStyle
    • fontWeight

      protected String fontWeight
    • fontFamily

      protected String fontFamily
    • fontSize

      protected Integer fontSize
    • align

      protected Align align
    • verticalAlign

      protected VerticalAlign verticalAlign
    • lineHeight

      protected Integer lineHeight
    • backgroundColor

      protected Color backgroundColor
    • borderColor

      protected Color borderColor
    • borderWidth

      protected Integer borderWidth
    • borderType

      protected String borderType
    • borderDashOffset

      protected Integer borderDashOffset
    • borderRadius

      protected Integer borderRadius
    • padding

      protected Padding padding
    • shadowColor

      protected Color shadowColor
    • shadowBlur

      protected Integer shadowBlur
    • shadowOffsetX

      protected Integer shadowOffsetX
    • shadowOffsetY

      protected Integer shadowOffsetY
    • width

      protected Integer width
    • height

      protected Integer height
    • textBorderColor

      protected Color textBorderColor
    • textBorderWidth

      protected Double textBorderWidth
    • textBorderType

      protected String textBorderType
    • textBorderDashOffset

      protected Integer textBorderDashOffset
    • textShadowColor

      protected Color textShadowColor
    • textShadowBlur

      protected Integer textShadowBlur
    • textShadowOffsetX

      protected Integer textShadowOffsetX
    • textShadowOffsetY

      protected Integer textShadowOffsetY
  • Constructor Details

    • RichStyle

      public RichStyle()
  • Method Details

    • getColor

      public Color getColor()
    • setColor

      public void setColor(Color color)
    • getFontStyle

      public FontStyle getFontStyle()
    • setFontStyle

      public void setFontStyle(FontStyle fontStyle)
    • getFontWeight

      public String getFontWeight()
    • setFontWeight

      public void setFontWeight(String fontWeight)
    • getFontFamily

      public String getFontFamily()
    • setFontFamily

      public void setFontFamily(String fontFamily)
    • getFontSize

      public Integer getFontSize()
    • setFontSize

      public void setFontSize(Integer fontSize)
    • getAlign

      public Align getAlign()
      Specified by:
      getAlign in interface HasAlign<RichStyle>
      Returns:
      horizontal alignment of component
    • setAlign

      public void setAlign(Align align)
      Description copied from interface: HasAlign
      Sets horizontal alignment of component or replaces an existing one.
      Specified by:
      setAlign in interface HasAlign<RichStyle>
      Parameters:
      align - alignment to set
    • getVerticalAlign

      public VerticalAlign getVerticalAlign()
      Specified by:
      getVerticalAlign in interface HasAlign<RichStyle>
      Returns:
      vertical alignment of component
    • setVerticalAlign

      public void setVerticalAlign(VerticalAlign verticalAlign)
      Description copied from interface: HasAlign
      Sets vertical alignment of component or replaces an existing one.
      Specified by:
      setVerticalAlign in interface HasAlign<RichStyle>
      Parameters:
      verticalAlign - alignment to set
    • getLineHeight

      public Integer getLineHeight()
    • setLineHeight

      public void setLineHeight(Integer lineHeight)
    • getBackgroundColor

      public Color getBackgroundColor()
    • setBackgroundColor

      public void setBackgroundColor(Color backgroundColor)
    • getBorderColor

      public Color getBorderColor()
      Specified by:
      getBorderColor in interface HasBorder<RichStyle>
      Returns:
      border color
    • setBorderColor

      public void setBorderColor(Color borderColor)
      Description copied from interface: HasBorder
      Sets a border color or replaces an existing one.
      Specified by:
      setBorderColor in interface HasBorder<RichStyle>
      Parameters:
      borderColor - color to set
    • getBorderWidth

      public Integer getBorderWidth()
      Specified by:
      getBorderWidth in interface HasBorder<RichStyle>
      Returns:
      border width in pixels
    • setBorderWidth

      public void setBorderWidth(Integer borderWidth)
      Description copied from interface: HasBorder
      Sets a border width or replaces an existing one.
      Specified by:
      setBorderWidth in interface HasBorder<RichStyle>
      Parameters:
      borderWidth - border width in pixels
    • getBorderType

      public String getBorderType()
    • setBorderType

      public void setBorderType(String borderType)
    • getBorderDashOffset

      public Integer getBorderDashOffset()
    • setBorderDashOffset

      public void setBorderDashOffset(Integer borderDashOffset)
    • getBorderRadius

      public Integer getBorderRadius()
      Specified by:
      getBorderRadius in interface HasBorder<RichStyle>
      Returns:
      border radius of the text fragment
    • setBorderRadius

      public void setBorderRadius(Integer borderRadius)
      Description copied from interface: HasBorder
      Sets a border radius of the text fragment or replaces an existing one.
      Specified by:
      setBorderRadius in interface HasBorder<RichStyle>
      Parameters:
      borderRadius - border radius to set in pixels
    • getPadding

      public Padding getPadding()
      Specified by:
      getPadding in interface HasPadding<RichStyle>
      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<RichStyle>
      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<RichStyle>
      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<RichStyle>
      Parameters:
      top - top padding to set
      right - right padding to set
      bottom - bottom padding to set
      left - left padding to set
    • getShadowColor

      public Color getShadowColor()
      Specified by:
      getShadowColor in interface HasShadow<RichStyle>
      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<RichStyle>
      Parameters:
      shadowColor - color to set
    • getShadowBlur

      public Integer getShadowBlur()
      Specified by:
      getShadowBlur in interface HasShadow<RichStyle>
      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<RichStyle>
      Parameters:
      shadowBlur - depth of shadow blur
    • getShadowOffsetX

      public Integer getShadowOffsetX()
      Specified by:
      getShadowOffsetX in interface HasShadow<RichStyle>
      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<RichStyle>
      Parameters:
      shadowOffsetX - offset to set in pixels
    • getShadowOffsetY

      public Integer getShadowOffsetY()
      Specified by:
      getShadowOffsetY in interface HasShadow<RichStyle>
      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<RichStyle>
      Parameters:
      shadowOffsetY - offset to set in pixels
    • getWidth

      public Integer getWidth()
    • setWidth

      public void setWidth(Integer width)
    • getHeight

      public Integer getHeight()
    • setHeight

      public void setHeight(Integer height)
    • getTextBorderColor

      public Color getTextBorderColor()
      Specified by:
      getTextBorderColor in interface HasText<RichStyle>
      Returns:
      stroke color of the text
    • setTextBorderColor

      public void setTextBorderColor(Color textBorderColor)
      Description copied from interface: HasText
      Sets a stroke color of the text or replaces an existing one.
      Specified by:
      setTextBorderColor in interface HasText<RichStyle>
      Parameters:
      textBorderColor - color to set
    • getTextBorderWidth

      public Double getTextBorderWidth()
      Specified by:
      getTextBorderWidth in interface HasText<RichStyle>
      Returns:
      stroke line width of the text in pixels
    • setTextBorderWidth

      public void setTextBorderWidth(Double textBorderWidth)
      Description copied from interface: HasText
      Sets a stroke line width of the text or replaces an existing one.
      Specified by:
      setTextBorderWidth in interface HasText<RichStyle>
      Parameters:
      textBorderWidth - line width to set in pixels
    • getTextBorderType

      public String getTextBorderType()
      Specified by:
      getTextBorderType in interface HasText<RichStyle>
      Returns:
      stroke line type of the text
    • setTextBorderType

      public void setTextBorderType(String textBorderType)
      Description copied from interface: HasText
      Sets a stroke line type of the text or replaces an existing one.
      Possible values are:
      • solid
      • dashed
      • dotted
      Since v5.0.0, it can also be a number. For more flexible customization use JmixChart.setNativeJson(String).
      Specified by:
      setTextBorderType in interface HasText<RichStyle>
      Parameters:
      textBorderType - stroke line type to set
    • getTextBorderDashOffset

      public Integer getTextBorderDashOffset()
      Specified by:
      getTextBorderDashOffset in interface HasText<RichStyle>
      Returns:
      offset of the line dash
    • setTextBorderDashOffset

      public void setTextBorderDashOffset(Integer textBorderDashOffset)
      Description copied from interface: HasText
      Sets offset of the line dash or replaces an existing one.
      Specified by:
      setTextBorderDashOffset in interface HasText<RichStyle>
      Parameters:
      textBorderDashOffset - offset of the line dash to set
      See Also:
    • getTextShadowColor

      public Color getTextShadowColor()
      Specified by:
      getTextShadowColor in interface HasText<RichStyle>
      Returns:
      text shadow color
    • setTextShadowColor

      public void setTextShadowColor(Color textShadowColor)
      Description copied from interface: HasText
      Sets a color of the text shadow or replaces an existing one.
      Specified by:
      setTextShadowColor in interface HasText<RichStyle>
      Parameters:
      textShadowColor - text shadow color to set
    • getTextShadowBlur

      public Integer getTextShadowBlur()
      Specified by:
      getTextShadowBlur in interface HasText<RichStyle>
      Returns:
      shadow blur of the text itself
    • setTextShadowBlur

      public void setTextShadowBlur(Integer textShadowBlur)
      Description copied from interface: HasText
      Sets a depth of text shadow blur or replaces an existing one.
      Specified by:
      setTextShadowBlur in interface HasText<RichStyle>
      Parameters:
      textShadowBlur - depth of text shadow blur
    • getTextShadowOffsetX

      public Integer getTextShadowOffsetX()
      Specified by:
      getTextShadowOffsetX in interface HasText<RichStyle>
      Returns:
      horizontal offset for text shadow in pixels
    • setTextShadowOffsetX

      public void setTextShadowOffsetX(Integer textShadowOffsetX)
      Description copied from interface: HasText
      Sets horizontal offset for text shadow or replaces an existing one.
      Specified by:
      setTextShadowOffsetX in interface HasText<RichStyle>
      Parameters:
      textShadowOffsetX - offset to set in pixels
    • getTextShadowOffsetY

      public Integer getTextShadowOffsetY()
      Specified by:
      getTextShadowOffsetY in interface HasText<RichStyle>
      Returns:
      vertical offset for text shadow in pixels
    • setTextShadowOffsetY

      public void setTextShadowOffsetY(Integer textShadowOffsetY)
      Description copied from interface: HasText
      Sets vertical offset for text shadow or replaces an existing one.
      Specified by:
      setTextShadowOffsetY in interface HasText<RichStyle>
      Parameters:
      textShadowOffsetY - offset to set in pixels
    • withColor

      public RichStyle withColor(Color color)
    • withFontStyle

      public RichStyle withFontStyle(FontStyle fontStyle)
    • withFontWeight

      public RichStyle withFontWeight(String fontWeight)
    • withFontFamily

      public RichStyle withFontFamily(String fontFamily)
    • withFontSize

      public RichStyle withFontSize(Integer fontSize)
    • withLineHeight

      public RichStyle withLineHeight(Integer lineHeight)
    • withBackgroundColor

      public RichStyle withBackgroundColor(Color backgroundColor)
    • withBorderType

      public RichStyle withBorderType(String borderType)
    • withBorderDashOffset

      public RichStyle withBorderDashOffset(Integer borderDashOffset)
    • withWidth

      public RichStyle withWidth(Integer width)
    • withHeight

      public RichStyle withHeight(Integer height)