1. Domino UI
  2. Layouts
  3. Split panel
Top Horizontal split Vertical split Min-Max split Multiple split Combined split Docs

Split panel

Split panel

Represents a UI split panel that can be used alongside other split panels in a layout. It offers functionalities to adjust its size constraints and to listen to resizing events.

Usage example:

 
 SplitPanel splitPanel = SplitPanel.create()
      .setMinSize(100)
      .setMaxSize(500)
      .addResizeListener((panel, pixels, percent) -> {
           // Logic executed when the panel is resized
      });
 

See also :

Vertical split panel

Represents a vertical split panel which contains two panels separated by a vertical splitter.

This is an extension of the base split panel with specific behavior for vertical layout.

Horizontal split panel

Represents a horizontal split panel which contains two panels separated by a horizontal splitter.

This is an extension of the base split panel with specific behavior for horizontal layout.

Anatomy

split-panel-anatomy.
  1. Left side panel, or for vertical split the top panel.
  2. Right side panel, or for vertical split the bottom panel.
  3. Row gaps, each row can have a consistent gap between its columns.

Examples

Horizontal split panel.

Vertical split panel.

Split panel Min/Max Split panels with minimum and maximum width/height.

Multiple split panels We can have more than 2 split panels.

Combined split panels We can mix horizontal and vertical split panels.

API Docs: Split panel

Constructors

public void SplitPanel()
Creates a new SplitPanel instance with default styles and settings.

Static methods

public static SplitPanel create()
Factory method to create a new SplitPanel instance.

Returns:

a new instance of SplitPanel

Public methods

public int getMinSize()
Returns the minimum size of the split panel.

Returns:

the minimum size of the panel

public SplitPanel setMinSize(int minSize)
Sets the minimum size of the split panel.

minSize

the minimum size to set



Returns:

the current instance for method chaining

public int getMaxSize()
Returns the maximum size of the split panel.

Returns:

the maximum size of the panel

public SplitPanel setMaxSize(int maxSize)
Sets the maximum size of the split panel.

maxSize

the maximum size to set



Returns:

the current instance for method chaining

public double getMinPercent()
Returns the minimum size of the split panel in percentage.

Returns:

the minimum size of the panel in percentage

public SplitPanel setMinPercent(double minPercent)
Sets the minimum size of the split panel in percentage.

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



Returns:

the current instance for method chaining

public double getMaxPercent()
Returns the maximum size of the split panel in percentage.

Returns:

the maximum size of the panel in percentage

public SplitPanel setMaxPercent(double maxPercent)
Sets the maximum size of the split panel in percentage.

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



Returns:

the current instance for method chaining

public SplitPanel addResizeListener(ResizeListener resizeListener)
Adds a ResizeListener to the split panel.

resizeListener

the listener to add



Returns:

the current instance for method chaining

public SplitPanel removeResizeListener(ResizeListener resizeListener)
Removes a ResizeListener from the split panel.

resizeListener

the listener to remove



Returns:

the current instance for method chaining

public boolean isFirst()
Checks if this panel is the first one in the split layout.

Returns:

true if this panel is the first, false otherwise

public SplitPanel setFirst(boolean first)
Sets this panel as the first one in the split layout.

first

true to set this panel as the first, false otherwise



Returns:

the current instance for method chaining

public boolean isLast()
Checks if this panel is the last one in the split layout.

Returns:

true if this panel is the last, false otherwise

public SplitPanel setLast(boolean last)
Sets this panel as the last one in the split layout.

last

true to set this panel as the last, false otherwise



Returns:

the current instance for method chaining

public HTMLDivElement element()
Returns the root HTMLDivElement of the SplitPanel.

Returns:

the root HTMLDivElement element of this split panel

API Docs: Horizontal split panel

Constructors

public void HSplitPanel()
Creates a new horizontal split panel.

Static methods

public static HSplitPanel create()
Factory method to create a new instance of HSplitPanel .

Returns:

a new instance of HSplitPanel

Public methods

public double getSize()
Gets the width of this horizontal split panel.

Returns:

the width of the split panel

API Docs: Vertical split panel

Constructors

public void VSplitPanel()
Creates a new vertical split panel.

Static methods

public static VSplitPanel create()
Factory method to create a new instance of VSplitPanel .

Returns:

a new instance of VSplitPanel

Public methods

public double getSize()
Gets the height of this vertical split panel.

Returns:

the height of the split panel

We are a group of passionate people who love what we do

Donate & Support Us