|
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
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--edu.berkeley.guir.lib.satin.Sheet
Essentially a SATIN Panel. The Panel contains patches and screen objects.
There are a number of ways of configuring how the Sheet handles strokes by default. They include:
setEnabled(boolean) sets whether the Sheet handles any
strokes at all. This can be used to temporarily disable strokes.
You can check the current enabled status by calling
isEnabled().
setAcceptLeftButton(boolean),
setAcceptMiddleButton(boolean), or
setAcceptRightButton(boolean).
setDrawLeftButtonStrokes(boolean),
setDrawMiddleButtonStrokes(boolean), or
setDrawRightButtonStrokes(boolean). Of course, this only
works if the strokes are accepted in the first place (see above).
setAddLeftButtonStrokes(boolean),
setAddMiddleButtonStrokes(boolean), or
setAddRightButtonStrokes(boolean).
To change the background color, use
setBackground(Color) just like a normal
JComponent.
Be very careful about calling repaint, as that
may cause strange painting errors, especially during animation. It's safer
to use the damage(int) methods included in this class.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, May 19 1998, JH
Created
- SATIN-v2.1-1.0.0, Aug 11 2000, JH
Touched for SATIN release
| Inner Class Summary | |
class |
Sheet.SheetGraphicalObjectGroup
This class handles the Graphical Objects in the sheet. |
| Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
| Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
| Inner classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent |
| 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 | |
protected StrokeEventFilter |
addFilter
|
static String |
BACKGROUND_COLOR_DEFAULT
|
static String |
BACKGROUND_COLOR_PROPERTY
|
static String |
CURRENTSTROKE_STYLE_FILE
|
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| 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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
Sheet()
Default constructor. |
|
Sheet(Dimension dim)
Create a Sheet with the specified width and height dimensions. |
|
Sheet(int w,
int h)
Create a Sheet with the specified width and height. |
|
| Method Summary | |
GraphicalObject |
add(GraphicalObject gob)
Add a GraphicalObject to the top layer. |
GraphicalObject |
add(GraphicalObject gob,
int pos)
Add a GraphicalObject to the top of this group, specifying the GraphicalObject's position at the same time. |
GraphicalObject |
add(int index,
GraphicalObject gob)
Add a Graphical Object to the specified location. |
GraphicalObject |
add(int index,
GraphicalObject gob,
int pos)
Add a GraphicalObject to the specified layer of this group, specifying the GraphicalObject's position at the same time. |
void |
addIndexedProperty(String strPropertyName,
Object newVal)
|
GraphicalObject |
addToBack(GraphicalObject gob)
Add a GraphicalObject to the bottom layer. |
GraphicalObject |
addToBack(GraphicalObject gob,
int pos)
Add a GraphicalObject to the bottom layer. |
GraphicalObject |
addToFront(GraphicalObject gob)
Add a GraphicalObject to the top layer. |
GraphicalObject |
addToFront(GraphicalObject gob,
int pos)
Add a GraphicalObject to the top layer. |
Watcher |
addWatcher(Watcher w)
Add a watcher to this object. |
void |
applyTransform(AffineTransform tr)
Apply an affine Transform to this Graphical Object. |
void |
bringDownALayer()
Bring this Graphical Object down one layer in its current group. |
void |
bringDownALayer(GraphicalObject gob)
Move the specified GraphicalObject down one layer in this Graphical Object Group. |
void |
bringDownNLayers(GraphicalObject gob,
int n)
Move the specified GraphicalObject down N layers in this Group. |
void |
bringDownNLayers(int n)
Bring this Graphical Object down N layers in its current group. |
void |
bringToBottomLayer()
Bring this Graphical Object to the bottom of its current group. |
void |
bringToBottomLayer(GraphicalObject gob)
Move the specified Graphical Object to the bottom layer of this Graphical Object Group. |
void |
bringToTopLayer()
Bring this Graphical Object to the top of its current group. |
void |
bringToTopLayer(GraphicalObject gob)
Move the specified Graphical Object to the top layer of this Graphical Object Group. |
void |
bringUpALayer()
Bring this Graphical Object up one layer in its current group. |
void |
bringUpALayer(GraphicalObject gob)
Move the specified GraphicalObject up one layer in this Graphical Object Group. |
void |
bringUpNLayers(GraphicalObject gob,
int n)
Move the specified GraphicalObject up N layers in this Group. |
void |
bringUpNLayers(int n)
Bring this Graphical Object up N layers in its current group. |
void |
clear()
Clear out everything on the Sheet. |
void |
clearIndexedProperty(String strPropertyName)
|
void |
clearWatchers()
Delete all watchers on this object. |
Object |
clone()
My clone sleeps alone as a shallow clone. |
boolean |
contains(double x,
double y)
|
boolean |
contains(double x,
double y,
double w,
double h)
|
boolean |
contains(GraphicalObject gob)
See if this Graphical Object Collection contains the specified Graphical Object. |
boolean |
contains(Point2D p)
|
boolean |
contains(Rectangle2D r)
|
protected void |
copyInternal()
Called when the user copies by keyboard. |
int |
countWatchers()
Count the number of watchers watching this object. |
protected void |
cutInternal()
Called when the user cuts by keyboard. |
void |
damage(int sync)
If this GraphicalObject hasNotifyEnabled(), mark this
GraphicalObject as damaged and repaint. |
void |
damage(int sync,
GraphicalObject gob)
Damage an area for repainting. |
void |
damage(int sync,
Rectangle2D rect)
Damage an area for immediate repainting. |
void |
damage(int sync,
Rectangle2D oldRect,
Rectangle2D newRect)
If this GraphicalObject hasNotifyEnabled(), mark the specified
regions as damaged and repaint. |
Object |
deepClone()
My clone sleeps alone as a deep clone. |
void |
delete()
Ignore. |
protected void |
deleteInternal()
Called when the user deletes by keyboard. |
void |
disableDamage()
Turn off damage mechanism temporarily. |
void |
disableNotify()
Turn off ability to notify others. |
void |
enableDamage()
Re-enable damage mechanism. |
void |
enableNotify()
Turn on ability to notify others. |
GraphicalObject |
get(int index)
Get the Graphical Object at the specified index. |
String |
getAbsoluteLayer()
Get the absolute layer this group is in. |
String |
getAbsoluteLayer(GraphicalObject gob)
Given a GraphicalObject, return its absolute layer position. |
Polygon2D |
getBoundingPoints2D(int cdsys)
Get a Polygon describing the outer boundary of all of the visible views of this GraphicalObject. |
Polygon2D |
getBoundingPoints2D(int cdsys,
AffineTransform tx,
Polygon2D poly)
Get a Polygon describing the outer boundary of all of the visible views of this GraphicalObject. |
Rectangle2D |
getBounds2D()
|
Rectangle2D |
getBounds2D(int cdsys)
Get the bounds of all of the visible views of this GraphicalObject. |
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. |
Style |
getCurrentStyle()
Get the style for how the current stroke is drawn. |
GraphicalObject |
getFirst()
Get the first Graphical Object. |
Iterator |
getForwardIterator()
Get an iterator that goes forward thru the collection. |
Interpreter |
getGestureInterpreter()
Get the current Gesture Interpreter, which tries to handle strokes as gestures. |
GraphicalObjectCollection |
getGraphicalObjects(GraphicalObject gob,
int num,
int depth,
int gettype)
|
GraphicalObjectCollection |
getGraphicalObjects(GraphicalObject gob,
int num,
int depth,
int gettype,
double thresh,
GraphicalObjectCollection out)
Get all Graphical Objects subject to the specified parameters. |
GraphicalObjectCollection |
getGraphicalObjects(int cdsys,
double x,
double y,
int num,
int depth,
int gettype)
|
GraphicalObjectCollection |
getGraphicalObjects(int cdsys,
double x,
double y,
int num,
int depth,
int gettype,
double thresh,
GraphicalObjectCollection out)
|
GraphicalObjectCollection |
getGraphicalObjects(int cdsys,
Point2D pt,
int num,
int depth,
int gettype)
|
GraphicalObjectCollection |
getGraphicalObjects(int cdsys,
Point2D pt,
int num,
int depth,
int gettype,
double thresh,
GraphicalObjectCollection out)
Get all Graphical Objects subject to the specified parameters. |
GraphicalObjectCollection |
getGraphicalObjects(int cdsys,
Shape s,
int num,
int depth,
int gettype)
|
GraphicalObjectCollection |
getGraphicalObjects(int cdsys,
Shape s,
int num,
int depth,
int gettype,
double thresh,
GraphicalObjectCollection out)
|
float |
getHeight2D(int cdsys)
Get the height of all of the visible views of this GraphicalObject. |
GraphicalObject |
getID(int id)
Retrieve the GraphicalObject with the specified unique ID. |
List |
getIndexedProperty(String strPropertyName)
|
Object |
getIndexedProperty(String strPropertyName,
int index)
|
Interpreter |
getInkInterpreter()
Get the current Ink Interpreter, which tries to handle strokes as Ink. |
AffineTransform |
getInverseTransform(int cdsys)
Get the inverse of the transform. |
AffineTransform |
getInverseTransform(int cdsys,
AffineTransform tx)
Get the inverse transform. |
GraphicalObject |
getLast()
Get the last Graphical Object. |
Point2D |
getLocation2D(int cdsys)
Get the location of the top-left corner of the bounding box for all of the visible views of this GraphicalObject. |
Point2D |
getLocation2D(int cdsys,
AffineTransform tx,
Point2D pt)
Get the location of the top-left corner of the bounding box for all of the visible views of this GraphicalObject. |
GraphicalObjectGroup |
getParentGroup()
Get the parent of this Graphical object. |
PathIterator |
getPathIterator(AffineTransform at)
|
PathIterator |
getPathIterator(AffineTransform at,
double flatness)
|
Object |
getProperty(String strPropertyName)
|
Iterator |
getPropertyNames()
|
String |
getRelativeLayer()
Get the current layer this Graphical Object is in. |
String |
getRelativeLayer(GraphicalObject gob)
Given a GraphicalObject, return what layer it is in relative to this Graphical Object Group. |
Iterator |
getReverseIterator()
Get an iterator that goes backwards thru the collection. |
Style |
getSelectedStyle()
Get the style for how the selected objects are drawn. |
Sheet |
getSheet()
Get the sheet that this Graphical object is in. |
Style |
getStyle()
Get a copy of the current Style for this Graphical Object. |
Style |
getStyleRef()
Get a reference of the current Style for this Graphical Object. |
AffineTransform |
getTransform(int cdsys)
Get a copy of the current transform for this GraphicalObject. |
AffineTransform |
getTransform(int cdsys,
AffineTransform outTx)
Get a copy of the current transform, putting the results in outTx. |
AffineTransform |
getTransformRef()
Get a reference to the current transform. |
int |
getUniqueID()
Get the ID of this GraphicalObject. |
View |
getView()
Get the current View for this GraphicalObject, the object that handles how the the GraphicalObject is displayed. |
float |
getWidth2D(int cdsys)
Get the width of all of the visible views of this GraphicalObject. |
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 |
hasClosedBoundingPoints()
Check if the bounding points describing this GraphicalObject is a closed Polygon (e.g. |
boolean |
hasDamageEnabled()
See if damage is enabled or not. |
boolean |
hasNotifyEnabled()
Check current ability to notify others. |
int |
indexOf(GraphicalObject gob)
Find the index of the specified Graphical Object. |
boolean |
intersects(double x,
double y,
double w,
double h)
|
boolean |
intersects(Rectangle2D r)
|
boolean |
isClippedToBounds()
Check whether the GraphicalObject should be clipped to bounds or not. |
boolean |
isEmpty()
Is this collection empty? |
boolean |
isEnabled()
Check whether ink is enabled for this Sheet or not. |
boolean |
isFocusTraversable()
|
boolean |
isSelectable()
Check whether or not this Graphical Object can be selected. |
float |
minDistance(int cdsys,
double x,
double y)
Calculate the closest distance from the specified point to self. |
float |
minDistance(int cdsys,
Point2D pt)
Calls the other minDistance(int, double, double) method. |
void |
moveBy(int cdsys,
double dx,
double dy)
Move relative to where we currently are. |
void |
moveBy(int cdsys,
Point2D pt)
Calls the other moveBy(int, double, double) method. |
void |
moveTo(int cdsys,
double x,
double y)
Move directly to the specified position. |
void |
moveTo(int cdsys,
Point2D pt)
Calls the other moveTo(int, double, double) method. |
void |
notifyWatchers()
Notify the watchers. |
void |
notifyWatchers(Object arg)
Notify the watchers. |
void |
notifyWatchersDelete()
Notify the watchers that this object has been deleted. |
void |
notifyWatchersUpdate(Object arg)
Notify the watchers that the object has been changed and the change needs to be handled by the watchers. |
void |
notifyWatchersUpdate(String strProperty,
Object newVal,
Object oldVal)
Notify the watchers that some value has been changed. |
int |
numElements()
Get the number of elements contained in this collection. |
void |
onDelete(Watchable w)
Callback method for notifications of deletions, that is this Graphical Object has been deleted and you should remove it. |
void |
onNewStroke(NewStrokeEvent evt)
Start dispatching a new stroke. |
void |
onNotify(Watchable w,
Object arg)
Callback method for generic notifications. |
void |
onSingleStroke(SingleStrokeEvent evt)
|
void |
onUpdate(Watchable w,
Object arg)
Callback method for notifications. |
void |
onUpdate(Watchable w,
String strProperty,
Object oldVal,
Object newVal)
Callback method for notifications. |
void |
onUpdateStroke(UpdateStrokeEvent evt)
|
void |
paintComponent(Graphics g)
|
protected void |
pasteInternal()
Called when the user pastes by keyboard. |
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)
|
protected void |
redoInternal()
Called when the user redoes an action by keyboard. |
GraphicalObject |
remove(GraphicalObject gob)
Remove a Graphical Object from this collection. |
void |
removeAll(GraphicalObjectCollection gobcol)
Remove from this Group all of the GraphicalObjects in the collection. |
List |
removeIndexedProperty(String strPropertyName)
|
Object |
removeIndexedProperty(String strPropertyName,
int index)
|
Object |
removeProperty(String strPropertyName)
|
Watcher |
removeWatcher(Watcher w)
Delete a watcher on this object. |
void |
render(SatinGraphics g)
Render this graphical object in the specified Graphics context. |
void |
setAcceptLeftButton(boolean flag)
Set whether any left-button strokes will be dispatched at all. |
void |
setAcceptMiddleButton(boolean flag)
Set whether any middle-button strokes will be dispatched at all. |
void |
setAcceptRightButton(boolean flag)
Set whether any right-button strokes will be dispatched at all. |
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 |
setAutoScroll(boolean flag)
|
void |
setBackground(Color bkgrd)
|
void |
setBoundingPoints2D(int cdsys,
Shape s)
Set the bounding points for our default view. |
void |
setClipToBounds(boolean flag)
Set whether the GraphicalObject should be clipped to bounds or not. |
Style |
setCurrentStyle(Style newStyle)
Set the style for how the current stroke is drawn. |
void |
setDrawLeftButtonStrokes(boolean flag)
Set whether left-button strokes will be drawn. |
void |
setDrawMiddleButtonStrokes(boolean flag)
Set whether middle-button strokes will be drawn. |
void |
setDrawRightButtonStrokes(boolean flag)
Set whether right-button strokes will be drawn. |
void |
setEnabled(boolean flag)
Set whether ink is enabled for this Sheet or not. |
Interpreter |
setGestureInterpreter(Interpreter intrp)
Set the current Gesture Interpreter, which tries to handle strokes as gestures. |
void |
setHasClosedBoundingPoints(boolean flag)
Ignored, since we always have closed bounding points. |
void |
setIndexedProperty(String strPropertyName,
int index,
Object newVal)
|
Interpreter |
setInkInterpreter(Interpreter intrp)
Set the current Ink Interpreter, which tries to handle strokes as Ink. |
void |
setParentGroup(GraphicalObjectGroup newparent)
This method should not normally be used. |
void |
setProperty(String strPropertyName,
Object newVal)
|
void |
setRelativeLayer(GraphicalObject gob,
int layer)
Given a GraphicalObject, set what layer it is in relative to this Graphical Object Group. |
void |
setRelativeLayer(int layer)
A convenience method to set what layer this object is in. |
void |
setSelectable(boolean flag)
Ignored. |
Style |
setSelectedStyle(Style newStyle)
Set the style for how the selected objects are drawn. |
void |
setSheet(Sheet sheet)
Set this sheet to be the same as the specified sheet. |
void |
setSize(Dimension dim)
|
void |
setSize(int w,
int h)
|
Style |
setStyle(Style newStyle)
Set the current Style for this Graphical Object. |
void |
setTransform(AffineTransform tr)
Set and apply a copy of the specified AffineTransform to this GraphicalObject. |
void |
setUniqueID(int newID)
Set the ID of this GraphicalObject. |
void |
setView(View v)
Set the View for this GraphicalObject. |
boolean |
shapeContains(GraphicalObject gob)
Yes, we contain everything. |
boolean |
shapeContains(int cdsys,
double x,
double y)
Yes, we contain everything. |
boolean |
shapeContains(int cdsys,
Point2D pt)
Yes, we contain everything. |
boolean |
shapeContains(int cdsys,
Shape s)
Yes, we contain everything. |
boolean |
shapeIntersects(GraphicalObject gob)
Yes, we intersect everything. |
boolean |
shapeIntersects(int cdsys,
Shape s)
Yes, we intersect everything. |
void |
sort(Comparator c)
Actually does nothing, since ordering is imposed by layers. |
String |
toString()
Return debugging information for the entire system. |
protected void |
undoInternal()
Called when the user undoes an action by keyboard. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, updateUI |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.berkeley.guir.lib.satin.objects.GraphicalObject |
isVisible, setVisible |
| Methods inherited from interface java.awt.Shape |
getBounds |
| Field Detail |
public static String BACKGROUND_COLOR_PROPERTY
public static String BACKGROUND_COLOR_DEFAULT
public static String CURRENTSTROKE_STYLE_FILE
protected StrokeEventFilter addFilter
| Constructor Detail |
public Sheet()
public Sheet(int w,
int h)
w - is the width of the Sheet.h - is the height of the Sheet.public Sheet(Dimension dim)
dim - is the width and height dimensions.| Method Detail |
protected void undoInternal()
protected void redoInternal()
protected void pasteInternal()
protected void cutInternal()
protected void copyInternal()
protected void deleteInternal()
public void setSheet(Sheet sheet)
sheet - is the Sheet that contains the objects that we want.
Don't use variable sheet after calling this method,
since many of the variables will be shared, and since
we move all of the GraphicalObjects from the passed-in
sheet to this sheet.public void setAutoScroll(boolean flag)
public void setEnabled(boolean flag)
setEnabled in class JComponentpublic boolean isEnabled()
isEnabled in class Componentpublic void setAcceptLeftButton(boolean flag)
public void setAcceptMiddleButton(boolean flag)
public void setAcceptRightButton(boolean flag)
public void setDrawLeftButtonStrokes(boolean flag)
public void setDrawMiddleButtonStrokes(boolean flag)
public void setDrawRightButtonStrokes(boolean flag)
public void setAddLeftButtonStrokes(boolean flag)
public void setAddMiddleButtonStrokes(boolean flag)
public void setAddRightButtonStrokes(boolean flag)
public int getUniqueID()
GraphicalObjectgetUniqueID in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectpublic void setUniqueID(int newID)
GraphicalObjectsetUniqueID in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectpublic Iterator getPropertyNames()
getPropertyNames in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectFlexProperties.getPropertyNames()public Object getProperty(String strPropertyName)
getProperty in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectFlexProperties.getProperty(String)
public void setProperty(String strPropertyName,
Object newVal)
setProperty in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectFlexProperties.setProperty(String, Object)public Object removeProperty(String strPropertyName)
removeProperty in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectFlexProperties.removeProperty(String)public List getIndexedProperty(String strPropertyName)
getIndexedProperty in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectFlexProperties.getIndexedProperty(String)
public Object getIndexedProperty(String strPropertyName,
int index)
getIndexedProperty in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectFlexProperties.getIndexedProperty(String, int)
public void setIndexedProperty(String strPropertyName,
int index,
Object newVal)
setIndexedProperty in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectFlexProperties.setIndexedProperty(String, int, Object)
public void addIndexedProperty(String strPropertyName,
Object newVal)
addIndexedProperty in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectFlexProperties.addIndexedProperty(String, Object)
public Object removeIndexedProperty(String strPropertyName,
int index)
removeIndexedProperty in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectFlexProperties.removeIndexedProperty(String, int)public List removeIndexedProperty(String strPropertyName)
removeIndexedProperty in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectFlexProperties.removeIndexedProperty(String)public void clearIndexedProperty(String strPropertyName)
clearIndexedProperty in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectFlexProperties.clearIndexedProperty(String)public View getView()
GraphicalObjectgetView in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.setView(View)public void setView(View v)
GraphicalObjectsetView in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.getView(),
View.setBoundingPoints2DRef(Polygon2D)public Interpreter getGestureInterpreter()
GraphicalObjectgetGestureInterpreter in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectpublic Interpreter setGestureInterpreter(Interpreter intrp)
GraphicalObjectsetGestureInterpreter in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectintrp - is the new Interpreter to use.public Interpreter getInkInterpreter()
GraphicalObjectgetInkInterpreter in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectpublic Interpreter setInkInterpreter(Interpreter intrp)
GraphicalObjectsetInkInterpreter in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectintrp - is the new Interpreter to use.public Style setStyle(Style newStyle)
GraphicalObjectNotifies Watchers of an update when called.
setStyle in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectthe - Style to set to. A null value means use default values.public Style getStyle()
GraphicalObjectgetStyle in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectpublic Style getStyleRef()
GraphicalObjectgetStyleRef in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectpublic Style setCurrentStyle(Style newStyle)
public Style getCurrentStyle()
public Style setSelectedStyle(Style newStyle)
public Style getSelectedStyle()
public String getRelativeLayer()
GraphicalObjectMain Tree |-- | A Collection | |-- | | Relative: 1 | | Absolute: 1 | | | | |-- | | | Relative: 1 | | | Absolute: 1.1 | | |-- | | | | |-- | | | Relative: 2 | | | Absolute: 1.2 | | |-- | |-- | | Another Collection | |-- | | Relative: 2 | | Absolute: 2 | | | | |-- | | | Relative: 1 | | | Absolute: 2.1 | | |-- | |-- |--
getRelativeLayer in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectpublic void setRelativeLayer(int layer)
GraphicalObjectNotifies Watchers of an update when called.
setRelativeLayer in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectlayer - is the non-negative layer value to set to. If it is set
too high, it is just sent to the bottom-most layer.public String getAbsoluteLayer()
GraphicalObjectgetAbsoluteLayer in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectpublic void bringUpALayer()
GraphicalObjectNotifies Watchers of an update when called.
bringUpALayer in interface GraphicalObjectpublic void bringDownALayer()
GraphicalObjectNotifies Watchers of an update when called.
bringDownALayer in interface GraphicalObjectpublic void bringToTopLayer()
GraphicalObjectNotifies Watchers of an update when called.
bringToTopLayer in interface GraphicalObjectpublic void bringToBottomLayer()
GraphicalObjectNotifies Watchers of an update when called.
bringToBottomLayer in interface GraphicalObjectpublic void applyTransform(AffineTransform tr)
GraphicalObjectNotifies Watchers of an update when called.
applyTransform in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectnewTx - is a Transform to apply. No modifications are made to newTx.public void setTransform(AffineTransform tr)
GraphicalObjectNotifies Watchers of an update when called.
setTransform in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectnewTx - is a Transform to apply. Removes the old one completely.
No modifications are made to newTx.public AffineTransform getTransformRef()
GraphicalObjectgetTransformRef in interface GraphicalObjectpublic AffineTransform getTransform(int cdsys)
GraphicalObjectgetTransform in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public AffineTransform getTransform(int cdsys,
AffineTransform outTx)
GraphicalObjectgetTransform in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system.outTx - is the storage space.outTx.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABSpublic AffineTransform getInverseTransform(int cdsys)
GraphicalObjectgetInverseTransform in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system to use.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public AffineTransform getInverseTransform(int cdsys,
AffineTransform tx)
GraphicalObjectgetInverseTransform in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system to use.outTx - is the output storage. Use null to create a new object.outTxSatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABSpublic void setHasClosedBoundingPoints(boolean flag)
setHasClosedBoundingPoints in interface GraphicalObjectpublic boolean hasClosedBoundingPoints()
GraphicalObjecthasClosedBoundingPoints in interface GraphicalObject
public float minDistance(int cdsys,
double x,
double y)
GraphicalObjectminDistance in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system.x - is the x-coordinate.y - is the y-coordinate.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public float minDistance(int cdsys,
Point2D pt)
GraphicalObjectGraphicalObject.minDistance(int, double, double) method.minDistance in interface GraphicalObjectpublic Point2D getLocation2D(int cdsys)
GraphicalObjectgetLocation2D in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system to use.GraphicalObject.getLocation2D(int, AffineTransform, Point2D),
SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public Point2D getLocation2D(int cdsys,
AffineTransform tx,
Point2D pt)
GraphicalObjectgetLocation2D in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system to use.tx - is the transform to apply after the location is
retrieved. Use null for none.pt - is where to store the output. Use null to create a
new point. Use for optimization purposes.pt.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABSpublic Rectangle2D getBounds2D(int cdsys)
GraphicalObjectgetBounds2D in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system to use.GraphicalObject.getBounds2D(int),
SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public Rectangle2D getBounds2D(int cdsys,
AffineTransform tx,
Rectangle2D rect)
GraphicalObjectgetBounds2D in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - 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.rect.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABSpublic Polygon2D getBoundingPoints2D(int cdsys)
GraphicalObjectgetBoundingPoints2D in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system to use.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public Polygon2D getBoundingPoints2D(int cdsys,
AffineTransform tx,
Polygon2D poly)
GraphicalObjectgetBoundingPoints2D in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - 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.poly.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABSpublic float getWidth2D(int cdsys)
GraphicalObjectgetWidth2D in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system to use.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABSpublic float getHeight2D(int cdsys)
GraphicalObjectgetHeight2D in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system to use.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABSpublic boolean shapeContains(GraphicalObject gob)
shapeContains in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectgob - is the GraphicalObject to check. It doesn't matter what
coordinate space gob is in, it will be moved to the correct
space.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public boolean shapeContains(int cdsys,
Point2D pt)
shapeContains in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system of the point.pt - is the point.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public boolean shapeContains(int cdsys,
double x,
double y)
shapeContains in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system of the point.x - is the x-coordinate.y - is the y-coordinate.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public boolean shapeContains(int cdsys,
Shape s)
shapeContains in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system of the point.s - is the shape to check.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABSpublic boolean shapeIntersects(GraphicalObject gob)
shapeIntersects in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectgob - 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.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public boolean shapeIntersects(int cdsys,
Shape s)
shapeIntersects in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system of the point.s - is the shape to check.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABSpublic boolean isSelectable()
GraphicalObjectisSelectable in interface GraphicalObjectpublic void setSelectable(boolean flag)
setSelectable in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectflag - is true to set this Graphical Object as selectable,
false otherwise.
public void moveTo(int cdsys,
double x,
double y)
GraphicalObjectNotifies Watchers of an update when called.
moveTo in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system to use.x - is the x-coordinate to move to.y - is the y-coordinate to move to.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public void moveTo(int cdsys,
Point2D pt)
GraphicalObjectGraphicalObject.moveTo(int, double, double) method.moveTo in interface GraphicalObject
public void moveBy(int cdsys,
double dx,
double dy)
GraphicalObjectNotifies Watchers of an update when called.
moveBy in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system to use.dx - is the change in x-coordinate to move.dy - is the change in y-coordinate to move.SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public void moveBy(int cdsys,
Point2D pt)
GraphicalObjectGraphicalObject.moveBy(int, double, double) method.moveBy in interface GraphicalObject
public void setBoundingPoints2D(int cdsys,
Shape s)
GraphicalObjectNotifies Watchers of an update when called.
setBoundingPoints2D in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectcdsys - is the coordinate system to use.s - is the shape that describes our bounds.GraphicalObject.getView(),
SatinConstants.COORD_LOCAL,
SatinConstants.COORD_REL,
SatinConstants.COORD_ABS
public boolean contains(double x,
double y)
contains in interface Shape
public boolean contains(double x,
double y,
double w,
double h)
contains in interface Shapepublic boolean contains(Point2D p)
contains in interface Shapepublic boolean contains(Rectangle2D r)
contains in interface Shapepublic Rectangle2D getBounds2D()
getBounds2D in interface Shapepublic PathIterator getPathIterator(AffineTransform at)
getPathIterator in interface Shape
public PathIterator getPathIterator(AffineTransform at,
double flatness)
getPathIterator in interface Shape
public boolean intersects(double x,
double y,
double w,
double h)
intersects in interface Shapepublic boolean intersects(Rectangle2D r)
intersects in interface Shapepublic void onNewStroke(NewStrokeEvent evt)
setDrawLeftButtonStrokes(boolean)), and if the event says
it should render (see SatinEvent.setShouldRender(boolean)).onNewStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectevt - is the event to dispatch. evt should be in this
GraphicalObject's local coordinate space when this method is
called.for information on how to manipulate the event.public void preProcessNewStroke(NewStrokeEvent evt)
preProcessNewStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.onNewStroke(NewStrokeEvent)public void redispatchNewStroke(NewStrokeEvent evt)
redispatchNewStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.onNewStroke(NewStrokeEvent)public void postProcessNewStroke(NewStrokeEvent evt)
postProcessNewStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.onNewStroke(NewStrokeEvent)public void handleNewStroke(NewStrokeEvent evt)
StrokeListenerSatinEvent.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.handleNewStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.onNewStroke(NewStrokeEvent)public void onUpdateStroke(UpdateStrokeEvent evt)
onUpdateStroke in interface GraphicalObjectonNewStroke(NewStrokeEvent)public void preProcessUpdateStroke(UpdateStrokeEvent evt)
preProcessUpdateStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.onNewStroke(NewStrokeEvent)public void redispatchUpdateStroke(UpdateStrokeEvent evt)
redispatchUpdateStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.onNewStroke(NewStrokeEvent)public void postProcessUpdateStroke(UpdateStrokeEvent evt)
postProcessUpdateStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.onNewStroke(NewStrokeEvent)public void handleUpdateStroke(UpdateStrokeEvent evt)
handleUpdateStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.onNewStroke(NewStrokeEvent)public void onSingleStroke(SingleStrokeEvent evt)
onSingleStroke in interface GraphicalObjectonNewStroke(NewStrokeEvent)public void preProcessSingleStroke(SingleStrokeEvent evt)
preProcessSingleStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.onNewStroke(NewStrokeEvent)public void redispatchSingleStroke(SingleStrokeEvent evt)
redispatchSingleStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.onNewStroke(NewStrokeEvent)public void postProcessSingleStroke(SingleStrokeEvent evt)
postProcessSingleStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.onNewStroke(NewStrokeEvent)public void handleSingleStroke(SingleStrokeEvent evt)
handleSingleStroke in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.onNewStroke(NewStrokeEvent)public void disableDamage()
GraphicalObjectThis 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.
disableDamage in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.enableDamage(),
GraphicalObject.hasDamageEnabled()public void enableDamage()
GraphicalObjectenableDamage in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.disableDamage(),
GraphicalObject.hasDamageEnabled()public boolean hasDamageEnabled()
GraphicalObjecthasDamageEnabled in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectGraphicalObject.disableDamage(),
GraphicalObject.enableDamage()public void setClipToBounds(boolean flag)
GraphicalObjectsetClipToBounds in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectflag - specifies whether the GraphicalObject should be clipped
to bounds or not.public boolean isClippedToBounds()
GraphicalObjectisClippedToBounds in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectpublic void damage(int sync)
GraphicalObjectWatchable.hasNotifyEnabled(), mark this
GraphicalObject as damaged and repaint.damage in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectsync - is either SatinConstants.DAMAGE_NOW or
SatinConstants.DAMAGE_LATERSatinConstants.DAMAGE_NOW,
SatinConstants.DAMAGE_LATER
public void damage(int sync,
Rectangle2D rect)
damage in interface GraphicalObjectrect - is the region to repaint.
public void damage(int sync,
GraphicalObject gob)
damage in interface GraphicalObjectgob - is the GraphicalObject to repaint.
public void damage(int sync,
Rectangle2D oldRect,
Rectangle2D newRect)
GraphicalObjectWatchable.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.damage in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectsync - is either SatinConstants.DAMAGE_NOW or
SatinConstants.DAMAGE_LATERoldRect - is the rectangle to damage (absolute coordinates).newRect - is the rectangle to damage (absolute coordinates).SatinConstants.DAMAGE_NOW,
SatinConstants.DAMAGE_LATERpublic void setParentGroup(GraphicalObjectGroup newparent)
setParentGroup in interface GraphicalObjectGraphicalObject.setParentGroup(GraphicalObjectGroup)public GraphicalObjectGroup getParentGroup()
GraphicalObjectgetParentGroup in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectpublic Sheet getSheet()
GraphicalObjectgetSheet in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectpublic void delete()
delete in interface GraphicalObjectpublic String getRelativeLayer(GraphicalObject gob)
GraphicalObjectGroupgetRelativeLayer in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the contained Graphical Object to check out.GraphicalObject.getRelativeLayer()
public void setRelativeLayer(GraphicalObject gob,
int layer)
GraphicalObjectGroupsetRelativeLayer in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the contained Graphical Object to move.layer - is the layer to move to.GraphicalObject.setRelativeLayer(int)public String getAbsoluteLayer(GraphicalObject gob)
GraphicalObjectGroupgetAbsoluteLayer in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the contained Graphical Object to check out.GraphicalObject.getAbsoluteLayer()public void bringUpALayer(GraphicalObject gob)
GraphicalObjectGroupbringUpALayer in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the Graphical Object to move.GraphicalObject.bringUpALayer()
public void bringUpNLayers(GraphicalObject gob,
int n)
GraphicalObjectGroupbringUpNLayers in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the Graphical Object to move.n - is the number of layers to move.GraphicalObject.bringUpNLayers(int)public void bringUpNLayers(int n)
GraphicalObjectNotifies Watchers of an update when called.
bringUpNLayers in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectn - is the number of layers to move this GraphicalObject up.public void bringDownALayer(GraphicalObject gob)
GraphicalObjectGroupbringDownALayer in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the Graphical Object to move.GraphicalObject.bringDownALayer()
public void bringDownNLayers(GraphicalObject gob,
int n)
GraphicalObjectGroupbringDownNLayers in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the Graphical Object to move.n - is the number of layers to move.GraphicalObject.bringDownNLayers(int)public void bringDownNLayers(int n)
GraphicalObjectNotifies Watchers of an update when called.
bringDownNLayers in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectn - is the number of layers to move this GraphicalObject down.public void bringToTopLayer(GraphicalObject gob)
GraphicalObjectGroupbringToTopLayer in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the Graphical Object to move.GraphicalObject.bringToTopLayer()public void bringToBottomLayer(GraphicalObject gob)
GraphicalObjectGroupbringToBottomLayer in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the Graphical Object to move.GraphicalObject.bringToBottomLayer()public GraphicalObject add(GraphicalObject gob)
add in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectiongob - is the GraphicalObject to add.public GraphicalObject addToBack(GraphicalObject gob)
addToBack in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectiongob - is the Graphical Object to add.public GraphicalObject addToFront(GraphicalObject gob)
addToFront in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectiongob - is the Graphical Object to add.
public GraphicalObject add(int index,
GraphicalObject gob)
GraphicalObjectCollectionadd in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectionindex - is the location to add to (zero-based). It is up to the
programmer to ensure that this is a valid value.gob - is the Graphical Object to add.
public GraphicalObject add(GraphicalObject gob,
int pos)
GraphicalObjectGroupadd in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the GraphicalObject to add.pos - is the GraphicalObject's position, either
GraphicalObjectGroup.KEEP_ABS_POS or GraphicalObjectGroup.KEEP_REL_POS.GraphicalObjectGroup.addToFront(GraphicalObject, int)
public GraphicalObject addToBack(GraphicalObject gob,
int pos)
addToBack in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the GraphicalObject to add.pos - is the GraphicalObject's position, either
GraphicalObjectGroup.KEEP_ABS_POS or GraphicalObjectGroup.KEEP_REL_POS.
public GraphicalObject addToFront(GraphicalObject gob,
int pos)
addToFront in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the GraphicalObject to add.pos - is the GraphicalObject's position, either
GraphicalObjectGroup.KEEP_ABS_POS or GraphicalObjectGroup.KEEP_REL_POS.
public GraphicalObject add(int index,
GraphicalObject gob,
int pos)
GraphicalObjectGroupadd in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupindex - is the layer to add to. Lower numbers indicate the front
(higher layers).gob - is the GraphicalObject to add.pos - is the GraphicalObject's position, either
GraphicalObjectGroup.KEEP_ABS_POS or GraphicalObjectGroup.KEEP_REL_POS.public void clear()
clear in interface GraphicalObjectCollectionpublic boolean contains(GraphicalObject gob)
GraphicalObjectCollectionGraphicalObject.shapeContains(GraphicalObject).contains in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectionpublic GraphicalObject get(int index)
GraphicalObjectCollectionget in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectionindex - is the location to look at (zero-based). It is up to the
programmer to ensure that this is a valid value.public GraphicalObject getFirst()
GraphicalObjectCollectiongetFirst in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectionpublic GraphicalObject getLast()
GraphicalObjectCollectiongetLast in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectionpublic GraphicalObject getID(int id)
GraphicalObjectCollectiongetID in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectionid - is the unique ID of the GraphicalObject to retrieve.public Rectangle2D getCollectionBounds2D(int cdsys)
GraphicalObjectCollectiongetCollectionBounds2D in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectioncdsys - is the coordinate system to use.
public Rectangle2D getCollectionBounds2D(int cdsys,
Rectangle2D rect)
GraphicalObjectCollectiongetCollectionBounds2D in interface GraphicalObjectCollectionpublic int indexOf(GraphicalObject gob)
GraphicalObjectCollectionindexOf in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectiongob - is the Graphical Object to look for.public boolean isEmpty()
GraphicalObjectCollectionisEmpty in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectionpublic void sort(Comparator c)
sort in interface GraphicalObjectCollectionpublic int numElements()
GraphicalObjectCollectionI realize that this should have been called size(), but there already exists a deprecated method in Component named size().
numElements in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectionpublic GraphicalObject remove(GraphicalObject gob)
GraphicalObjectCollectionremove in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectiongob - is the Graphical Object ot remove.public Iterator getForwardIterator()
GraphicalObjectCollectiongetForwardIterator in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectionpublic Iterator getReverseIterator()
GraphicalObjectCollectiongetReverseIterator in interface GraphicalObjectCollectionedu.berkeley.guir.lib.satin.objects.GraphicalObjectCollectionpublic void removeAll(GraphicalObjectCollection gobcol)
GraphicalObjectGroupremoveAll in interface GraphicalObjectGroup
public GraphicalObjectCollection getGraphicalObjects(int cdsys,
Point2D pt,
int num,
int depth,
int gettype,
double thresh,
GraphicalObjectCollection out)
GraphicalObjectGroupReally big methods like this one are usually a warning sign, but I really don't see any alternatives.
getGraphicalObjects in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupcdsys - is the coordinate system.pt - is the point to get the Graphical Objects from.num - is either SatinConstants.ALL or
SatinConstants.FIRST.depth - is either SatinConstants.SHALLOW or
SatinConstants.DEEPgettype - is the algorithm to use to retrieve, either
SatinConstants.INTERSECTS,
SatinConstants.CONTAINEDBY,
SatinConstants.CONTAINS,
SatinConstants.NEAR,
SatinConstants.ABOVE,
SatinConstants.BELOW,thresh - is the threshold or halo to retrieve.gobcol - is the storage for output. Use null to create new space.
public GraphicalObjectCollection getGraphicalObjects(int cdsys,
double x,
double y,
int num,
int depth,
int gettype,
double thresh,
GraphicalObjectCollection out)
getGraphicalObjects in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupGraphicalObjectGroup.getGraphicalObjects(int, Point2D, int, int, int, double, GraphicalObjectCollection)
public GraphicalObjectCollection getGraphicalObjects(int cdsys,
Shape s,
int num,
int depth,
int gettype,
double thresh,
GraphicalObjectCollection out)
getGraphicalObjects in interface GraphicalObjectGroup
public GraphicalObjectCollection getGraphicalObjects(GraphicalObject gob,
int num,
int depth,
int gettype,
double thresh,
GraphicalObjectCollection out)
GraphicalObjectGroupReally big methods like this one are usually a warning sign, but I really don't see any alternatives.
getGraphicalObjects in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupgob - is the Graphical Object whose bounding points to use.num - is either SatinConstants.ALL or
SatinConstants.FIRST.depth - is either SatinConstants.SHALLOW or
SatinConstants.DEEPgettype - is the algorithm to use to retrieve, either
SatinConstants.INTERSECTS,
SatinConstants.CONTAINEDBY,
SatinConstants.CONTAINS,
SatinConstants.NEAR,
SatinConstants.ABOVE,
SatinConstants.BELOW,thresh - is the threshold or halo to retrieve.gobcol - is the storage for output. Use null to create new space.
public GraphicalObjectCollection getGraphicalObjects(int cdsys,
Point2D pt,
int num,
int depth,
int gettype)
getGraphicalObjects in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupGraphicalObjectGroup.getGraphicalObjects(int, Point2D, int, int, int, double, GraphicalObjectCollection)
public GraphicalObjectCollection getGraphicalObjects(int cdsys,
double x,
double y,
int num,
int depth,
int gettype)
getGraphicalObjects in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupGraphicalObjectGroup.getGraphicalObjects(int, Point2D, int, int, int, double, GraphicalObjectCollection)
public GraphicalObjectCollection getGraphicalObjects(int cdsys,
Shape s,
int num,
int depth,
int gettype)
getGraphicalObjects in interface GraphicalObjectGroup
public GraphicalObjectCollection getGraphicalObjects(GraphicalObject gob,
int num,
int depth,
int gettype)
getGraphicalObjects in interface GraphicalObjectGroupedu.berkeley.guir.lib.satin.objects.GraphicalObjectGroupGraphicalObjectGroup.getGraphicalObjects(GraphicalObject, int, int, int, double, GraphicalObjectCollection)public Watcher addWatcher(Watcher w)
WatchableaddWatcher in interface Watchableedu.berkeley.guir.lib.satin.watch.Watchablew - is the Watcher to add.public int countWatchers()
WatchablecountWatchers in interface Watchablepublic Watcher removeWatcher(Watcher w)
WatchableremoveWatcher in interface Watchableedu.berkeley.guir.lib.satin.watch.Watchablepublic void clearWatchers()
WatchableclearWatchers in interface Watchablepublic void enableNotify()
WatchableenableNotify in interface Watchableedu.berkeley.guir.lib.satin.watch.WatchableWatchable.disableNotify()public void disableNotify()
WatchabledisableNotify in interface Watchablepublic boolean hasNotifyEnabled()
WatchablehasNotifyEnabled in interface Watchableedu.berkeley.guir.lib.satin.watch.WatchableWatchable.disableNotify(),
Watchable.enableNotify()public void notifyWatchers()
WatchablenotifyWatchers in interface Watchablepublic void notifyWatchers(Object arg)
WatchablenotifyWatchers in interface Watchablepublic void notifyWatchersUpdate(Object arg)
WatchablenotifyWatchersUpdate in interface Watchableedu.berkeley.guir.lib.satin.watch.Watchablearg - is the argument to send to all Watchers.
public void notifyWatchersUpdate(String strProperty,
Object newVal,
Object oldVal)
WatchablenotifyWatchersUpdate in interface Watchableedu.berkeley.guir.lib.satin.watch.WatchablestrProperty - is some agreed upon name for the property.oldVal - is the old value.newVal - is the new value. It should be a clone, not a
reference to the actual value, unless it is
prohibitively expensive to clone. Whether this is a
copy or a reference should be defined in the
SatinConstants file.SatinConstantspublic void notifyWatchersDelete()
WatchablenotifyWatchersDelete in interface Watchable
public void onNotify(Watchable w,
Object arg)
WatcheronNotify in interface Watcheredu.berkeley.guir.lib.satin.watch.Watcherw - 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)
WatcheronUpdate in interface Watcheredu.berkeley.guir.lib.satin.watch.Watcherw - 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)
WatcheronUpdate in interface Watcheredu.berkeley.guir.lib.satin.watch.Watcherw - 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 onDelete(Watchable w)
WatcheronDelete in interface Watcheredu.berkeley.guir.lib.satin.watch.Watcherw - is the Watchable object to be deleted.Watchable.notifyWatchersDelete()
public void setSize(int w,
int h)
setSize in class Componentpublic void setSize(Dimension dim)
setSize in class Componentpublic boolean isFocusTraversable()
isFocusTraversable in class JComponentpublic void setBackground(Color bkgrd)
setBackground in class JComponentpublic void render(SatinGraphics g)
GraphicalObjectWhen this method is called for you, your Style and Transform has already been set. This has several implications.
First, you can just use the normal drawing methods, like drawLine(), and they will automatically use the thickness and other properties as set in Style. You can still set colors and fonts and such if you want, though.
Secondly, your coordinate system is set such that (0,0) is your top-left corner.
Third, since your transform is already set, you don't have to do anything special to get rotation. Just draw normally.
Fourth, while in render(), do not call any methods that use
SatinConstants.COORD_REL or SatinConstants.COORD_ABS,
since the transform has already been applied. Instead, use
SatinConstants.COORD_LOCAL.
So in other words, all you have to do is just draw the GraphicalObject normally, and everything else will be handled for you. However, do NOT call anything that uses the transformed bounds, since that will apply the transform twice (the transform has already been applied once).
render in interface GraphicalObjectedu.berkeley.guir.lib.satin.objects.GraphicalObjectg - is the Graphics context to draw in.public void paintComponent(Graphics g)
paintComponent in class JComponentpublic String toString()
toString in class Componentpublic Object clone()
clone in interface GraphicalObjectclone in class Objectpublic Object deepClone()
deepClone in interface GraphicalObject
|
Copyright Information | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||