Package com.iizix.prop.bridge
Class BridgeContainer<LAYOUT_PROP extends LayoutProp>
java.lang.Object
com.iizix.prop.bridge.BridgeContainer<LAYOUT_PROP>
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
ConstructorDescriptionBridgeContainer
(UIContainer uiContainer, LayoutMgr<LAYOUT_PROP> layoutMgr, PropCnr propCnr) Constructs the bridge with UI container.Method Summary
Modifier and TypeMethodDescriptionAdds a definition of a UI component mapping to a VS property.Gets the UI container.Gets the layout manager.
Constructor Details
BridgeContainer
Constructs the bridge with UI container.- Parameters:
uiContainer
- The UI containerlayoutMgr
- The class of the UI container layout manager.propCnr
- The property container.
Method Details
getContainer
Gets the UI container.getLayoutMgr
Gets the layout manager.add
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.