Class View

java.lang.Object
com.structurizr.view.View
All Implemented Interfaces:
PropertyHolder
Direct Known Subclasses:
FilteredView, ImageView, ModelView

public abstract class View extends Object implements PropertyHolder
The superclass for all views.
  • Method Details

    • getDescription

      public String getDescription()
      Gets the description of this view.
      Returns:
      the description, as a String
    • setDescription

      public void setDescription(String description)
    • getKey

      public String getKey()
      Gets the identifier for this view.
      Returns:
      the identifier, as a String
    • getOrder

      public int getOrder()
      Gets the order of this view.
      Returns:
      a positive integer
    • getTitle

      public String getTitle()
      Gets the title of this view, if one has been set.
      Returns:
      the title, as a String
    • setTitle

      public void setTitle(String title)
      Sets the title for this view.
      Parameters:
      title - the title, as a String
    • getName

      public abstract String getName()
      Gets the (computed) name of this view.
      Returns:
      the name, as a String
    • getViewSet

      public ViewSet getViewSet()
      Gets the view set that this view belongs to.
      Returns:
      a ViewSet object
    • getProperties

      public Map<String,String> getProperties()
      Gets the collection of name-value property pairs associated with this view, as a Map.
      Specified by:
      getProperties in interface PropertyHolder
      Returns:
      a Map (String, String) (empty if there are no properties)
    • addProperty

      public void addProperty(String name, String value)
      Adds a name-value pair property to this view.
      Specified by:
      addProperty in interface PropertyHolder
      Parameters:
      name - the name of the property
      value - the value of the property