Class DefaultK2DElementFactory

java.lang.Object
com.kheops.jmap.client.graphics2D.DefaultK2DElementFactory
All Implemented Interfaces:
K2DElementFactory, Serializable

public class DefaultK2DElementFactory extends Object implements K2DElementFactory
DefaultK2DElementFactory is the default K2DElement factory used in JMap.
See Also:
  • Method Details

    • getInstance

      public static DefaultK2DElementFactory getInstance()
      Returns the unique instance of DefaultK2DElementFactory.
      Returns:
      the unique instance of DefaultK2DElementFactory.
    • createElement

      public K2DElement createElement(Geometry geometry, Object[] attributes, long id, int elementType)
      Creates a new K2DElement using the specified parameters.
      Specified by:
      createElement in interface K2DElementFactory
      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:
      getSupportedTypes in interface K2DElementFactory
      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:
      getDefaultType in interface K2DElementFactory
      Parameters:
      geometryType - the geometry type.
      Returns:
      the default element type.
      See Also: