NextApp Echo2
v2.1.0

nextapp.echo2.app
Class Insets

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

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

A property which describes an "inset" within a rectangular region. This property is commonly used to specify margins of a Component relative to its container. Null values for top/left/right/bottom margins indicate a 0-pixel inset for that margin.

See Also:
Serialized Form

Constructor Summary
Insets(Extent size)
          Creates a new Insets object, defining all margins to be the provided value.
Insets(Extent horizontal, Extent vertical)
          Creates a new Insets object by defining values for the horizontal and vertical margins.
Insets(Extent left, Extent top, Extent right, Extent bottom)
          Creates a new Insets object with the given margin sizes.
Insets(int sizePx)
          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 leftPx, int topPx, int rightPx, int bottomPx)
          Creates a new Insets object with the given pixel margin sizes.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Extent getBottom()
          Returns the size of the bottom margin.
 Extent getLeft()
          Returns the size of the left margin.
 Extent getRight()
          Returns the size of the right margin.
 Extent getTop()
          Returns the size of the top margin.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Insets

public Insets(int leftPx,
              int topPx,
              int rightPx,
              int bottomPx)
Creates a new Insets object with the given pixel margin sizes.

Parameters:
leftPx - the size of the left margin in pixels
topPx - the size of the top margin in pixels
rightPx - the size of the right margin in pixels
bottomPx - the size of the bottom margin in pixels

Insets

public Insets(Extent left,
              Extent top,
              Extent right,
              Extent bottom)
Creates a new Insets object with the given margin sizes. Insets only supports Extents with fixed (i.e., not percent) units.

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 sizePx)
Creates a new Insets object, defining all margins to be the provided value.

Parameters:
sizePx - the margin size in pixels

Insets

public Insets(Extent size)
Creates a new Insets object, defining all margins to be the provided value. Insets only supports Extents with fixed (i.e., not percent) units.

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 in pixels
vertical - the size of the vertical (top and bottom) margins in pixels

Insets

public Insets(Extent horizontal,
              Extent 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

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getBottom

public Extent getBottom()
Returns the size of the bottom margin. Insets only supports Extents with fixed (i.e., not percent) units.

Returns:
the size of the bottom margin

getLeft

public Extent getLeft()
Returns the size of the left margin. Insets only supports Extents with fixed (i.e., not percent) units.

Returns:
the size of the left margin

getRight

public Extent getRight()
Returns the size of the right margin. Insets only supports Extents with fixed (i.e., not percent) units.

Returns:
the size of the right margin

getTop

public Extent getTop()
Returns the size of the top margin. Insets only supports Extents with fixed (i.e., not percent) units.

Returns:
the size of the top margin

NextApp Echo2
v2.1.0