Class ImageView

java.lang.Object
com.structurizr.view.View
com.structurizr.view.ImageView
All Implemented Interfaces:
PropertyHolder, Comparable<View>

public final class ImageView extends View
A view that has been rendered elsewhere (e.g. PlantUML, Mermaid, Kroki, etc) as a image (e.g. PNG).
  • Method Details

    • getElementId

      public String getElementId()
      Gets the ID of the element associated with this view.
      Returns:
      the ID, as a String, or null if not set
    • getElement

      public Element getElement()
    • getContent

      public String getContent()
      Gets the content of this view (a URL or a data URI).
      Returns:
      the content, as a String
    • setContent

      public void setContent(String content)
      Sets the content of this image view, which needs to be a URL or a data URI.
      Parameters:
      content - the content of this view
    • getContentType

      public String getContentType()
      Gets the content type of this view (e.g. "image/png").
      Returns:
      the content type, as a String
    • setContentType

      public void setContentType(String contentType)
      Sets the content type of this view (e.g. "image/png").
      Parameters:
      contentType - the content type, as a String
    • getName

      public String getName()
      Description copied from class: View
      Gets the (computed) name of this view.
      Specified by:
      getName in class View
      Returns:
      the name, as a String