nextapp.echo
Class Insets

java.lang.Object
  extended by nextapp.echo.Insets
All Implemented Interfaces:
java.io.Serializable

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

Contains information about a component's margins. Insets may be used with components such as Panels, Grid.Cells and ContentPanes.

See Also:
Serialized Form

Constructor Summary
Insets()
           
Insets(int size)
          Creates a new Insets object, defining all margins to be the provided value.
Insets(int horizontal, int vertical)
          Creates a new Insets object by defining values for the horizontal and vertical margins.
Insets(int left, int top, int right, int bottom)
          Creates a new Insets object with the given margin sizes (in pixels).
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getBottom()
          Returns the size of the bottom margin.
 int getLeft()
          Returns the size of the left margin.
 int getRight()
          Returns the size of the right margin.
 int getTop()
          Returns the size of the top margin.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Insets

public Insets()

Insets

public Insets(int left,
              int top,
              int right,
              int bottom)
Creates a new Insets object with the given margin sizes (in pixels).

Parameters:
left - The size of the left margin.
top - The size of the top margin.
right - The size of the right margin.
bottom - The size of the bottom margin.

Insets

public Insets(int size)
Creates a new Insets object, defining all margins to be the provided value.

Parameters:
size - The margin size.

Insets

public Insets(int horizontal,
              int vertical)
Creates a new Insets object by defining values for the horizontal and vertical margins.

Parameters:
horizontal - The size of the horizontal (left and right) margins.
vertical - The size of the vertical (top and bottom) margins.
Method Detail

getBottom

public int getBottom()
Returns the size of the bottom margin.

Returns:
The size of the bottom margin.

getLeft

public int getLeft()
Returns the size of the left margin.

Returns:
The size of the left margin.

getRight

public int getRight()
Returns the size of the right margin.

Returns:
The size of the right margin.

getTop

public int getTop()
Returns the size of the top margin.

Returns:
The size of the top margin.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object