Package com.jogamp.nativewindow.util
Class Insets
java.lang.Object
com.jogamp.nativewindow.util.Insets
- All Implemented Interfaces:
com.jogamp.common.type.WriteCloneable,InsetsImmutable,Cloneable
Mutable insets representing rectangular window decoration insets on all four edges
in window units.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether two rect objects are equal.final intfinal intfinal intfinal intfinal intfinal intstatic final InsetsImmutablegetZero()inthashCode()final voidset(int left, int right, int top, int bottom) Set the inset values of this instance in window units.final voidsetBottomHeight(int bottom) Set the bottom inset value of this instance in window units.final voidsetLeftWidth(int left) Set the left inset value of this instance in window units.final voidsetRightWidth(int right) Set the right inset value of this instance in window units.final voidsetTopHeight(int top) Set the top inset value of this instance in window units.toString()
-
Constructor Details
-
Insets
public Insets() -
Insets
public Insets(int left, int right, int top, int bottom)
-
-
Method Details
-
getZero
-
cloneMutable
- Specified by:
cloneMutablein interfacecom.jogamp.common.type.WriteCloneable
-
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
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
-
toString
-