Class ElementStyle

java.lang.Object
lu.kbra.modelizer_next.domain.shared.ElementStyle
All Implemented Interfaces:
Cloneable, ModelElement

public class ElementStyle extends Object implements ModelElement
Reusable style settings for model elements, including colors and optional visual flags.
  • Constructor Details

    • ElementStyle

      public ElementStyle()
      Creates an element style instance.
    • ElementStyle

      public ElementStyle(Color textColor, Color backgroundColor, Color borderColor)
      Creates an element style instance.
      Parameters:
      textColor - color value to use
      backgroundColor - color value to use
      borderColor - color value to use
  • Method Details

    • forClass

      public static ElementStyle forClass()
      Creates the default style for class elements.
      Returns:
      the for class result
    • forField

      public static ElementStyle forField()
      Creates the default style for field elements.
      Returns:
      the for field result
    • getBackgroundColor

      public Color getBackgroundColor()
      Returns the background color.
      Returns:
      the background color
    • getBorderColor

      public Color getBorderColor()
      Returns the border color.
      Returns:
      the border color
    • getTextColor

      public Color getTextColor()
      Returns the text color.
      Returns:
      the text color
    • setBackgroundColor

      public void setBackgroundColor(Color backgroundColor)
      Sets the background color.
      Parameters:
      backgroundColor - color value to use
    • setBorderColor

      public void setBorderColor(Color borderColor)
      Sets the border color.
      Parameters:
      borderColor - color value to use
    • setTextColor

      public void setTextColor(Color textColor)
      Sets the text color.
      Parameters:
      textColor - color value to use
    • clone

      public ElementStyle clone()
      Creates a copy of this object so callers can modify it without changing the original.
      Specified by:
      clone in interface ModelElement
      Overrides:
      clone in class Object
      Returns:
      the clone result
    • toString

      public String toString()
      Builds a debug string for this element style.
      Overrides:
      toString in class Object
      Returns:
      a debug string for this object