|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractList fr.emn.lite.Lite fr.emn.lite.LiteContainer fr.emn.lite.LiteUnion
This class describes a Union of lite objects.
A LiteUnion is a temporar container which is used to perform operations on a set of lite objects. It is well suited to describe group selections.
The shape of a LiteUnion is the union of the shapes of its lite children (it may contains holes). As a result, it can be picked only where its children reside (! changing the lite bounds after moving it in the union has no effect on the union's shape !).
Lite objects can be moved in and out a Union. When moved in, lite objects temporarily leave their parent and become direct children of the LiteUnion, until they are moved out and return to their original parent. During these operations, the affine transform of the lite is updated so that its screen appearance never changes.
Every set of lite can form a Union, even if they have not originally the same parent. Subclass LiteUnion to describe particular unions of objects.
WARNING : Always add the LiteUnion to the hierarchy before filling it.
Field Summary |
Fields inherited from class fr.emn.lite.LiteContainer |
children |
Fields inherited from class fr.emn.lite.Lite |
model, oldParent, parent, PICK_ACTIVEBOUNDS, PICK_ALL, PICK_DEEPEST, PICK_FIRST, PICK_GRAPHBOUNDS, PICK_INSIDE, PICK_INTER, PICK_MANIPULABLE, visible |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
LiteUnion()
LiteGroup constructor comment. |
Method Summary | |
void |
createIn(Lite l,
LiteContainer realParent)
Moves a newly created lite object (i.e. without original parent) in this Union without changing its transformation (*), and returns it to the specified parent when moveOut() is called. |
void |
delete()
Destroy this group by calling moveAllOut() and removing this object from its parent. |
void |
doPaint(java.awt.Graphics2D g)
paint children. |
java.awt.geom.Rectangle2D |
getBounds()
getBounds2D method comment. |
java.awt.geom.GeneralPath |
getGhostPath(int maxDepth)
This object has no ghost path on its own, but returns the ghost path of its children. |
void |
moveAllOut()
Moves all elements to their original parent. |
void |
moveAllOut(LiteContainer newParent)
Moves all elements to a new common parent. |
void |
moveIn(Lite l)
Moves the lite object in this Union while keeping its global transformation (*), and returns it to its original parent when moveOut() is called. |
void |
moveIn(java.util.Vector objects)
Insert the method's description here. |
void |
moveOut(Lite l)
Returns l to its original parent. |
void |
moveOut(Lite l,
LiteContainer newParent)
Moves element to a new parent. |
boolean |
pick(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D rect,
int strategy,
PickedList picked)
Picks this object with the specified strategy, and adds the results to the picked list. |
void |
updateObjects(java.util.Vector objects)
Update this group with a new vector of objects (optimized). |
Methods inherited from class fr.emn.lite.LiteContainer |
add, add, get, getChildrenBounds, remove, remove, set, set, size |
Methods inherited from class fr.emn.lite.Lite |
changeTransform, concatenate, context, dist, equals, getActiveBounds, getActiveBoundsFrom, getAncestor, getAncestor, getBoundsFrom, getBoundsFromNoCorrect, getChildrenGhostPath, getCommonAncestor, getGhost_old, getGhost, getParent, getShadow, getTransform, getTransformFrom, getTransformNoCopy, isVisible, migrateBack, migrateTo, paint_old, paint, paintChildren, paintShadows, pickChildren, preConcatenate, setContext, setParent, setTransform, setVisible, toString, transformBounds |
Methods inherited from class java.util.AbstractList |
add, addAll, clear, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Constructor Detail |
public LiteUnion()
Method Detail |
public void createIn(Lite l, LiteContainer realParent)
This is useful when creating unions of new objects (e.g. when cloning unions).
*: Set the lite's transform BEFORE moving it to the union.
public void delete()
public void doPaint(java.awt.Graphics2D g)
doPaint
in class Lite
public java.awt.geom.Rectangle2D getBounds()
getBounds
in class Lite
public java.awt.geom.GeneralPath getGhostPath(int maxDepth)
getGhostPath
in class Lite
#getChildrenGhostPath()
public void moveAllOut()
public void moveAllOut(LiteContainer newParent)
public void moveIn(Lite l)
*: The Union's parent must be an ancestor of the lite object.
public void moveIn(java.util.Vector objects)
objects
- java.util.Vectorpublic void moveOut(Lite l)
public void moveOut(Lite l, LiteContainer newParent)
public boolean pick(java.awt.Graphics2D g, java.awt.geom.Rectangle2D rect, int strategy, PickedList picked)
Lite
A picking strategy is a combination of a depth strategy and a geometrical strategy.
* Depth filters:
PICK_DEEPEST strategy : Deepest pickable children of this object (or the object itself if none) are added to the picked list. This is the default value.
PICK_FIRST strategy : First pickable children (or the object itself if pickable) are added to the picked list.
PICK_ALL strategy : All pickable objects are added to the list.
* Geometrical filters:
PICK_INTER strategy : Objects have to intersect the picking rectangle to be picked. This is the default value.
PICK_INSIDE strategy : Objects must be inside the picking rectangle to be picked. PICK_ACTIVEBOUNDS strategy PICK_GRAPHBOUNDS strategy * Semantic filters: PICK_MANIPULABLE strategy
pick
in class Lite
rect
- The picking rectanglestrategy
- The picking strategy to be used, i.e. a combination
of a depth strategy and a geometrical strategy. Default value (0) is
PICK_DEEPEST | PICK_INTER.picked
- if this argument is not null, picked objects are added
to the pick list.public void updateObjects(java.util.Vector objects)
objects
- java.util.Vector
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |