Interface MPPViewport


@NonExtendable public interface MPPViewport
This interface represents a single viewport in the multi-perspective preview. Viewports are not unique, this means that multiple viewports with the exact same properties might exist.
To create a viewport, you must use the builder.
To access the current viewports (or modify the existing ones), you must use the MPPViewportAgent.
Since:
5.2.604
See Also:
  • Method Details

    • setIconType

      void setIconType(@Nullable MPPViewport.IconType icon)
      Set the icon type for this viewport.
      Parameters:
      icon - the icon type to use
      Since:
      5.2.604
      See Also:
    • getIconType

      @Nullable MPPViewport.IconType getIconType()
      Get the viewport icon type.
      Returns:
      the viewport icon type, or null if not specified
      Since:
      5.2.604
    • getWidth

      int getWidth()
      Get the viewport width in pixels.
      Returns:
      the width in pixels
      Since:
      5.2.604
    • setWidth

      void setWidth(int width)
      Set the viewport width in pixels.
      Parameters:
      width - the width in pixels
      Throws:
      IllegalArgumentException - if width is < 1
      Since:
      5.2.604
    • getHeight

      int getHeight()
      Get the viewport height in pixels.
      Returns:
      the height in pixels
      Since:
      5.2.604
    • setHeight

      void setHeight(int height)
      Set the viewport height in pixels.
      Parameters:
      height - the height in pixels
      Throws:
      IllegalArgumentException - if height is < 1
      Since:
      5.2.604
    • getScaling

      int getScaling()
      Get the percentage-based viewport scaling.
      Returns:
      the scaling as percentage
      Since:
      5.2.604
    • setScaling

      void setScaling(int percentage)
      Set the percentage-based viewport scaling.
      Parameters:
      percentage - the scaling as percentage
      Since:
      5.2.604
    • getTemplateSet

      @Nullable @Nullable TemplateSet getTemplateSet()
      Get the TemplateSet configured for this viewport.
      Returns:
      the TemplateSet for this viewport, or null for default TemplateSet
      Since:
      5.2.604
    • setTemplateSet

      void setTemplateSet(@Nullable @Nullable TemplateSet templateSet)
      Set the TemplateSet to be used for this viewport.
      Parameters:
      templateSet - the TemplateSet to use, or null for default TemplateSet
      Since:
      5.2.604