borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.layout
java.lang.Object +----borland.jbcl.layout.XYConstraints
Constructors Properties Methods
Implements 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)Retrieves and sets the height of the control in pixels.
Parameters:
public int getWidth() public void setWidth(int width)Retrieves and sets the width of the control in pixels.
Parameters:
public int getX() public void setX(int x)Retrieves and sets the distance from the left side of the container in pixels.
Parameters:
public int getY() public void setY(int y)Retrieves and sets the distance from the top of the container in pixels.
Parameters:
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()