|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.view.geometry.GraphGeometryService
This class has static method(s) for loading xml geometry-data resources from files with java's built-in classloader-based resource loading facility.
GeometryPool,
GraphGeometryService| Method Summary | |
static java.lang.Object |
createObjectFromItem(GeometryDescriptorItem item)
This method constructs an object from the given GeometryDescriptorItem. |
static AttributeSet |
getItemAttributes(int itemType)
Returns the AttributeSet for the given item identifier. |
static void |
init()
|
static void |
loadGeometriesFromResource(java.lang.String filename,
java.lang.Class resourceclass)
Loads the given geometry into the GeometryPool |
static void |
loadGeometriesFromResource(java.lang.String filename,
java.lang.Class resourceClass,
boolean overwriteExisting)
Loads the geometry definitions from the file given through filename. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final void init()
public static final void loadGeometriesFromResource(java.lang.String filename,
java.lang.Class resourceclass)
throws ReadException
GeometryPool
filename - the filename for the resource, which is passed
to the ClassLoader of the given class. The
ClassLoader will then
figure out the exact location of the geometry definitions.resourceclass - the class whose ClassLoader to use for
loading the geometry definitions.
ReadException - thrown if the loading failed.
public static final void loadGeometriesFromResource(java.lang.String filename,
java.lang.Class resourceClass,
boolean overwriteExisting)
throws XMLParseException,
ReadException
filename. The filename must be
relative to the reference class given by resourceClass.
overwriteExisting indicates whether
to overwrite definitions that have been loaded previously and have the
same name as the ones that should be loaded from the file.
filename - the relative filenameoverwriteExisting - flag that indicates whether to overwrite
existing definition with the same name
XMLParseException - thrown when an error occurs while read xml
from the file given by filename
ReadException - thrown when an error occurs while translating the
read xml structure into corresponding definition objectspublic static final AttributeSet getItemAttributes(int itemType)
AttributeSet for the given item identifier.
itemType - the item identifier.
AttributeSet for the given item identifier.
public static final java.lang.Object createObjectFromItem(GeometryDescriptorItem item)
throws GeometryItemCreationException
GeometryDescriptorItem.
item - the
GeometryDescriptorItem
to create on object from.
GeometryDescriptorItem.
GeometryItemCreationException - thrown if item
creation failed.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||