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 Object
cloneMutable()
boolean
equals(Object obj)
Checks whether two rect objects are equal.int
getBottomHeight()
int
getLeftWidth()
int
getRightWidth()
int
getTopHeight()
int
getTotalHeight()
int
getTotalWidth()
static InsetsImmutable
getZero()
int
hashCode()
void
set(int left, int right, int top, int bottom)
Set the inset values of this instance in window units.void
setBottomHeight(int bottom)
Set the bottom inset value of this instance in window units.void
setLeftWidth(int left)
Set the left inset value of this instance in window units.void
setRightWidth(int right)
Set the right inset value of this instance in window units.void
setTopHeight(int top)
Set the top inset value of this instance in window units.String
toString()
-
-
-
Method Detail
-
getZero
public static final InsetsImmutable getZero()
-
cloneMutable
public Object cloneMutable()
- Specified by:
cloneMutable
in interfaceWriteCloneable
-
getLeftWidth
public final int getLeftWidth()
- Specified by:
getLeftWidth
in interfaceInsetsImmutable
- Returns:
- left inset width in window units.
-
getRightWidth
public final int getRightWidth()
- Specified by:
getRightWidth
in interfaceInsetsImmutable
- Returns:
- right inset width in window units.
-
getTotalWidth
public final int getTotalWidth()
- Specified by:
getTotalWidth
in interfaceInsetsImmutable
- Returns:
- total width in window units, ie.
left_width + right_width
-
getTopHeight
public final int getTopHeight()
- Specified by:
getTopHeight
in interfaceInsetsImmutable
- Returns:
- top inset height in window units.
-
getBottomHeight
public final int getBottomHeight()
- Specified by:
getBottomHeight
in interfaceInsetsImmutable
- Returns:
- bottom inset height in window units.
-
getTotalHeight
public final int getTotalHeight()
- Specified by:
getTotalHeight
in 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:InsetsImmutable
Checks whether two rect objects are equal. Two instances ofInsets
are equal if the four integer values of the fieldsleft
,right
,top
, andbottom
are all equal.- Specified by:
equals
in interfaceInsetsImmutable
- Overrides:
equals
in classObject
- Returns:
true
if the two Insets are equal; otherwisefalse
.
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceInsetsImmutable
- Overrides:
hashCode
in classObject
-
-