Class RMViewerShape
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.rm.shape.RMShape
-
- com.inductiveautomation.rm.shape.RMParentShape
-
- com.inductiveautomation.rm.viewer.RMViewerShape
-
- All Implemented Interfaces:
Archivable
,DeepChangeListener
,RMPropertyChanger
,RMTypes
,java.beans.PropertyChangeListener
,java.lang.Cloneable
,java.util.EventListener
- Direct Known Subclasses:
RMEditorShape
public class RMViewerShape extends RMParentShape
A shape to act as root of shape to be viewed.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.inductiveautomation.rm.base.RMTypes
RMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.rm.shape.RMShape
BINDING_PROP_NAME, STROKE_BORDER, STROKE_DOUBLE, STROKE_HIDDEN, STROKE_SHAPE
-
-
Constructor Summary
Constructors Constructor Description RMViewerShape(RMViewer aViewer)
Creates a new ViewerShape.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
computePrefHeight(double aWidth)
Override to return content preferred height.protected double
computePrefWidth(double aHeight)
Override to return content preferred width.RMAnimator
getChildAnimator()
Return child animator.RMParentShape
getContent()
Returns the root shape that is being viewed in viewer.<T extends RMParentShape>
TgetContent(java.lang.Class<T> aClass)
Returns the root shape that is being viewed in viewer as a specific class.byte[]
getContentBytes()
Returns the content bytes.RXElement
getContentXML()
Returns RXElement for content shape.RMDocument
getDocument()
Returns the root shape as RMDocument, if available.RMParentShape
getPage(int anIndex)
Returns the page at index.int
getPageCount()
Returns the page count.RMParentShape
getSelectedPage()
Returns the currently selected page shape.int
getSelectedPageIndex()
Returns the index of the current visible document page.WebURL
getSourceURL()
Returns the SourceURL.RMViewer
getViewer()
Returns the viewer.boolean
isEditing()
Returns whether this shape is being edited in an editor.boolean
isViewing()
Returns whether this shape is being viewed in a viewer.protected void
layoutChildren()
This is bogus, but we want to make sure that ViewerShape is always the same size as the content.void
paint(RMShapePainter aPntr)
Override to set Painting flag.protected void
repaint(RMShape aShape)
This is a notification call for impending visual shape attribute changes.void
setContent(RMParentShape aShape)
Sets the root shape that is being viewed in viewer.void
setSelectedPageIndex(int anIndex)
Sets the page of viewer's document that is visible (by index).void
setSourceURL(WebURL aURL)
Sets the SourceURL.-
Methods inherited from class com.inductiveautomation.rm.shape.RMParentShape
addChild, addChild, addChild, addChild, addLayoutChild, bringShapesToFront, clone, cloneDeep, divideShapeFromTop, fromXML, fromXMLChildren, fromXMLShape, getBoundsOfChildren, getChild, getChildArray, getChildContaining, getChildCount, getChildLast, getChildren, getChildrenIntersecting, getChildrenWithClass, getChildrenWithClass, getChildWithClass, getChildWithName, getLayout, getNeedsLayout, indexOfChild, isHittable, isShowing, isSourceURLSet, layout, relayout, removeChild, removeChild, removeChildren, removeLayoutChild, rpgAll, rpgChildren, sendShapesToBack, setHeight, setLayout, setNeedsLayout, setWidth, toXML, toXMLChildren, toXMLShape
-
Methods inherited from class com.inductiveautomation.rm.shape.RMShape
acceptsChildren, acceptsMouse, addBinding, addBinding, addDeepChangeListener, addMouseListener, animUpdate, bounds, childrenSuperSelectImmediately, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, createDivideShapeRemainder, deepChange, divideShapeFromEdge, get, get, getAlignment, getAlignmentX, getAlignmentY, getAncestor, getAncestorCount, getAncestorInCommon, getAnimator, getAnimator, getAutosizing, getAutosizingDefault, getBestHeight, getBestHeight, getBestWidth, getBestWidth, getBinding, getBinding, getBindingCount, getBindings, getBounds, getBoundsInside, getBoundsMarked, getBoundsMarkedDeep, getChildAnimator, getChildClipShape, getClipShape, getColor, getDashArrayString, getDashPhase, getDatasetEntity, getDatasetKey, getDisplayedFill, getDisplayedStroke, getEffect, getEventAdapter, getFill, getFont, getFormat, getFrame, getFrameHeight, getFrameMaxX, getFrameMaxY, getFrameWidth, getFrameX, getFrameXY, getFrameY, getHeight, getHover, getLayoutInfo, getMaskPath, getMaxX, getMaxY, getMinHeight, getMinHeight, getMinWidth, getMinWidth, getName, getOpacity, getOpacityDeep, getOutline, getPageBreak, getPageBreakMax, getPageBreakPage, getPageBreakPageMax, getPageShape, getParent, getParent, getPath, getPathInBounds, getPrefHeight, getPrefHeight, getPrefWidth, getPrefWidth, getPropertyNameMapped, getPropertyNames, getPropertyNames, getRoll, getRootShape, getRSS, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSkewX, getSkewY, getStroke, getStrokeColor, getStrokeOnTop, getStrokeStyle, getStrokeWidth, getTextColor, getTimeline, getTimeline, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getURL, getVisbileBounds, getVisibleBounds, getVisibleBounds, getVisibleBounds, getWidth, getX, getXY, getXYP, getY, height, indexOf, intersects, isAncestor, isAnimProperty, isDeletable, isDescendant, isEnabled, isFontSet, isHittable, isLocked, isMinHeightSet, isMinWidthSet, isPrefHeightSet, isPrefWidthSet, isRoot, isRSS, isShowing, isUnderlined, isUseFill, isUseStroke, isVisible, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, offsetXY, page, pageMax, paintShape, paintShapeAll, paintShapeChildren, paintShapeOver, propertyChange, put, removeBinding, removeBinding, removeDeepChangeListener, removeFromParent, removeMouseListener, repaint, resolvePageReferences, rpgBindings, rpgShape, setAlignment, setAlignmentX, setAlignmentY, setAutosizing, setBestHeight, setBestSize, setBounds, setBounds, setColor, setDashArrayString, setDashPhase, setEffect, setEnabled, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHover, setLayoutInfo, setLocked, setMinHeight, setMinSize, setMinWidth, setName, setOpacity, setOutline, setParent, setPrefHeight, setPrefWidth, setRoll, setScaleX, setScaleXY, setScaleY, setShowing, setSize, setSize, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setStrokeStyle, setStrokeWidth, setTextColor, setTime, setTimeline, setUnderlined, setURL, setUseFill, setUseStroke, setVisible, setX, setXY, setXY, setXYP, setY, shapeHidden, shapeShown, superSelectable, toString, undoerDisable, undoerEnable, undoerSetUndoTitle, width, x, y
-
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
-
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
-
-
-
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 classRMShape
-
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 classRMShape
-
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 classRMParentShape
-
computePrefWidth
protected double computePrefWidth(double aHeight)
Override to return content preferred width.- Overrides:
computePrefWidth
in classRMParentShape
-
computePrefHeight
protected double computePrefHeight(double aWidth)
Override to return content preferred height.- Overrides:
computePrefHeight
in classRMParentShape
-
repaint
protected void repaint(RMShape aShape)
This is a notification call for impending visual shape attribute changes.
-
paint
public void paint(RMShapePainter aPntr)
Override to set Painting flag.
-
isViewing
public boolean isViewing()
Returns whether this shape is being viewed in a viewer.
-
isEditing
public boolean isEditing()
Returns whether this shape is being edited in an editor.
-
getSourceURL
public WebURL getSourceURL()
Returns the SourceURL.- Overrides:
getSourceURL
in classRMParentShape
-
setSourceURL
public void setSourceURL(WebURL aURL)
Sets the SourceURL.- Overrides:
setSourceURL
in classRMParentShape
-
getContentXML
public RXElement getContentXML()
Returns RXElement for content shape.
-
getContentBytes
public byte[] getContentBytes()
Returns the content bytes.
-
-