Class BridgeContainer<LAYOUT_PROP extends LayoutProp>


  • public class BridgeContainer<LAYOUT_PROP extends LayoutProp>
    extends java.lang.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 Detail

      • 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 Detail

      • getContainer

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

        public LAYOUT_PROP add​(VSField field,
                               UIComp comp,
                               java.lang.String prompt,
                               java.lang.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:
        java.lang.IllegalArgumentException - If the field is attached to a component in this bridge container.