|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.element.ElementPool
This class is a pool for elements. The elements are either the visual
representations of nodes or edges.
Elements are pooled by means of a HashMap internally.
The elements must provide equals and hashcode methods, implementing
Comparable is not required.
GeometryPool,
StylePool| Method Summary | |
static void |
clear()
Clears the pool. |
static void |
dump()
Dumps the pool's contents to stderr. |
static VisualGraphObject |
get(java.lang.String elementName)
Returns an item from the pool by name. |
static java.lang.String |
getDefaultVisualEdgeGeometry()
Returns the name of the geometry that should be used by default for a VisualEdge automatically created by the GraphAPI. |
static java.lang.String |
getDefaultVisualEdgeStyle()
Returns the name of the style that should be used by default for a VisualEdge automatically created by the GraphAPI. |
static java.util.Set |
names()
Method names returns a set the keys of the internal map. |
static void |
pool(java.lang.String elementName,
VisualGraphObject visualgraphobject)
Adds an item to the pool, if an item with the same name exists already, nothing will happen. |
static int |
size()
Returns the size of the pool. |
static void |
useThreadLocal()
A call to this method configures the ElementPool to
make use of the ThreadLocal class hence a pool is created
for each Thread the ElementPool is used
by.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final void useThreadLocal()
ElementPool to
make use of the ThreadLocal class hence a pool is created
for each Thread the ElementPool is used
by.
ElementPool is in use by any Thread.
ThreadLocalpublic static final java.lang.String getDefaultVisualEdgeGeometry()
VisualEdge automatically created by the GraphAPI.
public static final java.lang.String getDefaultVisualEdgeStyle()
VisualEdge automatically created by the GraphAPI.
public static final void pool(java.lang.String elementName,
VisualGraphObject visualgraphobject)
elementName - the name of the element.visualgraphobject - the VisualGraphObject to poolpublic static final VisualGraphObject get(java.lang.String elementName)
elementName - the name of the element.
public static final int size()
public static final java.util.Set names()
public static final void clear()
public static void dump()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||