Package com.spinyowl.legui.style
Class Style
java.lang.Object
com.spinyowl.legui.style.Style
The type Style..
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCss display type.static enumCss position type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets background.Gets border.Returns bottom left border radius.Returns bottom right border radius.Returns top left border radius.Returns top right border radius.Returns bottom style.Returns display style.Flex style object.org.joml.Vector4fReturnsVector4ffocused stroke color vector where x,y,z,w mapped to r,g,b,a values.getFont()Gets font.Used to set height.org.joml.Vector4fReturns highlight color.Returns horizontal alignment.getLeft()Returns left style.Returns position type or null.getRight()Returns right style.org.joml.Vector4fReturns text color.getTop()Returns top style.Returns vertical alignment.getWidth()Returns width.voidsetBackground(Background background) Sets background.voidSets border.voidsetBorderBottomLeftRadius(float borderBottomLeftRadius) Used to set bottom left border radius.voidsetBorderBottomLeftRadius(Length borderBottomLeftRadius) Used to set bottom left border radius.voidsetBorderBottomRightRadius(float borderBottomRightRadius) Used to set bottom right border radius.voidsetBorderBottomRightRadius(Length borderBottomRightRadius) Used to set bottom right border radius.voidsetBorderRadius(float radius) Used to set border radius for all four corners.voidsetBorderRadius(float topLeftBottomRight, float topRightBottomLeft) Used to set border radius.voidsetBorderRadius(float topLeft, float topRightBottomLeft, float bottomRight) Used to set border radius.voidsetBorderRadius(float topLeft, float topRight, float bottomRight, float bottomLeft) Used to set border radius.voidsetBorderRadius(Length radius) Used to set border radius for all four corners.voidsetBorderRadius(Length topLeftBottomRight, Length topRightBottomLeft) Used to set border radius.voidsetBorderRadius(Length topLeft, Length topRightBottomLeft, Length bottomRight) Used to set border radius.voidsetBorderRadius(Length topLeft, Length topRight, Length bottomRight, Length bottomLeft) Used to set border radius.voidsetBorderTopLeftRadius(float borderTopLeftRadius) Used to set top left border radius.voidsetBorderTopLeftRadius(Length borderTopLeftRadius) Used to set top left border radius.voidsetBorderTopRightRadius(float borderTopRightRadius) Used to set top right border radius.voidsetBorderTopRightRadius(Length borderTopRightRadius) Used to set top right border radius.voidsetBottom(float bottom) Used tp set bottom style.voidUsed tp set bottom style.voidsetDisplay(Style.DisplayType display) Used to set display type.voidsetFocusedStrokeColor(float r, float g, float b, float a) Used to set focused stroke color vector.voidsetFocusedStrokeColor(org.joml.Vector4f focusedStrokeColor) Used to set focused stroke color vector where x,y,z,w mapped to r,g,b,a values.voidSets font.voidsetFontSize(Float fontSize) voidsetHeight(float height) voidvoidsetHighlightColor(float r, float g, float b, float a) Used to set highlight color.voidsetHighlightColor(org.joml.Vector4f highlightColor) Used to set highlight color.voidsetHorizontalAlign(HorizontalAlign horizontalAlign) Used to set horizontal alignment.voidsetLeft(float left) Used tp set left style.voidUsed tp set left style.voidsetMargin(float margin) voidsetMargin(float topBottom, float leftRight) voidsetMargin(float top, float right, float bottom, float left) voidvoidvoidvoidsetMarginBottom(Unit marginBottom) voidsetMarginBottom(Float marginBottom) voidsetMarginLeft(Unit marginLeft) voidsetMarginLeft(Float marginLeft) voidsetMarginRight(Unit marginRight) voidsetMarginRight(Float marginRight) voidsetMarginTop(Unit marginTop) voidsetMarginTop(Float marginTop) voidsetMaxHeight(float maxHeight) voidsetMaxHeight(Length maxHeight) voidsetMaximumSize(float width, float height) Used to set max width and height.voidsetMaxWidth(float maxWidth) voidsetMaxWidth(Length maxWidth) voidsetMinHeight(float minHeight) voidsetMinHeight(Length minHeight) voidsetMinimumSize(float width, float height) Used to set minimum width and heightvoidsetMinWidth(float minWidth) voidsetMinWidth(Length minWidth) voidsetPadding(float padding) voidsetPadding(float topBottom, float leftRight) voidsetPadding(float top, float right, float bottom, float left) voidsetPadding(Length padding) voidsetPadding(Length topBottom, Length leftRight) voidsetPadding(Length top, Length right, Length bottom, Length left) voidsetPaddingBottom(Length paddingBottom) voidsetPaddingLeft(Length paddingLeft) voidsetPaddingRight(Length paddingRight) voidsetPaddingTop(Length paddingTop) voidsetPosition(Style.PositionType position) Used to set position style.voidsetRight(float right) Used tp set right style.voidUsed tp set right style.voidvoidsetTextColor(float r, float g, float b, float a) Used to set text color.voidsetTextColor(org.joml.Vector4f textColor) Used to set text color.voidsetTop(float top) Used tp set top style.voidUsed tp set top style.voidsetVerticalAlign(VerticalAlign verticalAlign) Used to set vertical alignment.voidsetWidth(float width) Used to set width.voidUsed to set width.
-
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
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
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
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
Used to set border radius.- Parameters:
topLeft- top left radius.topRight- top right radius.bottomRight- bottom right radius.bottomLeft- bottom left radius.
-
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
Used to set top left border radius.- Parameters:
borderTopLeftRadius- top left border radius.
-
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
Used to set top right border radius.- Parameters:
borderTopRightRadius- top right border radius.
-
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
Used to set bottom right border radius.- Parameters:
borderBottomRightRadius- bottom right border radius.
-
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
Used to set bottom left border radius.- Parameters:
borderBottomLeftRadius- bottom left border radius.
-
getWidth
Returns width.- Returns:
- width.
-
setWidth
public void setWidth(float width) Used to set width. (PIXEL VERSION)- Parameters:
width- width to set.
-
setWidth
Used to set width.- Parameters:
width- width to set.
-
getHeight
Used to set height.- Returns:
- height to set.
-
setHeight
public void setHeight(float height) -
setHeight
-
getMinWidth
-
setMinWidth
public void setMinWidth(float minWidth) -
setMinWidth
-
getMinHeight
-
setMinHeight
public void setMinHeight(float minHeight) -
setMinHeight
-
getMaxWidth
-
setMaxWidth
public void setMaxWidth(float maxWidth) -
setMaxWidth
-
getMaxHeight
-
setMaxHeight
public void setMaxHeight(float maxHeight) -
setMaxHeight
-
setPadding
public void setPadding(float padding) -
setPadding
-
setPadding
public void setPadding(float topBottom, float leftRight) -
setPadding
-
setPadding
public void setPadding(float top, float right, float bottom, float left) -
setPadding
-
getPaddingTop
-
setPaddingTop
-
getPaddingBottom
-
setPaddingBottom
-
getPaddingRight
-
setPaddingRight
-
getPaddingLeft
-
setPaddingLeft
-
setMargin
public void setMargin(float margin) -
setMargin
-
setMargin
public void setMargin(float topBottom, float leftRight) -
setMargin
-
setMargin
public void setMargin(float top, float right, float bottom, float left) -
setMargin
-
getMarginTop
-
setMarginTop
-
setMarginTop
-
getMarginBottom
-
setMarginBottom
-
setMarginBottom
-
getMarginRight
-
setMarginRight
-
setMarginRight
-
getMarginLeft
-
setMarginLeft
-
setMarginLeft
-
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
Used tp set top style.- Parameters:
top- top style.
-
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
Used tp set bottom style.- Parameters:
bottom- bottom style.
-
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
Used tp set right style.- Parameters:
right- right style.
-
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
Used tp set left style.- Parameters:
left- left style.
-
getDisplay
Returns display style.- Returns:
- display style.
-
setDisplay
Used to set display type.- Parameters:
display- display to set.
-
getBackground
Gets background.- Returns:
- the background
-
setBackground
Sets background.- Parameters:
background- the background
-
getBorder
Gets border.- Returns:
- the border
-
setBorder
Sets border.- Parameters:
border- the border
-
getFont
Gets font.- Returns:
- the font
-
setFont
Sets font.- Parameters:
font- the font
-
getFocusedStrokeColor
public org.joml.Vector4f getFocusedStrokeColor()ReturnsVector4ffocused 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
Flex style object.- Returns:
- flex style object.
-
getPosition
Returns position type or null.- Returns:
- position type or null.
-
setPosition
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
-
setShadow
-
getFontSize
-
setFontSize
-
getHorizontalAlign
Returns horizontal alignment.- Returns:
- horizontal alignment.
-
setHorizontalAlign
Used to set horizontal alignment.- Parameters:
horizontalAlign- horizontal alignment.
-
getVerticalAlign
Returns vertical alignment.- Returns:
- vertical alignment.
-
setVerticalAlign
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.
-