Class CommentModel

java.lang.Object
lu.kbra.modelizer_next.domain.CommentModel
All Implemented Interfaces:
IdOwner, StyleOwner, VisibilityOwner

public class CommentModel extends Object implements StyleOwner, VisibilityOwner, IdOwner
Persistent model of a text comment or annotation placed in a diagram.
  • Constructor Details

    • CommentModel

      public CommentModel()
      Creates a comment model instance.
    • CommentModel

      public CommentModel(String txt)
      Creates a comment model instance.
      Parameters:
      txt - text value for txt
  • Method Details

    • getBinding

      public CommentBinding getBinding()
      Returns the binding.
      Returns:
      the binding
    • getId

      public String getId()
      Returns the ID.
      Specified by:
      getId in interface IdOwner
      Returns:
      the ID
    • getKind

      public CommentKind getKind()
      Returns the kind.
      Returns:
      the kind
    • getStyle

      public ElementStyle getStyle()
      Returns the style.
      Specified by:
      getStyle in interface StyleOwner
      Returns:
      the style
    • getText

      public String getText()
      Returns the text.
      Returns:
      the text
    • getVisibility

      public LayerVisibility getVisibility()
      Returns the visibility.
      Specified by:
      getVisibility in interface VisibilityOwner
      Returns:
      the visibility
    • setBackgroundColorLegacy

      @Deprecated public void setBackgroundColorLegacy(Color color)
      Deprecated.
      Sets the background color legacy.
      Parameters:
      color - color value to use
    • setBinding

      public void setBinding(CommentBinding binding)
      Sets the binding.
      Parameters:
      binding - binding value used by the operation
    • setBorderColorLegacy

      @Deprecated public void setBorderColorLegacy(Color color)
      Deprecated.
      Sets the border color legacy.
      Parameters:
      color - color value to use
    • setId

      public void setId(String id)
      Sets the ID.
      Specified by:
      setId in interface IdOwner
      Parameters:
      id - stable id of the model element
    • setKind

      public void setKind(CommentKind kind)
      Sets the kind.
      Parameters:
      kind - kind value used by the operation
    • setStyle

      public void setStyle(ElementStyle style)
      Sets the style.
      Specified by:
      setStyle in interface StyleOwner
      Parameters:
      style - style value used by the operation
    • setText

      public void setText(String text)
      Sets the text.
      Parameters:
      text - text to display or edit
    • setTextColorLegacy

      @Deprecated public void setTextColorLegacy(Color color)
      Deprecated.
      Sets the text color legacy.
      Parameters:
      color - color value to use
    • setVisibility

      public void setVisibility(LayerVisibility visibility)
      Sets the visibility.
      Specified by:
      setVisibility in interface VisibilityOwner
      Parameters:
      visibility - visibility value used by the operation
    • setVisibleInConceptualLegacy

      @Deprecated public void setVisibleInConceptualLegacy(boolean visibleInConceptual)
      Deprecated.
      Sets the visible in conceptual legacy.
      Parameters:
      visibleInConceptual - whether visible in conceptual is enabled
    • setVisibleInLogicalLegacy

      @Deprecated public void setVisibleInLogicalLegacy(boolean visibleInLogical)
      Deprecated.
      Sets the visible in logical legacy.
      Parameters:
      visibleInLogical - whether visible in logical is enabled
    • setVisibleInPhysicalLegacy

      @Deprecated public void setVisibleInPhysicalLegacy(boolean visibleInPhysical)
      Deprecated.
      Sets the visible in physical legacy.
      Parameters:
      visibleInPhysical - whether visible in physical is enabled
    • toString

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