public interface ModeSelector
If none of the registered ModeSelector
s return a valid Mode, the TopComponent
will open in the mode selected by the default algorithm. Implementation of WindowManager
may ignore the hint, for example if it conflicts with persisted settings or user choices.
Implementations of ModeSelector
must be registered in the default Lookup.
Modifier and Type | Method and Description |
---|---|
Mode |
selectModeForOpen(TopComponent tc,
Mode preselectedMode)
Choose a suitable Mode to open the TopComponent in.
|
Mode selectModeForOpen(TopComponent tc, Mode preselectedMode)
preselectedMode
.
The implementation can accept the default or ignore the request and return
null
.tc
- the TopComponent
to be opened.preselectedMode
- the default mode for openingnull
to use the preselected one.