29package com.jogamp.nativewindow.util;
39 private int l, r, t, b;
45 public Insets(
final int left,
final int right,
final int top,
final int bottom) {
61 }
catch (
final CloneNotSupportedException ex) {
62 throw new InternalError();
86 public final void set(
final int left,
final int right,
final int top,
final int bottom) {
87 l = left; r = right; t = top; b = bottom;
111 public boolean equals(
final Object obj) {
112 if(
this == obj) {
return true; }
113 if (obj instanceof
Insets) {
115 return (r == insets.r) && (l == insets.l) &&
116 (b == insets.b) && (t == insets.t);
123 final int sum1 = l + b;
124 final int sum2 = t + r;
125 final int val1 = sum1 * (sum1 + 1)/2 + l;
126 final int val2 = sum2 * (sum2 + 1)/2 + r;
127 final int sum3 = val1 + val2;
128 return sum3 * (sum3 + 1)/2 + val2;
Mutable insets representing rectangular window decoration insets on all four edges in window units.
final int getRightWidth()
final int getTotalWidth()
static final InsetsImmutable getZero()
Insets(final int left, final int right, final int top, final int bottom)
final int getTotalHeight()
final void setBottomHeight(final int bottom)
Set the bottom inset value of this instance in window units.
final void setLeftWidth(final int left)
Set the left inset value of this instance in window units.
boolean equals(final Object obj)
Checks whether two rect objects are equal.
final void setTopHeight(final int top)
Set the top inset value of this instance in window units.
final void setRightWidth(final int right)
Set the right inset value of this instance in window units.
final int getBottomHeight()
Immutable insets representing rectangular window decoration insets on all four edges in window units.