Package io.jmix.ui.component
Interface SplitPanel
- All Superinterfaces:
Component
,Component.BelongToFrame
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,ComponentContainer
,HasComponents
,HasContextHelp
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
- All Known Implementing Classes:
SplitPanelImpl
@StudioComponent(caption="VerticalSplitPanel",
category="Containers",
xmlElement="split",
icon="io/jmix/ui/icon/container/verticalSplitPanel.svg",
canvasBehaviour=CONTAINER,
containerType=SPLIT,
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/containers/split-panel.html")
public interface SplitPanel
extends ComponentContainer, Component.BelongToFrame, Component.HasIcon, Component.HasCaption, HasContextHelp, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer
A split panel contains two components and lays them vertically or horizontally.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Specifies SplitPanel docking direction.static class
Event that indicates a change in SplitPanel's splitter position.Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
-
Field Summary
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionAdds a listener forSplitPanel.SplitPositionChangeEvent
s fired by a SplitPanel.float
Returns the maximum position of the splitter.Returns the unit of the maximum position of the splitter.float
Returns the minimum position of the splitter.Returns the unit of the minimum position of the splitter.int
float
Returns the unit of position of the splitter.boolean
boolean
isLocked()
boolean
Return from which side position is set.void
setDockable
(boolean dockable) Enables or disables SplitPanel dock button.void
setDockMode
(SplitPanel.DockMode dockMode) Sets docking direction.void
setLocked
(boolean locked) Sets whether users are able to change the separator position or not.void
setMaxSplitPosition
(int pos, SizeUnit unit) Sets the maximum split position to the given position and unit.void
setMinSplitPosition
(int pos, SizeUnit unit) Sets the minimum split position to the given position and unit.void
setOrientation
(int orientation) Sets a split panel orientation.void
setSplitPosition
(int pos) Sets a position of split from the left side by default.void
setSplitPosition
(int pos, SizeUnit unit) Sets a position of split from the left side by default.void
setSplitPosition
(int pos, SizeUnit unit, boolean reversePosition) Sets a position of split from the left side by default.Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.ComponentContainer
add, add, remove, remove, removeAll
Methods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStream
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
-
Field Details
-
NAME
- See Also:
-
ORIENTATION_VERTICAL
static final int ORIENTATION_VERTICAL- See Also:
-
ORIENTATION_HORIZONTAL
static final int ORIENTATION_HORIZONTAL- See Also:
-
-
Method Details
-
getOrientation
int getOrientation()- Returns:
- a split panel orientation
-
setOrientation
void setOrientation(int orientation) Sets a split panel orientation.- Parameters:
orientation
- a split panel orientation- See Also:
-
setSplitPosition
void setSplitPosition(int pos) Sets a position of split from the left side by default.- Parameters:
pos
- the new size of the first region.
-
setSplitPosition
@StudioProperty(name="pos", type=STRING, defaultValue="50") void setSplitPosition(int pos, SizeUnit unit) Sets a position of split from the left side by default.- Parameters:
pos
- the new size of the first region.unit
- the unit (fromSizeUnit
) in which the size is given.
-
setSplitPosition
Sets a position of split from the left side by default. If reversePosition is true position will be set from right.- Parameters:
pos
- the new size of the first region.unit
- the unit (fromSizeUnit
) in which the size is given.reversePosition
- if set to true the split splitter position is measured by the second region else it is measured by the first region
-
getSplitPosition
float getSplitPosition()- Returns:
- position of the splitter.
-
getSplitPositionSizeUnit
SizeUnit getSplitPositionSizeUnit()Returns the unit of position of the splitter.- Returns:
- unit of position of the splitter
-
isSplitPositionReversed
boolean isSplitPositionReversed()Return from which side position is set. -
setMinSplitPosition
@StudioProperty(name="minSplitPosition", type=STRING) void setMinSplitPosition(int pos, SizeUnit unit) Sets the minimum split position to the given position and unit. If the split position is reversed, maximum and minimum are also reversed.- Parameters:
pos
- the new size of the first region.unit
- the unit (fromSizeUnit
) in which the size is given.
-
getMinSplitPosition
float getMinSplitPosition()Returns the minimum position of the splitter.- Returns:
- minimum position of the splitter
-
getMinSplitPositionSizeUnit
SizeUnit getMinSplitPositionSizeUnit()Returns the unit of the minimum position of the splitter.- Returns:
- unit of the minimum position of the splitter
-
setMaxSplitPosition
@StudioProperty(name="maxSplitPosition", type=STRING) void setMaxSplitPosition(int pos, SizeUnit unit) Sets the maximum split position to the given position and unit. If the split position is reversed, maximum and minimum are also reversed.- Parameters:
pos
- the new size of the first region.unit
- the unit (fromSizeUnit
) in which the size is given.
-
getMaxSplitPosition
float getMaxSplitPosition()Returns the maximum position of the splitter.- Returns:
- maximum position of the splitter
-
getMaxSplitPositionSizeUnit
SizeUnit getMaxSplitPositionSizeUnit()Returns the unit of the maximum position of the splitter.- Returns:
- unit of the maximum position of the splitter
-
setLocked
Sets whether users are able to change the separator position or not.- Parameters:
locked
- locked
-
isLocked
boolean isLocked()- Returns:
- whether users are able to change the separator position or not.
-
setDockable
Enables or disables SplitPanel dock button.- Parameters:
dockable
- dockable
-
isDockable
boolean isDockable()- Returns:
- whether dock button is enabled or not
-
setDockMode
Sets docking direction.- Parameters:
dockMode
- one ofSplitPanel.DockMode
options
-
getDockMode
SplitPanel.DockMode getDockMode()- Returns:
- docking direction
-
addSplitPositionChangeListener
Adds a listener forSplitPanel.SplitPositionChangeEvent
s fired by a SplitPanel.- Parameters:
listener
- a listener to add
-