ReportMill 10 API

com.reportmill.shape
Class RMSwitchShape

java.lang.Object
  extended by com.reportmill.base.RMObject
      extended by com.reportmill.shape.RMShape
          extended by com.reportmill.shape.RMSwitchShape
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
RMTableRow

public class RMSwitchShape
extends RMShape

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 Summary
 
Fields inherited from class com.reportmill.shape.RMShape
WRAP_TYPE_BOTH, WRAP_TYPE_NONE
 
Constructor Summary
RMSwitchShape()
          Creates a plain switch shape.
 
Method Summary
 boolean acceptsChildren()
          Editor method - specifies that switch shape accepts children.
 boolean acceptsMouse()
          Viewer method.
 RMSwitchShape alternateShapeInstance()
          Creates a new switch shape of this same class.
 java.lang.Object clone()
          Standard clone implementation.
 RMShape cloneDeep()
          Standard clone deep implementation.
 void copy(java.lang.Object anObj)
          Standard copy implementation.
 boolean equals(java.lang.Object anObj)
          Standard equals implementation.
 java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement)
          XML unarchival.
 java.util.Map getAlternates()
          Returns the map used to hold alternate versions.
 com.reportmill.graphics.RMAnimator getChildAnimator(boolean create)
          Returns the child animator of the switch shape (creating it if absent and requested).
 java.lang.String getDefaultVersionName()
          Returns the default version name.
 java.lang.String getVersion()
          Returns the currently selected version string for the switch shape.
 RMSwitchShape getVersion(java.lang.String aName)
          Returns the switch shape associated with the given version name.
 java.lang.String getVersionKey()
          Returns the version key used to get the version used in a report.
 java.util.List getVersionNames()
          Returns a sorted list of all version names contained in the switch shape.
 boolean hasAlternateVersions()
          Returns whether switch shape has version(s) other than the default.
 boolean hasMouseVersions()
          Returns whether switch shape has any mouse versions ("Mouse Over" or "Mouse Down").
 boolean hasVersion(java.lang.String aString)
          Returns whether switch shape has a version with the given name.
 void mouseEntered(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
          Viewer method.
 void mouseExited(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
          Viewer method.
 void removeVersion(java.lang.String aString)
          Removes the version shape associated with the given name from the alternates map.
 RMShape rpgClone_super(com.reportmill.base.ReportMill aReportMill)
          Gives us access to normal shape rpgClone implementation.
 RMShape rpgClone(com.reportmill.base.ReportMill aReportMill)
          Standard RPG clone method.
 RMShape rpgClone(com.reportmill.base.ReportMill aReportMill, java.lang.String aVersion)
          RPG clone with specified version.
 void setAlternates(java.util.Map aMap)
          Sets the map used to hold alternate versions.
 void setVersion(java.lang.String aName)
          Sets the currently selected version of the switch shape to given version name.
 void setVersion(java.lang.String aString, RMSwitchShape aShape, boolean makeActive)
          Sets given shape to be the version for the given name.
 void setVersionKey(java.lang.String aVersionKey)
          Sets the version key used to get the version used in a report.
 void setWidth(double aWidth)
          Overrides standard shape method to resize alternates.
 boolean superSelectable()
          Editor method - specifies that switch shape is super selectable.
 com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver)
          XML archival.
 
Methods inherited from class com.reportmill.shape.RMShape
addChild, addChild, 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, createLayout, delete, didChange, divideShapeFromEdge, divideShapeFromTop, doLayout, fromXMLDeep, get, getActionScript, getAnim, getAnim, getAnimator, getAnimator, getAutosizeHeight, getAutosizing, getBounds, getBoundsInside, getBoundsMarked, getBoundsOfChildren, getBoundsOfChildren, getBoundsSuperSelected, getCausesWrap, getCausesWrapType, getChild, getChildAnimator, getChildContaining, getChildCount, getChildCountHitable, getChildCountLayout, getChildCountVisible, getChildHitable, getChildLast, getChildLayout, getChildren, getChildrenIntersecting, getChildrenWhoCauseWrap, getChildrenWithClass, getChildrenWithClass, getChildVisible, getChildWithClass, getChildWithName, getColor, getCommonAncestor, getDatasetKey, getDatasetKeyDeep, getDatasetKeyShape, getDocument, getFill, getFill, getFill, getFillCount, getFills, getFont, getFormat, getFrame, getFrame, getFrameMaxX, getFrameMaxY, getFrameX, getFrameXY, getFrameY, getGroupShape, getHeight, getHeightToFit, getImageFill, getLayout, getLineWidth, getListKey, getMaxX, getMaxY, getName, getOpacity, getOpacityDeep, getOutline, getPageBreak, getPageBreakMax, getPageBreakPage, getPageBreakPageMax, 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, height, indexOf, indexOf, intersects, invalidate, isAncestor, isDescendant, isLocked, isRoot, isUnderlined, isValid, layoutReset, mouseDragged, mouseMoved, mousePressed, mouseReleased, notRSS, offsetChildrenXY, offsetXY, page, pageMax, put, putPropertyKey, reclaimChildren, removeChild, removeChild, removeChildren, removeChildren, removeFromParent, resolvePageReferences, revalidate, rpgCloneBase, rpgCloneChildren, rpgCloneNotification, rpgClonePreprocess, rpgCloneUrl, sendShapesToBack, setActionScript, setAnim, setAutosizeHeight, setAutosizing, setBounds, setBounds, setCausesWrapType, setChildren, setColor, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHeight, setHeightDeep, setHeightToFit, setLayout, setLayoutEnabled, setLineWidth, 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, setWidthDeep, setWidthToFit, setX, setXY, setXY, setXYP, setY, sizesToFitChildren, toString, toXMLDeep, undoClone, undoCopy, undoEquals, undoerAddDirtyObject, undoerDisable, undoerEnable, undoerSetUndoTitle, validate, width, willChange, willChange, x, y
 
Methods inherited from class com.reportmill.base.RMObject
didUndo, getAnimAttribute, getClassNameShort
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RMSwitchShape

public RMSwitchShape()
Creates a plain switch shape.

Method Detail

getVersion

public java.lang.String getVersion()
Returns the currently selected version string for the switch shape.


setVersion

public void setVersion(java.lang.String aName)
Sets 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.


getVersion

public RMSwitchShape getVersion(java.lang.String aName)
Returns the switch shape associated with the given version name.


setVersion

public void setVersion(java.lang.String aString,
                       RMSwitchShape aShape,
                       boolean makeActive)
Sets given shape to be the version for the given name. If makeActive, then it makes given version active as well.


removeVersion

public void removeVersion(java.lang.String aString)
Removes the version shape associated with the given name from the alternates map.


getVersionKey

public java.lang.String getVersionKey()
Returns the version key used to get the version used in a report.


setVersionKey

public void setVersionKey(java.lang.String aVersionKey)
Sets the version key used to get the version used in a report.


getAlternates

public java.util.Map getAlternates()
Returns the map used to hold alternate versions.


setAlternates

public void setAlternates(java.util.Map aMap)
Sets the map used to hold alternate versions.


hasVersion

public boolean hasVersion(java.lang.String aString)
Returns whether switch shape has a version with the given name.


hasAlternateVersions

public boolean hasAlternateVersions()
Returns whether switch shape has version(s) other than the default.


hasMouseVersions

public boolean hasMouseVersions()
Returns whether switch shape has any mouse versions ("Mouse Over" or "Mouse Down").


getVersionNames

public java.util.List getVersionNames()
Returns a sorted list of all version names contained in the switch shape.


getDefaultVersionName

public java.lang.String getDefaultVersionName()
Returns the default version name.


getChildAnimator

public com.reportmill.graphics.RMAnimator getChildAnimator(boolean create)
Returns the child animator of the switch shape (creating it if absent and requested).

Overrides:
getChildAnimator in class RMShape

alternateShapeInstance

public RMSwitchShape alternateShapeInstance()
Creates a new switch shape of this same class.


rpgClone

public RMShape rpgClone(com.reportmill.base.ReportMill aReportMill)
Standard RPG clone method.

Overrides:
rpgClone in class RMShape

rpgClone

public RMShape rpgClone(com.reportmill.base.ReportMill aReportMill,
                        java.lang.String aVersion)
RPG clone with specified version.


rpgClone_super

public RMShape rpgClone_super(com.reportmill.base.ReportMill aReportMill)
Gives us access to normal shape rpgClone implementation.


setWidth

public void setWidth(double aWidth)
Overrides standard shape method to resize alternates.

Overrides:
setWidth in class RMShape

equals

public boolean equals(java.lang.Object anObj)
Standard equals implementation.

Overrides:
equals in class RMShape

copy

public void copy(java.lang.Object anObj)
Standard copy implementation.

Overrides:
copy in class RMShape

clone

public java.lang.Object clone()
Standard clone implementation.

Overrides:
clone in class RMShape

cloneDeep

public RMShape cloneDeep()
Standard clone deep implementation.

Overrides:
cloneDeep in class RMShape

acceptsMouse

public boolean acceptsMouse()
Viewer method.

Overrides:
acceptsMouse in class RMShape

mouseEntered

public void mouseEntered(RMViewer aViewer,
                         java.awt.event.MouseEvent anEvent)
Viewer method.

Overrides:
mouseEntered in class RMShape

mouseExited

public void mouseExited(RMViewer aViewer,
                        java.awt.event.MouseEvent anEvent)
Viewer method.

Overrides:
mouseExited in class RMShape

superSelectable

public boolean superSelectable()
Editor method - specifies that switch shape is super selectable.

Overrides:
superSelectable in class RMShape

acceptsChildren

public boolean acceptsChildren()
Editor method - specifies that switch shape accepts children.

Overrides:
acceptsChildren in class RMShape

toXML

public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver)
XML archival.

Overrides:
toXML in class RMShape

fromXML

public java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver,
                                com.reportmill.archiver.RXElement anElement)
XML unarchival.

Overrides:
fromXML in class RMShape

ReportMill 10 API