org.netbeans.spi.navigator/1 1.27.1

org.netbeans.spi.navigator
Interface NavigatorDisplayer


public interface NavigatorDisplayer

An abstraction for displaying the Navigator UI. Implement only if you need to display the navigator differently from the standard Navigator window.

By default the standard Navigator TopComponent is provided which manages the navigator panels. An alternative visualization/placement can be specified by implementing this interface and registering it is a service. The methods of the interface get call by the navigator module based on what it needs at the moment.

If an implementation is provided then the navigator needs to be explicitly initialized by calling NavigatorHandler.activateNavigator() when the UI is shown.

Since:
1.19
See Also:
ServiceProvider

Field Summary
static String PROP_PANEL_SELECTION
          Property name to be fired when the selected panel changes in the UI.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Add a listener for PROP_PANEL_SELECTION property change.
 boolean allowAsyncUpdate()
          Tells the navigator whether it can postpone reaction to context changes (possibly coalesce frequent changes) when computing the panels.
 NavigatorPanel getSelectedPanel()
           
 TopComponent getTopComponent()
           
 void removePropertyChangeListener(PropertyChangeListener l)
          Remove a listener for PROP_PANEL_SELECTION property change.
 void setDisplayName(String name)
          Called with the display name of currently selected objects (nodes).
 void setPanels(List<? extends NavigatorPanel> panels, NavigatorPanel select)
          Called to set all the panels to display, plus which one should be selected.
 void setSelectedPanel(NavigatorPanel panel)
          Called to select given panel in the UI.
 

Field Detail

PROP_PANEL_SELECTION

static final String PROP_PANEL_SELECTION
Property name to be fired when the selected panel changes in the UI.

See Also:
Constant Field Values
Method Detail

setDisplayName

void setDisplayName(String name)
Called with the display name of currently selected objects (nodes). It should appear e.g. in the title of the enclosing window.

Parameters:
name - The name of selected object(s)

setPanels

void setPanels(List<? extends NavigatorPanel> panels,
               NavigatorPanel select)
Called to set all the panels to display, plus which one should be selected.

Parameters:
panels - The panels to display
select - The panel to select (can be null)

setSelectedPanel

void setSelectedPanel(NavigatorPanel panel)
Called to select given panel in the UI.

Parameters:
panel - The panel to select

getSelectedPanel

NavigatorPanel getSelectedPanel()
Returns:
The currently selected panel in the UI (can be null)

allowAsyncUpdate

boolean allowAsyncUpdate()
Tells the navigator whether it can postpone reaction to context changes (possibly coalesce frequent changes) when computing the panels. In other words, whether it can be behind the global context sometimes. (It may cause problems in some situations.)

Returns:
false if navigator should react synchronously

getTopComponent

TopComponent getTopComponent()
Returns:
The enclosing TopComponent of the navigator UI

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener l)
Add a listener for PROP_PANEL_SELECTION property change.

Parameters:
l - the listener

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener l)
Remove a listener for PROP_PANEL_SELECTION property change.

Parameters:
l - the listener

org.netbeans.spi.navigator/1 1.27.1

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