public static class SplitPane.Settings

  1. Object
  2. SplitPane.Settings
An object to configure settings for a SplitPane. Build an instance of this class to define such things as the divider thickness, the insets, and the UIIDs to use for the various icons (collapse/expand/drag) on the divider. Once you have set all of the settings, you can pass this to com.codename1.ui.Component, com.codename1.ui.Component) to create the corresponding SplitPane instance.

Constructors

public Settings()Creates a new Settings with default values.
public Settings(int orientation, String minInset, String preferredInset, String maxInset)Creates a new Settings with the provided orientation, and insets.

Methods

public SplitPane.Settings orientation(int orientation)Sets the orientation.
public SplitPane.Settings expandButtonUIID(String expandButtonUIID)Sets the UIID to use for the expand button.
public SplitPane.Settings collapseButtonUIID(String collapseButtonUIID)Sets the UIID to use for the collapse button.
public SplitPane.Settings dragHandleUIID(String dragHandleUIID)Sets the UIID to use for the drag handle on the divider.
public SplitPane.Settings buttonUIIDs(String uiid)Sets the UIID to use for all of the buttons on the divider.
public SplitPane.Settings collapseIcon(Image icon)Sets the icon to use for the collapse button.
public SplitPane.Settings expandIcon(Image icon)Sets the icon to use for the expand button.
public SplitPane.Settings dragHandleIcon(Image icon)Sets the icon to use for the drag handle.
public SplitPane.Settings collapseMaterialIcon(char icon)Sets the material icon to use for the collapse button.
public SplitPane.Settings expandMaterialIcon(char icon)Sets the material icon to use for the expand button.
public SplitPane.Settings dragHandleMaterialIcon(char icon)Sets the material icon to use for the drag handle.
public SplitPane.Settings dividerThicknessMM(float dividerThicknessMM)Sets the preferred divider thickness in Millimetres.
public SplitPane.Settings dividerUIID(String uiid)A custom UIID to use for the divider.
public SplitPane.Settings minInset(String minInset)Sets the minimum inset for the divider.
public SplitPane.Settings preferredInset(String preferredInset)Sets the preferred inset for the divider.
public SplitPane.Settings maxInset(String maxInset)Sets the max inset for the divider.
public SplitPane.Settings insets(String min, String preferred, String max)Sets the min, preferred, and max insets in a single method.
public SplitPane.Settings showExpandCollapseButtons(boolean show)Set whether to show the expand/collapse buttons on the divider.
public SplitPane.Settings showDragHandle(boolean show)Set whether to show the drag handle on the divider.

Inherited methods

Constructor details

Settings

public Settings()
Creates a new Settings with default values.

Settings

public Settings(int orientation, String minInset, String preferredInset, String maxInset)
Creates a new Settings with the provided orientation, and insets.

Parameters

orientation int
The orientation. One of #HORIZONTAL_SPLIT or #VERTICAL_SPLIT.
minInset String
The minimum allowable inset for the divider. The inset should be expressed as a string with both a value and a unit. E.g. “75%”, “50mm”, “200px”.
preferredInset String
The default preferred inset for the divider. The inset should be expressed as a string with both value and unit. E.g. “75%”, “50mm”, “20px”.
maxInset String
The maximum allowable inset for the divider. The inset should be expressed as a string with both a value and a unit. E.g. “75%”, “50mm”, “20px”.

Method details

orientation

public SplitPane.Settings orientation(int orientation)
Sets the orientation.

Parameters

orientation int
The orientation. One of #HORIZONTAL_SPLIT or #VERTICAL_SPLIT.

Returns

Self for chaining.

expandButtonUIID

public SplitPane.Settings expandButtonUIID(String expandButtonUIID)
Sets the UIID to use for the expand button. Default is “Label”

Parameters

expandButtonUIID String
The UIID to use for the expand button.

Returns

Self for chaining.

collapseButtonUIID

public SplitPane.Settings collapseButtonUIID(String collapseButtonUIID)
Sets the UIID to use for the collapse button. Default is “Label”

Parameters

