Class AbstractK2DElementFactory

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

public abstract class AbstractK2DElementFactory extends Object implements K2DElementFactory
See Also:
  • 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 interface K2DElementFactory
      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 interface K2DElementFactory
      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 interface K2DElementFactory
      Parameters:
      geometryType - a geometry type.
      Returns:
      the element type.
    • setLayerInfo

      public void setLayerInfo(LayerInfo layerInfo)
    • getLayerInfo

      public LayerInfo getLayerInfo()