|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.tabular.NodeLayoutDescriptor
public class NodeLayoutDescriptor
This class is used by TabularLayouter
to provide placement details for nodes during the layout process.
It allows to configure layout settings individually for each node of the input graph.
A NodeLayoutDescriptor
can be specified individually for single nodes using a
DataProvider
that returns a descriptor instance for the node, or
null
if no individual descriptor is bound to a node. In the latter case,
the default descriptor
is used.
The DataProvider
must be registered with the graph with
key TabularLayouter.NODE_LAYOUT_DESCRIPTOR_DPKEY
.
TabularLayouter.NODE_LAYOUT_DESCRIPTOR_DPKEY
,
TabularLayouter.setDefaultNodeLayoutDescriptor(NodeLayoutDescriptor)
Constructor Summary | |
---|---|
NodeLayoutDescriptor()
|
Method Summary | |
---|---|
NodeLayoutDescriptor |
createCopy()
Creates a copy of this descriptor instance. |
double |
getHorizontalAlignment()
Returns the horizontal alignment of the node within its column. |
double |
getVerticalAlignment()
Returns the vertical alignment of the node within its row. |
void |
setHorizontalAlignment(double horizontalAlignment)
Specifies the horizontal alignment of the node within its column. |
void |
setVerticalAlignment(double verticalAlignment)
Specifies the vertical alignment of the node within its row. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeLayoutDescriptor()
Method Detail |
---|
public double getVerticalAlignment()
All nodes of the same row will be aligned according to their vertical alignment setting.
0.0
corresponds to top-alignment.0.5
corresponds to center-alignment.1.0
corresponds to bottom-alignment.
The vertical alignment value must be within [0,1]
.
[0,1]
setVerticalAlignment(double)
public void setVerticalAlignment(double verticalAlignment)
All nodes of the same row will be aligned according to their vertical alignment setting.
0.0
corresponds to top-alignment.0.5
corresponds to center-alignment.1.0
corresponds to bottom-alignment.
The vertical alignment value must be within [0,1]
.
verticalAlignment
- the vertical alignment value in interval [0,1]
java.lang.IllegalArgumentException
- if the given value is not within interval [0,1]
Nodes in the first row are top-aligned, nodes in the second row are center-aligned, nodes in the third row are bottom-aligned. |
public double getHorizontalAlignment()
All nodes of the same column will be aligned according to their horizontal alignment setting.
0.0
corresponds to left-alignment.0.5
corresponds to center-alignment.1.0
corresponds to right-alignment.
The horizontal alignment value must be within [0,1]
.
[0,1]
setHorizontalAlignment(double)
public void setHorizontalAlignment(double horizontalAlignment)
All nodes of the same column will be aligned according to their horizontal alignment setting.
0.0
corresponds to left-alignment.0.5
corresponds to center-alignment.1.0
corresponds to right-alignment.
The horizontal alignment value must be within [0,1]
.
horizontalAlignment
- the horizontal alignment value in interval [0,1]
java.lang.IllegalArgumentException
- if the given value is not within interval [0,1]
Nodes in the first column are left-aligned, nodes in the second column are center-aligned, nodes in the third column are right-aligned. |
public NodeLayoutDescriptor createCopy()
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |