Class Insets
java.lang.Object
io.github.somesourcecode.someguiapi.scene.util.Insets
Represents the distance from the edges of a container to its content.
- Since:
- 1.0.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInsets(int topRightBottomLeft) Constructs a new Insets instance with same value for all four offsets.Insets(int topBottom, int rightLeft) Constructs a new Insets instance with same value for top and bottom, and for right and left.Insets(int top, int right, int bottom, int left) Constructs a new Insets instance with four different offsets. -
Method Summary
-
Field Details
-
EMPTY
Empty insets. AnInsetsinstance with all insets set to 0.- Since:
- 1.0.0
-
-
Constructor Details
-
Insets
public Insets(int top, int right, int bottom, int left) Constructs a new Insets instance with four different offsets.- Parameters:
top- the top insetright- the right insetbottom- the bottom insetleft- the left inset- Since:
- 1.0.0
-
Insets
public Insets(int topBottom, int rightLeft) Constructs a new Insets instance with same value for top and bottom, and for right and left.- Parameters:
topBottom- the top and bottom insetsrightLeft- the right and left insets- Since:
- 1.0.0
-
Insets
public Insets(int topRightBottomLeft) Constructs a new Insets instance with same value for all four offsets.- Parameters:
topRightBottomLeft- the top, right, bottom, and left insets- Since:
- 1.0.0
-
-
Method Details
-
getTop
public int getTop()Returns the top inset.- Returns:
- the top inset
- Since:
- 1.0.0
-
getRight
public int getRight()Returns the right inset.- Returns:
- the right inset
- Since:
- 1.0.0
-
getBottom
public int getBottom()Returns the bottom inset.- Returns:
- the bottom inset
- Since:
- 1.0.0
-
getLeft
public int getLeft()Returns the left inset.- Returns:
- the left inset
- Since:
- 1.0.0
-
equals
Indicates whether some other object is "equal to" this one.
-