|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jaxodraw.object.JaxoObjectFactory
public final class JaxoObjectFactory
Factory class to create instances of JaxoObjects.
| Method Summary | |
|---|---|
static void |
addObjectType(int type,
String objectId)
Adds a new type of JaxoObject to the list of know objects. |
static JaxoObject |
newObject(int type)
Returns a new instance of a JaxoObject. |
static JaxoObject |
newObject(int type,
Point[] location)
Creates a new JaxoObject, initialized with values taken from the Preferences. |
static JaxoObject |
newObject(String objectId)
Returns a new instance of a JaxoObject. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static JaxoObject newObject(int type)
type - The type of object to be created,
as defined in JaxoConstants).
public static JaxoObject newObject(String objectId)
objectId - The class name of the object to be instantiated.
public static JaxoObject newObject(int type,
Point[] location)
Preferences.
A NoSuchElementException is thrown if type is not a known object.
type - The type of object to be created
(defined in JaxoConstants).location - the points of the object.
The size of the array has to be equal to the point count of the object.
public static void addObjectType(int type,
String objectId)
type - The type of object to be created, has to be different from any
of the pre-defined types in JaxoConstants).objectId - The class name of the object of the given type.
This is used to instantiate the object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||