fr.emn.inputeditor
Class LiteLinkHandle

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byfr.emn.lite.Lite
              extended byfr.emn.inputeditor.LiteLinkHandle
All Implemented Interfaces:
java.util.Collection, java.util.List
Direct Known Subclasses:
LiteLinkInHandle, LiteLinkOutHandle

public abstract class LiteLinkHandle
extends Lite


Field Summary
 
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
LiteLinkHandle()
           
 
Method Summary
 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 getGhostPath(int maxDepth)
          This method returns the ghost shape of this object.
abstract  LiteSlot getSlot()
           
protected  double parametrize(java.awt.geom.Point2D p, java.awt.geom.Point2D pO, java.awt.geom.Point2D pI, java.awt.geom.Point2D res, java.awt.geom.Point2D resNorm)
          transforms a point into "parametric" coordinates according to a segment.
protected  double parametrizePath(java.awt.geom.Point2D p, java.awt.geom.PathIterator pi, java.awt.geom.Point2D res, java.awt.geom.Point2D resNorm)
          Parametrize according to a general path instead of a single segment.
 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 setDist(double DIST)
           
 void setParametricDist(double TDIST)
           
 void setParametricLocation(double TLOC0, double TLOC1)
           
 void setParent(LiteContainer par)
           
 
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, getParent, getShadow, getTransform, getTransformFrom, getTransformNoCopy, isVisible, migrateBack, migrateTo, paint_old, paint, paintChildren, paintShadows, pickChildren, preConcatenate, setContext, 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
 

Constructor Detail

LiteLinkHandle

public LiteLinkHandle()
Method Detail

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

getGhostPath

public java.awt.geom.GeneralPath getGhostPath(int maxDepth)
Description copied from class: Lite
This method returns the ghost shape of this object. (implemented here for debug reasons).

By default, this method returns the path iterator of this object's bounds and appends its children's ghost path.

Overrides:
getGhostPath in class Lite
See Also:
#getChildrenGhostPath()

getSlot

public abstract LiteSlot getSlot()

parametrize

protected double parametrize(java.awt.geom.Point2D p,
                             java.awt.geom.Point2D pO,
                             java.awt.geom.Point2D pI,
                             java.awt.geom.Point2D res,
                             java.awt.geom.Point2D resNorm)
transforms a point into "parametric" coordinates according to a segment. res(x, y) = "parametric" result in pixels resNorm(x, y) = normalized "parametric" result (0 -> 1) x = location on the segment: 0=outslot extermity, 1=inslot extremity y = effective distance to the segment: can be normal distance, or distance from an extremity (this is not truly parametric). returns segment length in pixels.


parametrizePath

protected double parametrizePath(java.awt.geom.Point2D p,
                                 java.awt.geom.PathIterator pi,
                                 java.awt.geom.Point2D res,
                                 java.awt.geom.Point2D resNorm)
Parametrize according to a general path instead of a single segment.


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.

setDist

public void setDist(double DIST)

setParametricDist

public void setParametricDist(double TDIST)

setParametricLocation

public void setParametricLocation(double TLOC0,
                                  double TLOC1)

setParent

public void setParent(LiteContainer par)
Overrides:
setParent in class Lite