public class SplitPanelImpl extends AbstractComponent<com.vaadin.ui.AbstractSplitPanel> implements SplitPanel
SplitPanel.DockMode, SplitPanel.SplitPositionChangeEvent
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
protected float |
currentPosition |
protected boolean |
inverse |
protected int |
orientation |
protected java.util.List<Component> |
ownComponents |
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
NAME, ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
SplitPanelImpl() |
Modifier and Type | Method and Description |
---|---|
void |
add(Component childComponent)
Adds a component to this container.
|
io.jmix.core.common.event.Subscription |
addSplitPositionChangeListener(java.util.function.Consumer<SplitPanel.SplitPositionChangeEvent> listener)
Adds a listener for
SplitPanel.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 |
createComponentImpl() |
void |
detached()
Notifies all listeners that component has been detached.
|
protected void |
fireSplitPositionChangeListener(com.vaadin.ui.AbstractSplitPanel.SplitPositionChangeEvent event) |
Component |
getComponent(java.lang.String id)
Gets a component belonging to the whole components tree below this container.
|
java.util.Collection<Component> |
getComponents()
Gets all components belonging to the whole components tree below this container.
|
SplitPanel.DockMode |
getDockMode() |
float |
getMaxSplitPosition()
Returns the maximum position of the splitter.
|
SizeUnit |
getMaxSplitPositionSizeUnit()
Returns the unit of the maximum position of the splitter.
|
float |
getMinSplitPosition()
Returns the minimum position of the splitter.
|
SizeUnit |
getMinSplitPositionSizeUnit()
Returns the unit of the minimum position of the splitter.
|
int |
getOrientation() |
Component |
getOwnComponent(java.lang.String id)
Gets component directly owned by this container.
|
java.util.Collection<Component> |
getOwnComponents()
Gets all components directly owned by this container.
|
java.util.stream.Stream<Component> |
getOwnComponentsStream()
Gets stream of all components directly owned by this container.
|
float |
getSplitPosition() |
SizeUnit |
getSplitPositionSizeUnit()
Returns the unit of position of the splitter.
|
boolean |
isDockable() |
boolean |
isLocked() |
boolean |
isSplitPositionReversed()
Return from which side position is set.
|
void |
remove(Component childComponent)
Removes a component from this container.
|
void |
removeAll()
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 |
setFrame(Frame frame) |
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.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, remove
focusFirstComponent, getComponentNN
getFrame
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
getIcon, setIcon, setIconFromSet
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
protected java.util.List<Component> ownComponents
protected int orientation
protected float currentPosition
protected boolean inverse
public void add(Component childComponent)
ComponentContainer
add
in interface ComponentContainer
childComponent
- a component to addprotected void createComponentImpl()
protected void fireSplitPositionChangeListener(com.vaadin.ui.AbstractSplitPanel.SplitPositionChangeEvent event)
public void remove(Component childComponent)
ComponentContainer
remove
in interface ComponentContainer
childComponent
- a component to removepublic void removeAll()
ComponentContainer
removeAll
in interface ComponentContainer
public void setFrame(@Nullable Frame frame)
setFrame
in interface Component.BelongToFrame
setFrame
in class AbstractComponent<com.vaadin.ui.AbstractSplitPanel>
@Nullable public Component getOwnComponent(java.lang.String id)
HasComponents
getOwnComponent
in interface HasComponents
@Nullable public Component getComponent(java.lang.String id)
HasComponents
getComponent
in interface HasComponents
public java.util.Collection<Component> getOwnComponents()
HasComponents
getOwnComponents
in interface HasComponents
public java.util.stream.Stream<Component> getOwnComponentsStream()
HasComponents
getOwnComponentsStream
in interface HasComponents
public java.util.Collection<Component> getComponents()
HasComponents
getComponents
in interface HasComponents
public int getOrientation()
getOrientation
in interface SplitPanel
public void setOrientation(int orientation)
SplitPanel
setOrientation
in interface SplitPanel
orientation
- a split panel orientationSplitPanel.ORIENTATION_VERTICAL
,
SplitPanel.ORIENTATION_HORIZONTAL
public void setSplitPosition(int pos)
SplitPanel
setSplitPosition
in interface SplitPanel
pos
- the new size of the first region.public void setSplitPosition(int pos, SizeUnit unit)
SplitPanel
setSplitPosition
in interface SplitPanel
pos
- the new size of the first region.unit
- the unit (from SizeUnit
) in which the size is given.public void setSplitPosition(int pos, SizeUnit unit, boolean reversePosition)
SplitPanel
setSplitPosition
in interface SplitPanel
pos
- the new size of the first region.unit
- the unit (from SizeUnit
) 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 regionpublic float getSplitPosition()
getSplitPosition
in interface SplitPanel
public SizeUnit getSplitPositionSizeUnit()
SplitPanel
getSplitPositionSizeUnit
in interface SplitPanel
public boolean isSplitPositionReversed()
SplitPanel
isSplitPositionReversed
in interface SplitPanel
public void setMinSplitPosition(int pos, SizeUnit unit)
SplitPanel
setMinSplitPosition
in interface SplitPanel
pos
- the new size of the first region.unit
- the unit (from SizeUnit
) in which the size is given.public float getMinSplitPosition()
SplitPanel
getMinSplitPosition
in interface SplitPanel
public SizeUnit getMinSplitPositionSizeUnit()
SplitPanel
getMinSplitPositionSizeUnit
in interface SplitPanel
public void setMaxSplitPosition(int pos, SizeUnit unit)
SplitPanel
setMaxSplitPosition
in interface SplitPanel
pos
- the new size of the first region.unit
- the unit (from SizeUnit
) in which the size is given.public float getMaxSplitPosition()
SplitPanel
getMaxSplitPosition
in interface SplitPanel
public SizeUnit getMaxSplitPositionSizeUnit()
SplitPanel
getMaxSplitPositionSizeUnit
in interface SplitPanel
public void setLocked(boolean locked)
SplitPanel
setLocked
in interface SplitPanel
locked
- lockedpublic boolean isLocked()
isLocked
in interface SplitPanel
protected com.vaadin.server.Sizeable.Unit convertLegacyUnit(int unit)
public void setDockable(boolean dockable)
SplitPanel
setDockable
in interface SplitPanel
dockable
- dockablepublic boolean isDockable()
isDockable
in interface SplitPanel
public void setDockMode(SplitPanel.DockMode dockMode)
SplitPanel
setDockMode
in interface SplitPanel
dockMode
- one of SplitPanel.DockMode
optionspublic SplitPanel.DockMode getDockMode()
getDockMode
in interface SplitPanel
public io.jmix.core.common.event.Subscription addSplitPositionChangeListener(java.util.function.Consumer<SplitPanel.SplitPositionChangeEvent> listener)
SplitPanel
SplitPanel.SplitPositionChangeEvent
s fired by a SplitPanel.addSplitPositionChangeListener
in interface SplitPanel
listener
- a listener to addpublic void attached()
AttachNotifier
attached
in interface AttachNotifier
attached
in class AbstractComponent<com.vaadin.ui.AbstractSplitPanel>
public void detached()
AttachNotifier
detached
in interface AttachNotifier
detached
in class AbstractComponent<com.vaadin.ui.AbstractSplitPanel>