Class RMViewerShape

All Implemented Interfaces:
Archivable, DeepChangeListener, RMPropertyChanger, RMTypes, PropertyChangeListener, Cloneable, EventListener
Direct Known Subclasses:
RMEditorShape

public class RMViewerShape extends RMParentShape
A shape to act as root of shape to be viewed.
  • Constructor Details

    • RMViewerShape

      public RMViewerShape(RMViewer aViewer)
      Creates a new ViewerShape.
  • Method Details

    • getViewer

      public RMViewer getViewer()
      Returns the viewer.
    • getContent

      public RMParentShape getContent()
      Returns the root shape that is being viewed in viewer.
    • setContent

      public void setContent(RMParentShape aShape)
      Sets the root shape that is being viewed in viewer.
    • getContent

      @Nullable public <T extends RMParentShape> T getContent(Class<T> aClass)
      Returns the root shape that is being viewed in viewer as a specific class.
    • getDocument

      @Nullable public RMDocument getDocument()
      Returns the root shape as RMDocument, if available.
      Overrides:
      getDocument in class RMShape
    • getPageCount

      public int getPageCount()
      Returns the page count.
    • getPage

      public RMParentShape getPage(int anIndex)
      Returns the page at index.
    • getSelectedPage

      public RMParentShape getSelectedPage()
      Returns the currently selected page shape.
    • getSelectedPageIndex

      public int getSelectedPageIndex()
      Returns the index of the current visible document page.
    • setSelectedPageIndex

      public void setSelectedPageIndex(int anIndex)
      Sets the page of viewer's document that is visible (by index).
    • getChildAnimator

      @Nullable public RMAnimator getChildAnimator()
      Return child animator.
      Overrides:
      getChildAnimator in class RMShape
    • layoutChildren

      protected void layoutChildren()
      This is bogus, but we want to make sure that ViewerShape is always the same size as the content.
      Overrides:
      layoutChildren in class RMParentShape
    • computePrefWidth

      protected double computePrefWidth(double aHeight)
      Override to return content preferred width.
      Overrides:
      computePrefWidth in class RMParentShape
    • computePrefHeight

      protected double computePrefHeight(double aWidth)
      Override to return content preferred height.
      Overrides:
      computePrefHeight in class RMParentShape
    • repaint

      protected void repaint(RMShape aShape)
      This is a notification call for impending visual shape attribute changes.
      Overrides:
      repaint in class RMShape
    • paint

      public void paint(RMShapePainter aPntr)
      Override to set Painting flag.
      Overrides:
      paint in class RMShape
    • isViewing

      public boolean isViewing()
      Returns whether this shape is being viewed in a viewer.
      Overrides:
      isViewing in class RMShape
    • isEditing

      public boolean isEditing()
      Returns whether this shape is being edited in an editor.
      Overrides:
      isEditing in class RMShape
    • getSourceURL

      public WebURL getSourceURL()
      Returns the SourceURL.
      Overrides:
      getSourceURL in class RMParentShape
    • setSourceURL

      public void setSourceURL(WebURL aURL)
      Sets the SourceURL.
      Overrides:
      setSourceURL in class RMParentShape
    • getContentXML

      public RXElement getContentXML()
      Returns RXElement for content shape.
    • getContentBytes

      public byte[] getContentBytes()
      Returns the content bytes.