public static class SplitPane.Settings
- Object
- 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
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
orientationint- The orientation. One of
#HORIZONTAL_SPLITor#VERTICAL_SPLIT. minInsetString- 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”.
preferredInsetString- 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”.
maxInsetString- 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
orientationint- The orientation. One of
#HORIZONTAL_SPLITor#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
expandButtonUIIDString- 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
collapseButtonUIIDString- 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
dragHandleUIIDString- 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
uiidString- 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
dividerThicknessMMfloat- 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
uiidString- The custom UIID
Returns
self for chaining.
minInset
public SplitPane.Settings minInset(String minInset)Sets the minimum inset for the divider.
Parameters
minInsetString- 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
preferredInsetString- 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
maxInsetString- 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
minString- 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”.
preferredString- 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”.
maxString- 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
showboolean- 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
showboolean- true to show the expand/collapse buttons. false to hide them.
Returns
Self for chaining.