org.netbeans.spi.navigator/1 1.27.1

org.netbeans.spi.navigator
Class NavigatorHandler

java.lang.Object
  extended by org.netbeans.spi.navigator.NavigatorHandler

public final class NavigatorHandler
extends Object

Set of methods for driving navigator behaviour.


Method Summary
static void activateNavigator()
          If there is a custom NavigatorDisplayer implementation, it should call this method just before its UI shows up (before the enclosing TopComponent is opened) to actually initialize the navigator.
static void activatePanel(NavigatorPanel panel)
          Activates and shows given panel in navigator view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

activatePanel

public static void activatePanel(NavigatorPanel panel)
Activates and shows given panel in navigator view. Panel must be one of available panels at the time this method is called, which means that panel must be registered (either through mime type in xml layer or NavigatorLookupHint) for currently activated node in the system. Previously activated panel is deactivated and hidden.

Typical use case is to set preferred navigator panel in a situation when multiple panels are registered for multiple data types.

This method must be called from EventQueue thread.

Parameters:
panel - Navigator panel to be activated
Throws:
IllegalArgumentException - if given panel is not available

activateNavigator

public static void activateNavigator()
If there is a custom NavigatorDisplayer implementation, it should call this method just before its UI shows up (before the enclosing TopComponent is opened) to actually initialize the navigator. From this point the navigator observes the TopComponent and once it is opened, it starts collecting panels from the providers and passing them to the displayer.

If there is no custom displayer registered, the navigator's own (default) TopComponent will be used and it also takes care of initializing the navigator automatically. No need to call this method then.

Since:
1.19

org.netbeans.spi.navigator/1 1.27.1

Built on June 6 2013.  |  Portions Copyright 1997-2013 Oracle. All rights reserved.