|
|||||||||||
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
Field Summary | |
java.lang.Object |
model
|
protected LiteContainer |
oldParent
|
protected LiteContainer |
parent
|
static int |
PICK_ACTIVEBOUNDS
|
static int |
PICK_ALL
All depth strategy for picking. |
static int |
PICK_DEEPEST
Deepest depth strategy for picking. |
static int |
PICK_FIRST
First depth strategy for picking. |
static int |
PICK_GRAPHBOUNDS
|
static int |
PICK_INSIDE
Inside geometrical strategy for picking. |
static int |
PICK_INTER
Intersection geometrical strategy for picking. |
static int |
PICK_MANIPULABLE
|
protected boolean |
visible
|
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
Lite()
|
Method Summary | |
void |
changeTransform(java.awt.geom.AffineTransform t)
|
void |
concatenate(java.awt.geom.AffineTransform t)
|
LiteContext |
context()
|
protected static double |
dist(java.awt.geom.Rectangle2D r1,
java.awt.geom.Rectangle2D r2)
|
abstract void |
doPaint(java.awt.Graphics2D g)
Include painting code here. |
boolean |
equals(java.lang.Object l)
|
java.lang.Object |
get(int index)
Don't subclass. |
java.awt.geom.Rectangle2D |
getActiveBounds()
|
java.awt.geom.Rectangle2D |
getActiveBoundsFrom(LiteContainer l)
|
LiteContainer |
getAncestor()
|
LiteContainer |
getAncestor(java.lang.Class ancestorClass)
|
abstract java.awt.geom.Rectangle2D |
getBounds()
Returns the bounds of the Lite object in its own coordinate system. |
java.awt.geom.Rectangle2D |
getBoundsFrom(LiteContainer l)
|
protected java.awt.geom.Rectangle2D |
getBoundsFromNoCorrect(LiteContainer l)
|
java.awt.geom.GeneralPath |
getChildrenGhostPath(int maxDepth)
Returns the ghost path of all this object's children, transformed in the current coordinates system. |
static LiteContainer |
getCommonAncestor(Lite l1,
Lite l2)
Utility method used to retreive the nearest common ancestor of two lite objects. |
LiteGhost_old |
getGhost_old()
|
LiteGhost |
getGhost(int maxDepth)
|
java.awt.geom.GeneralPath |
getGhostPath(int maxDepth)
This method returns the ghost shape of this object. |
LiteContainer |
getParent()
|
java.awt.Shape |
getShadow()
Returns this lite's own shadow, WITHOUT its children's shadows. |
java.awt.geom.AffineTransform |
getTransform()
Returns a copy of the current transform. |
java.awt.geom.AffineTransform |
getTransformFrom(LiteContainer l)
|
java.awt.geom.AffineTransform |
getTransformNoCopy()
Returns the current transform. |
boolean |
isVisible()
|
void |
migrateBack()
Utility method for moving a lite back to its original parent. |
void |
migrateTo(LiteContainer newParent)
Utility method for moving temporarily a lite in another parent. |
void |
paint_old(java.awt.Graphics2D g)
Called by immediate parent |
void |
paint(java.awt.Graphics2D g)
Called by immediate parent |
protected void |
paintChildren(java.awt.Graphics2D g)
Useful methods for composite Lite |
void |
paintShadows(java.awt.Graphics2D g)
This paints all shadows for lite objects implementing Shadow interface. |
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. |
protected boolean |
pickChildren(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D rect,
int strategy,
PickedList picked)
Picks this object's children. |
void |
preConcatenate(java.awt.geom.AffineTransform t)
|
void |
setContext(LiteContext c)
|
protected void |
setParent(LiteContainer par)
|
void |
setTransform(java.awt.geom.AffineTransform t)
|
void |
setVisible(boolean visible)
|
int |
size()
Don't subclass. |
java.lang.String |
toString()
|
static java.awt.geom.Rectangle2D |
transformBounds(java.awt.geom.Rectangle2D bounds,
java.awt.geom.AffineTransform at)
|
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, 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 |
Field Detail |
public java.lang.Object model
public static final int PICK_INTER
public static final int PICK_INSIDE
public static final int PICK_DEEPEST
public static final int PICK_FIRST
public static final int PICK_ALL
public static final int PICK_ACTIVEBOUNDS
public static final int PICK_GRAPHBOUNDS
public static final int PICK_MANIPULABLE
protected LiteContainer parent
protected LiteContainer oldParent
protected boolean visible
Constructor Detail |
public Lite()
Method Detail |
public void changeTransform(java.awt.geom.AffineTransform t)
public void concatenate(java.awt.geom.AffineTransform t)
public LiteContext context()
protected static double dist(java.awt.geom.Rectangle2D r1, java.awt.geom.Rectangle2D r2)
public abstract void doPaint(java.awt.Graphics2D g)
Call PaintChildren if Lite object is a container.
public boolean equals(java.lang.Object l)
public java.lang.Object get(int index)
Read-only abstract lists must implement get(int index) and size() methods. set(int, Object) method throws an UnsupportedOperation exception.
public java.awt.geom.Rectangle2D getActiveBounds()
public java.awt.geom.Rectangle2D getActiveBoundsFrom(LiteContainer l)
public final LiteContainer getAncestor()
public final LiteContainer getAncestor(java.lang.Class ancestorClass)
public abstract java.awt.geom.Rectangle2D getBounds()
public java.awt.geom.Rectangle2D getBoundsFrom(LiteContainer l)
protected java.awt.geom.Rectangle2D getBoundsFromNoCorrect(LiteContainer l)
public static LiteContainer getCommonAncestor(Lite l1, Lite l2)
public LiteGhost getGhost(int maxDepth)
public LiteGhost_old getGhost_old()
public java.awt.geom.GeneralPath getGhostPath(int maxDepth)
By default, this method returns the path iterator of this object's bounds and appends its children's ghost path.
#getChildrenGhostPath()
public java.awt.geom.GeneralPath getChildrenGhostPath(int maxDepth)
Used by the default implementation of getGhostPath().
public LiteContainer getParent()
public java.awt.Shape getShadow()
By default, this method returns null. If you want your object to cast shadows, subclass it and return your shadow's shape (the most simple is getBounds()). Be careful : your shadow must stay inside lite's bounds.
public java.awt.geom.AffineTransform getTransform()
public java.awt.geom.AffineTransform getTransformNoCopy()
public java.awt.geom.AffineTransform getTransformFrom(LiteContainer l)
public boolean isVisible()
public void migrateBack()
migrateTo(fr.emn.lite.LiteContainer)
public void migrateTo(LiteContainer newParent)
newParent
- fr.emn.lite.LitemigrateBack()
public void paint(java.awt.Graphics2D g)
public void paint_old(java.awt.Graphics2D g)
protected void paintChildren(java.awt.Graphics2D g)
public void paintShadows(java.awt.Graphics2D g)
public boolean pick(java.awt.Graphics2D g, java.awt.geom.Rectangle2D rect, int strategy, PickedList picked)
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
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.protected boolean pickChildren(java.awt.Graphics2D g, java.awt.geom.Rectangle2D rect, int strategy, PickedList picked)
rect
- The picking rectangle.strategy
- The picking strategy to be used.picked
- If this argument is not null, picked objects are added
to this list.public void preConcatenate(java.awt.geom.AffineTransform t)
public void setContext(LiteContext c)
protected void setParent(LiteContainer par)
public void setTransform(java.awt.geom.AffineTransform t)
public void setVisible(boolean visible)
public int size()
Read-only abstract lists must implement get(int index) and size() methods. set(int, Object) method throws an UnsupportedOperation exception.
public java.lang.String toString()
public static java.awt.geom.Rectangle2D transformBounds(java.awt.geom.Rectangle2D bounds, java.awt.geom.AffineTransform at)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |