This diagram shows a {@code Tabs} with A and B tabs. When A's button is clicked, A's contentis shown. B content is not generated or not visible.
{@code -------------------------------------- | ----- ----- | | |*A*| | B | | <--- the buttons group, A selected | ----- ----- | |------------------------------------| | | <--- the contentArea group | -------------------------------- | | | A content | | | -------------------------------- | | | --------------------------------------}
The tab content associated with a button is supplied on demand via a {@link Supplier}instance. The contract of {@code Supplier} is obeyed in that {@link Supplier#destroy()} iscalled whenever the associated tab goes out of scope.
NOTE: The inheritance from Composite means that child elements may not be added or removed directly. It you need, for example, a title bar, just use a Group with the title bar and tabs.
TODO: do we care about scrolling buttons? yes
|
|