public class MissionPoint extends Object
Modifier and Type | Field and Description |
---|---|
protected Color |
color |
static Color |
COLORMINE |
static Color |
COLORMINESELECTED |
static Color |
COLORPOINT |
static Color |
COLORPOINT2 |
static Color |
COLORPOINTSELECTED |
static Color |
COLORTEXT |
static Color |
COLORTEXTBGD |
static Color |
COLORWATCHRADIUS |
protected Object |
commnd
Mission command to which this point applies
|
protected double |
depth
Depth below the surface of the represented point
|
protected int |
index
Index of the mission command to which this point applies
|
protected NumberFormat |
nf
To print point positions
|
static int |
POINTHEIGHT |
static float |
POINTHIGHLIGHWIDTH |
static float |
POINTLINEWIDTH |
protected String |
pointType
Type of point a this object represents
|
static String |
POINTTYPE_COMPOSITEWAYPOINT |
static String |
POINTTYPE_HOVER |
static String[] |
POINTTYPE_LIST |
static String |
POINTTYPE_MINE |
static String |
POINTTYPE_POSITION |
static String |
POINTTYPE_WAYPOINT |
static int |
POINTWIDTH |
protected int |
standoff
Standoff distance from point, used in waypoint nodes
|
static int |
TEXTOFFSETX |
static int |
TEXTOFFSETY |
protected Point2D |
xyPosit
2D representation of the point's horizontal (x, y) position
|
Constructor and Description |
---|
MissionPoint()
Creates a new instance of MissionPoint
|
MissionPoint(Point2D p)
Creates a new instance of MissionPoint
|
MissionPoint(Point2D p,
double z)
Creates a new instance of MissionPoint
|
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics2D gArea,
MissionToJava2DCoord m2j,
boolean flagSelected,
boolean showText,
boolean showWatchRadius)
draws the point in the 2D mission viewer
|
void |
draw(Graphics2D gArea,
MissionToJava2DCoord m2j,
boolean flagSelected,
boolean showText,
boolean showWatchRadius,
boolean showRealTime) |
void |
draw(Graphics2D gArea,
MissionToJava2DCoord m2j,
boolean flagSelected,
boolean showText,
boolean showWatchRadius,
boolean showRealTime,
boolean inFocus) |
void |
draw(Graphics2D gArea,
MissionToJava2DCoord m2j,
boolean flagSelected,
boolean showTextLabels,
boolean showWatchRadius,
boolean showRealTime,
boolean inFocus,
boolean isFirst) |
double |
getDepth()
gets the depth of the represented position
|
String |
getDescription() |
double |
getMaxEasting(MissionToJava2DCoord m2j) |
double |
getMaxNorthing(MissionToJava2DCoord m2j)
For zooming the map
|
double |
getMinEasting(MissionToJava2DCoord m2j) |
double |
getMinNorthing(MissionToJava2DCoord m2j) |
Point2D |
getPos()
Returns the (x, y) position represented
|
int |
getWatchStandOff() |
boolean |
isSelected(double mouseX,
double mouseY,
MissionToJava2DCoord m2j)
Check whether a user mouse click is close enough to a point to consider it selected
|
void |
setDepth(int aDep)
set depth
|
void |
setDescription(String description) |
void |
setImage2D(String image)
Provides a method that inheriting classes can over-ride to provide an icon for use
in drawing.
|
void |
setPos(int x,
int y)
Moves the point to a new location
|
void |
setPos(int x,
int y,
double z)
Moves the point to a new location
|
void |
setPos(Point2D p)
Moves the point to a new location
|
void |
setPos(Point2D p,
double z)
Moves the point to a new location
|
void |
setValue(MissionPoint mp)
Overwrites all fields with those of another MissionPoint (makes a copy)
|
void |
setWatchStandOff(int i) |
public static final String POINTTYPE_HOVER
public static final String POINTTYPE_POSITION
public static final String POINTTYPE_WAYPOINT
public static final String POINTTYPE_COMPOSITEWAYPOINT
public static final String POINTTYPE_MINE
public static final String[] POINTTYPE_LIST
public static final int POINTWIDTH
public static final int POINTHEIGHT
public static final float POINTLINEWIDTH
public static final float POINTHIGHLIGHWIDTH
public static final Color COLORMINE
public static final Color COLORMINESELECTED
public static final Color COLORPOINT
public static final Color COLORPOINT2
public static final Color COLORPOINTSELECTED
public static final Color COLORTEXT
public static final Color COLORTEXTBGD
public static final Color COLORWATCHRADIUS
public static int TEXTOFFSETX
public static int TEXTOFFSETY
protected Point2D xyPosit
protected double depth
protected int index
protected Object commnd
protected int standoff
protected String pointType
protected NumberFormat nf
protected Color color
public MissionPoint()
public MissionPoint(Point2D p)
p
- 2D (x, y) position of this MissionPointpublic MissionPoint(Point2D p, double z)
p
- 2D (x, y) position of this MissionPointz
- depth to be assigned to this pointpublic final void setPos(Point2D p)
p
- representing the new (x, y) positionpublic void setPos(Point2D p, double z)
p
- representing the new (x, y) positionpublic void setPos(int x, int y, double z)
x
- x position of new (x, y, z) positiony
- y position of new (x, y, z) positionz
- z position of new (x, y, z) positionpublic void setPos(int x, int y)
x
- x position of new (x, y, z) positiony
- y position of new (x, y, z) positionpublic double getMaxNorthing(MissionToJava2DCoord m2j)
public double getMinNorthing(MissionToJava2DCoord m2j)
public double getMaxEasting(MissionToJava2DCoord m2j)
public double getMinEasting(MissionToJava2DCoord m2j)
public void setValue(MissionPoint mp)
mp
- to be copiedpublic Point2D getPos()
public void setDepth(int aDep)
aDep
- numeric valuepublic double getDepth()
public void setWatchStandOff(int i)
public int getWatchStandOff()
public void setImage2D(String image)
public void draw(Graphics2D gArea, MissionToJava2DCoord m2j, boolean flagSelected, boolean showText, boolean showWatchRadius)
gArea
- drawing canvasm2j
- coordinate translatorflagSelected
- is it selectedshowText
- to draw text?showWatchRadius
- to draw StandOff distance?public void draw(Graphics2D gArea, MissionToJava2DCoord m2j, boolean flagSelected, boolean showText, boolean showWatchRadius, boolean showRealTime)
public void draw(Graphics2D gArea, MissionToJava2DCoord m2j, boolean flagSelected, boolean showText, boolean showWatchRadius, boolean showRealTime, boolean inFocus)
public void draw(Graphics2D gArea, MissionToJava2DCoord m2j, boolean flagSelected, boolean showTextLabels, boolean showWatchRadius, boolean showRealTime, boolean inFocus, boolean isFirst)
public boolean isSelected(double mouseX, double mouseY, MissionToJava2DCoord m2j)
mouseX
- mouse cursor X coordinatesmouseY
- mouse cursor Y coordinatesm2j
- coordinate translatorpublic String getDescription()
public void setDescription(String description)
description
- the description to set