|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.ui.standard.tool.map.NavpointEditLayer
public class NavpointEditLayer
A map layer to allow the editing of navpoints.
Constructor Summary | |
---|---|
NavpointEditLayer(java.awt.Component displayComponent,
boolean drawNavNumbers)
Constructor |
Method Summary | |
---|---|
void |
addNavpointPosition(IntPoint newNavpointPosition)
Add a new navpoint position. |
void |
clearNavpointPositions()
Clear all navpoint positions. |
void |
clearSelectedNavpoint()
Clears the selected navpoint if any. |
void |
displayLayer(Coordinates mapCenter,
java.lang.String mapType,
java.awt.Graphics g)
Displays the layer on the map image. |
IntPoint |
getNavpointPosition(int index)
Gets a navpoint position at an index. |
int |
overNavIcon(int x,
int y)
Checks if an x,y position is over a navpoint flag. |
void |
selectNavpoint(int index)
Sets a navpoint at an index as selected. |
void |
setNavpointPosition(int index,
IntPoint newNavpointPosition)
Sets a navpoint position at a given index. |
boolean |
withinDisplayEdges(IntPoint newNavpointPosition)
Checks if navpoint position is within the display boundries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NavpointEditLayer(java.awt.Component displayComponent, boolean drawNavNumbers)
displayComponent
- the component displaying the map.drawNavNumbers
- display navpoint flag numbers?Method Detail |
---|
public void addNavpointPosition(IntPoint newNavpointPosition)
newNavpointPosition
- the navpoint position.public void clearNavpointPositions()
public IntPoint getNavpointPosition(int index)
index
- the navpoint position index.
public void setNavpointPosition(int index, IntPoint newNavpointPosition)
index
- the index to set the position.newNavpointPosition
- the position to set at the index.public boolean withinDisplayEdges(IntPoint newNavpointPosition)
newNavpointPosition
- the navpoint position to check.
public void selectNavpoint(int index)
index
- the index to select.public void clearSelectedNavpoint()
public int overNavIcon(int x, int y)
x
- the x positiony
- the y position
public void displayLayer(Coordinates mapCenter, java.lang.String mapType, java.awt.Graphics g)
displayLayer
in interface MapLayer
mapCenter
- the location of the center of the map.mapType
- the type of map.g
- graphics context of the map display.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |