Package com.ribsapp.shapes
Class RJShape
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.shape.RMShape
com.ribsapp.shapes.RJShape
- All Implemented Interfaces:
RMArchiver.Archiving
,RMShapePainter.Paint
,RJMinMaxSizeSettable
,Cloneable
- Direct Known Subclasses:
JProgressBarShape
,JScrollPaneShape
,JSeparatorShape
,JSliderShape
,JSpinnerShape
,JSplitPaneShape
,JTabbedPaneShape
,JTableShape
,JTreeShape
,RJColorDockShape
,RJColorWellShape
,RJCustomViewShape
,RJPanelShape
,RJSwitchPaneShape
,RJTextShape
,RJThumbWheelShape
An RMShape subclass to represent Swing components.
-
Field Summary
Fields inherited from class com.reportmill.shape.RMShape
WRAP_TYPE_BOTH, WRAP_TYPE_NONE
-
Constructor Summary
ConstructorsConstructorDescriptionRJShape()
Creates a new RJShape.RJShape
(JComponent aComponent) Creates a new RJShape for the given component. -
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptsDrag
(DropTargetDragEvent dragEvent) Implemented by shapes that can handle drag & dropclone()
Standard clone implementation.For clone deep, lets just archive and unarchive component, and get shape hieracrhy from it.void
dragAtPoint
(DropTargetDragEvent dragEvent, RMPoint aPoint) Editor method - called by RBEditor when system does DnD over shape.void
dragExit()
Editor method.void
dropAtPoint
(DropTargetDropEvent dropEvent, RMPoint aPoint) Editor method.void
dropKeyAtPoint
(String aKey, RMPoint aPoint) Editor method.boolean
Standard equals implementation.Walks up the shape hierarchy looking for the first ancestor of this shape which is an RJPanel.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.Overrides shape implementation to propagate to component.Returns the Swing border for this shape.Returns the bounds of the shape in its own coordinate system, inset by the component's Insets, if it has any.getChildRB
(int anIndex) Returns the individual child at the given index as an RJShape.Implemented by sublasses to specify clipping behavior.Returns the RJComponent represented by this shape.Get the minimum/maximum size values from the component instead of the helper.Get the minimum/maximum size values from the component instead of the helper.getFont()
Overrides shape implementation to propagate to component.getImage()
Returns the image for this shape.Returns component's maximum size as an RMSize.Returns component's minimum size as an RMSize.getName()
Returns the shape's component's name.Editor method - indicates that linked text should use normal text inspector.Returns the tool tip text associated with this shape's component.void
Paints the shape component image with the given graphics.void
Paints the shape component image into the given graphics in a manner more likely to always work.void
paintShape
(RMShapePainter aPainter, Graphics2D g) Paints the shape.void
recache()
Resets the image represenation of this control to force it to recreate from component.void
Recache the entire shape tree (depth first).void
setAutosizing
(String aValue) Overrides shape implementation to propagate to component.void
Sets the Swing border for this shape.void
setClipsChildren
(boolean flag) Any shape can be set to clip to its bbox by calling setClipsChildren(true).void
setComponent
(JComponent aComponent) Sets the RJComponent represented by this shape.void
Overrides shape implementation to propagate to component.void
Overrides shape implementation to propagate to component.void
setHeight
(double aValue) Overrides shape implementation to propagate to component.void
setMaximumSize
(RMSize max) Set component's maximum size as an RMSizevoid
setMinimumSize
(RMSize min) Set component's minimum size as an RMSize.void
Sets the shape's component's name.void
setToolTipText
(String aValue) Sets the tool tip text associated with this shape's component.void
setWidth
(double aValue) Overrides shape implementation to propagate to component.void
setX
(double aValue) Overrides shape implementation to propagate to component.void
setY
(double aValue) Overrides shape implementation to propagate to component.super_fromXML
(RXArchiver anArchiver, RXElement anElement) Provides access to RMShape fromXML implementation.toXML
(RXArchiver anArchiver) XML archival.Methods inherited from class com.reportmill.shape.RMShape
acceptsChildren, acceptsDragKeys, acceptsFormat, acceptsMouse, 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, copy, copyShape, delete, didChange, divideShapeFromEdge, divideShapeFromTop, dragKeyAtPoint, fromXMLDeep, get, getActionScript, getAnim, getAnim, getAnimator, getAnimator, getAutosizeHeight, getBounds, getBoundsInside, getBoundsMarked, getBoundsOfChildren, getBoundsOfChildren, getBoundsSuperSelected, getCausesWrap, getCausesWrapType, getChild, getChildAnimator, getChildAnimator, getChildContaining, getChildCount, getChildLast, getChildren, getChildrenIntersecting, getChildrenWhoCauseWrap, getChildrenWhoDraw, getChildrenWhoHitTest, getChildSortedByX, getChildWithClass, getChildWithName, getColor, getCommonAncestor, getDocument, getFill, getFill, getFill, getFillCount, getFills, getFormat, getFrame, getFrame, getFrameMaxX, getFrameMaxY, getFrameX, getFrameXY, getFrameY, getGroupShape, getHeight, getHeightToFit, getImageFill, getLineWidth, getListKey, getListKeyDeep, getListKeyShape, getMaxX, getMaxY, 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, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getUrl, getWidth, getWidthToFit, getX, getXY, getXYP, getY, groupShapes, hasPageBreaks, height, indexOf, indexOf, initWithArchiver, intersects, isAncestor, isDescendant, isLocked, isRoot, isUnderlined, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, notRSS, offsetChildrenXY, offsetXY, page, pageBreakMax, pageBreakPageMax, pageMax, put, putPropertyKey, reclaimChildren, removeChild, removeChild, removeChildren, removeChildren, removeFromParent, resolvePageReferences, rpgClone, rpgCloneBase, rpgCloneChildren, rpgCloneConclude, rpgCloneNotification, rpgClonePrepare, rpgClonePreprocess, rpgCloneUrl, sendShapesToBack, setActionScript, setAnim, setAutosizeHeight, setBounds, setBounds, setCausesWrapType, setChildren, setColor, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHeightDeep, setHeightDeep, setHeightToFit, setLineWidth, setListKey, setLocked, 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, setWidthDeep, setWidthToFit, setXY, setXY, setXYP, sizesToFitChildren, superSelectable, toString, undoClone, undoCopy, undoEquals, undoerAddDirtyObject, undoerDisable, undoerEnable, undoerSetUndoTitle, width, willChange, willChange, x, y
Methods inherited from class com.reportmill.base.RMObject
didUndo, getAnimAttribute, getClassNameShort
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.ribsapp.shapes.RJMinMaxSizeSettable
getSize
-
Constructor Details
-
RJShape
public RJShape()Creates a new RJShape. -
RJShape
Creates a new RJShape for the given component.
-
-
Method Details
-
getComponent
Returns the RJComponent represented by this shape. -
setComponent
Sets the RJComponent represented by this shape. -
getName
Returns the shape's component's name. -
setName
Sets the shape's component's name. -
setX
public void setX(double aValue) Overrides shape implementation to propagate to component. -
setY
public void setY(double aValue) Overrides shape implementation to propagate to component. -
setWidth
public void setWidth(double aValue) Overrides shape implementation to propagate to component. -
setHeight
public void setHeight(double aValue) Overrides shape implementation to propagate to component. -
setFill
Overrides shape implementation to propagate to component. -
getAutosizing
Overrides shape implementation to propagate to component.- Overrides:
getAutosizing
in classRMShape
-
setAutosizing
Overrides shape implementation to propagate to component.- Overrides:
setAutosizing
in classRMShape
-
setMaximumSize
Set component's maximum size as an RMSize- Specified by:
setMaximumSize
in interfaceRJMinMaxSizeSettable
-
getMaximumSize
Returns component's maximum size as an RMSize.- Specified by:
getMaximumSize
in interfaceRJMinMaxSizeSettable
-
setMinimumSize
Set component's minimum size as an RMSize.- Specified by:
setMinimumSize
in interfaceRJMinMaxSizeSettable
-
getMinimumSize
Returns component's minimum size as an RMSize.- Specified by:
getMinimumSize
in interfaceRJMinMaxSizeSettable
-
getDefaultMinimumSize
Get the minimum/maximum size values from the component instead of the helper. If had been set previously, we'll get the last set value, otherwise it will return whatever the component's default is (on this L&F)- Specified by:
getDefaultMinimumSize
in interfaceRJMinMaxSizeSettable
-
getDefaultMaximumSize
Get the minimum/maximum size values from the component instead of the helper. If had been set previously, we'll get the last set value, otherwise it will return whatever the component's default is (on this L&F)- Specified by:
getDefaultMaximumSize
in interfaceRJMinMaxSizeSettable
-
getFont
Overrides shape implementation to propagate to component. -
setFont
Overrides shape implementation to propagate to component. -
getBorder
Returns the Swing border for this shape. -
setBorder
Sets the Swing border for this shape. -
getToolTipText
Returns the tool tip text associated with this shape's component. -
setToolTipText
Sets the tool tip text associated with this shape's component. -
getChildRB
Returns the individual child at the given index as an RJShape. -
getBoundsInsideInset
Returns the bounds of the shape in its own coordinate system, inset by the component's Insets, if it has any. -
equals
Standard equals implementation. -
clone
Standard clone implementation. -
cloneDeep
For clone deep, lets just archive and unarchive component, and get shape hieracrhy from it. -
getClipRect
Implemented by sublasses to specify clipping behavior. Null (the default) indicates no clipping. Any other rect is interpreted as being in the parent's coordinate system. -
setClipsChildren
public void setClipsChildren(boolean flag) Any shape can be set to clip to its bbox by calling setClipsChildren(true). -
paintShape
Paints the shape.- Specified by:
paintShape
in interfaceRMShapePainter.Paint
-
getImage
Returns the image for this shape. -
recache
public void recache()Resets the image represenation of this control to force it to recreate from component. -
recacheDeep
public void recacheDeep()Recache the entire shape tree (depth first). -
paintImage
Paints the shape component image with the given graphics. -
paintImageOverkill
Paints the shape component image into the given graphics in a manner more likely to always work. -
getToolClassName
Editor method - indicates that linked text should use normal text inspector.- Overrides:
getToolClassName
in classRMShape
-
toXML
XML archival. -
fromXML
XML unarchival. -
super_fromXML
Provides access to RMShape fromXML implementation. -
acceptsDrag
Implemented by shapes that can handle drag & drop -
dragAtPoint
Editor method - called by RBEditor when system does DnD over shape. -
dropAtPoint
Editor method. -
dropKeyAtPoint
Editor method.- Overrides:
dropKeyAtPoint
in classRMShape
-
dragExit
public void dragExit()Editor method. -
findParentPanel
Walks up the shape hierarchy looking for the first ancestor of this shape which is an RJPanel.
-