|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.latdraw.diagram.Vertex
public class Vertex
This holds the position of an element in 3 formats: 3d raw, 3d normalized, and a 2d projection. In the 3d normalized form the z coordinate lies in [0, 1] and the projection to the x-y plane lies in the circle of radius 1/2. Also various force imformation is stored here.
| Field Summary | |
|---|---|
static int |
AUTOMATIC
Label positionsr. |
static int |
BOTTOM
|
static int |
CENTER
|
static int |
LEFT
|
static int |
RIGHT
|
static int |
TOP
|
| Constructor Summary | |
|---|---|
Vertex(POElem e)
|
|
| Method Summary | |
|---|---|
void |
adjustForce(double dx,
double dy)
|
java.lang.Object |
clone()
|
static double |
correlation(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2)
|
java.awt.Color |
getColor()
|
java.lang.String |
getLabel()
|
java.awt.Color |
getLabelBackgroundColor()
|
java.awt.Font |
getLabelFont()
May return null in which case the default should be used. |
java.awt.Color |
getLabelForegroundColor()
|
int |
getLabelPosition()
Get the label position which is one of the constants AUTOMATIC, LEFT, RIGHT, TOP, BOTTOM, or CENTER. |
double |
getNormalizedX()
|
double |
getNormalizedY()
|
double |
getNormalizedZ()
|
double |
getProjectedX()
|
double |
getProjectedY()
|
java.awt.geom.Point2D |
getProjection()
|
POElem |
getUnderlyingElem()
|
java.lang.Object |
getUnderlyingObject()
Get the underlyingObject (the label) of the underlying POElem. |
java.lang.String |
getUnderlyingObjectlabel()
|
double |
getX()
|
double |
getY()
|
double |
getZ()
|
int |
index()
The index in the linear extension of the ordered set. |
boolean |
isFilled()
|
boolean |
isHighlighted()
|
boolean |
isJoinIrreducible()
|
boolean |
isLabelPainted()
|
boolean |
isMeetIrreducible()
|
void |
project2d(double angle)
|
void |
project2d(double cos,
double sin)
|
void |
reset()
|
void |
setColor(java.awt.Color c)
|
void |
setFilled(boolean v)
|
void |
setHighlighted(boolean v)
|
void |
setHorizontalLocationFromDrag(double delta,
double angle)
This is for horizontal movements only. |
void |
setLabel(java.lang.String v)
|
void |
setLabelBackgroundColor(java.awt.Color c)
|
void |
setLabelFont(java.awt.Font v)
|
void |
setLabelForgeroundColor(java.awt.Color c)
|
void |
setLabelPainted(boolean v)
|
void |
setLabelPosition(int v)
Set the label position to be one of the constants AUTOMATIC, LEFT, RIGHT, TOP, BOTTOM, or CENTER. |
void |
setLocationFromDrag(double deltaH,
double deltaV,
double angle)
|
protected void |
setNormalizedCoords()
|
protected void |
setNormalizedCoords(double scaleFactor)
|
void |
setUseOrderForLabel(boolean v)
|
void |
setX(double v)
|
void |
setY(double v)
|
void |
setZ(double v)
|
java.lang.String |
toString()
|
void |
update()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int AUTOMATIC
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
public static final int CENTER
| Constructor Detail |
|---|
public Vertex(POElem e)
| Method Detail |
|---|
public POElem getUnderlyingElem()
public int index()
public void setUseOrderForLabel(boolean v)
public boolean isJoinIrreducible()
public boolean isMeetIrreducible()
public java.lang.String getLabel()
public java.lang.String getUnderlyingObjectlabel()
public void setLabel(java.lang.String v)
public int getLabelPosition()
public void setLabelPosition(int v)
public java.awt.Color getColor()
public void setColor(java.awt.Color c)
public boolean isFilled()
public void setFilled(boolean v)
public boolean isHighlighted()
public void setHighlighted(boolean v)
public boolean isLabelPainted()
public void setLabelPainted(boolean v)
public java.awt.Font getLabelFont()
public void setLabelFont(java.awt.Font v)
public java.awt.Color getLabelForegroundColor()
public void setLabelForgeroundColor(java.awt.Color c)
public java.awt.Color getLabelBackgroundColor()
public void setLabelBackgroundColor(java.awt.Color c)
public double getX()
public void setX(double v)
public double getY()
public void setY(double v)
public double getZ()
public void setZ(double v)
public double getNormalizedX()
public double getNormalizedY()
public double getNormalizedZ()
public java.lang.Object getUnderlyingObject()
public java.awt.geom.Point2D getProjection()
public double getProjectedX()
public double getProjectedY()
public void reset()
public void update()
public static double correlation(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2)
public void adjustForce(double dx,
double dy)
protected void setNormalizedCoords()
protected void setNormalizedCoords(double scaleFactor)
public void project2d(double angle)
public void project2d(double cos,
double sin)
public void setLocationFromDrag(double deltaH,
double deltaV,
double angle)
public void setHorizontalLocationFromDrag(double delta,
double angle)
delta - the horizontal movement in lat coordiantes in the
2d projection.public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||