Package com.jogamp.nativewindow.util
Class Insets
- java.lang.Object
-
- com.jogamp.nativewindow.util.Insets
-
- All Implemented Interfaces:
WriteCloneable,InsetsImmutable,Cloneable
public class Insets extends Object implements Cloneable, InsetsImmutable
Mutable insets representing rectangular window decoration insets on all four edges in window units.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectcloneMutable()booleanequals(Object obj)Checks whether two rect objects are equal.intgetBottomHeight()intgetLeftWidth()intgetRightWidth()intgetTopHeight()intgetTotalHeight()intgetTotalWidth()static InsetsImmutablegetZero()inthashCode()voidset(int left, int right, int top, int bottom)Set the inset values of this instance in window units.voidsetBottomHeight(int bottom)Set the bottom inset value of this instance in window units.voidsetLeftWidth(int left)Set the left inset value of this instance in window units.voidsetRightWidth(int right)Set the right inset value of this instance in window units.voidsetTopHeight(int top)Set the top inset value of this instance in window units.StringtoString()
-
-
-
Method Detail
-
getZero
public static final InsetsImmutable getZero()
-
cloneMutable
public Object cloneMutable()
- Specified by:
cloneMutablein interfaceWriteCloneable
-
getLeftWidth
public final int getLeftWidth()
- Specified by:
getLeftWidthin interfaceInsetsImmutable- Returns:
- left inset width in window units.
-
getRightWidth
public final int getRightWidth()
- Specified by:
getRightWidthin interfaceInsetsImmutable- Returns:
- right inset width in window units.
-
getTotalWidth
public final int getTotalWidth()
- Specified by:
getTotalWidthin interfaceInsetsImmutable- Returns:
- total width in window units, ie.
left_width + right_width
-
getTopHeight
public final int getTopHeight()
- Specified by:
getTopHeightin interfaceInsetsImmutable- Returns:
- top inset height in window units.
-
getBottomHeight
public final int getBottomHeight()
- Specified by:
getBottomHeightin interfaceInsetsImmutable- Returns:
- bottom inset height in window units.
-
getTotalHeight
public final int getTotalHeight()
- Specified by:
getTotalHeightin interfaceInsetsImmutable- Returns:
- total height in window units, ie.
top_height + bottom_height
-
set
public final void set(int left, int right, int top, int bottom)Set the inset values of this instance in window units.- Parameters:
left- left inset width in window units.right- right inset width in window units.top- top inset width in window units.bottom- bottom inset width in window units.
-
setLeftWidth
public final void setLeftWidth(int left)
Set the left inset value of this instance in window units.- Parameters:
left- left inset width in window units.
-
setRightWidth
public final void setRightWidth(int right)
Set the right inset value of this instance in window units.- Parameters:
right- right inset width in window units.
-
setTopHeight
public final void setTopHeight(int top)
Set the top inset value of this instance in window units.- Parameters:
top- top inset width in window units.
-
setBottomHeight
public final void setBottomHeight(int bottom)
Set the bottom inset value of this instance in window units.- Parameters:
bottom- bottom inset width in window units.
-
equals
public boolean equals(Object obj)
Description copied from interface:InsetsImmutableChecks whether two rect objects are equal. Two instances ofInsetsare equal if the four integer values of the fieldsleft,right,top, andbottomare all equal.- Specified by:
equalsin interfaceInsetsImmutable- Overrides:
equalsin classObject- Returns:
trueif the two Insets are equal; otherwisefalse.
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceInsetsImmutable- Overrides:
hashCodein classObject
-
-