UC Berkeley Group for User Interface Research
Updated November 17, 2000

edu.berkeley.guir.lib.satin
Class Sheet.SheetGraphicalObjectGroup

java.lang.Object
  |
  +--edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl
        |
        +--edu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupImpl
              |
              +--edu.berkeley.guir.lib.satin.Sheet.SheetGraphicalObjectGroup
All Implemented Interfaces:
Cloneable, EventListener, GraphicalObject, GraphicalObjectCollection, GraphicalObjectGroup, SatinConstants, Serializable, Shape, StrokeListener, Watchable, Watcher
Enclosing class:
Sheet

public final class Sheet.SheetGraphicalObjectGroup
extends GraphicalObjectGroupImpl

This class handles the Graphical Objects in the sheet. This also handles the repainting.

The real reason this class is here is because I really need multiple inheritance, since Sheet is both a JComponent and a GraphicalObjectGroup. Since I don't want to rewrite a lot of the code already in GraphicalObjectGroupImpl, I just delegated a lot of its functions here.

Subclassing the GraphicalObjectGroupImpl as an inner class is actually a really clean solution, giving us the benefits of delegation and inheritance.

See Also:
Serialized Form

Inner classes inherited from class edu.berkeley.guir.lib.satin.SatinConstants
SatinConstants.ObjectPoolAffineTransform, SatinConstants.ObjectPoolPoint2D, SatinConstants.ObjectPoolPolygon2D, SatinConstants.ObjectPoolRectangle2D, SatinConstants.ObjectPoolStringBuffer, SatinConstants.UniqueAffineTransform, SatinConstants.UniquePoint2D, SatinConstants.UniquePolygon2D, SatinConstants.UniqueRectangle2D
 
Fields inherited from interface edu.berkeley.guir.lib.satin.objects.GraphicalObjectGroup
DEFAULT_POS_POLICY, KEEP_ABS_POS, KEEP_REL_POS
 
Fields inherited from interface edu.berkeley.guir.lib.satin.objects.GraphicalObject
GESTUREINTRP_CLPROPERTY, INKINTRP_CLPROPERTY, STYLE_CLPROPERTY, VIEW_CLPROPERTY
 
Fields inherited from interface edu.berkeley.guir.lib.satin.SatinConstants
ABOVE, ALL, BAR, BELOW, clipboard, clprops, cmdqueue, cmdsubsys, CONTAINEDBY, CONTAINS, COORD_ABS, COORD_LOCAL, COORD_REL, DAMAGE_LATER, DAMAGE_NOW, DEBUG_GRAPHICS_OFFSET, DEBUG_STYLE_FILE, DEBUG_STYLE_GPROPERTY, DEEP, DEFAULT_POINT2D_POOL_SIZE, DEFAULT_POLYGON2D_POOL_SIZE, DEFAULT_RECTANGLE_POOL_SIZE, DEFAULT_REPAINT_THRESHOLD, DEFAULT_SELECT_THRESHOLD, DEFAULT_STRINGBUFFER_POOL_SIZE, DEFAULT_TRANSFORM_POOL_SIZE, DIR_CENTER, DIR_DOWN, DIR_DOWN_LEFT, DIR_DOWN_RIGHT, DIR_LEFT, DIR_RIGHT, DIR_UP, DIR_UP_LEFT, DIR_UP_RIGHT, FILTER_THRESHOLD, FIRST, FLOATING_PT_TOLERANCE, glprops, INTERSECTS, KEY_STYLE_DASHARRAY, KEY_STYLE_DASHPHASE, KEY_STYLE_DRAWCOLOR, KEY_STYLE_DRAWFONT, KEY_STYLE_DRAWTRANSPARENCY, KEY_STYLE_ENDCAP, KEY_STYLE_FILLCOLOR, KEY_STYLE_FILLTRANSPARENCY, KEY_STYLE_LINEJOIN, KEY_STYLE_LINEWIDTH, KEY_STYLE_MITERLIMIT, NEAR, NOTIFY_BOUNDS, NOTIFY_LAYER, NOTIFY_LOCATION, NOTIFY_STYLE, NOTIFY_TRANSFORM, poolPoints, poolPolys, poolRects, poolStrbuf, poolTx, rand, SATIN_DATA_DIRECTORY_DEFAULT, SATIN_DATA_DIRECTORY_GPROPERTY, SATIN_PROPERTIES_FILENAME, SHALLOW
 
Constructor Summary
Sheet.SheetGraphicalObjectGroup()
           
 
Method Summary
 boolean contains(double x, double y)
          See if this GraphicalObject contains the specified point.
 boolean contains(double x, double y, double w, double h)
          See if this GraphicalObject contains the specified rectangle.
 boolean contains(Point2D p)
          See if this GraphicalObject contains the specified point.
 boolean contains(Rectangle2D r)
          See if this GraphicalObject contains the specified rectangle.
 void damage(int sync)
          If this GraphicalObject Sheet.hasNotifyEnabled(), mark this GraphicalObject as damaged and repaint.
 void damage(int sync, GraphicalObject gob)
          If this GraphicalObject Sheet.hasNotifyEnabled(), mark the specified GraphicalObject as damaged and repaint.
 void damage(int sync, Rectangle2D rect)
          If this GraphicalObject Sheet.hasNotifyEnabled(), mark the specified region as damaged and repaint.
 void damage(int sync, Rectangle2D oldRect, Rectangle2D newRect)
          If this GraphicalObject Sheet.hasNotifyEnabled(), mark the specified regions as damaged and repaint.
 void disableDamage()
          Turn off damage mechanism temporarily.
 void enableDamage()
          Re-enable damage mechanism.
 Polygon2D getBoundingPoints2D(int cdsys)
          Our bounds is always the size of the Sheet.
 Polygon2D getBoundingPoints2D(int cdsys, AffineTransform tx, Polygon2D poly)
          Our bounds is always the size of the Sheet.
 Rectangle2D getBounds2D()
          Get the relative bounds.
 Rectangle2D getBounds2D(int cdsys)
          Our bounds is the coordinate system.
 Rectangle2D getBounds2D(int cdsys, AffineTransform tx, Rectangle2D rect)
          Get the bounds of all of the visible views of this GraphicalObject.
 Rectangle2D getCollectionBounds2D(int cdsys)
          Get the union of the bounds of the GraphicalObjects contained in this collection.
 Rectangle2D getCollectionBounds2D(int cdsys, Rectangle2D rect)
          Get the bounds, put them in the specified Rectangle.
 PathIterator getPathIterator(AffineTransform at)
          Get the path iterator, relative coordinates.
 PathIterator getPathIterator(AffineTransform at, double flatness)
           
 Sheet getSheet()
          Get the sheet that this Graphical object is in.
 void handleNewStroke(NewStrokeEvent evt)
          This callback is called when the stroke should be handled by this object.
 void handleSingleStroke(SingleStrokeEvent evt)
           
 void handleUpdateStroke(UpdateStrokeEvent evt)
           
 boolean hasDamageEnabled()
          See if damage is enabled or not.
 boolean intersects(double x, double y, double w, double h)
          Check if the specified rectangle intersects this GraphicalObject (relative coordinates).
 boolean intersects(Rectangle2D r)
          Check if the specified rectangle intersects this GraphicalObject (relative coordinates).
 void onDelete(Watchable w)
          Callback method for notifications of deletions, that is this Graphical Object has been deleted and you should remove it.
 void onNotify(Watchable w, Object arg)
          Callback method for generic notifications.
 void onUpdate(Watchable w, Object arg)
          Recalculate the bounding points.
 void onUpdate(Watchable w, String strProperty, Object oldVal, Object newVal)
          Recalculate the bounding points.
 void postProcessNewStroke(NewStrokeEvent evt)
           
 void postProcessSingleStroke(SingleStrokeEvent evt)
           
 void postProcessUpdateStroke(UpdateStrokeEvent evt)
           
 void preProcessNewStroke(NewStrokeEvent evt)
           
 void preProcessSingleStroke(SingleStrokeEvent evt)
           
 void preProcessUpdateStroke(UpdateStrokeEvent evt)
           
 void redispatchNewStroke(NewStrokeEvent evt)
           
 void redispatchSingleStroke(SingleStrokeEvent evt)
           
 void redispatchUpdateStroke(UpdateStrokeEvent evt)
           
 void setBoundingPoints2D(int cdsys, Shape s)
          Set the bounding points for our default view.
 boolean shapeContains(GraphicalObject gob)
          See if the specified GraphicalObject fits entirely within our bounds.
 boolean shapeContains(int cdsys, double x, double y)
          See if we contain the specified point.
 boolean shapeContains(int cdsys, Point2D pt)
          See if we contain the specified point.
 boolean shapeContains(int cdsys, Shape s)
          See if we contain the specified rectangle.
 boolean shapeIntersects(GraphicalObject gob)
          See if the specified GraphicalObject intersects the this GraphicalObject.
 boolean shapeIntersects(int cdsys, Shape s)
          See if we intersect the specified shape.
 void superDelete(Watchable w)
          This is here so that the Sheet can call the original version of this method.
 void superHandleNewStroke(NewStrokeEvent evt)
           
 void superHandleSingleStroke(SingleStrokeEvent evt)
           
 void superHandleUpdateStroke(UpdateStrokeEvent evt)
           
 void superNotify(Watchable w, Object arg)
          This is here so that the Sheet can call the original version of this method.
 void superPostProcessNewStroke(NewStrokeEvent evt)
           
 void superPostProcessSingleStroke(SingleStrokeEvent evt)
           
 void superPostProcessUpdateStroke(UpdateStrokeEvent evt)
           
 void superPreProcessNewStroke(NewStrokeEvent evt)
           
 void superPreProcessSingleStroke(SingleStrokeEvent evt)
           
 void superPreProcessUpdateStroke(UpdateStrokeEvent evt)
           
 void superRedispatchNewStroke(NewStrokeEvent evt)
           
 void superRedispatchSingleStroke(SingleStrokeEvent evt)
           
 void superRedispatchUpdateStroke(UpdateStrokeEvent evt)
           
 void superUpdate(Watchable w, Object arg)
          This is here so that the Sheet can call the original version of this method.
 void superUpdate(Watchable w, String strProperty, Object oldVal, Object newVal)
          This is here so that the Sheet can call the original version of this method.
