Class AbstractK2DElementFactory
java.lang.Object
com.kheops.jmap.client.graphics2D.AbstractK2DElementFactory
- All Implemented Interfaces:
K2DElementFactory
,Serializable
- See Also:
-
Field Summary
Fields inherited from interface com.kheops.jmap.client.graphics2D.K2DElementFactory
serialVersionUID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract K2DElement
createElement
(Geometry geometry, Object[] values, long id, int elementType) Creates a new instance of K2DElement based on the specified element type.abstract int
getDefaultType
(int geometryType) Returns the element type that this element factory will create for the specified geometry type.abstract int[]
getSupportedTypes
(int geometryType) Returns all element types that this element factory can create for the specified geometry type.void
setLayerInfo
(LayerInfo layerInfo)
-
Constructor Details
-
AbstractK2DElementFactory
public AbstractK2DElementFactory()
-
-
Method Details
-
createElement
public abstract K2DElement createElement(Geometry geometry, Object[] values, long id, int elementType) throws IllegalArgumentException Description copied from interface:K2DElementFactory
Creates a new instance of K2DElement based on the specified element type. That new element will be initialized will use the specified id, geometry and attributes.- Specified by:
createElement
in interfaceK2DElementFactory
- Parameters:
geometry
- the element geoemtry.values
- element attributes.id
- the element unique id.elementType
- the element type to create.- Returns:
- a newly created K2DElement.
- Throws:
IllegalArgumentException
-
getSupportedTypes
public abstract int[] getSupportedTypes(int geometryType) Description copied from interface:K2DElementFactory
Returns all element types that this element factory can create for the specified geometry type.- Specified by:
getSupportedTypes
in interfaceK2DElementFactory
- Parameters:
geometryType
- a geometry type.- Returns:
- an array of element types.
-
getDefaultType
public abstract int getDefaultType(int geometryType) Description copied from interface:K2DElementFactory
Returns the element type that this element factory will create for the specified geometry type.- Specified by:
getDefaultType
in interfaceK2DElementFactory
- Parameters:
geometryType
- a geometry type.- Returns:
- the element type.
-
setLayerInfo
-
getLayerInfo
-