public final class JaxoObjectFactory
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addObjectType(int type,
java.lang.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,
java.awt.Point[] location)
Creates a new JaxoObject, initialized with values taken from the
Preferences . |
static JaxoObject |
newObject(java.lang.String objectId)
Returns a new instance of a JaxoObject.
|
public static JaxoObject newObject(int type)
type
- The type of object to be created,
as defined in JaxoConstants
).public static JaxoObject newObject(java.lang.String objectId)
objectId
- The class name of the object to be instantiated.public static JaxoObject newObject(int type, java.awt.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, java.lang.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.Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.