|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.hierarchic.incremental.SwimLaneDescriptor
public class SwimLaneDescriptor
This class is used by HierarchicLayouter during the various
phases to associate swim lanes with each node.
Each node should be associated with a SwimLaneDescriptor instance;
nodes in the same lane may share one instance.
The results of the calculation of the geometry of the swim lanes will be placed
into the instances of this class after the layout.
It can be bound to the layout algorithm using the
HierarchicLayouter.SWIMLANE_DESCRIPTOR_DPKEY DataProvider key.
This class is designed as a class to allow for future additions of new getter
methods.
HierarchicLayouter.SWIMLANE_DESCRIPTOR_DPKEY![]() |
![]() |
| Constructor Summary | |
|---|---|
SwimLaneDescriptor(Comparable clientObject)
Creates a new swim lane descriptor with an associated client object. |
|
SwimLaneDescriptor(Object clientObject,
Comparator cmp)
Creates a new swim lane descriptor using the given client object and comparator. |
|
| Method Summary | |
|---|---|
int |
compareTo(Object o)
Implements the Comparable interface using the getComparator() and
getClientObject() fields. |
Object |
getClientObject()
Returns the client object. |
Comparator |
getComparator()
Returns the comparator that is used for sorting the lanes. |
int |
getComputedLaneIndex()
Returns the computed zero-based index of the lane after the layout has been calculated. |
double |
getComputedLanePosition()
Returns the computed position (smaller coordinate) of the lane after the layout has been calculated. |
double |
getComputedLaneWidth()
Returns the computed width of the lane after the layout has been calculated. |
double |
getLaneTightness()
Returns the tightness factor of the lane. |
double |
getLeftLaneInset()
Returns the left lane inset where no element will lie in the resulting drawing. |
double |
getMinimumLaneWidth()
Returns the minimum lane width. |
double |
getRightLaneInset()
Returns the right lane inset where no element will lie in the resulting drawing. |
void |
setClientObject(Object o)
Sets the client object. |
void |
setComparator(Comparator c)
Sets the comparator used for sorting the lanes. |
void |
setLaneTightness(double tightness)
Sets the tightness factor of the lane. |
void |
setLeftLaneInset(double inset)
Sets the left lane inset where no element will lie in the resulting drawing. |
void |
setMinimumLaneWidth(double laneWidth)
Sets the minimum width of the lane. |
void |
setRightLaneInset(double inset)
Sets the right lane inset where no element will lie in the resulting drawing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SwimLaneDescriptor(Comparable clientObject)
clientObject - an object provided by the client that will be used
for determining the order of the lanes.
public SwimLaneDescriptor(Object clientObject,
Comparator cmp)
clientObject - a client object used for sorting the lanescmp - a Comparator used for comparing the client objects.| Method Detail |
|---|
public void setClientObject(Object o)
o - the new objectpublic Object getClientObject()
public void setLaneTightness(double tightness)
0.0d will disable compression of the lane.
A value of 1.0d will try to force the lane to be of
its minimum width.
IllegalArgumentException - if tightness is out of the valid rangetightness - the tightness of the lane [0.0d .. 1.0d]public double getLaneTightness()
0.0d.
setLaneTightness(double)public void setComparator(Comparator c)
c - the comparatorpublic Comparator getComparator()
public double getMinimumLaneWidth()
0.0d.
public void setMinimumLaneWidth(double laneWidth)
laneWidth - the new widthpublic double getLeftLaneInset()
0.0d.
public double getRightLaneInset()
0.0d.
public void setLeftLaneInset(double inset)
inset - the new insetpublic void setRightLaneInset(double inset)
inset - the new insetpublic double getComputedLanePosition()
public double getComputedLaneWidth()
public int getComputedLaneIndex()
public int compareTo(Object o)
getComparator() and
getClientObject() fields.
compareTo in interface Comparable
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||