com.threerings.opengl.gui.util
Class Insets

java.lang.Object
  extended by com.threerings.opengl.gui.util.Insets

public class Insets
extends Object

Represents insets from the edges of a component.


Field Summary
 int bottom
          The inset from the bottom edge.
 int left
          The inset from the left edge.
 int right
          The inset from the right edge.
 int top
          The inset from the top edge.
static Insets ZERO_INSETS
          A convenient set of blank insets.
 
Constructor Summary
Insets()
           
Insets(Insets other)
           
Insets(int left, int top, int right, int bottom)
           
 
Method Summary
 Insets add(Insets insets)
          Returns insets which are the sum of these insets with the specified insets.
 boolean equals(Object other)
           
 int getHorizontal()
          Returns the sum of the horizontal insets.
 int getVertical()
          Returns the sum of the vertical insets.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO_INSETS

public static final Insets ZERO_INSETS
A convenient set of blank insets.


left

public int left
The inset from the left edge.


top

public int top
The inset from the top edge.


right

public int right
The inset from the right edge.


bottom

public int bottom
The inset from the bottom edge.

Constructor Detail

Insets

public Insets(int left,
              int top,
              int right,
              int bottom)

Insets

public Insets(Insets other)

Insets

public Insets()
Method Detail

getHorizontal

public int getHorizontal()
Returns the sum of the horizontal insets.


getVertical

public int getVertical()
Returns the sum of the vertical insets.


add

public Insets add(Insets insets)
Returns insets which are the sum of these insets with the specified insets. Note: if either insets are all zeros, the other set will be returned directly rather than creating a new insets instance.


equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.