站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

NavigatorPanel (NetBeans Navigator API) - NetBeans API Javadoc 5.0.0

 

org.netbeans.spi.navigator
Interface NavigatorPanel


public interface NavigatorPanel

Navigation related view description. Implementors of this interface, also registered in layer, will be plugged into Navigator UI.


Method Summary
 JComponent getComponent()
          JComponent representation of this view.
 String getDisplayHint()
          Description of the view, explaining main purpose of the view.
 String getDisplayName()
          Name of the view which will be shown in navigator UI.
 Lookup getLookup()
          Returns Lookup that will be integrated into Lookup of Navigator UI TopComponent.
 void panelActivated(Lookup context)
          Called when this panel's component is about to being displayed.
 void panelDeactivated()
          Called when this panel's component is about to being hidden.
 

Method Detail

getDisplayName

public String getDisplayName()
Name of the view which will be shown in navigator UI.

Returns:
Displayable name of the view

getDisplayHint

public String getDisplayHint()
Description of the view, explaining main purpose of the view. Will be shown in Navigator UI.

Returns:
String description of the view.

getComponent

public JComponent getComponent()
JComponent representation of this view. System will ask multiple times and it is strongly recommended to return the same JComponent instance each call for performance reasons.

This method is always called in event dispatch thread.

Returns:
JComponent representation of this view.

panelActivated

public void panelActivated(Lookup context)
Called when this panel's component is about to being displayed. Right place to attach listeners to current navigation data context, as clients are responsible for listening to context changes when active (in the time between panelActivated - panelDeactivated calls). This method is always called in event dispatch thread.

Parameters:
context - Lookup instance representing current context to take data from

panelDeactivated

public void panelDeactivated()
Called when this panel's component is about to being hidden. Right place to detach, remove listeners from data context, that were added in panelActivated impl. This method is always called in event dispatch thread.


getLookup

public Lookup getLookup()
Returns Lookup that will be integrated into Lookup of Navigator UI TopComponent. Allows clients for example to specify activated Node of Navigator UI TopComponent when this panel is active.

Method may return null, signalizing that default mechanism should be enabled. Default mechanism chooses first Node from Utilities.actionsGlobalContext() as activated Node for Navigator's TopComponent.

Returns:
Lookup instance or null

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.