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

  • 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 (from SizeUnit) in which the size is given.
    • setSplitPosition

      void setSplitPosition(int pos, SizeUnit unit, boolean reversePosition)
      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 (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

      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 (from SizeUnit) 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 (from SizeUnit) 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

      @StudioProperty(defaultValue="false") void setLocked(boolean locked)
      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

      @StudioProperty(defaultValue="false") void setDockable(boolean dockable)
      Enables or disables SplitPanel dock button.
      Parameters:
      dockable - dockable
    • isDockable

      boolean isDockable()
      Returns:
      whether dock button is enabled or not
    • setDockMode

      void setDockMode(SplitPanel.DockMode dockMode)
      Sets docking direction.
      Parameters:
      dockMode - one of SplitPanel.DockMode options
    • getDockMode

      SplitPanel.DockMode getDockMode()
      Returns:
      docking direction
    • addSplitPositionChangeListener

      Subscription addSplitPositionChangeListener(Consumer<SplitPanel.SplitPositionChangeEvent> listener)
      Adds a listener for SplitPanel.SplitPositionChangeEvents fired by a SplitPanel.
      Parameters:
      listener - a listener to add