Class ElementStyle
java.lang.Object
lu.kbra.modelizer_next.domain.shared.ElementStyle
- All Implemented Interfaces:
Cloneable,ModelElement
Reusable style settings for model elements, including colors and optional visual flags.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an element style instance.ElementStyle(Color textColor, Color backgroundColor, Color borderColor) Creates an element style instance. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a copy of this object so callers can modify it without changing the original.static ElementStyleforClass()Creates the default style for class elements.static ElementStyleforField()Creates the default style for field elements.Returns the background color.Returns the border color.Returns the text color.voidsetBackgroundColor(Color backgroundColor) Sets the background color.voidsetBorderColor(Color borderColor) Sets the border color.voidsetTextColor(Color textColor) Sets the text color.toString()Builds a debug string for this element style.
-
Constructor Details
-
ElementStyle
public ElementStyle()Creates an element style instance. -
ElementStyle
Creates an element style instance.- Parameters:
textColor- color value to usebackgroundColor- color value to useborderColor- color value to use
-
-
Method Details
-
forClass
Creates the default style for class elements.- Returns:
- the for class result
-
forField
Creates the default style for field elements.- Returns:
- the for field result
-
getBackgroundColor
Returns the background color.- Returns:
- the background color
-
getBorderColor
Returns the border color.- Returns:
- the border color
-
getTextColor
Returns the text color.- Returns:
- the text color
-
setBackgroundColor
Sets the background color.- Parameters:
backgroundColor- color value to use
-
setBorderColor
Sets the border color.- Parameters:
borderColor- color value to use
-
setTextColor
Sets the text color.- Parameters:
textColor- color value to use
-
clone
Creates a copy of this object so callers can modify it without changing the original.- Specified by:
clonein interfaceModelElement- Overrides:
clonein classObject- Returns:
- the clone result
-
toString
Builds a debug string for this element style.
-