Example Usage:
GridLayout gridLayout = GridLayout.create()
.setGap("10px")
.setHeaderSpan(SectionSpan.of(1, 3))
.setLeftSpan(SectionSpan.of(2, 1, 1), true, true)
.withContent(contentElement -> {
// Add content to the main content area
});
RootPanel.get().appendChild(gridLayout);
See also :
public void GridLayout()
public static GridLayout create()
A new instance of the GridLayout.
public GridLayout setGap(String gap)
gap
The gap between grid items, e.g., "10px".
This GridLayout instance for method chaining.
public GridLayout setHeaderSpan(SectionSpan sectionSpan)
sectionSpan
The span for the header section.
This GridLayout instance for method chaining.
public GridLayout hideHeader()
This GridLayout instance for method chaining.
public GridLayout setRightSpan(SectionSpan sectionSpan, boolean spanUp, boolean spanDown)
sectionSpan
The span for the right section.
spanUp
Whether to span up.
spanDown
Whether to span down.
This GridLayout instance for method chaining.
public GridLayout hideRight()
This GridLayout instance for method chaining.
public GridLayout setLeftSpan(SectionSpan sectionSpan, boolean spanUp, boolean spanDown)
sectionSpan
The span for the left section.
spanUp
Whether to span up.
spanDown
Whether to span down.
This GridLayout instance for method chaining.
public GridLayout hideLeft()
This GridLayout instance for method chaining.
public GridLayout setFooterSpan(SectionSpan sectionSpan)
sectionSpan
The span for the footer section.
This GridLayout instance for method chaining.
public GridLayout hideFooter()
This GridLayout instance for method chaining.
public DivElement getContentElement()
The content element.
public GridLayout withContent(ChildHandler<GridLayout, DivElement> handler)
handler
The child handler for the content element.
This GridLayout instance for method chaining.
public DivElement getHeaderElement()
The header element.
public GridLayout withHeader(ChildHandler<GridLayout, DivElement> handler)
handler
The child handler for the header element.
This GridLayout instance for method chaining.
public DivElement getFooterElement()
The footer element.
public GridLayout withFooter(ChildHandler<GridLayout, DivElement> handler)
handler
The child handler for the footer element.
This GridLayout instance for method chaining.
public DivElement getLeftElement()
The left panel element.
public GridLayout withLeftPanel(ChildHandler<GridLayout, DivElement> handler)
handler
The child handler for the left panel element.
This GridLayout instance for method chaining.
public DivElement getRightElement()
The right panel element.
public GridLayout withRightPanel(ChildHandler<GridLayout, DivElement> handler)
handler
The child handler for the right panel element.
This GridLayout instance for method chaining.