|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.omGraphics.geom.BasicGeometry | +--com.bbn.openmap.omGraphics.OMGraphic | +--com.bbn.openmap.layer.location.Location | +--com.bbn.openmap.layer.location.URLRasterLocation | +--com.bbn.openmap.graphicLoader.scenario.ScenarioPoint
A ScenarioPoint is a ScenarioGraphic representing an object on the map. It takes TimeStamps and works out its location for a specific time, or it can also represent its plan for the entire scenario. If the URL provided for the point is not available, it will describe itself as an OMPoint. ScenarioPoint is a Location, however, so any location marker OMGraphic can be used. Make sure setGraphicLocations is updated if the marker OMGraphic is something other than OMPoint or OMRaster.
Field Summary | |
protected boolean |
DEBUG
|
protected int |
pathStep
The resolution of segments to use for interpolating between activity points. |
protected int |
radius
The radius of OMPoints, if icons are not found. |
Fields inherited from class com.bbn.openmap.layer.location.URLRasterLocation |
SPACING |
Fields inherited from class com.bbn.openmap.layer.location.Location |
allowDecluttering, currentFontDescent, DECLUTTER_ANYWHERE, DECLUTTER_LOCALLY, declutterLimit, DEFAULT_SPACING, details, handler, horizontalLabelBuffer, label, lat, location, lon, name, origXLabelOffset, origYLabelOffset, showLocation, showName, x, xOffset, y, yOffset |
Fields inherited from class com.bbn.openmap.omGraphics.OMGraphic |
declutterType, displayPaint, edgeMatchesFill, fillPaint, hasLabel, linePaint, matted, mattingPaint, renderType, selected, selectPaint, showEditablePalette, stroke, textureMask |
Fields inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry |
APP_OBJECT_KEY, appObject, ATT_MAP_KEY, lineType, needToRegenerate, shape, visible |
Constructor Summary | |
ScenarioPoint(java.lang.String name,
java.lang.String iconURL)
Create a ScenarioLocation at a latitude/longtude location. |
|
ScenarioPoint(java.lang.String name,
java.net.URL iconURL)
Create a ScenarioLocation at a latitude/longtude location. |
Method Summary | |
void |
addTimeStamp(TimeStamp timeStamp)
Add a TimeStamp to the point. |
void |
clearTimeStamps()
Clear all time stamps. |
boolean |
generate(Projection p)
Prepare the graphic for rendering. |
void |
generateSnapshot(Projection p,
long time)
Prepare the ScenarioPoint to be rendered in its position at a certain time. |
void |
generateTotalScenario(Projection p)
Prepare the ScenarioPoint to render its entire scenario performance. |
protected void |
init()
|
boolean |
removeTimeStamp(TimeStamp timeStamp)
Remove a location at a certain time. |
void |
render(java.awt.Graphics g)
Paint the graphic and the name of the location. |
void |
setGraphicLocations(float latitude,
float longitude)
Given a new latitude/longitude, reposition the graphic and label. |
void |
setPosition(long time)
Given a time, figure out the location. |
boolean |
thisIsYou(java.lang.String n)
Checks the internal name against the given string. |
Methods inherited from class com.bbn.openmap.layer.location.URLRasterLocation |
getIconRaster, getIconRaster, getIconRaster, getIconRaster, getIconRaster, getIconRaster, getIconRasterURL, setGraphicLocations, setGraphicLocations |
Methods inherited from class com.bbn.openmap.layer.location.Location |
convertCoordinateString, declutterLabel, distance, generate, getDeclutterLimit, getDetails, getHorizontalLabelBuffer, getLabel, getLocationHandler, getLocationMarker, getName, isAllowDecluttering, isShowLocation, isShowName, main, renderLocation, renderName, setAllowDecluttering, setDeclutterLimit, setDetails, setHorizontalLabelBuffer, setLabel, setLocation, setLocation, setLocation, setLocation, setLocationHandler, setLocationMarker, setLocationPaint, setName, setShowLocation, setShowName, showDetails |
Methods inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry |
_distance, appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, checkAttributeMap, checkAttributeMap, clearAttributes, contains, createAttributeMap, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, draw, fill, getAppObject, getAppObject, getAttribute, getAttributeMap, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, replaceAppObjectWithAttributeMap, setAppObject, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setVisible |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.bbn.openmap.omGraphics.OMGeometry |
clearAttributes, contains, draw, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setVisible |
Field Detail |
protected int radius
protected int pathStep
protected boolean DEBUG
Constructor Detail |
public ScenarioPoint(java.lang.String name, java.lang.String iconURL)
name
- the identifier for the location.iconURL
- a string to a URL for an imagepublic ScenarioPoint(java.lang.String name, java.net.URL iconURL)
name
- the identifier for the location.iconURL
- a URL for an imageMethod Detail |
protected void init()
public boolean thisIsYou(java.lang.String n)
thisIsYou
in interface ScenarioGraphic
public void addTimeStamp(TimeStamp timeStamp)
addTimeStamp
in interface ScenarioGraphic
public boolean removeTimeStamp(TimeStamp timeStamp)
ScenarioGraphic
removeTimeStamp
in interface ScenarioGraphic
public void clearTimeStamps()
ScenarioGraphic
clearTimeStamps
in interface ScenarioGraphic
public void setPosition(long time)
public void generateSnapshot(Projection p, long time)
generateSnapshot
in interface ScenarioGraphic
public void setGraphicLocations(float latitude, float longitude)
setGraphicLocations
in class URLRasterLocation
public void generateTotalScenario(Projection p)
generateTotalScenario
in interface ScenarioGraphic
public boolean generate(Projection p)
Location
render()
! If a vector graphic has
lat-lon components, then we project these vertices into x-y
space. For raster graphics we prepare in a different fashion.
If the generate is unsuccessful, it's usually because of some
oversight, (for instance if proj
is null), and
if debugging is enabled, a message may be output to the
controlling terminal.
generate
in interface OMGeometry
generate
in class Location
p
- Projection
public void render(java.awt.Graphics g)
Location
This paints the graphic into the Graphics context. This is
similar to paint()
function of
java.awt.Components. Note that if the graphic has not been
generated, it will not be rendered. This render will take into
account the layer showNames and showLocations settings.
render
in class Location
g
- Graphics context to render into.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |