com.droplets.api
Class Insets

java.lang.Object
  |
  +--com.droplets.api.Insets

public class Insets
extends java.lang.Object

A simple class of data objects used to set the insets property of components. All components are laid out using logic equivalent to that of java.awt.GridBagLayout. See the API documentation for that class for more detail.


Constructor Summary
Insets(int top, int left, int bottom, int right)
          Constructs a new Insets object.
 
Method Summary
 boolean equals(java.lang.Object o)
          Tests this object for equality with another.
 int getBottom()
          Gets the number of pixels to leave between the bottom of the component and the bottom of its display area.
 int getLeft()
          Gets the number of pixels to leave between the left of the component and the left of its display area.
 int getRight()
          Gets the number of pixels to leave between the right of the component and the right of its display area.
 int getTop()
          Gets the number of pixels to leave between the top of the component and the top of its display area.
 void setBottom(int value)
          Sets the number of pixels to leave between the bottom of the component and the bottom of its display area.
 void setLeft(int value)
          Sets the number of pixels to leave between the left of the component and the left of its display area.
 void setRight(int value)
          Sets the number of pixels to leave between the right of the component and the right of its display area.
 void setTop(int value)
          Sets the number of pixels to leave between the top of the component and the top of its display area.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Insets

public Insets(int top,
              int left,
              int bottom,
              int right)
Constructs a new Insets object.
Parameters:
top - pixels to leave in between the top of the component and the top of its display area
left - pixels to leave on the left
bottom - pixels to leave on the bottom
right - pixels to leave on the right
Method Detail

getTop

public int getTop()
Gets the number of pixels to leave between the top of the component and the top of its display area.
Returns:
the number of pixels

getLeft

public int getLeft()
Gets the number of pixels to leave between the left of the component and the left of its display area.
Returns:
the number of pixels

getBottom

public int getBottom()
Gets the number of pixels to leave between the bottom of the component and the bottom of its display area.
Returns:
the number of pixels

getRight

public int getRight()
Gets the number of pixels to leave between the right of the component and the right of its display area.
Returns:
the number of pixels

setTop

public void setTop(int value)
Sets the number of pixels to leave between the top of the component and the top of its display area.
Parameters:
value - the number of pixels

setLeft

public void setLeft(int value)
Sets the number of pixels to leave between the left of the component and the left of its display area.
Parameters:
value - the number of pixels

setBottom

public void setBottom(int value)
Sets the number of pixels to leave between the bottom of the component and the bottom of its display area.
Parameters:
value - the number of pixels

setRight

public void setRight(int value)
Sets the number of pixels to leave between the right of the component and the right of its display area.
Parameters:
value - the number of pixels

equals

public boolean equals(java.lang.Object o)
Tests this object for equality with another. Two Insets are equal if all four member variables are equal.
Overrides:
equals in class java.lang.Object
Parameters:
o - another object
Returns:
true if they're logically equal, otherwise false


Copyright © Droplets, 2001. All Rights Reserved.