protected  void updateBoundingPoints()
          Update cached copies of our bounds.
 
Methods inherited from class edu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupImpl
add, add, add, add, addToBack, addToBack, addToFront, addToFront, bringDownALayer, bringDownNLayers, bringToBottomLayer, bringToTopLayer, bringUpALayer, bringUpNLayers, clear, clone, clone, contains, createNewInteractionHandler, deepClone, deepClone, defaultRender, get, getAbsoluteLayer, getDispatchee, getFirst, getForwardIterator, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getID, getLast, getRelativeLayer, getReverseIterator, indexOf, isEmpty, notifyWatchersDelete, numElements, remove, removeAll, setRelativeLayer, shapeContainsInternal, shapeContainsInternal, shapeIntersectsInternal, sort, toDebugString, updateGroupBounds, updateGroupBounds
 
Methods inherited from class edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl
addIndexedProperty, addWatcher, applyTransform, bringDownALayer, bringDownNLayers, bringToBottomLayer, bringToTopLayer, bringUpALayer, bringUpNLayers, clearIndexedProperty, clearWatchers, clone, countWatchers, createNewViewHandler, deepClone, delete, disableNotify, enableNotify, equals, getAbsoluteLayer, getBoundingPoints2DRef, getBounds, getClassDebugProperty, getClassProperty, getClassPropertyGestureInterpreter, getClassPropertyInkInterpreter, getClassPropertyStyle, getClassPropertyView, getGestureInterpreter, getHeight2D, getIndexedProperty, getIndexedProperty, getInkInterpreter, getInteractionHandler, getInverseTransform, getInverseTransform, getLocalBoundingPoints2DRef, getLocation2D, getLocation2D, getParentGroup, getPresentationName, getProperty, getPropertyNames, getRelativeLayer, getStyle, getStyleRef, getTransform, getTransform, getTransformRef, getUniqueID, getView, getViewHandler, getWidth2D, hasClosedBoundingPoints, hasNotifyEnabled, isClippedToBounds, isDirty, isSelectable, isVisible, minDistance, minDistance, minLocalDistance, moveBy, moveBy, moveTo, moveTo, notifyWatchers, notifyWatchers, notifyWatchersUpdate, notifyWatchersUpdate, onNewStroke, onSingleStroke, onUpdateStroke, removeIndexedProperty, removeIndexedProperty, removeProperty, removeWatcher, render, renderAllCoordBounds, renderBoundingBox, renderDebug, renderDimensions, renderSelected, renderSelectionHandle, setClassDebugProperty, setClassProperty, setClassPropertyGestureInterpreter, setClassPropertyInkInterpreter, setClassPropertyStyle, setClassPropertyView, setClipToBounds, setDirty, setGestureInterpreter, setHasClosedBoundingPoints, setIndexedProperty, setInkInterpreter, setInteractionHandler, setLocalBoundingPoints2DRef, setParentGroup, setProperty, setRelativeLayer, setSelectable, setStyle, setTransform, setTransformInternal, setUniqueID, setView, setViewHandler, setVisible, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.berkeley.guir.lib.satin.objects.GraphicalObject
addIndexedProperty, applyTransform, bringDownALayer, bringDownNLayers, bringToBottomLayer, bringToTopLayer, bringUpALayer, bringUpNLayers, clearIndexedProperty, delete, getAbsoluteLayer, getGestureInterpreter, getHeight2D, getIndexedProperty, getIndexedProperty, getInkInterpreter, getInverseTransform, getInverseTransform, getLocation2D, getLocation2D, getParentGroup, getProperty, getPropertyNames, getRelativeLayer, getStyle, getStyleRef, getTransform, getTransform, getTransformRef, getUniqueID, getView, getWidth2D, hasClosedBoundingPoints, isClippedToBounds, isSelectable, isVisible, minDistance, minDistance, moveBy, moveBy, moveTo, moveTo, onNewStroke, onSingleStroke, onUpdateStroke, removeIndexedProperty, removeIndexedProperty, removeProperty, render, setClipToBounds, setGestureInterpreter, setHasClosedBoundingPoints, setIndexedProperty, setInkInterpreter, setParentGroup, setProperty, setRelativeLayer, setSelectable, setStyle, setTransform, setUniqueID, setView, setVisible
 
Methods inherited from interface edu.berkeley.guir.lib.satin.watch.Watchable
addWatcher, clearWatchers, countWatchers, disableNotify, enableNotify, hasNotifyEnabled, notifyWatchers, notifyWatchers, notifyWatchersUpdate, notifyWatchersUpdate, removeWatcher
 
Methods inherited from interface java.awt.Shape
getBounds
 

Constructor Detail

Sheet.SheetGraphicalObjectGroup

public Sheet.SheetGraphicalObjectGroup()
Method Detail

disableDamage

public void disableDamage()
Description copied from interface: GraphicalObject
Turn off damage mechanism temporarily. This works like a counting semaphore. Every time this method is called, the disable value is incremented. The damage mechanism is enabled if and only if the disable value is 0.

This method is useful if you are doing multiple operations to the same GraphicalObject all at once, but don't want to damage the GraphicalObject until all the operations are done.

Overrides:
disableDamage in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.enableDamage(), GraphicalObject.hasDamageEnabled()

enableDamage

public void enableDamage()
Description copied from interface: GraphicalObject
Re-enable damage mechanism.
Overrides:
enableDamage in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.disableDamage(), GraphicalObject.hasDamageEnabled()

hasDamageEnabled

public boolean hasDamageEnabled()
Description copied from interface: GraphicalObject
See if damage is enabled or not.
Overrides:
hasDamageEnabled in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.disableDamage(), GraphicalObject.enableDamage()

damage

public void damage(int sync)
Description copied from interface: GraphicalObject
If this GraphicalObject Watchable.hasNotifyEnabled(), mark this GraphicalObject as damaged and repaint.
Overrides:
damage in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
sync - is either SatinConstants.DAMAGE_NOW or SatinConstants.DAMAGE_LATER
See Also:
SatinConstants.DAMAGE_NOW, SatinConstants.DAMAGE_LATER

damage

public void damage(int sync,
                   GraphicalObject gob)
Description copied from interface: GraphicalObject
If this GraphicalObject Watchable.hasNotifyEnabled(), mark the specified GraphicalObject as damaged and repaint.
Overrides:
damage in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
sync - is either SatinConstants.DAMAGE_NOW or SatinConstants.DAMAGE_LATER
gob - is the GraphicalObject to repaint.
See Also:
SatinConstants.DAMAGE_NOW, SatinConstants.DAMAGE_LATER

damage

public void damage(int sync,
                   Rectangle2D rect)
Description copied from interface: GraphicalObject
If this GraphicalObject Watchable.hasNotifyEnabled(), mark the specified region as damaged and repaint.
Overrides:
damage in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
sync - is either SatinConstants.DAMAGE_NOW or SatinConstants.DAMAGE_LATER
rect - is the rectangle to damage (absolute coordinates).
See Also:
SatinConstants.DAMAGE_NOW, SatinConstants.DAMAGE_LATER

damage

public void damage(int sync,
                   Rectangle2D oldRect,
                   Rectangle2D newRect)
Description copied from interface: GraphicalObject
If this GraphicalObject Watchable.hasNotifyEnabled(), mark the specified regions as damaged and repaint. This method is typically used when transforms are applied, when the GraphicalObject was in one place and is now in another.
Overrides:
damage in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
sync - is either SatinConstants.DAMAGE_NOW or SatinConstants.DAMAGE_LATER
oldRect - is the rectangle to damage (absolute coordinates).
newRect - is the rectangle to damage (absolute coordinates).
See Also:
SatinConstants.DAMAGE_NOW, SatinConstants.DAMAGE_LATER

superNotify

public void superNotify(Watchable w,
                        Object arg)
This is here so that the Sheet can call the original version of this method.

superUpdate

public void superUpdate(Watchable w,
                        Object arg)
This is here so that the Sheet can call the original version of this method.

superUpdate

public void superUpdate(Watchable w,
                        String strProperty,
                        Object oldVal,
                        Object newVal)
This is here so that the Sheet can call the original version of this method.

superDelete

public void superDelete(Watchable w)
This is here so that the Sheet can call the original version of this method.

onNotify

public void onNotify(Watchable w,
                     Object arg)
Description copied from interface: Watcher
Callback method for generic notifications. This typically won't be used.
Overrides:
onNotify in class GraphicalObjectGroupImpl
Following copied from interface: edu.berkeley.guir.lib.satin.watch.Watcher
Parameters:
w - is the Watchable object notifying you.
arg - is some agreed upon argument.
See Also:
Watchable.notifyWatchers(), Watchable.notifyWatchers(java.lang.Object)

onUpdate

public void onUpdate(Watchable w,
                     Object arg)
Description copied from class: GraphicalObjectGroupImpl
Recalculate the bounding points.
Overrides:
onUpdate in class GraphicalObjectGroupImpl
Following copied from interface: edu.berkeley.guir.lib.satin.watch.Watcher
Parameters:
w - is the Watchable object that has been updated.
arg - is some agreed upon argument.
See Also:
Watchable.notifyWatchersUpdate(Object)

onUpdate

public void onUpdate(Watchable w,
                     String strProperty,
                     Object oldVal,
                     Object newVal)
Description copied from class: GraphicalObjectGroupImpl
Recalculate the bounding points.
Overrides:
onUpdate in class GraphicalObjectGroupImpl
Following copied from interface: edu.berkeley.guir.lib.satin.watch.Watcher
Parameters:
w - is the Watchable object that has been updated.
strProperty - is the name of the property to update.
oldVal - is the old value of the property. This should usually be a clone of the old value, so that modifying this value should have no effect. Whether this is a copy or a reference should be defined in the SatinConstants file.
newVal - is the new value of the property. This should usually be a clone of the old value, so that modifying this value should have no effect. However, don't clone if it is prohibitively expensive to do so. Whether this is a copy or a reference should be defined in the SatinConstants file.
See Also:
SatinConstants, Watchable.notifyWatchersUpdate(String, Object, Object)

onDelete

public void onDelete(Watchable w)
Description copied from interface: Watcher
Callback method for notifications of deletions, that is this Graphical Object has been deleted and you should remove it.
Overrides:
onDelete in class GraphicalObjectGroupImpl
Following copied from interface: edu.berkeley.guir.lib.satin.watch.Watcher
Parameters:
w - is the Watchable object to be deleted.
See Also:
Watchable.notifyWatchersDelete()

preProcessNewStroke

public void preProcessNewStroke(NewStrokeEvent evt)
Overrides:
preProcessNewStroke in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.onNewStroke(NewStrokeEvent)

superPreProcessNewStroke

public void superPreProcessNewStroke(NewStrokeEvent evt)

redispatchNewStroke

public void redispatchNewStroke(NewStrokeEvent evt)
Overrides:
redispatchNewStroke in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.onNewStroke(NewStrokeEvent)

superRedispatchNewStroke

public void superRedispatchNewStroke(NewStrokeEvent evt)

postProcessNewStroke

public void postProcessNewStroke(NewStrokeEvent evt)
Overrides:
postProcessNewStroke in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.onNewStroke(NewStrokeEvent)

superPostProcessNewStroke

public void superPostProcessNewStroke(NewStrokeEvent evt)

handleNewStroke

public void handleNewStroke(NewStrokeEvent evt)
Description copied from interface: StrokeListener
This callback is called when the stroke should be handled by this object. If you, the listener, have consumed the Stroke, then call SatinEvent.setConsumed() with true to signify that it is consumed and no one else should handle it. Furthermore, if you don't want the stroke to be rendered, then call SatinEvent.setShouldRender(boolean) with false. By default, the stroke will be rendered.
Overrides:
handleNewStroke in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.onNewStroke(NewStrokeEvent)

superHandleNewStroke

public void superHandleNewStroke(NewStrokeEvent evt)

preProcessUpdateStroke

public void preProcessUpdateStroke(UpdateStrokeEvent evt)
Overrides:
preProcessUpdateStroke in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.onNewStroke(NewStrokeEvent)

superPreProcessUpdateStroke

public void superPreProcessUpdateStroke(UpdateStrokeEvent evt)

redispatchUpdateStroke

public void redispatchUpdateStroke(UpdateStrokeEvent evt)
Overrides:
redispatchUpdateStroke in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.onNewStroke(NewStrokeEvent)

superRedispatchUpdateStroke

public void superRedispatchUpdateStroke(UpdateStrokeEvent evt)

postProcessUpdateStroke

public void postProcessUpdateStroke(UpdateStrokeEvent evt)
Overrides:
postProcessUpdateStroke in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.onNewStroke(NewStrokeEvent)

superPostProcessUpdateStroke

public void superPostProcessUpdateStroke(UpdateStrokeEvent evt)

handleUpdateStroke

public void handleUpdateStroke(UpdateStrokeEvent evt)
Overrides:
handleUpdateStroke in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.onNewStroke(NewStrokeEvent)

superHandleUpdateStroke

public void superHandleUpdateStroke(UpdateStrokeEvent evt)

preProcessSingleStroke

public void preProcessSingleStroke(SingleStrokeEvent evt)
Overrides:
preProcessSingleStroke in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.onNewStroke(NewStrokeEvent)

superPreProcessSingleStroke

public void superPreProcessSingleStroke(SingleStrokeEvent evt)

redispatchSingleStroke

public void redispatchSingleStroke(SingleStrokeEvent evt)
Overrides:
redispatchSingleStroke in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.onNewStroke(NewStrokeEvent)

superRedispatchSingleStroke

public void superRedispatchSingleStroke(SingleStrokeEvent evt)

postProcessSingleStroke

public void postProcessSingleStroke(SingleStrokeEvent evt)
Overrides:
postProcessSingleStroke in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.onNewStroke(NewStrokeEvent)

superPostProcessSingleStroke

public void superPostProcessSingleStroke(SingleStrokeEvent evt)

handleSingleStroke

public void handleSingleStroke(SingleStrokeEvent evt)
Overrides:
handleSingleStroke in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
See Also:
GraphicalObject.onNewStroke(NewStrokeEvent)

superHandleSingleStroke

public void superHandleSingleStroke(SingleStrokeEvent evt)

getSheet

public Sheet getSheet()
Description copied from interface: GraphicalObject
Get the sheet that this Graphical object is in.
Overrides:
getSheet in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Returns:
the Sheet that this Graphical Object is in, or null if it is not in a Sheet.

setBoundingPoints2D

public void setBoundingPoints2D(int cdsys,
                                Shape s)
Description copied from interface: GraphicalObject
Set the bounding points for our default view.

Notifies Watchers of an update when called.

Overrides:
setBoundingPoints2D in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
cdsys - is the coordinate system to use.
s - is the shape that describes our bounds.
See Also:
GraphicalObject.getView(), SatinConstants.COORD_LOCAL, SatinConstants.COORD_REL, SatinConstants.COORD_ABS

getCollectionBounds2D

public Rectangle2D getCollectionBounds2D(int cdsys)
Description copied from interface: GraphicalObjectCollection
Get the union of the bounds of the GraphicalObjects contained in this collection. Asking for local bounds is useless.
Asking for relative bounds is useful only if all of the GraphicalObjects have the same parent.
Asking for absolute bounds will always work.
Overrides:
getCollectionBounds2D in class GraphicalObjectGroupImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObjectCollection
Parameters:
cdsys - is the coordinate system to use.
Returns:
Rectangle representing the union of bounds.

getCollectionBounds2D

public Rectangle2D getCollectionBounds2D(int cdsys,
                                         Rectangle2D rect)
Description copied from interface: GraphicalObjectCollection
Get the bounds, put them in the specified Rectangle.
Overrides:
getCollectionBounds2D in class GraphicalObjectGroupImpl

