|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl | +--edu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupImpl | +--edu.berkeley.guir.lib.satin.objects.PatchImpl
A Graphical Object Group with boundaries, additional kinds of properties and behavior.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Apr 01 1999, JH Created class - SATIN-v2.1-1.0.0, Aug 11 2000, JH Touched for SATIN release
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 |
Field Summary | |
static String |
PATCH_STYLE_FILE
The name of the file containing the current stroke properties. |
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 |
Constructor Summary | |
PatchImpl()
|
|
PatchImpl(Polygon newPoly)
Make a patch with the specified boundaries. |
|
PatchImpl(Polygon2D newPoly)
Make a patch with the specified boundaries. |
|
PatchImpl(Rectangle2D r)
|
|
PatchImpl(Shape s)
Make a patch with the specified boundaries. |
|
PatchImpl(TimedStroke stk)
Make a patch with the specified boundaries. |
Method Summary | |
Object |
clone()
Clone this object shallowly, copying references to any children this GraphicalObject has. |
protected PatchImpl |
clone(PatchImpl p)
For clone chaining purposes. |
Object |
deepClone()
Make a deep-clone. |
protected PatchImpl |
deepClone(PatchImpl newPatch)
For deep-clone chaining. |
protected void |
defaultRender(SatinGraphics g)
The default method for rendering. |
void |
handleSingleStroke(SingleStrokeEvent evt)
|
boolean |
isAddLeftButtonStrokes()
Returns whether left-button strokes are added. |
boolean |
isAddMiddleButtonStrokes()
Returns whether middle-button strokes are added. |
boolean |
isAddRightButtonStrokes()
Returns whether right-button strokes are added. |
static void |
main(String[] argv)
|
void |
onNotify(Watchable w,
Object arg)
Callback method for generic notifications. |
void |
onUpdate(Watchable w,
Object arg)
Callback method for notifications. |
void |
onUpdate(Watchable w,
String strProperty,
Object oldVal,
Object newVal)
Callback method for notifications. |
protected void |
renderChildren(SatinGraphics g)
Renders the children of the patch. |
void |
setAddLeftButtonStrokes(boolean flag)
Set whether left-button strokes will be added. |
void |
setAddMiddleButtonStrokes(boolean flag)
Set whether middle-button strokes will be added. |
void |
setAddRightButtonStrokes(boolean flag)
Set whether right-button strokes will be added. |
void |
setDrawChildren(boolean flag)
Set whether we should draw the children or not. |
void |
setDrawPatch(boolean flag)
Set whether we should draw the patch border. |
void |
setFillPatch(boolean flag)
Set whether we should fill in the patch. |
protected boolean |
shapeContainsInternal(Point2D pt)
Internal method. |
protected boolean |
shapeContainsInternal(Shape s)
Internal method. |
protected boolean |
shapeIntersectsInternal(Shape s)
Internal method. |
protected void |
updateGroupBounds()
This method is called by our parent class whenever a Graphical Object is added or removed. |
protected void |
updateGroupBounds(GraphicalObject gob)
This method is called by our parent class whenever a Graphical Object is added or removed. |
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, contains, createNewInteractionHandler, deepClone, get, getAbsoluteLayer, getCollectionBounds2D, getCollectionBounds2D, getDispatchee, getFirst, getForwardIterator, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getID, getLast, getRelativeLayer, getReverseIterator, indexOf, isEmpty, notifyWatchersDelete, numElements, onDelete, remove, removeAll, setRelativeLayer, sort, toDebugString |
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.GraphicalObjectGroup |
add, add, addToBack, addToFront, bringDownALayer, bringDownNLayers, bringToBottomLayer, bringToTopLayer, bringUpALayer, bringUpNLayers, getAbsoluteLayer, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getGraphicalObjects, getRelativeLayer, removeAll, setRelativeLayer |
Methods inherited from interface edu.berkeley.guir.lib.satin.watch.Watchable |
addWatcher, clearWatchers, countWatchers, disableNotify, enableNotify, hasNotifyEnabled, notifyWatchers, notifyWatchers, notifyWatchersDelete, notifyWatchersUpdate, notifyWatchersUpdate, removeWatcher |
Methods inherited from interface java.awt.Shape |
contains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, intersects, intersects |
Methods inherited from interface edu.berkeley.guir.lib.satin.objects.GraphicalObjectCollection |
add, add, addToBack, addToFront, clear, contains, get, getCollectionBounds2D, getCollectionBounds2D, getFirst, getForwardIterator, getID, getLast, getReverseIterator, indexOf, isEmpty, numElements, remove, sort |
Methods inherited from interface edu.berkeley.guir.lib.satin.watch.Watcher |
onDelete |
Field Detail |
public static final String PATCH_STYLE_FILE
Constructor Detail |
public PatchImpl()
public PatchImpl(TimedStroke stk)
stk
- represents the boundary of the Patch.public PatchImpl(Shape s)
s
- is the shape boundary.public PatchImpl(Rectangle2D r)
public PatchImpl(Polygon2D newPoly)
newpoly
- is the boundary.public PatchImpl(Polygon newPoly)
newpoly
- is the boundary.Method Detail |
public void setAddLeftButtonStrokes(boolean flag)
setAddLeftButtonStrokes
in interface Patch
public void setAddMiddleButtonStrokes(boolean flag)
setAddMiddleButtonStrokes
in interface Patch
public void setAddRightButtonStrokes(boolean flag)
setAddRightButtonStrokes
in interface Patch
public boolean isAddLeftButtonStrokes()
isAddLeftButtonStrokes
in interface Patch
public boolean isAddMiddleButtonStrokes()
isAddMiddleButtonStrokes
in interface Patch
public boolean isAddRightButtonStrokes()
isAddRightButtonStrokes
in interface Patch
public void handleSingleStroke(SingleStrokeEvent evt)
handleSingleStroke
in interface GraphicalObject
handleSingleStroke
in class GraphicalObjectImpl
edu.berkeley.guir.lib.satin.objects.GraphicalObject
GraphicalObject.onNewStroke(NewStrokeEvent)
protected boolean shapeContainsInternal(Point2D pt)
GraphicalObjectImpl
shapeContainsInternal
in class GraphicalObjectGroupImpl
protected boolean shapeContainsInternal(Shape s)
GraphicalObjectImpl
shapeContainsInternal
in class GraphicalObjectGroupImpl
protected boolean shapeIntersectsInternal(Shape s)
GraphicalObjectImpl
shapeIntersectsInternal
in class GraphicalObjectGroupImpl
protected void updateGroupBounds(GraphicalObject gob)
updateGroupBounds
in class GraphicalObjectGroupImpl
protected void updateGroupBounds()
updateGroupBounds
in class GraphicalObjectGroupImpl
public void onNotify(Watchable w, Object arg)
Watcher
onNotify
in interface Watcher
onNotify
in class GraphicalObjectGroupImpl
edu.berkeley.guir.lib.satin.watch.Watcher
w
- is the Watchable object notifying you.arg
- is some agreed upon argument.Watchable.notifyWatchers()
,
Watchable.notifyWatchers(java.lang.Object)
public void onUpdate(Watchable w, Object arg)
Watcher
onUpdate
in interface Watcher
onUpdate
in class GraphicalObjectGroupImpl
edu.berkeley.guir.lib.satin.watch.Watcher
w
- is the Watchable object that has been updated.arg
- is some agreed upon argument.Watchable.notifyWatchersUpdate(Object)
public void onUpdate(Watchable w, String strProperty, Object oldVal, Object newVal)
Watcher
onUpdate
in interface Watcher
onUpdate
in class GraphicalObjectGroupImpl
edu.berkeley.guir.lib.satin.watch.Watcher
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.SatinConstants
,
Watchable.notifyWatchersUpdate(String, Object, Object)
public void setDrawPatch(boolean flag)
public void setFillPatch(boolean flag)
public void setDrawChildren(boolean flag)
protected void renderChildren(SatinGraphics g)
protected void defaultRender(SatinGraphics g)
GraphicalObjectImpl
defaultRender
in class GraphicalObjectGroupImpl
public Object clone()
GraphicalObject
clone
in interface GraphicalObject
clone
in class GraphicalObjectGroupImpl
edu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupImpl
GraphicalObjectGroupImpl.deepClone()
protected PatchImpl clone(PatchImpl p)
GraphicalObjectImpl.clone(GraphicalObjectImpl)
public Object deepClone()
deepClone
in interface GraphicalObject
deepClone
in class GraphicalObjectGroupImpl
edu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupImpl
GraphicalObjectGroupImpl.clone()
protected PatchImpl deepClone(PatchImpl newPatch)
clone()
,
deepClone()
public static void main(String[] argv)
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |