org.netbeans.lib.awtextra
Class AbsoluteConstraints

java.lang.Object
  extended by org.netbeans.lib.awtextra.AbsoluteConstraints
All Implemented Interfaces:
java.io.Serializable

public class AbsoluteConstraints
extends java.lang.Object
implements java.io.Serializable

An object that encapsulates position and (optionally) size for Absolute positioning of components.

See Also:
AbsoluteLayout, Serialized Form

Field Summary
 int height
          The height of the component or -1 if the component's preferred height should be used
 int width
          The width of the component or -1 if the component's preferred width should be used
 int x
          The X position of the component
 int y
          The Y position of the component
 
Constructor Summary
AbsoluteConstraints(int x, int y)
          Creates a new AbsoluteConstraints for specified position.
AbsoluteConstraints(int x, int y, int width, int height)
          Creates a new AbsoluteConstraints for specified position and size.
AbsoluteConstraints(java.awt.Point pos)
          Creates a new AbsoluteConstraints for specified position.
AbsoluteConstraints(java.awt.Point pos, java.awt.Dimension size)
          Creates a new AbsoluteConstraints for specified position and size.
 
Method Summary
 int getHeight()
          DOCUMENT ME!
 int getWidth()
          DOCUMENT ME!
 int getX()
          DOCUMENT ME!
 int getY()
          DOCUMENT ME!
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public int x
The X position of the component


y

public int y
The Y position of the component


width

public int width
The width of the component or -1 if the component's preferred width should be used


height

public int height
The height of the component or -1 if the component's preferred height should be used

Constructor Detail

AbsoluteConstraints

public AbsoluteConstraints(java.awt.Point pos)
Creates a new AbsoluteConstraints for specified position.

Parameters:
pos - The position to be represented by this AbsoluteConstraints

AbsoluteConstraints

public AbsoluteConstraints(int x,
                           int y)
Creates a new AbsoluteConstraints for specified position.

Parameters:
x - The X position to be represented by this AbsoluteConstraints
y - The Y position to be represented by this AbsoluteConstraints

AbsoluteConstraints

public AbsoluteConstraints(java.awt.Point pos,
                           java.awt.Dimension size)
Creates a new AbsoluteConstraints for specified position and size.

Parameters:
pos - The position to be represented by this AbsoluteConstraints
size - The size to be represented by this AbsoluteConstraints or null if the component's preferred size should be used

AbsoluteConstraints

public AbsoluteConstraints(int x,
                           int y,
                           int width,
                           int height)
Creates a new AbsoluteConstraints for specified position and size.

Parameters:
x - The X position to be represented by this AbsoluteConstraints
y - The Y position to be represented by this AbsoluteConstraints
width - The width to be represented by this AbsoluteConstraints or -1 if the component's preferred width should be used
height - The height to be represented by this AbsoluteConstraints or -1 if the component's preferred height should be used
Method Detail

getX

public int getX()
DOCUMENT ME!

Returns:
The X position represented by this AbsoluteConstraints

getY

public int getY()
DOCUMENT ME!

Returns:
The Y position represented by this AbsoluteConstraints

getWidth

public int getWidth()
DOCUMENT ME!

Returns:
The width represented by this AbsoluteConstraints or -1 if the component's preferred width should be used

getHeight

public int getHeight()
DOCUMENT ME!

Returns:
The height represented by this AbsoluteConstraints or -1 if the component's preferred height should be used

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!