Package com.iizix.prop.bridge
Class BridgeContainer<LAYOUT_PROP extends LayoutProp>
- java.lang.Object
- com.iizix.prop.bridge.BridgeContainer<LAYOUT_PROP>
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 Summary
Constructors Constructor Description BridgeContainer(UIContainer uiContainer, LayoutMgr<LAYOUT_PROP> layoutMgr, PropCnr propCnr)
Constructs the bridge with UI container.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.UIContainer
getContainer()
Gets the UI container.LayoutMgr<LAYOUT_PROP>
getLayoutMgr()
Gets the layout manager.
Constructor Detail
BridgeContainer
public BridgeContainer(UIContainer uiContainer, LayoutMgr<LAYOUT_PROP> layoutMgr, PropCnr propCnr)
Constructs the bridge with UI container.- Parameters:
uiContainer
- The UI containerlayoutMgr
- The class of the UI container layout manager.propCnr
- The property container.
Method Detail
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, 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.