|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.engine.HotSpotMap
lt.monarch.chart.engine.SimpleHotSpotMap
public class SimpleHotSpotMap extends HotSpotMap
A simple hot spot map, which accepts all hot spot mappings and stores them. It can then find a mapped chart entity at a desired point (x,y)
| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleHotSpotMap.HotSpot
A simple hot spot, which maps some chart entity to some rectangle or polygon. |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<SimpleHotSpotMap.HotSpot> |
map
array of chart entities mappings to polygons or rectangles. |
| Constructor and Description |
|---|
SimpleHotSpotMap()
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all chart objects |
void |
clearEntity(ChartEntity entity)
Removes the specified chart entity and all it's child entities from the hot spot map. |
java.util.List<ChartEntity> |
findAllEntitiesAt(Point2D pt)
Finds all mapped entities at the specified point. |
java.lang.Object[] |
findEntitiesInside(java.awt.Rectangle r)
Finds a chart entities that are inside of the given area. |
java.lang.Object[] |
findEntitiesIntersecting(java.awt.Rectangle r)
Finds a chart entities that intersect with the given area. |
ChartEntity |
findEntityAt(Point2D pt)
Finds a chart entity at the specified point. |
Point2D |
getEntityPosition(ChartEntity entity)
Returns a position of the specified chart entity. |
java.awt.Shape |
getEntityShape(ChartEntity chartEntity)
Returns the entity shape according to the entity. |
java.awt.Shape |
getEntityShape(Point2D pt)
Returns the entity shape according to the point. |
ChartEntity |
getObjectById(int id)
Finds a chart object with specified id. |
void |
mapEntity(ChartEntity entity,
Point2D pt)
Maps the specified chart entity to the specified point. |
void |
mapEntity(ChartEntity entity,
Rectangle2D rectangle)
Maps the specified chart entity to the specified rectangle. |
void |
mapEntity(ChartEntity entity,
java.awt.Shape shape)
Maps the specified chart entity to the specified polygon. |
void |
mapEntity(ChartEntity entity,
java.awt.Shape shape,
int id)
Maps the polygon to the entity. |
protected void |
mapEntity(SimpleHotSpotMap.HotSpot spot)
Puts the specified HotSpot to the mappings array. |
| Methods inherited from class lt.monarch.chart.engine.HotSpotMap |
|---|
contains |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.util.ArrayList<SimpleHotSpotMap.HotSpot> map
| Constructor Detail |
|---|
public SimpleHotSpotMap()
| Method Detail |
|---|
public void clearEntity(ChartEntity entity)
clearEntity in class HotSpotMapentity - the entity to removepublic void clear()
clear in class HotSpotMapprotected void mapEntity(SimpleHotSpotMap.HotSpot spot)
HotSpot to the mappings array.
spot - the HotSpot
public void mapEntity(ChartEntity entity,
java.awt.Shape shape)
mapEntity in class HotSpotMapentity - the chart entityshape - the shape
public void mapEntity(ChartEntity entity,
Rectangle2D rectangle)
mapEntity in class HotSpotMapentity - the entityrectangle - the rectangle
public void mapEntity(ChartEntity entity,
Point2D pt)
mapEntity in class HotSpotMapentity - the entitypt - the pointpublic Point2D getEntityPosition(ChartEntity entity)
getEntityPosition in class HotSpotMapentity - the chart entitypublic ChartEntity findEntityAt(Point2D pt)
null.
findEntityAt in class HotSpotMappt - the pointnull
otherwisepublic java.util.List<ChartEntity> findAllEntitiesAt(Point2D pt)
findAllEntitiesAt in class HotSpotMappt - search pointpublic java.lang.Object[] findEntitiesIntersecting(java.awt.Rectangle r)
r - Rectangle where to look for chart entities.public java.awt.Shape getEntityShape(Point2D pt)
HotSpotMap
getEntityShape in class HotSpotMappt - point of shapepublic java.lang.Object[] findEntitiesInside(java.awt.Rectangle r)
r - Rectangle where to look for chart entities.public java.awt.Shape getEntityShape(ChartEntity chartEntity)
HotSpotMap
getEntityShape in class HotSpotMapchartEntity - entitypublic ChartEntity getObjectById(int id)
HotSpotMapnull.
getObjectById in class HotSpotMapid - id to search fornull
otherwise
public void mapEntity(ChartEntity entity,
java.awt.Shape shape,
int id)
HotSpotMap
mapEntity in class HotSpotMapentity - entity to be mappedshape - shapeid - id
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||