|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.terrain.LOSGenerator
public class LOSGenerator
The LOSGenerator uses gestures to create a mask over the map. The circular mask of green pixels shows what places are within the sight of the center of the circle. Additional height can be added to the center of the circle via the TerrainLayer palette, to represent a tower, building, or aircraft.
Field Summary | |
---|---|
protected boolean |
cancelled
Set when the projection has changed while a swing worker is gathering graphics, and we want him to stop early. |
protected OMGraphicList |
graphics
|
protected ProgressSupport |
progressSupport
|
protected com.bbn.openmap.layer.terrain.LOSStateMachine |
stateMachine
|
Fields inherited from interface com.bbn.openmap.layer.terrain.TerrainTool |
---|
MAX_SPACE_BETWEEN_PIXELS |
Constructor Summary | |
---|---|
LOSGenerator(TerrainLayer tLayer)
The creation of the tool starts here. |
Method Summary | |
---|---|
void |
addLOSEvent(java.awt.event.MouseEvent event)
Used to modify the circle parameters with another mouse event. |
void |
addProgressListener(ProgressListener list)
Add a ProgressListener that will display build progress. |
protected double |
calculateLOSslope(LatLonPoint cord,
double arc_dist)
CalculateLOSslope figures out the slope from the pixel to the center, in radians. |
void |
clearProgressListeners()
Clear all progress listeners. |
void |
createLOSImage()
Takes the member settings and manages the creation of the image. |
void |
doImage()
|
protected void |
fireProgressUpdate(int type,
java.lang.String task,
int frameNumber,
int totalFrames)
Fire an build update to progress listeners. |
OMGraphicList |
getGraphics()
Get the current list of graphics from the tool. |
State |
getState()
Get the current state from the state machine of the tool. |
void |
init()
Tell the tool to initialize. |
boolean |
isCancelled()
Check to see if the cancelled flag has been set. |
void |
removeProgressListener(ProgressListener list)
Remove a ProgressListener that displayed build progress. |
void |
reset()
Without arguments, the reset() call makes both graphics go offscreen in their smallest size. |
void |
reset(boolean circ,
boolean image)
Circ is for the circle to be reset, and image is for the image to be reset. |
protected void |
resolveImagePoint(int x,
int y,
int[] newPixels,
float[] azimuthVals,
int range,
float pix_arc_interval,
boolean mark,
int colorForMark)
Calculates the color for each pixel. |
void |
setCancelled(boolean set)
Used to set the cancelled flag in the layer. |
void |
setCenter(java.awt.event.MouseEvent event)
Called when the circle is started. |
void |
setLOSobjectHeight(int value)
Sets the new object height to use at the center of the circle. |
void |
setScreenParameters(Projection p)
Called on every getRectangle, in order to let the cache get sized right, and to reset the graphics if the scale changed (since they won't make sense. |
protected void |
workerComplete()
The TerrainWorker calls this method on the layer when it is done working. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected com.bbn.openmap.layer.terrain.LOSStateMachine stateMachine
protected OMGraphicList graphics
protected boolean cancelled
protected ProgressSupport progressSupport
Constructor Detail |
---|
public LOSGenerator(TerrainLayer tLayer)
Method Detail |
---|
public OMGraphicList getGraphics()
TerrainTool
getGraphics
in interface TerrainTool
public State getState()
TerrainTool
getState
in interface TerrainTool
public void init()
TerrainTool
init
in interface TerrainTool
public void doImage()
protected void workerComplete()
public void setCancelled(boolean set)
public boolean isCancelled()
public void reset()
reset
in interface TerrainTool
public void reset(boolean circ, boolean image)
public void setScreenParameters(Projection p)
setScreenParameters
in interface TerrainTool
public void createLOSImage()
protected void resolveImagePoint(int x, int y, int[] newPixels, float[] azimuthVals, int range, float pix_arc_interval, boolean mark, int colorForMark)
protected double calculateLOSslope(LatLonPoint cord, double arc_dist)
public void setCenter(java.awt.event.MouseEvent event)
event
- mouse event where the circle should be started.public void addLOSEvent(java.awt.event.MouseEvent event)
public void setLOSobjectHeight(int value)
value
- height of the object in meters.public void addProgressListener(ProgressListener list)
public void removeProgressListener(ProgressListener list)
public void clearProgressListeners()
protected void fireProgressUpdate(int type, java.lang.String task, int frameNumber, int totalFrames)
frameNumber
- the current frame counttotalFrames
- the total number of frames.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |