Search this API

y.layout
Interface NodeLayout

All Known Implementing Classes:
DefaultNodeLayout, GenericGroupNodeRealizer, GenericNodeRealizer, Graph2DNodeRealizer, GroupNodeRealizer, ImageNodeRealizer, NodeRealizer, ProxyAutoBoundsNodeRealizer, ProxyShapeNodeRealizer, ShapeNodeRealizer, TableGroupNodeRealizer

public interface NodeLayout

A NodeLayout encapsulates the layout information for a node.

The layout information consists of the size and position of the node.

 

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 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.
 

Method Detail

getX

double getX()
Returns the x-coordinate of the upper-left corner of the node.

The location of the node is described by the coordinates of the upper-left corner of the node.

Returns:
the x-coordinate of the node

getY

double getY()
Returns the y-coordinate of the upper-left corner of the node.

The location of the node is described by the coordinates of the upper-left corner of the node.

Returns:
the y-coordinate of the node

getWidth

double getWidth()
Returns the width of the node.

The width of the node is the horizontal distance the node spans.

Returns:
the width of the node

getHeight

double getHeight()
Returns the height of the node.

The height of the node is the vertical distance the node spans.

Returns:
the height of the node

setLocation

void setLocation(double x,
                 double y)
Sets the coordinates of the upper-left corner of the node.

Parameters:
x - the new x-coordinate of the node
y - the new y-coordinate of the node

setSize

void setSize(double width,
             double height)
Sets the size of the node.

Parameters:
width - the new width of the node
height - the new height of the node

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.