|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.DefaultNodeLayout
public class DefaultNodeLayout
DefaultNodeLayout
is the default implementation of the NodeLayout
interface.
The layout information consists of the size and position of the node.
Field Summary | |
---|---|
protected double |
h
Holds the height of the NodeLayout bounds. |
protected double |
w
Holds the width of the NodeLayout bounds. |
protected double |
x
Holds the minimum x-coordinates of the NodeLayout bounds. |
protected double |
y
Holds the minimum y-coordinates of the NodeLayout bounds. |
Constructor Summary | |
---|---|
DefaultNodeLayout()
Creates a new DefaultNodeLayout instance with default settings. |
|
DefaultNodeLayout(double x,
double y,
double width,
double height)
Creates a new DefaultNodeLayout instance with the specified box. |
|
DefaultNodeLayout(NodeLayout layout)
Creates a new DefaultNodeLayout instance which copies the given NodeLayout . |
|
DefaultNodeLayout(YPoint location,
YDimension size)
Creates a new DefaultNodeLayout instance with given location and size. |
Method Summary | |
---|---|
double |
getHeight()
Returns the height of the node. |
double |
getWidth()
Returns the width of the node. |
double |
getX()
Returns the x-coordinate of the upper-left corner of the node. |
double |
getY()
Returns the y-coordinate of the upper-left corner of the node. |
void |
setCenter(double x,
double y)
Specifies the coordinates of the node's center. |
void |
setHeight(double height)
Specifies the height of the node. |
void |
setLocation(double x,
double y)
Sets the coordinates of the upper-left corner of the node. |
void |
setSize(double width,
double height)
Sets the size of the node. |
void |
setWidth(double width)
Specifies the width of the node. |
void |
setX(double x)
Specifies the x-coordinate of the upper-left corner of the node. |
void |
setY(double y)
Specifies the y-coordinate of the upper-left corner of the node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double x
NodeLayout
bounds.
protected double y
NodeLayout
bounds.
protected double w
NodeLayout
bounds.
protected double h
NodeLayout
bounds.
Constructor Detail |
---|
public DefaultNodeLayout()
DefaultNodeLayout
instance with default settings.
public DefaultNodeLayout(NodeLayout layout)
DefaultNodeLayout
instance which copies the given NodeLayout
.
layout
- the NodeLayout
that is copiedpublic DefaultNodeLayout(double x, double y, double width, double height)
DefaultNodeLayout
instance with the specified box.
x
- the absolute x-coordinate of the upper-left corner of the NodeLayout
y
- the absolute y-coordinate of the upper-left corner of the NodeLayout
width
- the width of the NodeLayout
height
- the height of the NodeLayout
public DefaultNodeLayout(YPoint location, YDimension size)
DefaultNodeLayout
instance with given location and size.
location
- the coordinates of the upper-left corner of the NodeLayout
size
- the size of the NodeLayout
Method Detail |
---|
public void setLocation(double x, double y)
NodeLayout
setLocation
in interface NodeLayout
x
- the new x-coordinate of the nodey
- the new y-coordinate of the nodepublic void setCenter(double x, double y)
x
- the absolute x-coordinate of the centery
- the absolute y-coordinate of the centerpublic void setSize(double width, double height)
NodeLayout
setSize
in interface NodeLayout
width
- the new width of the nodeheight
- the new height of the nodepublic void setHeight(double height)
The height of the node is the vertical distance the node spans.
height
- the height of the nodepublic void setWidth(double width)
The width of the node is the horizontal distance the node spans.
width
- the width of the nodepublic void setX(double x)
The location of the node is described by the coordinates of the upper-left corner of the node.
x
- the x-coordinate of the nodepublic void setY(double y)
The location of the node is described by the coordinates of the upper-left corner of the node.
y
- the y-coordinate of the nodepublic double getHeight()
The height of the node is the vertical distance the node spans.
getHeight
in interface NodeLayout
setHeight(double)
public double getWidth()
The width of the node is the horizontal distance the node spans.
getWidth
in interface NodeLayout
setWidth(double)
public double getX()
The location of the node is described by the coordinates of the upper-left corner of the node.
getX
in interface NodeLayout
setX(double)
public double getY()
The location of the node is described by the coordinates of the upper-left corner of the node.
getY
in interface NodeLayout
setY(double)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |