|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.view.Bend
This class represents a control point of a visual edge.
Each bend belongs to at most one edge. Edges may have more than one
bend. Bends can be interpreted in different ways, depending on the
EdgeRealizer
they belong to.
Since a bend without edge realizer makes not much sense, it is the resonsibility of an edge realizer to create bends.
Constructor Summary | |
protected |
Bend(EdgeRealizer er,
double xpos,
double ypos)
Instantiates a new Bend at the given location. |
Method Summary | |
boolean |
contains(double x,
double y)
Whether or not the given coordinates lie within this bend. |
Edge |
getEdge()
Returns the edge this bend belongs to. |
double |
getX()
Returns the absolute x-coordinate of this bend. |
double |
getY()
Returns the absolute y-coordinate of this bend. |
boolean |
isInBox(double x,
double y,
double width,
double height)
Whether or not this bend is inside of the box defined by the given arguments. |
boolean |
isSelected()
Whether or not this beend is in a selected state. |
void |
moveBy(double dx,
double dy)
Moves the location of this bend by (dx,dy) .
|
void |
paint(Graphics2D gfx)
Paints this bend on the given graphics context. |
static void |
paintDefaultBend(Graphics2D gfx,
double x,
double y)
Paints a default bend at the given center location. |
static void |
paintDefaultBend(Graphics2D gfx,
double x,
double y,
Color c)
Paints a default bend at the given center location. |
void |
setLocation(double newX,
double newY)
Sets the absolute location of this bend to the given coordinates. |
void |
setSelected(boolean s)
Sets the selected state of this bend. |
String |
toString()
Returns a string representation of this bend, namely it's coords. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected Bend(EdgeRealizer er, double xpos, double ypos)
Method Detail |
public Edge getEdge()
public void setLocation(double newX, double newY)
public void moveBy(double dx, double dy)
(dx,dy)
.
the owning edge realizer will be informed that the
bend has been moved.
bendChanged
public double getX()
public double getY()
public boolean isSelected()
public void setSelected(boolean s)
public boolean contains(double x, double y)
public boolean isInBox(double x, double y, double width, double height)
true
iff this bend is inside the box.public void paint(Graphics2D gfx)
public static void paintDefaultBend(Graphics2D gfx, double x, double y)
public static void paintDefaultBend(Graphics2D gfx, double x, double y, Color c)
public String toString()
toString
in class Object
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |