|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkaapo.Observable
kaapo.project.DiagramComponentWrapper
kaapo.project.ElementWrapper
public class ElementWrapper
Wrapper class for elements. Element wrapper has information on the position and size of the elemenent.
Field Summary | |
---|---|
protected static double |
MIN_HEIGHT
|
protected static double |
MIN_WIDTH
|
Fields inherited from class kaapo.project.DiagramComponentWrapper |
---|
dcgraphics, dComponent, inConnections, outConnections |
Constructor Summary | |
---|---|
ElementWrapper(Element dc,
double x,
double y)
|
Method Summary | |
---|---|
double |
getCenterX()
Returns the x coordinate of the center of the element wrapper. |
double |
getCenterY()
Returns the y coordinate of the center of the element wrapper. |
double |
getHeight()
Returns the height of the element wrapper. |
double |
getWidth()
Returns the width of the element wrapper. |
double |
getX()
Returns the x coordinate. |
double |
getY()
Returns the y coordinate. |
void |
moveXY(double changeX,
double changeY,
Selection selection)
Moves the element wrapper and the connected connection wrappers. |
void |
setHeight(double height)
Sets the height of the element wrapper. |
void |
setSize(double width,
double height)
Sets the size of the element wrapper. |
void |
setWidth(double width)
Sets the width of the element wrapper. |
void |
setX(double x)
Sets the x coordinate. |
void |
setXY(double x,
double y)
Sets the location of the element wrapper. |
void |
setY(double y)
Sets the y coordinate. |
Methods inherited from class kaapo.project.DiagramComponentWrapper |
---|
addConnection, canMove, canResize, getDCGraphics, getDiagramComponent, getInConnections, getOutConnections, reinstateConnections, removeAllConnections, removeConnection |
Methods inherited from class kaapo.Observable |
---|
addObserver, notifyObservers, notifyObservers, removeAllObservers, removeObserver, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final double MIN_WIDTH
protected static final double MIN_HEIGHT
Constructor Detail |
---|
public ElementWrapper(Element dc, double x, double y)
Method Detail |
---|
public double getHeight()
public void setHeight(double height)
height
- The new heightpublic double getWidth()
public void setWidth(double width)
width
- The new widthpublic double getX()
public void setX(double x)
x
- New x coordinatepublic double getY()
public void setY(double y)
y
- New y coordinatepublic void setXY(double x, double y)
x
- New x coordinatey
- New y coordinatepublic void setSize(double width, double height)
width
- New widthheight
- New heightpublic double getCenterX()
public double getCenterY()
public void moveXY(double changeX, double changeY, Selection selection)
moveXY
in class DiagramComponentWrapper
changeX
- the value to add to the x coordinatechangeY
- the value to add to the y coordinateselection
- all the moved DiagramComponents
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |