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.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.SplitPanel
SplitPanel.DockMode, SplitPanel.SplitPositionChangeEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected floatprotected booleanprotected intFields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZEFields inherited from interface io.jmix.ui.component.SplitPanel
NAME, ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a component to this container.Adds a listener forSplitPanel.SplitPositionChangeEvents fired by a SplitPanel.voidattached()Notifies all listeners that component has been attached.protected com.vaadin.server.Sizeable.UnitconvertLegacyUnit(int unit) protected voidvoiddetached()Notifies all listeners that component has been detached.protected voidfireSplitPositionChangeListener(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.floatReturns the maximum position of the splitter.Returns the unit of the maximum position of the splitter.floatReturns the minimum position of the splitter.Returns the unit of the minimum position of the splitter.intGets component directly owned by this container.Gets all components directly owned by this container.Gets stream of all components directly owned by this container.floatReturns the unit of position of the splitter.booleanbooleanisLocked()booleanReturn from which side position is set.voidRemoves a component from this container.voidRemoves all components from this container.voidsetDockable(boolean dockable) Enables or disables SplitPanel dock button.voidsetDockMode(SplitPanel.DockMode dockMode) Sets docking direction.voidvoidsetLocked(boolean locked) Sets whether users are able to change the separator position or not.voidsetMaxSplitPosition(int pos, SizeUnit unit) Sets the maximum split position to the given position and unit.voidsetMinSplitPosition(int pos, SizeUnit unit) Sets the minimum split position to the given position and unit.voidsetOrientation(int orientation) Sets a split panel orientation.voidsetSplitPosition(int pos) Sets a position of split from the left side by default.voidsetSplitPosition(int pos, SizeUnit unit) Sets a position of split from the left side by default.voidsetSplitPosition(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, withUnwrappedCompositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrameMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.ComponentContainer
add, removeMethods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponentNNMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods 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:ComponentContainerAdds a component to this container.- Specified by:
addin 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:ComponentContainerRemoves a component from this container.- Specified by:
removein interfaceComponentContainer- Parameters:
childComponent- a component to remove
-
removeAll
public void removeAll()Description copied from interface:ComponentContainerRemoves all components from this container.- Specified by:
removeAllin interfaceComponentContainer
-
setFrame
- Specified by:
setFramein interfaceComponent.BelongToFrame- Overrides:
setFramein classAbstractComponent<com.vaadin.ui.AbstractSplitPanel>
-
getOwnComponent
Description copied from interface:HasComponentsGets component directly owned by this container.- Specified by:
getOwnComponentin interfaceHasComponents- Returns:
- component or null if not found
-
getComponent
Description copied from interface:HasComponentsGets a component belonging to the whole components tree below this container.- Specified by:
getComponentin interfaceHasComponents- Returns:
- component or null if not found
-
getOwnComponents
Description copied from interface:HasComponentsGets all components directly owned by this container.- Specified by:
getOwnComponentsin interfaceHasComponents- Returns:
- all components directly owned by this container
-
getOwnComponentsStream
Description copied from interface:HasComponentsGets stream of all components directly owned by this container.- Specified by:
getOwnComponentsStreamin interfaceHasComponents- Returns:
- stream of all components directly owned by this container
-
getComponents
Description copied from interface:HasComponentsGets all components belonging to the whole components tree below this container.- Specified by:
getComponentsin interfaceHasComponents- Returns:
- all components belonging to the whole components tree below this container
-
getOrientation
public int getOrientation()- Specified by:
getOrientationin interfaceSplitPanel- Returns:
- a split panel orientation
-
setOrientation
public void setOrientation(int orientation) Description copied from interface:SplitPanelSets a split panel orientation.- Specified by:
setOrientationin interfaceSplitPanel- Parameters:
orientation- a split panel orientation- See Also:
-
setSplitPosition
public void setSplitPosition(int pos) Description copied from interface:SplitPanelSets a position of split from the left side by default.- Specified by:
setSplitPositionin interfaceSplitPanel- Parameters:
pos- the new size of the first region.
-
setSplitPosition
Description copied from interface:SplitPanelSets a position of split from the left side by default.- Specified by:
setSplitPositionin 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:SplitPanelSets a position of split from the left side by default. If reversePosition is true position will be set from right.- Specified by:
setSplitPositionin 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:
getSplitPositionin interfaceSplitPanel- Returns:
- position of the splitter.
-
getSplitPositionSizeUnit
Description copied from interface:SplitPanelReturns the unit of position of the splitter.- Specified by:
getSplitPositionSizeUnitin interfaceSplitPanel- Returns:
- unit of position of the splitter
-
isSplitPositionReversed
public boolean isSplitPositionReversed()Description copied from interface:SplitPanelReturn from which side position is set.- Specified by:
isSplitPositionReversedin interfaceSplitPanel
-
setMinSplitPosition
Description copied from interface:SplitPanelSets the minimum split position to the given position and unit. If the split position is reversed, maximum and minimum are also reversed.- Specified by:
setMinSplitPositionin 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:SplitPanelReturns the minimum position of the splitter.- Specified by:
getMinSplitPositionin interfaceSplitPanel- Returns:
- minimum position of the splitter
-
getMinSplitPositionSizeUnit
Description copied from interface:SplitPanelReturns the unit of the minimum position of the splitter.- Specified by:
getMinSplitPositionSizeUnitin interfaceSplitPanel- Returns:
- unit of the minimum position of the splitter
-
setMaxSplitPosition
Description copied from interface:SplitPanelSets the maximum split position to the given position and unit. If the split position is reversed, maximum and minimum are also reversed.- Specified by:
setMaxSplitPositionin 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:SplitPanelReturns the maximum position of the splitter.- Specified by:
getMaxSplitPositionin interfaceSplitPanel- Returns:
- maximum position of the splitter
-
getMaxSplitPositionSizeUnit
Description copied from interface:SplitPanelReturns the unit of the maximum position of the splitter.- Specified by:
getMaxSplitPositionSizeUnitin interfaceSplitPanel- Returns:
- unit of the maximum position of the splitter
-
setLocked
public void setLocked(boolean locked) Description copied from interface:SplitPanelSets whether users are able to change the separator position or not.- Specified by:
setLockedin interfaceSplitPanel- Parameters:
locked- locked
-
isLocked
public boolean isLocked()- Specified by:
isLockedin 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:SplitPanelEnables or disables SplitPanel dock button.- Specified by:
setDockablein interfaceSplitPanel- Parameters:
dockable- dockable
-
isDockable
public boolean isDockable()- Specified by:
isDockablein interfaceSplitPanel- Returns:
- whether dock button is enabled or not
-
setDockMode
Description copied from interface:SplitPanelSets docking direction.- Specified by:
setDockModein interfaceSplitPanel- Parameters:
dockMode- one ofSplitPanel.DockModeoptions
-
getDockMode
- Specified by:
getDockModein interfaceSplitPanel- Returns:
- docking direction
-
addSplitPositionChangeListener
public Subscription addSplitPositionChangeListener(Consumer<SplitPanel.SplitPositionChangeEvent> listener) Description copied from interface:SplitPanelAdds a listener forSplitPanel.SplitPositionChangeEvents fired by a SplitPanel.- Specified by:
addSplitPositionChangeListenerin interfaceSplitPanel- Parameters:
listener- a listener to add
-
attached
public void attached()Description copied from interface:AttachNotifierNotifies all listeners that component has been attached.- Specified by:
attachedin interfaceAttachNotifier- Overrides:
attachedin classAbstractComponent<com.vaadin.ui.AbstractSplitPanel>
-
detached
public void detached()Description copied from interface:AttachNotifierNotifies all listeners that component has been detached.- Specified by:
detachedin interfaceAttachNotifier- Overrides:
detachedin classAbstractComponent<com.vaadin.ui.AbstractSplitPanel>
-