Class BridgeContainer<LAYOUT_PROP extends LayoutProp>

java.lang.Object
com.iizix.prop.bridge.BridgeContainer<LAYOUT_PROP>

public class BridgeContainer<LAYOUT_PROP extends LayoutProp> extends Object
Container class bridging one or several VS elements to UI components in a panel, with text translation support.

Note: this class is NOT thread-safe when building the UI, but once in operation it is.

Author:
Christopher Mindus
  • Constructor Details

    • BridgeContainer

      public BridgeContainer(UIContainer uiContainer, LayoutMgr<LAYOUT_PROP> layoutMgr, PropCnr propCnr)
      Constructs the bridge with UI container.
      Parameters:
      uiContainer - The UI container
      layoutMgr - The class of the UI container layout manager.
      propCnr - The property container.
  • Method Details

    • getContainer

      public UIContainer getContainer()
      Gets the UI container.
    • getLayoutMgr

      public LayoutMgr<LAYOUT_PROP> getLayoutMgr()
      Gets the layout manager.
    • add

      public LAYOUT_PROP add(VSField field, UIComp comp, String prompt, String tooltip)
      Adds a definition of a UI component mapping to a VS property. The items are vertically centered in the layout.
      Parameters:
      field - The VS field to map to.
      comp - The UI component.
      prompt - Potential prompt before the component, null for none.
      tooltip - Potential tooltip on the component and its prompt, null for none.
      Returns:
      The layout of the component.
      Throws:
      IllegalArgumentException - If the field is attached to a component in this bridge container.