updateBoundingPoints

protected void updateBoundingPoints()
Description copied from class: GraphicalObjectImpl
Update cached copies of our bounds.
Overrides:
updateBoundingPoints in class GraphicalObjectImpl

getBoundingPoints2D

public Polygon2D getBoundingPoints2D(int cdsys)
Our bounds is always the size of the Sheet.
Overrides:
getBoundingPoints2D in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
cdsys - is the coordinate system to use.
Returns:
a Polygon representing this GraphicalObject's bounding points.
See Also:
SatinConstants.COORD_LOCAL, SatinConstants.COORD_REL, SatinConstants.COORD_ABS

getBoundingPoints2D

public Polygon2D getBoundingPoints2D(int cdsys,
                                     AffineTransform tx,
                                     Polygon2D poly)
Our bounds is always the size of the Sheet.
Overrides:
getBoundingPoints2D in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
cdsys - is the coordinate system to use.
tx - is the transform to apply after the location is retrieved. Use null for none.
poly - is the Polygon to put the results in. Use null to create a new Polygon. Use for optimization purposes.
Returns:
a reference to poly.
See Also:
SatinConstants.COORD_LOCAL, SatinConstants.COORD_REL, SatinConstants.COORD_ABS

getBounds2D

public Rectangle2D getBounds2D(int cdsys)
Our bounds is the coordinate system.
Overrides:
getBounds2D in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
cdsys - is the coordinate system to use.
Returns:
a reference to rect.
See Also:
GraphicalObject.getBounds2D(int), SatinConstants.COORD_LOCAL, SatinConstants.COORD_REL, SatinConstants.COORD_ABS

getBounds2D

public Rectangle2D getBounds2D(int cdsys,
                               AffineTransform tx,
                               Rectangle2D rect)
Description copied from interface: GraphicalObject
Get the bounds of all of the visible views of this GraphicalObject.
Overrides:
getBounds2D in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
cdsys - is the coordinate system to use.
tx - is the transform to apply after the location is retrieved. Use null for none.
rect - is the Rectangle to put the results in. Use null to create a new Rectangle. Use for optimization purposes.
Returns:
a reference to rect.
See Also:
SatinConstants.COORD_LOCAL, SatinConstants.COORD_REL, SatinConstants.COORD_ABS

shapeContains

public boolean shapeContains(GraphicalObject gob)
Description copied from interface: GraphicalObject
See if the specified GraphicalObject fits entirely within our bounds.

Don't confuse this method with GraphicalObjectCollection.contains(GraphicalObject).

Overrides:
shapeContains in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
gob - is the GraphicalObject to check. It doesn't matter what coordinate space gob is in, it will be moved to the correct space.
Returns:
true if gob is contained, false otherwise.
See Also:
SatinConstants.COORD_LOCAL, SatinConstants.COORD_REL, SatinConstants.COORD_ABS

shapeContains

public boolean shapeContains(int cdsys,
                             Point2D pt)
Description copied from interface: GraphicalObject
See if we contain the specified point.
Overrides:
shapeContains in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
cdsys - is the coordinate system of the point.
pt - is the point.
Returns:
true if we contain the point, false otherwise.
See Also:
SatinConstants.COORD_LOCAL, SatinConstants.COORD_REL, SatinConstants.COORD_ABS

shapeContains

public boolean shapeContains(int cdsys,
                             double x,
                             double y)
Description copied from interface: GraphicalObject
See if we contain the specified point.
Overrides:
shapeContains in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
cdsys - is the coordinate system of the point.
x - is the x-coordinate.
y - is the y-coordinate.
Returns:
true if we contain the point, false otherwise.
See Also:
SatinConstants.COORD_LOCAL, SatinConstants.COORD_REL, SatinConstants.COORD_ABS

shapeContains

public boolean shapeContains(int cdsys,
                             Shape s)
Description copied from interface: GraphicalObject
See if we contain the specified rectangle.
Overrides:
shapeContains in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
cdsys - is the coordinate system of the point.
s - is the shape to check.
Returns:
true if we contain the point, false otherwise.
See Also:
SatinConstants.COORD_LOCAL, SatinConstants.COORD_REL, SatinConstants.COORD_ABS

shapeIntersects

