Package io.jmix.ui.component.impl
Class SplitPanelImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<com.vaadin.ui.AbstractSplitPanel>
io.jmix.ui.component.impl.SplitPanelImpl
- All Implemented Interfaces:
AttachNotifier
,Component
,Component.BelongToFrame
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,ComponentContainer
,HasComponents
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,SplitPanel
public class SplitPanelImpl
extends AbstractComponent<com.vaadin.ui.AbstractSplitPanel>
implements SplitPanel
-
Nested Class Summary
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
Nested classes/interfaces inherited from interface io.jmix.ui.component.SplitPanel
SplitPanel.DockMode, SplitPanel.SplitPositionChangeEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected float
protected boolean
protected int
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.ui.component.SplitPanel
NAME, ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a component to this container.Adds a listener forSplitPanel.SplitPositionChangeEvent
s fired by a SplitPanel.void
attached()
Notifies all listeners that component has been attached.protected com.vaadin.server.Sizeable.Unit
convertLegacyUnit
(int unit) protected void
void
detached()
Notifies all listeners that component has been detached.protected void
fireSplitPositionChangeListener
(com.vaadin.ui.AbstractSplitPanel.SplitPositionChangeEvent event) getComponent
(String id) Gets a component belonging to the whole components tree below this container.Gets all components belonging to the whole components tree below this container.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
Gets component directly owned by this container.Gets all components directly owned by this container.Gets stream of all components directly owned by this container.float
Returns the unit of position of the splitter.boolean
boolean
isLocked()
boolean
Return from which side position is set.void
Removes a component from this container.void
Removes all components from this container.void
setDockable
(boolean dockable) Enables or disables SplitPanel dock button.void
setDockMode
(SplitPanel.DockMode dockMode) Sets docking direction.void
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 class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
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, remove
Methods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponentNN
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
-
ownComponents
-
orientation
protected int orientation -
currentPosition
protected float currentPosition -
inverse
protected boolean inverse
-
-
Constructor Details
-
SplitPanelImpl
public SplitPanelImpl()
-
-
Method Details
-
add
Description copied from interface:ComponentContainer
Adds a component to this container.- Specified by:
add
in interfaceComponentContainer
- Parameters:
childComponent
- a component to add
-
createComponentImpl
protected void createComponentImpl() -
fireSplitPositionChangeListener
protected void fireSplitPositionChangeListener(com.vaadin.ui.AbstractSplitPanel.SplitPositionChangeEvent event) -
remove
Description copied from interface:ComponentContainer
Removes a component from this container.- Specified by:
remove
in interfaceComponentContainer
- Parameters:
childComponent
- a component to remove
-
removeAll
public void removeAll()Description copied from interface:ComponentContainer
Removes all components from this container.- Specified by:
removeAll
in interfaceComponentContainer
-
setFrame
- Specified by:
setFrame
in interfaceComponent.BelongToFrame
- Overrides:
setFrame
in classAbstractComponent<com.vaadin.ui.AbstractSplitPanel>
-
getOwnComponent
Description copied from interface:HasComponents
Gets component directly owned by this container.- Specified by:
getOwnComponent
in interfaceHasComponents
- Returns:
- component or null if not found
-
getComponent
Description copied from interface:HasComponents
Gets a component belonging to the whole components tree below this container.- Specified by:
getComponent
in interfaceHasComponents
- Returns:
- component or null if not found
-
getOwnComponents
Description copied from interface:HasComponents
Gets all components directly owned by this container.- Specified by:
getOwnComponents
in interfaceHasComponents
- Returns:
- all components directly owned by this container
-
getOwnComponentsStream
Description copied from interface:HasComponents
Gets stream of all components directly owned by this container.- Specified by:
getOwnComponentsStream
in interfaceHasComponents
- Returns:
- stream of all components directly owned by this container
-
getComponents
Description copied from interface:HasComponents
Gets all components belonging to the whole components tree below this container.- Specified by:
getComponents
in interfaceHasComponents
- Returns:
- all components belonging to the whole components tree below this container
-
getOrientation
public int getOrientation()- Specified by:
getOrientation
in interfaceSplitPanel
- Returns:
- a split panel orientation
-
setOrientation
public void setOrientation(int orientation) Description copied from interface:SplitPanel
Sets a split panel orientation.- Specified by:
setOrientation
in interfaceSplitPanel
- Parameters:
orientation
- a split panel orientation- See Also:
-
setSplitPosition
public void setSplitPosition(int pos) Description copied from interface:SplitPanel
Sets a position of split from the left side by default.- Specified by:
setSplitPosition
in interfaceSplitPanel
- Parameters:
pos
- the new size of the first region.
-
setSplitPosition
Description copied from interface:SplitPanel
Sets a position of split from the left side by default.- Specified by:
setSplitPosition
in interfaceSplitPanel
- Parameters:
pos
- the new size of the first region.unit
- the unit (fromSizeUnit
) in which the size is given.
-
setSplitPosition
Description copied from interface:SplitPanel
Sets a position of split from the left side by default. If reversePosition is true position will be set from right.- Specified by:
setSplitPosition
in interfaceSplitPanel
- 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
public float getSplitPosition()- Specified by:
getSplitPosition
in interfaceSplitPanel
- Returns:
- position of the splitter.
-
getSplitPositionSizeUnit
Description copied from interface:SplitPanel
Returns the unit of position of the splitter.- Specified by:
getSplitPositionSizeUnit
in interfaceSplitPanel
- Returns:
- unit of position of the splitter
-
isSplitPositionReversed
public boolean isSplitPositionReversed()Description copied from interface:SplitPanel
Return from which side position is set.- Specified by:
isSplitPositionReversed
in interfaceSplitPanel
-
setMinSplitPosition
Description copied from interface:SplitPanel
Sets the minimum split position to the given position and unit. If the split position is reversed, maximum and minimum are also reversed.- Specified by:
setMinSplitPosition
in interfaceSplitPanel
- Parameters:
pos
- the new size of the first region.unit
- the unit (fromSizeUnit
) in which the size is given.
-
getMinSplitPosition
public float getMinSplitPosition()Description copied from interface:SplitPanel
Returns the minimum position of the splitter.- Specified by:
getMinSplitPosition
in interfaceSplitPanel
- Returns:
- minimum position of the splitter
-
getMinSplitPositionSizeUnit
Description copied from interface:SplitPanel
Returns the unit of the minimum position of the splitter.- Specified by:
getMinSplitPositionSizeUnit
in interfaceSplitPanel
- Returns:
- unit of the minimum position of the splitter
-
setMaxSplitPosition
Description copied from interface:SplitPanel
Sets the maximum split position to the given position and unit. If the split position is reversed, maximum and minimum are also reversed.- Specified by:
setMaxSplitPosition
in interfaceSplitPanel
- Parameters:
pos
- the new size of the first region.unit
- the unit (fromSizeUnit
) in which the size is given.
-
getMaxSplitPosition
public float getMaxSplitPosition()Description copied from interface:SplitPanel
Returns the maximum position of the splitter.- Specified by:
getMaxSplitPosition
in interfaceSplitPanel
- Returns:
- maximum position of the splitter
-
getMaxSplitPositionSizeUnit
Description copied from interface:SplitPanel
Returns the unit of the maximum position of the splitter.- Specified by:
getMaxSplitPositionSizeUnit
in interfaceSplitPanel
- Returns:
- unit of the maximum position of the splitter
-
setLocked
public void setLocked(boolean locked) Description copied from interface:SplitPanel
Sets whether users are able to change the separator position or not.- Specified by:
setLocked
in interfaceSplitPanel
- Parameters:
locked
- locked
-
isLocked
public boolean isLocked()- Specified by:
isLocked
in interfaceSplitPanel
- Returns:
- whether users are able to change the separator position or not.
-
convertLegacyUnit
protected com.vaadin.server.Sizeable.Unit convertLegacyUnit(int unit) -
setDockable
public void setDockable(boolean dockable) Description copied from interface:SplitPanel
Enables or disables SplitPanel dock button.- Specified by:
setDockable
in interfaceSplitPanel
- Parameters:
dockable
- dockable
-
isDockable
public boolean isDockable()- Specified by:
isDockable
in interfaceSplitPanel
- Returns:
- whether dock button is enabled or not
-
setDockMode
Description copied from interface:SplitPanel
Sets docking direction.- Specified by:
setDockMode
in interfaceSplitPanel
- Parameters:
dockMode
- one ofSplitPanel.DockMode
options
-
getDockMode
- Specified by:
getDockMode
in interfaceSplitPanel
- Returns:
- docking direction
-
addSplitPositionChangeListener
public Subscription addSplitPositionChangeListener(Consumer<SplitPanel.SplitPositionChangeEvent> listener) Description copied from interface:SplitPanel
Adds a listener forSplitPanel.SplitPositionChangeEvent
s fired by a SplitPanel.- Specified by:
addSplitPositionChangeListener
in interfaceSplitPanel
- Parameters:
listener
- a listener to add
-
attached
public void attached()Description copied from interface:AttachNotifier
Notifies all listeners that component has been attached.- Specified by:
attached
in interfaceAttachNotifier
- Overrides:
attached
in classAbstractComponent<com.vaadin.ui.AbstractSplitPanel>
-
detached
public void detached()Description copied from interface:AttachNotifier
Notifies all listeners that component has been detached.- Specified by:
detached
in interfaceAttachNotifier
- Overrides:
detached
in classAbstractComponent<com.vaadin.ui.AbstractSplitPanel>
-