fr.emn.inputeditor
Class LiteSlots

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byfr.emn.lite.Lite
              extended byfr.emn.lite.LiteContainer
                  extended byfr.emn.inputeditor.LiteSlots
All Implemented Interfaces:
java.util.Collection, java.util.List
Direct Known Subclasses:
LiteInSlots, LiteOutSlots

public abstract class LiteSlots
extends LiteContainer

Manages a group of hierarchical slots. Draw labels and links between slots.


Field Summary
static java.awt.Font slotFont
           
 
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
LiteSlots()
           
LiteSlots(LiteSlot[] slots)
           
 
Method Summary
 void collapseAll()
           
 void doPaint(java.awt.Graphics2D g)
          doPaint method comment.
 void expand(boolean expand)
           
 java.awt.geom.Rectangle2D getActiveBounds()
          These bounds are used to collapse node on mouse exit.
static LiteSlot[] getAllRealChildren(LiteSlot s)
          Returns all non-hierarchical slots that are subchild of this hierarchical slot.
 java.util.Vector getAssociatedLinks()
          Returns the links attached to the slots of this node.
 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.
 double getHeight()
           
static int getLevel(LiteSlot slot)
           
 double getMaxX()
           
 double getMinX()
           
static LiteSlot[] getNextRealSlots(LiteSlot s, int count)
          Returns all next n non-hierarchical slots (returned size may be lower than requested size).
 java.awt.Shape getShadow()
          Returns this lite's own shadow, WITHOUT its children's shadows.
 LiteSlot getSlot(LiteLabel ll)
           
 LiteSlot getSlot(java.lang.String fullName)
           
 int getSlotIndex(LiteSlot s)
           
 LiteSlot[] getSlots()
           
abstract  float indentSize()
           
 void invalidate()
          Recomputes slots and labels layout.
abstract  int labelsWidth()
           
abstract  int labelsX()
           
 void setSlots(LiteSlot[] s)
           
abstract  float slotsX()
           
 
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, getActiveBoundsFrom, getAncestor, getAncestor, getBoundsFrom, getBoundsFromNoCorrect, getChildrenGhostPath, getCommonAncestor, getGhost_old, getGhost, getParent, getTransform, getTransformFrom, getTransformNoCopy, isVisible, migrateBack, migrateTo, paint_old, paint, paintChildren, paintShadows, pick, 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
 

Field Detail

slotFont

public static java.awt.Font slotFont
Constructor Detail

LiteSlots

public LiteSlots()

LiteSlots

public LiteSlots(LiteSlot[] slots)
Method Detail

collapseAll

public void collapseAll()

doPaint

public void doPaint(java.awt.Graphics2D g)
doPaint method comment.

Specified by:
doPaint in class Lite

getActiveBounds

public java.awt.geom.Rectangle2D getActiveBounds()
These bounds are used to collapse node on mouse exit.

Overrides:
getActiveBounds in class Lite

getAssociatedLinks

public java.util.Vector getAssociatedLinks()
Returns the links attached to the slots of this node.


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()

getHeight

public double getHeight()

getLevel

public static int getLevel(LiteSlot slot)

getMaxX

public double getMaxX()

getMinX

public double getMinX()

getShadow

public java.awt.Shape getShadow()
Description copied from class: Lite
Returns this lite's own shadow, WITHOUT its children's shadows.

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.

Overrides:
getShadow in class Lite

getSlot

public LiteSlot getSlot(LiteLabel ll)

getSlot

public LiteSlot getSlot(java.lang.String fullName)

getSlots

public LiteSlot[] getSlots()

getSlotIndex

public int getSlotIndex(LiteSlot s)

indentSize

public abstract float indentSize()

invalidate

public void invalidate()
Recomputes slots and labels layout.

Call this method when you change slots appearance (visible, etc.)


labelsWidth

public abstract int labelsWidth()

labelsX

public abstract int labelsX()

setSlots

public void setSlots(LiteSlot[] s)

expand

public void expand(boolean expand)

slotsX

public abstract float slotsX()

getAllRealChildren

public static LiteSlot[] getAllRealChildren(LiteSlot s)
Returns all non-hierarchical slots that are subchild of this hierarchical slot.


getNextRealSlots

public static LiteSlot[] getNextRealSlots(LiteSlot s,
                                          int count)
Returns all next n non-hierarchical slots (returned size may be lower than requested size).