Package limn.components
Interface TabbedPane.TabCloseRequest
- Enclosing class:
TabbedPane
public static sealed interface TabbedPane.TabCloseRequest
One question to
TabbedPane.onTabClose: may this tab close? Answered once, with
allow() or refuse(), now or later: a handler that shows a dialog keeps the
request and answers from its result. While it is unanswered the tab is not asked again.
Only Limn implements this interface. A test asks a handler the way the user does: a click
on the tab's close button, or the key that closes the selected tab, through the scene driver
of limn-test.
-
Method Summary
-
Method Details
-
index
int index()- Returns:
- the tab's index now, or -1 when it is no longer in the pane
-
content
Widget<?> content()- Returns:
- the content of the tab asked about, which is how it is known after a move
-
allow
void allow()Closes the tab, if it is still in the pane. UI thread only.- Throws:
IllegalStateException- if the request was already answered
-
refuse
void refuse()Keeps the tab. UI thread only.- Throws:
IllegalStateException- if the request was already answered
-
isAnswered
boolean isAnswered()
-