How to change selected tab of Multiview?
Using org.netbeans.core.api.multiview.MultiViews
you can get an instance of org.netbeans.core.api.multiview.MultiViewHandler
.
For example: Get the handler for the current TopComponent
TopComponent activated = WindowManager.getDefault().getRegistry().getActivated();
MultiViewHandler mvh = MultiViews.findMultiViewHandler(activated);
Using this handler you can call
-
getPerspectives()
to get all available tabs -
requestActive/requestVisible(MultiViewPerspective desc)
to activate the tab
See also MultiViewHandler