Class UI2dContainer

All Implemented Interfaces:
UIContainer, LXLoopTask, Iterable<UIObject>
Direct Known Subclasses:
UI2dContext, UI2dScrollContainer, UIAbstractGlobalModulator.UIModulation, UIAudio.GraphicMeter, UIAudio.UIOutputControls, UIBottomTray, UIButtonGroup, UIChannelDevice.PlaylistControls, UIClipButton, UIClipGridStrip, UIClipLauncher, UIClipView, UICollapsibleSection, UIColorPicker.UIColorOverlay, UIContentPicker, UIContextMenu, UIContextualHelpBar, UICredits, UIDevice, UIDeviceBin, UIDeviceBin.UIPatternBin, UIDeviceModulators, UIDialogBox, UIFixture, UIFixture.Section, UIFixturePicker, UIImagePattern.ImageControls, UIItemList.BasicList, UIItemList.ScrollList, UIMixer, UIMixerStrip, UIMixerStripControls, UIModelManager, UIModulator, UIModulatorPicker, UIPalette.SavedSwatch, UIPalette.Swatch, UIPane, UIPerformancePane.Section, UIPerformanceTool, UIPerformanceTool.Content, UIPreferences, UIProject.UIScheduler, UISceneLauncher, UISceneStrip, UIToolbar, UIToolbarSection, UIVariableLFO.UIPeriodControl, UIWave

public class UI2dContainer extends UI2dComponent implements UIContainer, Iterable<UIObject>
  • Constructor Details

    • UI2dContainer

      public UI2dContainer(float x, float y, float w, float h)
  • Method Details

    • newHorizontalContainer

      public static UI2dContainer newHorizontalContainer(float height)
    • newHorizontalContainer

      public static UI2dContainer newHorizontalContainer(float height, float childSpacing)
    • newHorizontalContainer

      public static UI2dContainer newHorizontalContainer(float height, float childSpacing, UI2dComponent... children)
    • newVerticalContainer

      public static UI2dContainer newVerticalContainer(float width)
    • newVerticalContainer

      public static UI2dContainer newVerticalContainer(float width, float childSpacing)
    • newVerticalContainer

      public static UI2dContainer newVerticalContainer(float width, float childSpacing, UI2dComponent... children)
    • setPadding

      public UI2dContainer setPadding(float padding)
    • setPadding

      public UI2dContainer setPadding(float yPadding, float xPadding)
    • setPadding

      public UI2dContainer setPadding(float topPadding, float rightPadding, float bottomPadding, float leftPadding)
    • getTopPadding

      public float getTopPadding()
    • getRightPadding

      public float getRightPadding()
    • getBottomPadding

      public float getBottomPadding()
    • getLeftPadding

      public float getLeftPadding()
    • setChildMargin

      @Deprecated public UI2dContainer setChildMargin(float childMargin)
      Deprecated.
      Deprecated. Use setChildSpacing(float) instead
      Parameters:
      childMargin - Child margin
      Returns:
      this
    • setChildSpacing

      public UI2dContainer setChildSpacing(float childSpacing)
    • setChildSpacing

      public UI2dContainer setChildSpacing(float childSpacingY, float childSpacingX)
    • setMinWidth

      public UI2dContainer setMinWidth(float minWidth)
    • setMinHeight

      public UI2dContainer setMinHeight(float minHeight)
    • setLayout

      public UI2dContainer setLayout(UI2dContainer.Layout layout, float childSpacing)
    • setLayout

      public UI2dContainer setLayout(UI2dContainer.Layout layout)
    • setDragToReorder

      public UI2dContainer setDragToReorder(boolean dragToReorder)
    • hasDragToReorder

      public boolean hasDragToReorder()
    • setArrowKeyFocus

      public UI2dContainer setArrowKeyFocus(UI2dContainer.ArrowKeyFocus keyFocus)
    • addChildren

      public UI2dContainer addChildren(UI2dComponent... children)
    • reflow

      protected final void reflow()
    • onReflow

      protected void onReflow()
    • setContentTarget

      protected UI2dContainer setContentTarget(UI2dContainer contentTarget)
    • addTopLevelComponent

      protected UI2dContainer addTopLevelComponent(UI2dComponent child)
    • getContentTarget

      public UI2dContainer getContentTarget()
      Returns the object that elements are added to when placed in this container. In most cases, it will be "this" - but some elements have special subcontainers.
      Specified by:
      getContentTarget in interface UIContainer
      Returns:
      Element
    • getScrollWidth

      public float getScrollWidth()
      Returns the width of scrolling content. By default this is the same as the width of the container itself, but if the container scrolls then the scroll width may be a larger value.
      Returns:
      Width of scrollable content
    • getScrollHeight

      public float getScrollHeight()
      Returns the height of scrolling content. By default this is the same as the height of the container itself, but if the container scrolls then the scroll height may be a larger value.
      Returns:
      Height of scrollable content
    • getContentWidth

      public float getContentWidth()
      Description copied from interface: UIContainer
      Returns the width of the content container
      Specified by:
      getContentWidth in interface UIContainer
      Returns:
      width of content section
    • getContentHeight

      public float getContentHeight()
      Description copied from interface: UIContainer
      Returns the height of the content container
      Specified by:
      getContentHeight in interface UIContainer
      Returns:
      height of the content section
    • setContentWidth

      public UI2dContainer setContentWidth(float w)
    • setContentHeight

      public UI2dContainer setContentHeight(float h)
    • setContentSize

      public UI2dContainer setContentSize(float w, float h)
    • removeAllChildren

      public UI2dContainer removeAllChildren()
    • removeAllChildren

      public UI2dContainer removeAllChildren(boolean dispose)
    • iterator

      public Iterator<UIObject> iterator()
      Specified by:
      iterator in interface Iterable<UIObject>
    • getChildren

      public List<UIObject> getChildren()
    • getChild

      public UI2dComponent getChild(int i)
    • onKeyPressed

      protected void onKeyPressed(KeyEvent keyEvent, char keyChar, int keyCode)
      Description copied from class: UIEventHandler
      Subclasses override to receive key events
      Overrides:
      onKeyPressed in class UIEventHandler
      Parameters:
      keyEvent - Key event
      keyChar - Key character
      keyCode - Key code value
    • onDraw

      protected void onDraw(UI ui, VGraphics vg)
      Description copied from class: UI2dComponent
      Subclasses should override this method to perform their drawing functions.
      Overrides:
      onDraw in class UI2dComponent
      Parameters:
      ui - UI context
      vg - Graphics context