Package com.inductiveautomation.rm.shape
Class RMImageShape
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.rm.shape.RMShape
com.inductiveautomation.rm.shape.RMRectShape
com.inductiveautomation.rm.shape.RMImageShape
- All Implemented Interfaces:
Archivable
,DeepChangeListener
,RMPropertyChanger
,RMTypes
,PropertyChangeListener
,Cloneable
,EventListener
This class is a shape representation of an image.
-
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
ConstructorsConstructorDescriptionCreates an RMImageShape.RMImageShape
(Object aSource) Creates an RMImageShape from the image source provided. -
Method Summary
Modifier and TypeMethodDescriptiondouble
computePrefHeight
(double aWidth) Returns the preferred height.double
computePrefWidth
(double aHeight) Returns the preferred width.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.Returns the horizontal alignment.Returns the vertical alignment.Returns the image bounds.Returns the image data.getKey()
Returns the report key used to load an image if none is provided.int
Returns the padding.int
Returns the page index.boolean
Returns whether to preserve the natural width to height ratio of image.protected void
getPropertyNames
(List<String> aList) Returns the property names for RMShape.boolean
Returns whether to grow image to fit available area if shape larger than image.void
paintShape
(RMShapePainter aPntr) Override to paint shape.rpgShape
(ReportOwner aRptOwner, RMShape aParent) Report generation method.void
setAlignmentX
(RMTypes.AlignX anAlignX) Sets the horizontal alignment.void
setAlignmentY
(RMTypes.AlignY anAlignY) Sets the vertical alignment.void
setGrowToFit
(boolean aValue) Sets whether to grow image to fit available area if shape larger than image.void
setImageData
(RMImageData anImageData) Sets the image data.void
setImageData
(Object aSource) Sets the image data from given source.void
Sets the report key used to load an image if none is provided.void
setPadding
(int aPadding) Sets the padding.void
setPageIndex
(int anIndex) Sets the page index.void
setPreserveRatio
(boolean aValue) Sets whether to preserve the natural width to height ratio of image.toXML
(RXArchiver anArchiver) XML archival.Methods inherited from class com.inductiveautomation.rm.shape.RMRectShape
getPath, getRadius, setRadius
Methods inherited from class com.inductiveautomation.rm.shape.RMShape
acceptsChildren, acceptsMouse, addBinding, addBinding, addDeepChangeListener, addMouseListener, animUpdate, bounds, childrenSuperSelectImmediately, clone, cloneDeep, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, createDivideShapeRemainder, deepChange, divideShapeFromEdge, divideShapeFromTop, get, get, getAlignment, getAncestor, getAncestorCount, getAncestorInCommon, getAnimator, getAnimator, getAutosizing, getAutosizingDefault, getBestHeight, getBestHeight, getBestWidth, getBestWidth, getBinding, getBinding, getBindingCount, getBindings, getBounds, getBoundsInside, getBoundsMarked, getBoundsMarkedDeep, getChild, getChildAnimator, getChildAnimator, getChildClipShape, getChildCount, getChildren, getClipShape, getColor, getDashArrayString, getDashPhase, getDatasetEntity, getDatasetKey, getDisplayedFill, getDisplayedStroke, getDocument, 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, getPathInBounds, getPrefHeight, getPrefHeight, getPrefWidth, getPrefWidth, getPropertyNameMapped, 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, isEditing, isEnabled, isFontSet, isHittable, isLocked, isMinHeightSet, isMinWidthSet, isPrefHeightSet, isPrefWidthSet, isRoot, isRSS, isShowing, isUnderlined, isUseFill, isUseStroke, isViewing, isVisible, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, offsetXY, page, pageMax, paint, paintShapeAll, paintShapeChildren, paintShapeOver, propertyChange, put, removeBinding, removeBinding, removeDeepChangeListener, removeFromParent, removeMouseListener, repaint, repaint, resolvePageReferences, rpgAll, rpgBindings, setAlignment, setAutosizing, setBestHeight, setBestSize, setBounds, setBounds, setColor, setDashArrayString, setDashPhase, setEffect, setEnabled, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHeight, 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, setWidth, 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 Details
-
RMImageShape
public RMImageShape()Creates an RMImageShape. -
RMImageShape
Creates an RMImageShape from the image source provided.
-
-
Method Details
-
getKey
Returns the report key used to load an image if none is provided. -
setKey
Sets the report key used to load an image if none is provided. -
getImageData
Returns the image data. -
setImageData
Sets the image data. -
setImageData
Sets the image data from given source. -
getPageIndex
public int getPageIndex()Returns the page index. -
setPageIndex
public void setPageIndex(int anIndex) Sets the page index. -
getPadding
public int getPadding()Returns the padding. -
setPadding
public void setPadding(int aPadding) Sets the padding. -
getAlignmentX
Returns the horizontal alignment.- Overrides:
getAlignmentX
in classRMShape
-
setAlignmentX
Sets the horizontal alignment.- Overrides:
setAlignmentX
in classRMShape
-
getAlignmentY
Returns the vertical alignment.- Overrides:
getAlignmentY
in classRMShape
-
setAlignmentY
Sets the vertical alignment.- Overrides:
setAlignmentY
in classRMShape
-
isGrowToFit
public boolean isGrowToFit()Returns whether to grow image to fit available area if shape larger than image. -
setGrowToFit
public void setGrowToFit(boolean aValue) Sets whether to grow image to fit available area if shape larger than image. -
getPreserveRatio
public boolean getPreserveRatio()Returns whether to preserve the natural width to height ratio of image. -
setPreserveRatio
public void setPreserveRatio(boolean aValue) Sets whether to preserve the natural width to height ratio of image. -
computePrefWidth
public double computePrefWidth(double aHeight) Returns the preferred width.- Overrides:
computePrefWidth
in classRMShape
-
computePrefHeight
public double computePrefHeight(double aWidth) Returns the preferred height.- Overrides:
computePrefHeight
in classRMShape
-
getPropertyNames
Returns the property names for RMShape.- Overrides:
getPropertyNames
in classRMShape
-
rpgShape
Report generation method. -
paintShape
Override to paint shape.- Overrides:
paintShape
in classRMShape
-
getImageBounds
Returns the image bounds. -
toXML
XML archival.- Specified by:
toXML
in interfaceArchivable
- Overrides:
toXML
in classRMRectShape
-
fromXML
XML unarchival.- Specified by:
fromXML
in interfaceArchivable
- Overrides:
fromXML
in classRMRectShape
-