public boolean shapeIntersects(GraphicalObject gob)
Description copied from interface: GraphicalObject
See if the specified GraphicalObject intersects the this GraphicalObject. Two GraphicalObjects intersect if they share any two points in common.
Overrides:
shapeIntersects in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
gob - is checked to see if it intersects this GraphicalObject. It doesn't matter what coordinate space gob is in, it will be moved to the correct space.
Returns:
true if gob intersects this GraphicalObject, false otherwise.
See Also:
SatinConstants.COORD_LOCAL, SatinConstants.COORD_REL, SatinConstants.COORD_ABS

shapeIntersects

public boolean shapeIntersects(int cdsys,
                               Shape s)
Description copied from interface: GraphicalObject
See if we intersect the specified shape.
Overrides:
shapeIntersects in class GraphicalObjectImpl
Following copied from interface: edu.berkeley.guir.lib.satin.objects.GraphicalObject
Parameters:
cdsys - is the coordinate system of the point.
s - is the shape to check.
Returns:
true if we contain the point, false otherwise.
See Also:
SatinConstants.COORD_LOCAL, SatinConstants.COORD_REL, SatinConstants.COORD_ABS

contains

public boolean contains(double x,
                        double y)
Description copied from class: GraphicalObjectImpl
See if this GraphicalObject contains the specified point.

Use GraphicalObjectLib.toLocalCoordinates(GraphicalObject, Point2D, GraphicalObject) or GraphicalObjectLib.toLocalCoordinates(GraphicalObject, Point2D, GraphicalObject, Point2D) to convert the point. Since you want the coordinates in relative coordinates (ie our parent's coordinates), you would do something like: dst.contains( GraphicalObjectLib.toLocalCoordinates(src, pt, dst.getParentGroup()) ); In most cases should not override this method.

Overrides:
contains in class GraphicalObjectImpl
Following copied from class: edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl
Parameters:
x - is the x-coordinate of the point (relative coords).
y - is the y-coordinate of the point (relative coords).
See Also:
for overriding.

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Description copied from class: GraphicalObjectImpl
See if this GraphicalObject contains the specified rectangle.

In most cases should not override this method.

Overrides:
contains in class GraphicalObjectImpl
Following copied from class: edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl
Parameters:
x - is the top-left of the rectangle (in this GraphicalObject's coordinate space, ie relative).
y - is the top-left of the rectangle (in this GraphicalObject's coordinate space, ie relative).
w - is the width of the rectangle.
h - is the height of the rectangle.
See Also:
for overriding., for an example of converting coordinate systems correctly.

contains

public boolean contains(Point2D p)
Description copied from class: GraphicalObjectImpl
See if this GraphicalObject contains the specified point.

In most cases should not override this method.

Overrides:
contains in class GraphicalObjectImpl
Following copied from class: edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl
Parameters:
p - is the point to check (in this GraphicalObject's coordinate space, ie relative).
See Also:
for overriding., for an example of converting coordinate systems correctly.

contains

public boolean contains(Rectangle2D r)
Description copied from class: GraphicalObjectImpl
See if this GraphicalObject contains the specified rectangle.

In most cases should not override this method.

Overrides:
contains in class GraphicalObjectImpl
Following copied from class: edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl
Parameters:
r - is the rectangle to check (in this GraphicalObject's coordinate space, ie relative).
See Also:
for overriding.

getBounds2D

public Rectangle2D getBounds2D()
Description copied from class: GraphicalObjectImpl
Get the relative bounds.
Overrides:
getBounds2D in class GraphicalObjectImpl

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Description copied from class: GraphicalObjectImpl
Get the path iterator, relative coordinates. Supppose that if you wanted to get the absolute bounds path iterator, you could call getPathIterator(getAbsoluteTransform()).

In most cases should not override this method.

Overrides:
getPathIterator in class GraphicalObjectImpl
Following copied from class: edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl
See Also:
for overriding.

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Overrides:
getPathIterator in class GraphicalObjectImpl

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Description copied from class: GraphicalObjectImpl
Check if the specified rectangle intersects this GraphicalObject (relative coordinates).

In most cases should not override this method.

Overrides:
intersects in class GraphicalObjectImpl
Following copied from class: edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl
See Also:
for overriding., for an example of converting coordinate systems correctly.

intersects

public boolean intersects(Rectangle2D r)
Description copied from class: GraphicalObjectImpl
Check if the specified rectangle intersects this GraphicalObject (relative coordinates).

In most cases should not override this method.

Overrides:
intersects in class GraphicalObjectImpl
Following copied from class: edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl
See Also:
for overriding.

Copyright Information