collapseButtonUIID String
The UIID to use for the collapse button.

Returns

Self for chaining.

dragHandleUIID

public SplitPane.Settings dragHandleUIID(String dragHandleUIID)
Sets the UIID to use for the drag handle on the divider. Default is “Label”

Parameters

dragHandleUIID String
The UIID to use for the drag handle of the divider.

Returns

Self for chaining.

buttonUIIDs

public SplitPane.Settings buttonUIIDs(String uiid)
Sets the UIID to use for all of the buttons on the divider. This includes the drag handle, the collapse button, and the expand button. This is a convenience method that is equivalent of calling #expandButtonUIID(java.lang.String), #collapseButtonUIID(java.lang.String), and #dragHandleUIID(java.lang.String) all with the same value.

Parameters

uiid String
The UIID to use for the buttons on the divider.

Returns

Self for chaining.

collapseIcon

public SplitPane.Settings collapseIcon(Image icon)
Sets the icon to use for the collapse button.

expandIcon

public SplitPane.Settings expandIcon(Image icon)
Sets the icon to use for the expand button.

dragHandleIcon

public SplitPane.Settings dragHandleIcon(Image icon)
Sets the icon to use for the drag handle.

collapseMaterialIcon

public SplitPane.Settings collapseMaterialIcon(char icon)
Sets the material icon to use for the collapse button.

expandMaterialIcon

public SplitPane.Settings expandMaterialIcon(char icon)
Sets the material icon to use for the expand button.

dragHandleMaterialIcon

public SplitPane.Settings dragHandleMaterialIcon(char icon)
Sets the material icon to use for the drag handle.

dividerThicknessMM

public SplitPane.Settings dividerThicknessMM(float dividerThicknessMM)
Sets the preferred divider thickness in Millimetres.

Parameters

dividerThicknessMM float
The divider thickness in Millimetres.

Returns

Self for chaining.

dividerUIID

public SplitPane.Settings dividerUIID(String uiid)
A custom UIID to use for the divider. Leave null to use default.

Parameters

uiid String
The custom UIID

Returns

self for chaining.

minInset

public SplitPane.Settings minInset(String minInset)
Sets the minimum inset for the divider.

Parameters

minInset String
The minimum allowable inset for the divider. The inset should be expressed as a string with both a value and a unit. E.g. “75%”, “50mm”, “200px”.

Returns

Self for chaining.

preferredInset

public SplitPane.Settings preferredInset(String preferredInset)
Sets the preferred inset for the divider.

Parameters

preferredInset String
The preferred inset for the divider. The inset should be expressed as a string with both a value and a unit. E.g. “75%”, “50mm”, “200px”.

Returns

Self for chaining.

maxInset

public SplitPane.Settings maxInset(String maxInset)
Sets the max inset for the divider.

Parameters

maxInset String
The max inset for the divider. The inset should be expressed as a string with both a value and a unit. E.g. “75%”, “50mm”, “200px”.

insets

public SplitPane.Settings insets(String min, String preferred, String max)
Sets the min, preferred, and max insets in a single method. This is equivalent of calling #minInset(java.lang.String), #maxInset(java.lang.String), and #preferredInset(java.lang.String) separately.

Parameters

min String
The min inset for the divider. The inset should be expressed as a string with both a value and a unit. E.g. “75%”, “50mm”, “200px”.
preferred String
The preferred inset for the divider. The inset should be expressed as a string with both a value and a unit. E.g. “75%”, “50mm”, “200px”.
max String
The max inset for the divider.

Returns

Self for chaining.

showExpandCollapseButtons

public SplitPane.Settings showExpandCollapseButtons(boolean show)
Set whether to show the expand/collapse buttons on the divider. Default is true.

Parameters

show boolean
true to show the expand/collapse buttons. false to hide them.

Returns

Self for chaining.

showDragHandle

public SplitPane.Settings showDragHandle(boolean show)
Set whether to show the drag handle on the divider. Default is true.

Parameters

show boolean
true to show the expand/collapse buttons. false to hide them.

Returns

Self for chaining.