Class Insets
java.lang.Object
io.github.cottonmc.cotton.gui.widget.data.Insets
The layout insets of a panel. The insets describe how many pixels should be around the panel's contents.
For example, root panels have 7 pixels around their contents, and that is set via
ROOT_PANEL.- Since:
- 4.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionintThe bottom (+Y) inset size.intThe left (-X) inset size.static InsetsEmpty layout insets that do not provide any borders around content.intThe right (+X) inset size.static InsetsThe default insets of a root panel, providing 7 pixels around the content on all sides.intThe top (-Y) inset size. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NONE
Empty layout insets that do not provide any borders around content. -
ROOT_PANEL
The default insets of a root panel, providing 7 pixels around the content on all sides. -
top
public final int topThe top (-Y) inset size. -
left
public final int leftThe left (-X) inset size. -
bottom
public final int bottomThe bottom (+Y) inset size. -
right
public final int rightThe right (+X) inset size.
-
-
Constructor Details
-
Insets
public Insets(int top, int left, int bottom, int right)Constructs layout insets.- Parameters:
top- the top (-Y) inset sizeleft- the left (-X) inset sizebottom- the bottom (+Y) inset sizeright- the right (+X) inset size
-
Insets
public Insets(int vertical, int horizontal)Constructs layout insets.- Parameters:
vertical- the vertical (Y) size of the insetshorizontal- the horizontal (X) size of the insets
-
Insets
public Insets(int size)Constructs layout insets.- Parameters:
size- the size of the insets on all sides
-
-
Method Details