|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.nav.fleet.graph.properties.AbstractProperty
com.kuka.nav.fleet.graph.properties.NodePosition
public class NodePosition
Represents the position of a node.
| Constructor Summary | |
|---|---|
NodePosition()
Creates a new node position property with value (0,0). |
|
NodePosition(double x,
double y)
Creates a new node position property with value (x, y). |
|
| Method Summary | |
|---|---|
double |
distanceTo(double x,
double y)
Calculates the distance to another position. |
double |
distanceTo(NodePosition pos)
Calculates the distance to another NodePosition. |
com.kuka.nav.Position |
get()
|
static NodePosition |
get(PropertyHolder n)
Helper function to get the NodePosition directly from a graph node. |
Collection<Integer> |
getAllowedTypes()
Returns the allowed robot type ids for this property. |
String |
getValueToDisplay()
Returns the value(s) in a way to show it in a UI. |
Double |
getX()
|
Double |
getY()
|
static NodePosition |
parse(String value)
Parses the node position from the given string. |
void |
set(double x,
double y)
Sets the coordinates of this position. |
static void |
set(PropertyHolder n,
double x,
double y)
Helper funtion to set the NodePosition directly of a graph node. |
void |
setX(Double x)
|
void |
setY(Double y)
|
String |
toString()
|
| Methods inherited from class com.kuka.nav.fleet.graph.properties.AbstractProperty |
|---|
equals, fireChanged, getId, hashCode, setId, tryGetParamFromString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NodePosition(double x,
double y)
x - The x-coordinate value.y - The y-coordinate value.public NodePosition()
| Method Detail |
|---|
public com.kuka.nav.Position get()
public Double getX()
public void setX(Double x)
x - the new x coordinatepublic Double getY()
public void setY(Double y)
y - the new y coordinate
public void set(double x,
double y)
x - the X-coordinate of the new positiony - the Y-coordinate of the new positionpublic String toString()
toString in class Objectpublic double distanceTo(NodePosition pos)
pos - the other NodePosition
public double distanceTo(double x,
double y)
x - the x-coordinate of another positiony - the y-coordinate of another position
public Collection<Integer> getAllowedTypes()
PropertyPropertyHolder.ROBOTTYPEALL)
is considered as a separate robot type. If all possible types are allowed
the returned collection is empty.
getAllowedTypes in interface PropertygetAllowedTypes in class AbstractPropertypublic static NodePosition get(PropertyHolder n)
n - the node
public static void set(PropertyHolder n,
double x,
double y)
n - the nodex - the X-coordinate of the new positiony - the Y-coordinate of the new positionpublic static NodePosition parse(String value)
value - The string representing a node position.
public String getValueToDisplay()
Property
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||