Class DefaultK2DElementFactory
java.lang.Object
com.kheops.jmap.client.graphics2D.DefaultK2DElementFactory
- All Implemented Interfaces:
K2DElementFactory,Serializable
DefaultK2DElementFactory is the default K2DElement factory used in JMap.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateElement(Geometry geometry, Object[] attributes, long id, int elementType) Creates a new K2DElement using the specified parameters.intgetDefaultType(int geometryType) Returns the default element type associated to the specified geometry type.static DefaultK2DElementFactoryReturns the unique instance of DefaultK2DElementFactory.int[]getSupportedTypes(int geometryType) Returns all supported element types for the specified geometry type.
-
Method Details
-
getInstance
Returns the unique instance of DefaultK2DElementFactory.- Returns:
- the unique instance of DefaultK2DElementFactory.
-
createElement
Creates a new K2DElement using the specified parameters.- Specified by:
createElementin interfaceK2DElementFactory- Parameters:
geometry- the geometry that will be used to create the new element.attributes- element bound attributes.id- the element id.elementType- the new element type.- Returns:
- the newly created element.
-
getSupportedTypes
public int[] getSupportedTypes(int geometryType) Returns all supported element types for the specified geometry type.- Specified by:
getSupportedTypesin interfaceK2DElementFactory- Parameters:
geometryType- the geometry type.- Returns:
- all supported element types.
- See Also:
-
getDefaultType
public int getDefaultType(int geometryType) Returns the default element type associated to the specified geometry type.- Specified by:
getDefaultTypein interfaceK2DElementFactory- Parameters:
geometryType- the geometry type.- Returns:
- the default element type.
- See Also:
-