Class Style

java.lang.Object
com.spinyowl.legui.style.Style

public class Style extends Object
The type Style..
  • Constructor Details

    • Style

      public Style()
  • Method Details

    • setBorderRadius

      public void setBorderRadius(float radius)
      Used to set border radius for all four corners. (PIXEL VERSION)
      Parameters:
      radius - radius to set. Sets border radius to all corners.
    • setBorderRadius

      public void setBorderRadius(Length radius)
      Used to set border radius for all four corners.
      Parameters:
      radius - radius to set. Sets border radius to all corners.
    • setBorderRadius

      public void setBorderRadius(float topLeftBottomRight, float topRightBottomLeft)
      Used to set border radius. (PIXEL VERSION)
      Parameters:
      topLeftBottomRight - top left and bottom right radius.
      topRightBottomLeft - top right and bottom left radius.
    • setBorderRadius

      public void setBorderRadius(Length topLeftBottomRight, Length topRightBottomLeft)
      Used to set border radius.
      Parameters:
      topLeftBottomRight - top left and bottom right radius.
      topRightBottomLeft - top right and bottom left radius.
    • setBorderRadius

      public void setBorderRadius(float topLeft, float topRightBottomLeft, float bottomRight)
      Used to set border radius. (PIXEL VERSION)
      Parameters:
      topLeft - top left radius.
      bottomRight - bottom right radius.
      topRightBottomLeft - top right and bottom left radius.
    • setBorderRadius

      public void setBorderRadius(Length topLeft, Length topRightBottomLeft, Length bottomRight)
      Used to set border radius.
      Parameters:
      topLeft - top left radius.
      bottomRight - bottom right radius.
      topRightBottomLeft - top right and bottom left radius.
    • setBorderRadius

      public void setBorderRadius(float topLeft, float topRight, float bottomRight, float bottomLeft)
      Used to set border radius. (PIXEL VERSION)
      Parameters:
      topLeft - top left radius.
      topRight - top right radius.
      bottomRight - bottom right radius.
      bottomLeft - bottom left radius.
    • setBorderRadius

      public void setBorderRadius(Length topLeft, Length topRight, Length bottomRight, Length bottomLeft)
      Used to set border radius.
      Parameters:
      topLeft - top left radius.
      topRight - top right radius.
      bottomRight - bottom right radius.
      bottomLeft - bottom left radius.
    • getBorderTopLeftRadius

      public Length getBorderTopLeftRadius()
      Returns top left border radius.
      Returns:
      top left border radius.
    • setBorderTopLeftRadius

      public void setBorderTopLeftRadius(float borderTopLeftRadius)
      Used to set top left border radius. (PIXEL VERSION)
      Parameters:
      borderTopLeftRadius - top left border radius.
    • setBorderTopLeftRadius

      public void setBorderTopLeftRadius(Length borderTopLeftRadius)
      Used to set top left border radius.
      Parameters:
      borderTopLeftRadius - top left border radius.
    • getBorderTopRightRadius

      public Length getBorderTopRightRadius()
      Returns top right border radius.
      Returns:
      top right border radius.
    • setBorderTopRightRadius

      public void setBorderTopRightRadius(float borderTopRightRadius)
      Used to set top right border radius. (PIXEL VERSION)
      Parameters:
      borderTopRightRadius - top right border radius.
    • setBorderTopRightRadius

      public void setBorderTopRightRadius(Length borderTopRightRadius)
      Used to set top right border radius.
      Parameters:
      borderTopRightRadius - top right border radius.
    • getBorderBottomRightRadius

      public Length getBorderBottomRightRadius()
      Returns bottom right border radius.
      Returns:
      bottom right border radius.
    • setBorderBottomRightRadius

      public void setBorderBottomRightRadius(float borderBottomRightRadius)
      Used to set bottom right border radius. (PIXEL VERSION)
      Parameters:
      borderBottomRightRadius - bottom right border radius.
    • setBorderBottomRightRadius

      public void setBorderBottomRightRadius(Length borderBottomRightRadius)
      Used to set bottom right border radius.
      Parameters:
      borderBottomRightRadius - bottom right border radius.
    • getBorderBottomLeftRadius

      public Length getBorderBottomLeftRadius()
      Returns bottom left border radius.
      Returns:
      bottom left border radius.
    • setBorderBottomLeftRadius

      public void setBorderBottomLeftRadius(float borderBottomLeftRadius)
      Used to set bottom left border radius. (PIXEL VERSION)
      Parameters:
      borderBottomLeftRadius - bottom left border radius.
    • setBorderBottomLeftRadius

      public void setBorderBottomLeftRadius(Length borderBottomLeftRadius)
      Used to set bottom left border radius.
      Parameters:
      borderBottomLeftRadius - bottom left border radius.
    • getWidth

      public Length getWidth()
      Returns width.
      Returns:
      width.
    • setWidth

      public void setWidth(float width)
      Used to set width. (PIXEL VERSION)
      Parameters:
      width - width to set.
    • setWidth

      public void setWidth(Length width)
      Used to set width.
      Parameters:
      width - width to set.
    • getHeight

      public Length getHeight()
      Used to set height.
      Returns:
      height to set.
    • setHeight

      public void setHeight(float height)
    • setHeight

      public void setHeight(Length height)
    • getMinWidth

      public Length getMinWidth()
    • setMinWidth

      public void setMinWidth(float minWidth)
    • setMinWidth

      public void setMinWidth(Length minWidth)
    • getMinHeight

      public Length getMinHeight()
    • setMinHeight

      public void setMinHeight(float minHeight)
    • setMinHeight

      public void setMinHeight(Length minHeight)
    • getMaxWidth

      public Length getMaxWidth()
    • setMaxWidth

      public void setMaxWidth(float maxWidth)
    • setMaxWidth

      public void setMaxWidth(Length maxWidth)
    • getMaxHeight

      public Length getMaxHeight()
    • setMaxHeight

      public void setMaxHeight(float maxHeight)
    • setMaxHeight

      public void setMaxHeight(Length maxHeight)
    • setPadding

      public void setPadding(float padding)
    • setPadding

      public void setPadding(Length padding)
    • setPadding

      public void setPadding(float topBottom, float leftRight)
    • setPadding

      public void setPadding(Length topBottom, Length leftRight)
    • setPadding

      public void setPadding(float top, float right, float bottom, float left)
    • setPadding

      public void setPadding(Length top, Length right, Length bottom, Length left)
    • getPaddingTop

      public Length getPaddingTop()
    • setPaddingTop

      public void setPaddingTop(Length paddingTop)
    • getPaddingBottom

      public Length getPaddingBottom()
    • setPaddingBottom

      public void setPaddingBottom(Length paddingBottom)
    • getPaddingRight

      public Length getPaddingRight()
    • setPaddingRight

      public void setPaddingRight(Length paddingRight)
    • getPaddingLeft

      public Length getPaddingLeft()
    • setPaddingLeft

      public void setPaddingLeft(Length paddingLeft)
    • setMargin

      public void setMargin(float margin)
    • setMargin

      public void setMargin(Unit margin)
    • setMargin

      public void setMargin(float topBottom, float leftRight)
    • setMargin

      public void setMargin(Unit topBottom, Unit leftRight)
    • setMargin

      public void setMargin(float top, float right, float bottom, float left)
    • setMargin

      public void setMargin(Unit top, Unit right, Unit bottom, Unit left)
    • getMarginTop

      public Unit getMarginTop()
    • setMarginTop

      public void setMarginTop(Unit marginTop)
    • setMarginTop

      public void setMarginTop(Float marginTop)
    • getMarginBottom

      public Unit getMarginBottom()
    • setMarginBottom

      public void setMarginBottom(Unit marginBottom)
    • setMarginBottom

      public void setMarginBottom(Float marginBottom)
    • getMarginRight

      public Unit getMarginRight()
    • setMarginRight

      public void setMarginRight(Unit marginRight)
    • setMarginRight

      public void setMarginRight(Float marginRight)
    • getMarginLeft

      public Unit getMarginLeft()
    • setMarginLeft

      public void setMarginLeft(Unit marginLeft)
    • setMarginLeft

      public void setMarginLeft(Float marginLeft)
    • getTop

      public Length getTop()
      Returns top style.
      Returns:
      top style.
    • setTop

      public void setTop(float top)
      Used tp set top style. (PIXEL VERSION)
      Parameters:
      top - top style.
    • setTop

      public void setTop(Length top)
      Used tp set top style.
      Parameters:
      top - top style.
    • getBottom

      public Length getBottom()
      Returns bottom style.
      Returns:
      bottom style.
    • setBottom

      public void setBottom(float bottom)
      Used tp set bottom style. (PIXEL VERSION)
      Parameters:
      bottom - bottom style.
    • setBottom

      public void setBottom(Length bottom)
      Used tp set bottom style.
      Parameters:
      bottom - bottom style.
    • getRight

      public Length getRight()
      Returns right style.
      Returns:
      right style.
    • setRight

      public void setRight(float right)
      Used tp set right style. (PIXEL VERSION)
      Parameters:
      right - right style.
    • setRight

      public void setRight(Length right)
      Used tp set right style.
      Parameters:
      right - right style.
    • getLeft

      public Length getLeft()
      Returns left style.
      Returns:
      left style.
    • setLeft

      public void setLeft(float left)
      Used tp set left style. (PIXEL VERSION)
      Parameters:
      left - left style.
    • setLeft

      public void setLeft(Length left)
      Used tp set left style.
      Parameters:
      left - left style.
    • getDisplay

      public Style.DisplayType getDisplay()
      Returns display style.
      Returns:
      display style.
    • setDisplay

      public void setDisplay(Style.DisplayType display)
      Used to set display type.
      Parameters:
      display - display to set.
    • getBackground

      public Background getBackground()
      Gets background.
      Returns:
      the background
    • setBackground

      public void setBackground(Background background)
      Sets background.
      Parameters:
      background - the background
    • getBorder

      public Border getBorder()
      Gets border.
      Returns:
      the border
    • setBorder

      public void setBorder(Border border)
      Sets border.
      Parameters:
      border - the border
    • getFont

      public String getFont()
      Gets font.
      Returns:
      the font
    • setFont

      public void setFont(String font)
      Sets font.
      Parameters:
      font - the font
    • getFocusedStrokeColor

      public org.joml.Vector4f getFocusedStrokeColor()
      Returns Vector4f focused stroke color vector where x,y,z,w mapped to r,g,b,a values.
      • vector.x - red.
      • vector.y - green.
      • vector.z - blue.
      • vector.a - alpha.
      Returns:
      background color vector.
    • setFocusedStrokeColor

      public void setFocusedStrokeColor(org.joml.Vector4f focusedStrokeColor)
      Used to set focused stroke color vector where x,y,z,w mapped to r,g,b,a values.
      • vector.x - red.
      • vector.y - green.
      • vector.z - blue.
      • vector.a - alpha.
      Parameters:
      focusedStrokeColor - focused stroke color vector.
    • setFocusedStrokeColor

      public void setFocusedStrokeColor(float r, float g, float b, float a)
      Used to set focused stroke color vector.
      Parameters:
      r - red value.
      g - green value.
      b - blue value.
      a - alpha value.
    • getFlexStyle

      public FlexStyle getFlexStyle()
      Flex style object.
      Returns:
      flex style object.
    • getPosition

      public Style.PositionType getPosition()
      Returns position type or null.
      Returns:
      position type or null.
    • setPosition

      public void setPosition(Style.PositionType position)
      Used to set position style.
      Parameters:
      position - position type to set.
    • setMinimumSize

      public void setMinimumSize(float width, float height)
      Used to set minimum width and height
      Parameters:
      width - minimum width to set.
      height - minimum height to set.
    • setMaximumSize

      public void setMaximumSize(float width, float height)
      Used to set max width and height.
      Parameters:
      width - max width to set.
      height - max height to set.
    • getShadow

      public Shadow getShadow()
    • setShadow

      public void setShadow(Shadow shadow)
    • getFontSize

      public Float getFontSize()
    • setFontSize

      public void setFontSize(Float fontSize)
    • getHorizontalAlign

      public HorizontalAlign getHorizontalAlign()
      Returns horizontal alignment.
      Returns:
      horizontal alignment.
    • setHorizontalAlign

      public void setHorizontalAlign(HorizontalAlign horizontalAlign)
      Used to set horizontal alignment.
      Parameters:
      horizontalAlign - horizontal alignment.
    • getVerticalAlign

      public VerticalAlign getVerticalAlign()
      Returns vertical alignment.
      Returns:
      vertical alignment.
    • setVerticalAlign

      public void setVerticalAlign(VerticalAlign verticalAlign)
      Used to set vertical alignment.
      Parameters:
      verticalAlign - vertical alignment.
    • getTextColor

      public org.joml.Vector4f getTextColor()
      Returns text color.
      Returns:
      text color.
    • setTextColor

      public void setTextColor(org.joml.Vector4f textColor)
      Used to set text color.
      Parameters:
      textColor - text color.
    • setTextColor

      public void setTextColor(float r, float g, float b, float a)
      Used to set text color.
      Parameters:
      r - red component.
      g - green component.
      b - blue component.
      a - alpha component.
    • getHighlightColor

      public org.joml.Vector4f getHighlightColor()
      Returns highlight color.
      Returns:
      highlight color
    • setHighlightColor

      public void setHighlightColor(org.joml.Vector4f highlightColor)
      Used to set highlight color.
      Parameters:
      highlightColor - highlight color.
    • setHighlightColor

      public void setHighlightColor(float r, float g, float b, float a)
      Used to set highlight color.
      Parameters:
      r - red component.
      g - green component.
      b - blue component.
      a - alpha component.