Top Description Fields Constructors Methods
com.jogamp.nativewindow.util

public Class Insets

extends Object
implements Cloneable, InsetsImmutable
Class Inheritance
All Implemented Interfaces
com.jogamp.nativewindow.util.InsetsImmutable, com.jogamp.common.type.WriteCloneable, java.lang.Cloneable

Mutable insets representing rectangular window decoration insets on all four edges in window units.

Field Summary

Modifier and TypeField and Description
private int
b

private int
l

private int
r

private int
t

pack-priv static final InsetsImmutable

Constructor Summary

AccessConstructor and Description
public
public
Insets(final int left, final int right, final int top, final int bottom)

Method Summary

Modifier and TypeMethod and Description
protected Object
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.
public Object
cloneMutable()

Implements com.jogamp.common.type.WriteCloneable.cloneMutable.

Get a mutable clone from this instance.
public boolean
equals(final Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Implements com.jogamp.nativewindow.util.InsetsImmutable.equals.

Checks whether two rect objects are equal.
public final int
public final int
public final int
public final int
public final int
public final int
public static final InsetsImmutable
public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements com.jogamp.nativewindow.util.InsetsImmutable.hashCode.

Returns a hash code value for this object.
public final void
set(final int
left inset width in window units.
left
,
final int
right inset width in window units.
right
,
final int
top inset width in window units.
top
,
final int
bottom inset width in window units.
bottom
)

Set the inset values of this instance in window units.

public final void
setBottomHeight(final int
bottom inset width in window units.
bottom
)

Set the bottom inset value of this instance in window units.

public final void
setLeftWidth(final int
left inset width in window units.
left
)

Set the left inset value of this instance in window units.

public final void
setRightWidth(final int
right inset width in window units.
right
)

Set the right inset value of this instance in window units.

public final void
setTopHeight(final int
top inset width in window units.
top
)

Set the top inset value of this instance in window units.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

bback to summary
private int b
lback to summary
private int l
rback to summary
private int r
tback to summary
private int t
zeroInsetsback to summary
pack-priv static final InsetsImmutable zeroInsets

Constructor Detail

Insetsback to summary
public Insets()
Insetsback to summary
public Insets(final int left, final int right, final int top, final int bottom)

Method Detail

cloneback to summary
protected Object clone()

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:Object

a clone of this instance.

Annotations
@Override
cloneMutableback to summary
public Object cloneMutable()

Implements com.jogamp.common.type.WriteCloneable.cloneMutable.

Doc from com.jogamp.common.type.WriteCloneable.cloneMutable.

Get a mutable clone from this instance.

Annotations
@Override
equalsback to summary
public boolean equals(final Object obj)

Overrides java.lang.Object.equals.

Implements com.jogamp.nativewindow.util.InsetsImmutable.equals.

Doc from com.jogamp.nativewindow.util.InsetsImmutable.equals.

Checks whether two rect objects are equal. Two instances of Insets are equal if the four integer values of the fields left, right, top, and bottom are all equal.

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

true if the two Insets are equal; otherwise false.

Annotations
@Override
getBottomHeightback to summary
public final int getBottomHeight()

Implements com.jogamp.nativewindow.util.InsetsImmutable.getBottomHeight.

Returns:int

Doc from com.jogamp.nativewindow.util.InsetsImmutable.getBottomHeight.

bottom inset height in window units.

Annotations
@Override
getLeftWidthback to summary
public final int getLeftWidth()

Implements com.jogamp.nativewindow.util.InsetsImmutable.getLeftWidth.

Returns:int

Doc from com.jogamp.nativewindow.util.InsetsImmutable.getLeftWidth.

left inset width in window units.

Annotations
@Override
getRightWidthback to summary
public final int getRightWidth()

Implements com.jogamp.nativewindow.util.InsetsImmutable.getRightWidth.

Returns:int

Doc from com.jogamp.nativewindow.util.InsetsImmutable.getRightWidth.

right inset width in window units.

Annotations
@Override
getTopHeightback to summary
public final int getTopHeight()

Implements com.jogamp.nativewindow.util.InsetsImmutable.getTopHeight.

Returns:int

Doc from com.jogamp.nativewindow.util.InsetsImmutable.getTopHeight.

top inset height in window units.

Annotations
@Override
getTotalHeightback to summary
public final int getTotalHeight()

Implements com.jogamp.nativewindow.util.InsetsImmutable.getTotalHeight.

Returns:int

Doc from com.jogamp.nativewindow.util.InsetsImmutable.getTotalHeight.

total height in window units, ie. top_height + bottom_height

Annotations
@Override
getTotalWidthback to summary
public final int getTotalWidth()

Implements com.jogamp.nativewindow.util.InsetsImmutable.getTotalWidth.

Returns:int

Doc from com.jogamp.nativewindow.util.InsetsImmutable.getTotalWidth.

total width in window units, ie. left_width + right_width

Annotations
@Override
getZeroback to summary
public static final InsetsImmutable getZero()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements com.jogamp.nativewindow.util.InsetsImmutable.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
setback to summary
public final void set(final int left, final int right, final int top, final int bottom)

Set the inset values of this instance in window units.

Parameters
left:int

left inset width in window units.

right:int

right inset width in window units.

top:int

top inset width in window units.

bottom:int

bottom inset width in window units.

setBottomHeightback to summary
public final void setBottomHeight(final int bottom)

Set the bottom inset value of this instance in window units.

Parameters
bottom:int

bottom inset width in window units.

setLeftWidthback to summary
public final void setLeftWidth(final int left)

Set the left inset value of this instance in window units.

Parameters
left:int

left inset width in window units.

setRightWidthback to summary
public final void setRightWidth(final int right)

Set the right inset value of this instance in window units.

Parameters
right:int

right inset width in window units.

setTopHeightback to summary
public final void setTopHeight(final int top)

Set the top inset value of this instance in window units.

Parameters
top:int

top inset width in window units.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override