borland Packages Class Hierarchy jbcl.layout Package Index
java.lang.Object +----borland.jbcl.layout.XYConstraints
Constructors Properties Methods
Implements Serializable, Cloneable
The XYConstraints object is the constraint object created when a component is added to an XYLayout. The constraints are the x and y coordinates that position the upper-left corner of the control relative to the container, and the width and height of the control.
See also: XYLayout
public XYConstraints()Constructs an XYConstraints object.
public XYConstraints(int x, int y, int width, int height)Constructs an XYConstraints object using the constraints passed to this constructor.
Parameters:
public int getHeight() public void setHeight(int height)Stores the height of the control in pixels. The height of the control added to the container in pixels. A value less than or equal to 0 means that the control's preferred height is used.
public int getWidth() public void setWidth(int width)Stores the width of the control in pixels. The width of the control added to the container in pixels. A value less than or equal to 0 means that the control's preferred width is used.
public int getX() public void setX(int x)Stores the distance from the left side of the container in pixels.
public int getY() public void setY(int y)Stores the distance from the top of the container in pixels.
public Object clone()Creates a copy of this XYConstraints object. The constraints are identical in both XYConstraints objects.
Overrides: java.lang.Object.clone()
public boolean equals(java.lang.Object that)Compares another XYConstraints object to this one. equals() returns true if the objects are equal; otherwise, equals() returns false.
Parameters:
Overrides: java.lang.Object.equals(Object)
public int hashCode()Returns the hashcode for this XYConstraints.
Overrides: java.lang.Object.hashCode()
public String toString()Returns a string that displays constraint values. This is the returned string:
"XYConstraints[" + x + "," + y + "," + width + "," + height + "]"
where x is the distance from the left edge of the container, y is the distance from the top of the container, width is the width of the control, and height is the height of the control. All of these values are in pixels.
Overrides: java.lang.Object.toString()