|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.LabelLayoutData
public class LabelLayoutData
This class encapsulates layout data for a label. The data is used
by clients to inform label aware layouters about labeling constraints like label size and
preferred placement. Label aware layouters like HierarchicLayouter
on the other hand return the calculated label positions by assigning the
corresponding bounds to the passed in label layout data.
LabelLayoutKeys.
| Field Summary |
|---|
| Fields inherited from interface y.layout.LabelLayoutConstants |
|---|
PLACE_ANYWHERE, PLACE_AT_CENTER, PLACE_AT_SOURCE, PLACE_AT_TARGET, PLACE_LEFT_OF_EDGE, PLACE_ON_EDGE, PLACE_RIGHT_OF_EDGE, PLACEMENT_ALONG_EDGE_MASK, PLACEMENT_ON_SIDE_OF_EDGE_MASK |
| Fields inherited from interface y.layout.LabelLayoutKeys |
|---|
EDGE_LABEL_LAYOUT_KEY, NODE_LABEL_LAYOUT_KEY |
| Constructor Summary | |
|---|---|
LabelLayoutData(double width,
double height)
Creates a new instance of LabelLayoutData. |
|
LabelLayoutData(double width,
double height,
byte preferredPlacement)
Creates a new instance of LabelLayoutData. |
|
| Method Summary | |
|---|---|
YRectangle |
getBounds()
Returns the bounds of the label. |
double |
getHeight()
Returns the height of the label. |
byte |
getPreferredPlacement()
Returns the preferred placement for this label. |
double |
getWidth()
Returns the width of the label. |
double |
getX()
Returns the x-coordinate of the label's upper-left corner. |
double |
getY()
Returns the y-coordinate of the label's upper-left corner. |
void |
setBounds(YRectangle bounds)
Sets the bounds of the label. |
void |
setLocation(double x,
double y)
Sets the coordinates of the upper-left corner of the label. |
void |
setPreferredPlacement(byte placement)
Sets the preferred placement for this label. |
void |
setSize(double width,
double height)
Sets the size of the label. |
String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LabelLayoutData(double width,
double height)
LabelLayoutConstants.PLACE_ANYWHERE is used
as preferred placement specifier.
width - the width of the labelheight - the height of the label
public LabelLayoutData(double width,
double height,
byte preferredPlacement)
width - the width of the labelheight - the height of the labelpreferredPlacement - a preferred placement specifierLabelLayoutConstants,
setPreferredPlacement(byte)| Method Detail |
|---|
public void setBounds(YRectangle bounds)
public YRectangle getBounds()
public void setSize(double width,
double height)
public double getWidth()
public double getHeight()
public void setLocation(double x,
double y)
public double getX()
public double getY()
public void setPreferredPlacement(byte placement)
placement - one of LabelLayoutConstants.PLACE_ANYWHERE, LabelLayoutConstants.PLACE_AT_SOURCE,
LabelLayoutConstants.PLACE_AT_TARGET, or LabelLayoutConstants.PLACE_AT_CENTER.LabelLayoutConstantspublic byte getPreferredPlacement()
LabelLayoutConstants.PLACE_ANYWHERE, LabelLayoutConstants.PLACE_AT_SOURCE,
LabelLayoutConstants.PLACE_AT_TARGET, or LabelLayoutConstants.PLACE_AT_CENTER.LabelLayoutConstantspublic String toString()
toString in class Object
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||