Package com.reportmill.shape
Class RMSwitchShape
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.shape.RMShape
com.reportmill.shape.RMSwitchShape
- All Implemented Interfaces:
- RMArchiver.Archiving,- Cloneable
- Direct Known Subclasses:
- RMGraph.BarLabel,- RMTableRow,- RMTableRowRPG
This class represents a sophisticated shape that can maintain multiple versions of itself. For example, a shape can
 have a "Standard" version and a "Mouse Over" version (to define the attributes of this shape when the mouse hovers
 over it).
- 
Field SummaryFields inherited from class com.reportmill.shape.RMShapeWRAP_TYPE_BOTH, WRAP_TYPE_NONE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanEditor method - specifies that switch shape accepts children.booleanViewer method.Creates a new switch shape of this same class.clone()Standard clone implementation.Standard clone deep implementation.voidStandard copy implementation.booleanStandard equals implementation.fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.Returns the map used to hold alternate versions.getChildAnimator(boolean create) Returns the child animator of the switch shape (creating it if absent and requested).Returns the default version name.Returns the currently selected version string for the switch shape.getVersion(String aName) Returns the switch shape associated with the given version name.Returns the version key used to get the version used in a report.Returns a sorted list of all version names contained in the switch shape.booleanReturns whether switch shape has version(s) other than the default.booleanReturns whether switch shape has any mouse versions ("Mouse Over" or "Mouse Down").booleanhasVersion(String aString) Returns whether switch shape has a version with the given name.initWithArchiver(RMArchiver anArchiver) Legacy unarchival.voidmouseEntered(RMViewer aViewer, MouseEvent anEvent) Viewer method.voidmouseExited(RMViewer aViewer, MouseEvent anEvent) Viewer method.voidremoveVersion(String aString) Removes the version shape associated with the given name from the alternates map.rpgClone(ReportMill aReportMill) Standard RPG clone method.rpgClone(ReportMill aReportMill, String aVersion) RPG clone with specified version.voidsetAlternates(Map aMap) Sets the map used to hold alternate versions.voidsetVersion(String aName) Sets the currently selected version of the switch shape to given version name.voidsetVersion(String aString, RMSwitchShape aShape, boolean makeActive) Sets given shape to be the version for the given name.voidsetVersionKey(String aVersionKey) Sets the version key used to get the version used in a report.voidsetWidthDeep(float width, boolean constrain) Overrides standard shape method to resize alternates.booleanEditor method - specifies that switch shape is super selectable.toXML(RXArchiver anArchiver) XML archival.protected voidtransferAttributes(RMSwitchShape toShape) This method is used by setVersion to transfers attributes to/from alternate versions.Methods inherited from class com.reportmill.shape.RMShapeacceptsDragKeys, acceptsFormat, addChild, addChild, addChildBelowLastChild, bounds, boundsChanged, boundsChanged, bringShapesToFront, canBeUngrouped, childrenSuperSelectImmediately, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedSizeFromShape, convertedSizeToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertSizeFromShape, convertSizeToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, delete, didChange, divideShapeFromEdge, divideShapeFromTop, dragExit, dragKeyAtPoint, dropKeyAtPoint, fromXMLDeep, get, getActionScript, getAnim, getAnim, getAnimator, getAnimator, getAutosizeHeight, getAutosizing, getBounds, getBoundsInside, getBoundsMarked, getBoundsOfChildren, getBoundsOfChildren, getBoundsSuperSelected, getCausesWrap, getCausesWrapType, getChild, getChildAnimator, getChildContaining, getChildCount, getChildLast, getChildren, getChildrenIntersecting, getChildrenWhoCauseWrap, getChildrenWhoDraw, getChildrenWhoHitTest, getChildSortedByX, getChildWithClass, getChildWithName, getColor, getCommonAncestor, getDocument, getFill, getFill, getFill, getFillCount, getFills, getFont, getFormat, getFrame, getFrame, getFrameMaxX, getFrameMaxY, getFrameX, getFrameXY, getFrameY, getGroupShape, getHeight, getHeightToFit, getImageFill, getLineWidth, getListKey, getListKeyDeep, getListKeyShape, getMaxX, getMaxY, getName, getOpacity, getOpacityDeep, getOutline, getPageCount, getPageShape, getParent, getParentCount, getParents, getPath, getPathInBounds, getPropertyKey, getPropertyKeyCount, getPropertyKeyName, getRoll, getRootShape, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSizeP, getSkewX, getSkewY, getStroke, getStrokeColor, getTextColor, getToolClassName, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getUrl, getWidth, getWidthToFit, getX, getXY, getXYP, getY, groupShapes, hasPageBreaks, height, indexOf, indexOf, intersects, isAncestor, isDescendant, isLocked, isRoot, isUnderlined, mouseDragged, mouseMoved, mousePressed, mouseReleased, notRSS, offsetChildrenXY, offsetXY, page, pageBreakMax, pageBreakPageMax, pageMax, put, putPropertyKey, reclaimChildren, removeChild, removeChild, removeChildren, removeChildren, removeFromParent, resolvePageReferences, rpgCloneBase, rpgCloneChildren, rpgCloneConclude, rpgCloneNotification, rpgClonePrepare, rpgClonePreprocess, rpgCloneUrl, sendShapesToBack, setActionScript, setAnim, setAutosizeHeight, setAutosizing, setBounds, setBounds, setCausesWrapType, setChildren, setColor, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHeight, setHeightDeep, setHeightDeep, setHeightToFit, setLineWidth, setListKey, setLocked, setName, setNeedsRepaint, setNeedsRepaint, setOpacity, setOutline, setParent, setRoll, setScaleX, setScaleXY, setScaleY, setSize, setSize, setSizeDeep, setSizeP, setSizeToFit, setSizeToFit, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setTextColor, setTime, setUnderlined, setUrl, setWidth, setWidthDeep, setWidthToFit, setX, setXY, setXY, setXYP, setY, sizesToFitChildren, toString, undoClone, undoCopy, undoEquals, undoerAddDirtyObject, undoerDisable, undoerEnable, undoerSetUndoTitle, width, willChange, willChange, x, yMethods inherited from class com.reportmill.base.RMObjectdidUndo, getAnimAttribute, getClassNameShort
- 
Constructor Details- 
RMSwitchShapepublic RMSwitchShape()Creates a plain switch shape.
 
