lt.monarch.chart.engine
Interface ChartObjectsMap

All Known Implementing Classes:
NullChartObjectsMap, SimpleChartObjectsMap

public interface ChartObjectsMap


Nested Class Summary
Modifier and Type Interface and Description
static interface ChartObjectsMap.TaggedChartObject
           
 
Method Summary
Modifier and Type Method and Description
 void clear()
          Removes all chart objects
 void clearChartObject(StyleEditorEntity chartObject, AbstractPaintTags tag)
          Removes chart object & tag combination from map
 java.util.List<? extends ChartObjectsMap.TaggedChartObject> findAllObjectsAt(Point2D pt)
          Finds all chart objects & tags at the specified point.
 ChartObjectsMap.TaggedChartObject findChartObjectAt(Point2D pt)
          Finds a chart object & tag at the specified point.
 int generateNextId()
          Returns an id which will be valid until the last clear call.
 java.util.List<? extends ChartObjectsMap.TaggedChartObject> getAllObjects()
          Gets all chart objects & tags
 java.util.List<java.awt.Shape> getChartObjectShapes(StyleEditorEntity chartObject, AbstractPaintTags tag)
          Returns list of shapes for the specified chart object & tag.
 ChartObjectsMap.TaggedChartObject getObjectById(int id)
          Finds a chart object with specified id.
 void mapChartObject(StyleEditorEntity chartObject, AbstractPaintTags tag, java.awt.Shape shape)
          Maps the specified chart object & tag to the specified polygon.
 void mapChartObject(StyleEditorEntity chartObject, AbstractPaintTags tag, java.awt.Shape shape, int id)
          Maps the specified chart object & tag to the specified polygon.
 

Method Detail

clearChartObject

void clearChartObject(StyleEditorEntity chartObject,
                      AbstractPaintTags tag)
Removes chart object & tag combination from map

Parameters:
chartObject -
tag -

clear

void clear()
Removes all chart objects


mapChartObject

void mapChartObject(StyleEditorEntity chartObject,
                    AbstractPaintTags tag,
                    java.awt.Shape shape)
Maps the specified chart object & tag to the specified polygon.

Parameters:
chartObject - the chart object
tag - the paint tag
shape - the shape
id - id

mapChartObject

void mapChartObject(StyleEditorEntity chartObject,
                    AbstractPaintTags tag,
                    java.awt.Shape shape,
                    int id)
Maps the specified chart object & tag to the specified polygon.

Parameters:
chartObject - the chart object
tag - the paint tag
shape - the shape
id - id

findAllObjectsAt

java.util.List<? extends ChartObjectsMap.TaggedChartObject> findAllObjectsAt(Point2D pt)
Finds all chart objects & tags at the specified point. If no entity was found, returns null.

Parameters:
pt - the point
Returns:
all objects at the specified point if search was successful, null otherwise

getAllObjects

java.util.List<? extends ChartObjectsMap.TaggedChartObject> getAllObjects()
Gets all chart objects & tags

Returns:
all objects

findChartObjectAt

ChartObjectsMap.TaggedChartObject findChartObjectAt(Point2D pt)
Finds a chart object & tag at the specified point. If no entity was found, returns null.

Parameters:
pt - the point
Returns:
an object at the specified point if the search was successful, null otherwise

getChartObjectShapes

java.util.List<java.awt.Shape> getChartObjectShapes(StyleEditorEntity chartObject,
                                                    AbstractPaintTags tag)
Returns list of shapes for the specified chart object & tag.

Parameters:
chartObject - the chart object
tag - the paint tag
Returns:
list of shapes

getObjectById

ChartObjectsMap.TaggedChartObject getObjectById(int id)
Finds a chart object with specified id. If no entity was found, returns null.

Parameters:
id - id to search for
Returns:
an object with specified if the search was successful, null otherwise

generateNextId

int generateNextId()
Returns an id which will be valid until the last clear call.

Returns:
generated id