Class NamedSpatialSoure
- java.lang.Object
-
- repast.simphony.visualizationOGL2D.NamedSpatialSoure
-
- All Implemented Interfaces:
SpatialSource
public abstract class NamedSpatialSoure extends Object implements SpatialSource
Abstract base class for creating named shape spatials. Child classes need only implement createShape(NamedShapeCreator creator).- Author:
- Nick Collier
-
-
Field Summary
Fields Modifier and Type Field Description protected String
id
-
Fields inherited from interface repast.simphony.visualizationOGL2D.SpatialSource
KEY_BSQUARE_SIZE, KEY_HEIGHT, KEY_SCALE, KEY_WIDTH
-
-
Constructor Summary
Constructors Constructor Description NamedSpatialSoure(String id)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
createShape(saf.v3d.NamedShapeCreator creator)
String
getID()
Gets the unique name for this source.void
registerSource(saf.v3d.ShapeFactory2D shapeFactory, Map<String,String> props)
Registers this source with ShapeFactory2D.
-
-
-
Field Detail
-
id
protected String id
-
-
Constructor Detail
-
NamedSpatialSoure
public NamedSpatialSoure(String id)
-
-
Method Detail
-
getID
public String getID()
Description copied from interface:SpatialSource
Gets the unique name for this source.- Specified by:
getID
in interfaceSpatialSource
- Returns:
- the unique name for this source.
-
createShape
protected abstract void createShape(saf.v3d.NamedShapeCreator creator)
-
registerSource
public void registerSource(saf.v3d.ShapeFactory2D shapeFactory, Map<String,String> props) throws IOException
Description copied from interface:SpatialSource
Registers this source with ShapeFactory2D. After registering the source VSpatials can be retreived by name from the ShapeFactory2D.- Specified by:
registerSource
in interfaceSpatialSource
props
- a map containing properties (SpatialSource.WIDTH, etc.) that can be used in registering the source- Throws:
IOException
-
-