Class CustomView

java.lang.Object
com.structurizr.view.View
com.structurizr.view.CustomView

public final class CustomView
extends View
Represents a custom view, containing custom elements.
  • Method Details

    • getName

      public java.lang.String getName()
      Gets the (computed) name of this view.
      Specified by:
      getName in class View
      Returns:
      the name, as a String
    • getModel

      public Model getModel()
      Gets the model that this view belongs to.
      Overrides:
      getModel in class View
      Returns:
      a Model object
    • checkElementCanBeAdded

      protected void checkElementCanBeAdded​(Element element)
      Specified by:
      checkElementCanBeAdded in class View
    • canBeRemoved

      protected boolean canBeRemoved​(Element element)
      Specified by:
      canBeRemoved in class View
    • add

      public RelationshipView add​(@Nonnull Relationship relationship)
      Adds a specific relationship to this view.
      Parameters:
      relationship - the Relationship to be added
      Returns:
      a RelationshipView object representing the relationship added
    • addAnimation

      public void addAnimation​(CustomElement... elements)
      Adds an animation step, with the specified elements.
      Parameters:
      elements - the elements that should be shown in the animation step
    • getAnimations

      public java.util.List<Animation> getAnimations()
    • addDefaultElements

      public void addDefaultElements()
      Adds the default set of elements to this view.
    • addAllCustomElements

      public void addAllCustomElements()
      Adds all custom elements to this view.