- 
- 
Method Details- 
getVersionReturns the currently selected version string for the switch shape.
- 
setVersionSets the currently selected version of the switch shape to given version name. If the specified version name doesn't yet exist, this method creates a new version for it.
- 
getVersionReturns the switch shape associated with the given version name.
- 
setVersionSets given shape to be the version for the given name. If makeActive, then it makes given version active as well.
- 
removeVersionRemoves the version shape associated with the given name from the alternates map.
- 
getVersionKeyReturns the version key used to get the version used in a report.
- 
setVersionKeySets the version key used to get the version used in a report.
- 
getAlternatesReturns the map used to hold alternate versions.
- 
setAlternatesSets the map used to hold alternate versions.
- 
transferAttributesThis method is used by setVersion to transfers attributes to/from alternate versions.
- 
hasVersionReturns whether switch shape has a version with the given name.
- 
hasAlternateVersionspublic boolean hasAlternateVersions()Returns whether switch shape has version(s) other than the default.
- 
hasMouseVersionspublic boolean hasMouseVersions()Returns whether switch shape has any mouse versions ("Mouse Over" or "Mouse Down").
- 
getVersionNamesReturns a sorted list of all version names contained in the switch shape.
- 
getDefaultVersionNameReturns the default version name.
- 
getChildAnimatorReturns the child animator of the switch shape (creating it if absent and requested).- Overrides:
- getChildAnimatorin class- RMShape
 
- 
alternateShapeInstanceCreates a new switch shape of this same class.
- 
rpgCloneStandard RPG clone method.
- 
rpgCloneRPG clone with specified version.
- 
setWidthDeeppublic void setWidthDeep(float width, boolean constrain) Overrides standard shape method to resize alternates.- Overrides:
- setWidthDeepin class- RMShape
 
- 
equalsStandard equals implementation.
- 
copyStandard copy implementation.
- 
cloneStandard clone implementation.
- 
cloneDeepStandard clone deep implementation.
- 
acceptsMousepublic boolean acceptsMouse()Viewer method.- Overrides:
- acceptsMousein class- RMShape
 
- 
mouseEnteredViewer method.- Overrides:
- mouseEnteredin class- RMShape
 
- 
mouseExitedViewer method.- Overrides:
- mouseExitedin class- RMShape
 
- 
superSelectablepublic boolean superSelectable()Editor method - specifies that switch shape is super selectable.- Overrides:
- superSelectablein class- RMShape
 
- 
acceptsChildrenpublic boolean acceptsChildren()Editor method - specifies that switch shape accepts children.- Overrides:
- acceptsChildrenin class- RMShape
 
- 
toXMLXML archival.
- 
fromXMLXML unarchival.
- 
initWithArchiverLegacy unarchival.- Specified by:
- initWithArchiverin interface- RMArchiver.Archiving
- Overrides:
- initWithArchiverin class- RMShape
 
 
-