How to change selected tab of Multiview?

Apache NetBeans Wiki Index

Note: These pages are being reviewed.

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