fr.emn.lite
Class LiteGhost_old

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byfr.emn.lite.Lite
              extended byfr.emn.lite.LiteGhost_old
All Implemented Interfaces:
java.util.Collection, java.util.List

public class LiteGhost_old
extends Lite

pending: this doc is deprecated.

This object is a completely flat and independent Lite object, useful for direct manipulation.

A "source" Lite object is passed to its constructor. LiteGhost's asks its geometry to the source through the "getGhostPath" method (which can include children's geometry too).

LiteGhost provides "translate" and "zoom" methods. These methods don't change ghost's local transform (always equal to identity), but rather transforms the ghost geometry itself.

This is useful to avoid scale problems during mouse manipulation (for example when performing a zoom, then a translation).


Field Summary
protected  java.awt.geom.Rectangle2D bounds
           
protected  java.awt.geom.GeneralPath outline
           
protected  Lite source
           
 
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
LiteGhost_old(Lite liteSource)
           
 
Method Summary
 LiteGhost_old copy_old()
          Copy (clone) the Ghost object
 LiteGhost copy()
          Copy (clone) the Ghost object
 void doPaint(java.awt.Graphics2D g)
          Include painting code here.
 java.awt.geom.Rectangle2D getBounds()
          Returns the bounds of the Lite object in its own coordinate system.
 java.awt.geom.GeneralPath getPath()
           
 java.awt.geom.AffineTransform getUserTransform()
          Get transformations performed by the user
 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 setPath(java.awt.geom.GeneralPath path)
           
 void setSource(Lite source)
          Used when the ghost is created before its source (i.e. in copy & paste)
 void translate(double dx, double dy)
           
 void updateSource()
           
 void zoom(java.awt.Point origin, double scale)
           
 void zoomCenter(double scale)
           
 
Methods inherited from class fr.emn.lite.Lite
changeTransform, concatenate, context, dist, equals, get, getActiveBounds, getActiveBoundsFrom, getAncestor, getAncestor, getBoundsFrom, getBoundsFromNoCorrect, getChildrenGhostPath, getCommonAncestor, getGhost_old, getGhost, getGhostPath, getParent, getShadow, getTransform, getTransformFrom, getTransformNoCopy, isVisible, migrateBack, migrateTo, paint_old, paint, paintChildren, paintShadows, pickChildren, preConcatenate, setContext, setParent, setTransform, setVisible, size, toString, transformBounds
 
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

source

protected Lite source

bounds

protected java.awt.geom.Rectangle2D bounds

outline

protected java.awt.geom.GeneralPath outline
Constructor Detail

LiteGhost_old

public LiteGhost_old(Lite liteSource)
Method Detail

copy

public LiteGhost copy()
Copy (clone) the Ghost object


copy_old

public LiteGhost_old copy_old()
Copy (clone) the Ghost object


doPaint

public void doPaint(java.awt.Graphics2D g)
Description copied from class: Lite
Include painting code here.

Call PaintChildren if Lite object is a container.

Specified by:
doPaint in class Lite

getBounds

public java.awt.geom.Rectangle2D getBounds()
Description copied from class: Lite
Returns the bounds of the Lite object in its own coordinate system. Warning : don't change the Rectangle2D returned. Instead, work on a copy.

Specified by:
getBounds in class Lite

getPath

public java.awt.geom.GeneralPath getPath()

getUserTransform

public java.awt.geom.AffineTransform getUserTransform()
Get transformations performed by the user


pick

public boolean pick(java.awt.Graphics2D g,
                    java.awt.geom.Rectangle2D rect,
                    int strategy,
                    PickedList picked)
Description copied from class: Lite
Picks this object with the specified strategy, and adds the results to the picked list.

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

Overrides:
pick in class Lite
Parameters:
rect - The picking rectangle
strategy - 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.

setPath

public void setPath(java.awt.geom.GeneralPath path)

setSource

public void setSource(Lite source)
Used when the ghost is created before its source (i.e. in copy & paste)


translate

public void translate(double dx,
                      double dy)

updateSource

public void updateSource()

zoom

public void zoom(java.awt.Point origin,
                 double scale)

zoomCenter

public void zoomCenter(double scale)