|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.organic.OutputRestriction
public abstract class OutputRestriction
OutputRestriction
s restrict the output area and the shape of a layout in conjunction
with organic layout algorithms such as SmartOrganicLayouter
or InteractiveOrganicLayouter
.
In consequence, all nodes need to be placed inside a specific restricted area.
SmartOrganicLayouter.setOutputRestriction(OutputRestriction)
,
InteractiveOrganicLayouter.setOutputRestriction(OutputRestriction)
Field Summary | |
---|---|
static OutputRestriction |
NONE
This OutputRestriction does not restrict the output by any means. |
Method Summary | |
---|---|
static OutputRestriction |
createAspectRatioRestriction(double ratio)
Creates an OutputRestriction that confines the layout result to a rectangular area which roughly complies
with the given aspect ratio. |
static OutputRestriction |
createCircularCageRestriction(double x,
double y,
double radius)
Creates an OutputRestriction that confines the layout result to a circle. |
static OutputRestriction |
createEllipticalCageRestriction(double x,
double y,
double w,
double h)
Creates an OutputRestriction that confines the layout result to an elliptical area. |
static OutputRestriction |
createRectangularCageRestriction(double x,
double y,
double w,
double h)
Creates an OutputRestriction that confines the layout to a rectangular area. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final OutputRestriction NONE
OutputRestriction
does not restrict the output by any means.
It is a no-op that can be used when the output area and shape of a layout should be unrestricted.
SmartOrganicLayouter.setOutputRestriction(OutputRestriction)
,
InteractiveOrganicLayouter.setOutputRestriction(OutputRestriction)
Method Detail |
---|
public static OutputRestriction createRectangularCageRestriction(double x, double y, double w, double h)
OutputRestriction
that confines the layout to a rectangular area.
This restriction rectangle is defined by the given coordinates and size values.
The values for height and width of the rectangle need to be greater than zero.
x
- the x-coordinate of the restriction rectangle's upper-left cornery
- the y-coordinate of the restriction rectangle's upper-left cornerw
- width of the restriction rectangleh
- height of the restriction rectangle
OutputRestriction
confining the layout to a rectangular area
java.lang.IllegalArgumentException
- if the given width or height is less than or equal to zeroSmartOrganicLayouter.setOutputRestriction(OutputRestriction)
,
InteractiveOrganicLayouter.setOutputRestriction(OutputRestriction)
Organic layout restricted to a rectangular area |
public static OutputRestriction createCircularCageRestriction(double x, double y, double radius)
OutputRestriction
that confines the layout result to a circle.
The actual restriction circle is defined by the given coordinates and radius.
The radius of the restriction circle needs to be greater than zero.
x
- the x-coordinate of the restriction circle's centery
- the y-coordinate of the restriction circle's centerradius
- the radius of the restriction circle
OutputRestriction
confining the layout to a circular area
java.lang.IllegalArgumentException
- if the given radius is less than or equal to zeroSmartOrganicLayouter.setOutputRestriction(OutputRestriction)
,
InteractiveOrganicLayouter.setOutputRestriction(OutputRestriction)
Organic layout restricted to a circular area |
public static OutputRestriction createEllipticalCageRestriction(double x, double y, double w, double h)
OutputRestriction
that confines the layout result to an elliptical area.
The restriction ellipse is defined by its bounding box specified by the given coordinates and size values.
The main axes of the ellipse are parallel to the coordinate axes.
The values for height and width of the ellipse's bounding box need to be greater than zero.
x
- the x-coordinate of the bounding box's upper left cornery
- the y-coordinate of the bounding box's upper left cornerw
- the width of the bounding boxh
- the height of the bounding box
OutputRestriction
confining the layout to an elliptical area
java.lang.IllegalArgumentException
- if the given width or height is 0
or negativeSmartOrganicLayouter.setOutputRestriction(OutputRestriction)
,
InteractiveOrganicLayouter.setOutputRestriction(OutputRestriction)
Organic layout restricted to an elliptical area |
public static OutputRestriction createAspectRatioRestriction(double ratio)
OutputRestriction
that confines the layout result to a rectangular area which roughly complies
with the given aspect ratio.
The aspect ratio is defined as the ratio between the width and the height of a layout.
The aspect ratio needs to be strictly positive.
ratio
- the preferred aspect ratio of the output
OutputRestriction
imposing the given aspect ratio on the layout
java.lang.IllegalArgumentException
- if the given aspect ratio is 0
or negativeSmartOrganicLayouter.setOutputRestriction(OutputRestriction)
,
InteractiveOrganicLayouter.setOutputRestriction(OutputRestriction)
Organic layout restricted to an area with aspect ratio 5 |
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |