Class RMViewerShape

    • Constructor Detail

      • RMViewerShape

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

      • 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​(java.lang.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).
      • 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
      • 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
      • getContentXML

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

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