|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.Bend
public class 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.
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)
Returns whether or not the given coordinates lie within this bend. |
Edge |
getEdge()
Returns the edge this bend belongs to. |
EdgeRealizer |
getRealizer()
Returns the visual representation of 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)
Returns whether or not this bend is inside the box defined by the given arguments. |
boolean |
isSelected()
Returns whether or not this bend is in a selected state. |
void |
moveBy(double dx,
double dy)
Moves the location of this bend by (dx,dy) . |
void |
paint(java.awt.Graphics2D gfx)
Paints this bend on the given graphics context. |
static void |
paintDefaultBend(java.awt.Graphics2D gfx,
double x,
double y)
Paints a default bend at the given center location. |
static void |
paintDefaultBend(java.awt.Graphics2D gfx,
double x,
double y,
java.awt.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. |
java.lang.String |
toString()
Returns a string representation of this bend, namely its coordinates. |
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 EdgeRealizer getRealizer()
EdgeRealizer
instance this bend belongs to.public void setLocation(double newX, double newY)
bendChanged
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)
(5,5)
.
true
iff the given coordinates lie within this bend;
false
otherwise.public boolean isInBox(double x, double y, double width, double height)
true
iff this bend is inside the box.public void paint(java.awt.Graphics2D gfx)
public static void paintDefaultBend(java.awt.Graphics2D gfx, double x, double y)
public static void paintDefaultBend(java.awt.Graphics2D gfx, double x, double y, java.awt.Color c)
public java.lang.String toString()
toString
in class java.lang.Object
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |