|
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 |
A collection of Graphical Objects that is part of the interactor tree.
Unlike a GraphicalObjectCollection, Graphical Objects will be modified when added, making this Group the parent of the added Graphical Object, as well as modifying the coordinates of the Graphical Object to be relative to the Group boundaries.
When a GraphicalObject is added to a group, it retains its relative
coordinates if the KEEP_REL_POS
constant is specified when
calling add(GraphicalObject,int)
. If the KEEP_ABS_POS
constant is specified when calling the same method, then the added
GraphicalObject will retain its current absolute position.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Oct 09 1998, 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 int |
DEFAULT_POS_POLICY
Which of the two policies above we use by default, if unspecified. |
static int |
KEEP_ABS_POS
When adding a GraphicalObject into this GraphicalObjectGroup, keep the same absolute position the GraphicalObject currently has. |
static int |
KEEP_REL_POS
When adding a GraphicalObject into this GraphicalObjectGroup, keep the same relative position the GraphicalObject currently has. |
Fields inherited from interface edu.berkeley.guir.lib.satin.objects.GraphicalObject |
GESTUREINTRP_CLPROPERTY, INKINTRP_CLPROPERTY, STYLE_CLPROPERTY, VIEW_CLPROPERTY |
Method Summary | |
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,
int pos)
Add a GraphicalObject to the specified layer of this group, specifying the GraphicalObject's position at the same time. |
GraphicalObject |
addToBack(GraphicalObject gob,
int pos)
Add a GraphicalObject to the bottom of this group, specifying the GraphicalObject's position at the same time. |
GraphicalObject |
addToFront(GraphicalObject gob,
int pos)
Add a GraphicalObject to the top of this group, specifying the GraphicalObject's position at the same time. |
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 |
bringToBottomLayer(GraphicalObject gob)
Move the specified Graphical Object to the bottom layer of this Graphical Object Group. |
void |
bringToTopLayer(GraphicalObject gob)
Move the specified Graphical Object to the top layer of this Graphical Object 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. |
String |
getAbsoluteLayer(GraphicalObject gob)
Given a GraphicalObject, return its absolute layer position. |
GraphicalObjectCollection |
getGraphicalObjects(GraphicalObject gob,
int num,
int depth,
int gettype)
|
GraphicalObjectCollection |
getGraphicalObjects(GraphicalObject gob,
int num,
int depth,
int gettype,
double thresh,
GraphicalObjectCollection gobcol)
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 gobcol)
|
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 gobcol)
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 gobcol)
|
String |
getRelativeLayer(GraphicalObject gob)
Given a GraphicalObject, return what layer it is in relative to this Graphical Object Group. |
void |
removeAll(GraphicalObjectCollection gobcol)
Remove from this Group all of the GraphicalObjects in the collection. |
void |
setRelativeLayer(GraphicalObject gob,
int layer)
Given a GraphicalObject, set what layer it is in relative to this Graphical Object Group. |
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, clone, contains, deepClone, 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, onNotify, onUpdate, onUpdate |
Field Detail |
public static final int KEEP_ABS_POS
See GraphicalObjectImpl
for an explanation of the different
coordinate systems.
public static final int KEEP_REL_POS
See GraphicalObjectImpl
for an explanation of the different
coordinate systems.
public static final int DEFAULT_POS_POLICY
Method Detail |
public GraphicalObject add(GraphicalObject gob, int pos)
gob
- is the GraphicalObject to add.pos
- is the GraphicalObject's position, either
KEEP_ABS_POS
or KEEP_REL_POS
.addToFront(GraphicalObject, int)
public GraphicalObject addToBack(GraphicalObject gob, int pos)
gob
- is the GraphicalObject to add.pos
- is the GraphicalObject's position, either
KEEP_ABS_POS
or KEEP_REL_POS
.public GraphicalObject addToFront(GraphicalObject gob, int pos)
gob
- is the GraphicalObject to add.pos
- is the GraphicalObject's position, either
KEEP_ABS_POS
or KEEP_REL_POS
.public GraphicalObject add(int index, GraphicalObject gob, int pos)
index
- 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
KEEP_ABS_POS
or KEEP_REL_POS
.public String getRelativeLayer(GraphicalObject gob)
gob
- is the contained Graphical Object to check out.GraphicalObject.getRelativeLayer()
public void setRelativeLayer(GraphicalObject gob, int layer)
gob
- is the contained Graphical Object to move.layer
- is the layer to move to.GraphicalObject.setRelativeLayer(int)
public String getAbsoluteLayer(GraphicalObject gob)
gob
- is the contained Graphical Object to check out.GraphicalObject.getAbsoluteLayer()
public void bringUpALayer(GraphicalObject gob)
gob
- is the Graphical Object to move.GraphicalObject.bringUpALayer()
public void bringUpNLayers(GraphicalObject gob, int n)
gob
- is the Graphical Object to move.n
- is the number of layers to move.GraphicalObject.bringUpNLayers(int)
public void bringDownALayer(GraphicalObject gob)
gob
- is the Graphical Object to move.GraphicalObject.bringDownALayer()
public void bringDownNLayers(GraphicalObject gob, int n)
gob
- is the Graphical Object to move.n
- is the number of layers to move.GraphicalObject.bringDownNLayers(int)
public void bringToTopLayer(GraphicalObject gob)
gob
- is the Graphical Object to move.GraphicalObject.bringToTopLayer()
public void bringToBottomLayer(GraphicalObject gob)
gob
- is the Graphical Object to move.GraphicalObject.bringToBottomLayer()
public void removeAll(GraphicalObjectCollection gobcol)
public GraphicalObjectCollection getGraphicalObjects(int cdsys, Point2D pt, int num, int depth, int gettype, double thresh, GraphicalObjectCollection gobcol)
Really big methods like this one are usually a warning sign, but I really don't see any alternatives.
cdsys
- 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.DEEP
gettype
- 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 gobcol)
getGraphicalObjects(int, Point2D, int, int, int, double, GraphicalObjectCollection)
public GraphicalObjectCollection getGraphicalObjects(int cdsys, Shape s, int num, int depth, int gettype, double thresh, GraphicalObjectCollection gobcol)
public GraphicalObjectCollection getGraphicalObjects(GraphicalObject gob, int num, int depth, int gettype, double thresh, GraphicalObjectCollection gobcol)
Really big methods like this one are usually a warning sign, but I really don't see any alternatives.
gob
- is the Graphical Object whose bounding points to use.num
- is either SatinConstants.ALL
or
SatinConstants.FIRST
.depth
- is either SatinConstants.SHALLOW
or
SatinConstants.DEEP
gettype
- 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(int, Point2D, int, int, int, double, GraphicalObjectCollection)
public GraphicalObjectCollection getGraphicalObjects(int cdsys, double x, double y, int num, int depth, int gettype)
getGraphicalObjects(int, Point2D, int, int, int, double, GraphicalObjectCollection)
public GraphicalObjectCollection getGraphicalObjects(int cdsys, Shape s, int num, int depth, int gettype)
public GraphicalObjectCollection getGraphicalObjects(GraphicalObject gob, int num, int depth, int gettype)
getGraphicalObjects(GraphicalObject, int, int, int, double, GraphicalObjectCollection)
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |