Class GridLayout.RowHelper
java.lang.Object
xyz.gmitch215.socketmc.screen.layout.GridLayout.RowHelper
- Enclosing class:
- GridLayout
Utility class for adding elements in rows.
- 
Method SummaryModifier and TypeMethodDescription<T extends LayoutElement>
 Tadd(T child) Adds an element to this row.<T extends LayoutElement>
 Tadd(T child, int occupiedColumns) Adds an element to this row.<T extends LayoutElement>
 Tadd(T child, int occupiedColumns, Consumer<LayoutSettings> settings) Adds an element to this row.<T extends LayoutElement>
 Tadd(T child, int occupiedColumns, Supplier<LayoutSettings> settings) Adds an element to this row.<T extends LayoutElement>
 Tadd(T child, int occupiedColumns, LayoutSettings settings) Adds an element to this row.<T extends LayoutElement>
 Tadd(T child, Consumer<LayoutSettings> settings) Adds an element to this row.<T extends LayoutElement>
 Tadd(T child, Supplier<LayoutSettings> settings) Adds an element to this row.<T extends LayoutElement>
 Tadd(T child, LayoutSettings settings) Adds an element to this row.getGrid()Gets the GridLayout that the RowHelper is associated with.
- 
Method Details- 
addAdds an element to this row.- Type Parameters:
- T- The type of the element
- Parameters:
- child- The element to add
- Returns:
- The element that was added
- Throws:
- IllegalArgumentException- if the element is null
 
- 
add@NotNull public <T extends LayoutElement> T add(@NotNull T child, int occupiedColumns) throws IllegalArgumentException Adds an element to this row.- Type Parameters:
- T- The type of the element
- Parameters:
- child- The element to add
- occupiedColumns- The number of columns the element occupies
- Returns:
- The element that was added
- Throws:
- IllegalArgumentException- if the element is null or the occupied columns is less than 1
 
- 
add@NotNull public <T extends LayoutElement> T add(@NotNull T child, LayoutSettings settings) throws IllegalArgumentException Adds an element to this row.- Type Parameters:
- T- The type of the element
- Parameters:
- child- The element to add
- settings- The layout settings for the element
- Returns:
- The element that was added
- Throws:
- IllegalArgumentException- if the element is null
 
- 
add@NotNull public <T extends LayoutElement> T add(@NotNull T child, int occupiedColumns, LayoutSettings settings) throws IllegalArgumentException Adds an element to this row.- Type Parameters:
- T- The type of the element
- Parameters:
- child- The element to add
- occupiedColumns- The number of columns the element occupies
- settings- The layout settings for the element
- Returns:
- The element that was added
- Throws:
- IllegalArgumentException- if the element or settings are null or the occupied columns is less than 1
 
- 
add@NotNull public <T extends LayoutElement> T add(@NotNull T child, Supplier<LayoutSettings> settings) throws IllegalArgumentException Adds an element to this row.- Type Parameters:
- T- The type of the element
- Parameters:
- child- The element to add
- settings- The generator for the layout settings
- Returns:
- The element that was added
- Throws:
- IllegalArgumentException- if the element is null
 
- 
add@NotNull public <T extends LayoutElement> T add(@NotNull T child, int occupiedColumns, Supplier<LayoutSettings> settings) throws IllegalArgumentException Adds an element to this row.- Type Parameters:
- T- The type of the element
- Parameters:
- child- The element to add
- occupiedColumns- The number of columns the element occupies
- settings- The generator for the layout settings
- Returns:
- The element that was added
- Throws:
- IllegalArgumentException- if the element or settings are null or the occupied columns is less than 1
 
- 
add@NotNull public <T extends LayoutElement> T add(@NotNull T child, Consumer<LayoutSettings> settings) throws IllegalArgumentException Adds an element to this row.- Type Parameters:
- T- The type of the element
- Parameters:
- child- The element to add
- settings- The function to apply on- GridLayout.createDefaultSettings()
- Returns:
- The element that was added
- Throws:
- IllegalArgumentException- if the element is null
 
- 
add@NotNull public <T extends LayoutElement> T add(@NotNull T child, int occupiedColumns, Consumer<LayoutSettings> settings) throws IllegalArgumentException Adds an element to this row.- Type Parameters:
- T- The type of the element
- Parameters:
- child- The element to add
- occupiedColumns- The number of columns the element occupies
- settings- The function to apply on- GridLayout.createDefaultSettings()
- Returns:
- The element that was added
- Throws:
- IllegalArgumentException- if the element or settings are null or the occupied columns is less than 1
 
- 
getGridGets the GridLayout that the RowHelper is associated with.- Returns:
- GridLayout
 
 
-