Usage example:
SplitPanel splitPanel = SplitPanel.create()
.setMinSize(100)
.setMaxSize(500)
.addResizeListener((panel, pixels, percent) -> {
// Logic executed when the panel is resized
});
See also :
This is an extension of the base split panel with specific behavior for vertical layout.
This is an extension of the base split panel with specific behavior for horizontal layout.
public void SplitPanel()
public static SplitPanel create()
a new instance of SplitPanel
public int getMinSize()
the minimum size of the panel
public SplitPanel setMinSize(int minSize)
minSize
the minimum size to set
the current instance for method chaining
public int getMaxSize()
the maximum size of the panel
public SplitPanel setMaxSize(int maxSize)
maxSize
the maximum size to set
the current instance for method chaining
public double getMinPercent()
the minimum size of the panel in percentage
public SplitPanel setMinPercent(double minPercent)
If the value is between 0 and 1, it's multiplied by 100. Values greater than 100 are set to 100. Negative values are set to 0.
minPercent
the minimum size in percentage to set
the current instance for method chaining
public double getMaxPercent()
the maximum size of the panel in percentage
public SplitPanel setMaxPercent(double maxPercent)
If the value is between 0 and 1, it's multiplied by 100. Values greater than 100 are set to 100. Negative values are set to 0.
maxPercent
the maximum size in percentage to set
the current instance for method chaining
public SplitPanel addResizeListener(ResizeListener resizeListener)
resizeListener
the listener to add
the current instance for method chaining
public SplitPanel removeResizeListener(ResizeListener resizeListener)
resizeListener
the listener to remove
the current instance for method chaining
public boolean isFirst()
true if this panel is the first, false otherwise
public SplitPanel setFirst(boolean first)
first
true to set this panel as the first, false otherwise
the current instance for method chaining
public boolean isLast()
true if this panel is the last, false otherwise
public SplitPanel setLast(boolean last)
last
true to set this panel as the last, false otherwise
the current instance for method chaining
public HTMLDivElement element()
the root HTMLDivElement element of this split panel
public void HSplitPanel()
public static HSplitPanel create()
public double getSize()
the width of the split panel
public void VSplitPanel()
public static VSplitPanel create()
public double getSize()
the height of the split panel