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
  • Field Details

    • ownComponents

      protected List<Component> ownComponents
    • orientation

      protected int orientation
    • currentPosition

      protected float currentPosition
    • inverse

      protected boolean inverse
  • Constructor Details

    • SplitPanelImpl

      public SplitPanelImpl()
  • Method Details

    • add

      public void add(Component childComponent)
      Description copied from interface: ComponentContainer
      Adds a component to this container.
      Specified by:
      add in interface ComponentContainer
      Parameters:
      childComponent - a component to add
    • createComponentImpl

      protected void createComponentImpl()
    • fireSplitPositionChangeListener

      protected void fireSplitPositionChangeListener(com.vaadin.ui.AbstractSplitPanel.SplitPositionChangeEvent event)
    • remove

      public void remove(Component childComponent)
      Description copied from interface: ComponentContainer
      Removes a component from this container.
      Specified by:
      remove in interface ComponentContainer
      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 interface ComponentContainer
    • setFrame

      public void setFrame(@Nullable Frame frame)
      Specified by:
      setFrame in interface Component.BelongToFrame
      Overrides:
      setFrame in class AbstractComponent<com.vaadin.ui.AbstractSplitPanel>
    • getOwnComponent

      @Nullable public Component getOwnComponent(String id)
      Description copied from interface: HasComponents
      Gets component directly owned by this container.
      Specified by:
      getOwnComponent in interface HasComponents
      Returns:
      component or null if not found
    • getComponent

      @Nullable public Component getComponent(String id)
      Description copied from interface: HasComponents
      Gets a component belonging to the whole components tree below this container.
      Specified by:
      getComponent in interface HasComponents
      Returns:
      component or null if not found
    • getOwnComponents

      public Collection<Component> getOwnComponents()
      Description copied from interface: HasComponents
      Gets all components directly owned by this container.
      Specified by:
      getOwnComponents in interface HasComponents
      Returns:
      all components directly owned by this container
    • getOwnComponentsStream

      public Stream<Component> getOwnComponentsStream()
      Description copied from interface: HasComponents
      Gets stream of all components directly owned by this container.
      Specified by:
      getOwnComponentsStream in interface HasComponents
      Returns:
      stream of all components directly owned by this container
    • getComponents

      public Collection<Component> getComponents()
      Description copied from interface: HasComponents
      Gets all components belonging to the whole components tree below this container.
      Specified by:
      getComponents in interface HasComponents
      Returns:
      all components belonging to the whole components tree below this container
    • getOrientation

      public int getOrientation()
      Specified by:
      getOrientation in interface SplitPanel
      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 interface SplitPanel
      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 interface SplitPanel
      Parameters:
      pos - the new size of the first region.
    • setSplitPosition

      public void setSplitPosition(int pos, SizeUnit unit)
      Description copied from interface: SplitPanel
      Sets a position of split from the left side by default.
      Specified by:
      setSplitPosition in interface SplitPanel
      Parameters:
      pos - the new size of the first region.
      unit - the unit (from SizeUnit) in which the size is given.
    • setSplitPosition

      public void setSplitPosition(int pos, SizeUnit unit, boolean reversePosition)
      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 interface SplitPanel
      Parameters:
      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 region
    • getSplitPosition

      public float getSplitPosition()
      Specified by:
      getSplitPosition in interface SplitPanel
      Returns:
      position of the splitter.
    • getSplitPositionSizeUnit

      public SizeUnit getSplitPositionSizeUnit()
      Description copied from interface: SplitPanel
      Returns the unit of position of the splitter.
      Specified by:
      getSplitPositionSizeUnit in interface SplitPanel
      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 interface SplitPanel
    • setMinSplitPosition

      public void setMinSplitPosition(int pos, SizeUnit unit)
      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 interface SplitPanel
      Parameters:
      pos - the new size of the first region.
      unit - the unit (from SizeUnit) 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 interface SplitPanel
      Returns:
      minimum position of the splitter
    • getMinSplitPositionSizeUnit

      public SizeUnit getMinSplitPositionSizeUnit()
      Description copied from interface: SplitPanel
      Returns the unit of the minimum position of the splitter.
      Specified by:
      getMinSplitPositionSizeUnit in interface SplitPanel
      Returns:
      unit of the minimum position of the splitter
    • setMaxSplitPosition

      public void setMaxSplitPosition(int pos, SizeUnit unit)
      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 interface SplitPanel
      Parameters:
      pos - the new size of the first region.
      unit - the unit (from SizeUnit) 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 interface SplitPanel
      Returns:
      maximum position of the splitter
    • getMaxSplitPositionSizeUnit

      public SizeUnit getMaxSplitPositionSizeUnit()
      Description copied from interface: SplitPanel
      Returns the unit of the maximum position of the splitter.
      Specified by:
      getMaxSplitPositionSizeUnit in interface SplitPanel
      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 interface SplitPanel
      Parameters:
      locked - locked
    • isLocked

      public boolean isLocked()
      Specified by:
      isLocked in interface SplitPanel
      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 interface SplitPanel
      Parameters:
      dockable - dockable
    • isDockable

      public boolean isDockable()
      Specified by:
      isDockable in interface SplitPanel
      Returns:
      whether dock button is enabled or not
    • setDockMode

      public void setDockMode(SplitPanel.DockMode dockMode)
      Description copied from interface: SplitPanel
      Sets docking direction.
      Specified by:
      setDockMode in interface SplitPanel
      Parameters:
      dockMode - one of SplitPanel.DockMode options
    • getDockMode

      public SplitPanel.DockMode getDockMode()
      Specified by:
      getDockMode in interface SplitPanel
      Returns:
      docking direction
    • addSplitPositionChangeListener

      public Subscription addSplitPositionChangeListener(Consumer<SplitPanel.SplitPositionChangeEvent> listener)
      Description copied from interface: SplitPanel
      Adds a listener for SplitPanel.SplitPositionChangeEvents fired by a SplitPanel.
      Specified by:
      addSplitPositionChangeListener in interface SplitPanel
      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 interface AttachNotifier
      Overrides:
      attached in class AbstractComponent<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 interface AttachNotifier
      Overrides:
      detached in class AbstractComponent<com.vaadin.ui.AbstractSplitPanel>