Extension SDK

oracle.ide.navigator
Interface NodeOverlayManager

All Superinterfaces:
IconOverlayManager

public interface NodeOverlayManager
extends IconOverlayManager

The manager for control of navigator node overlays.

Addins requiring the use of overlay icons in a navigator window must initialize the navigator manager with the overlay controller to use before the view is created. If there is a requirement for overlays in the system navigator instance, this must happen during addin initialization ahead of referencing the system navigator. The navigator manager provides a default overlay manager implementation, which can be established in the following way -

NavigatorManager manager = Ide.getFeatures().getNavigatorManager();
manager.setOverlayManager( manager.getDefaultOverlayManager() );

The node overlay manager also holds a list of clients through which the work of overlay determination is performed prior to rendering. Many clients may register, but since multiple simultaneous overlays are not supported there must be a client consensus for controlled elements and a separation of responsibility.

See Also:
NavigatorManager, NodeOverlayClient

Method Summary
 void addClient(NodeOverlayClient client)
          Adds a controller client for node overlay retrieval.
 void addTreeExplorer(TreeExplorer tree)
          Adds a tree explorer for node overlay control.
 void removeClient(NodeOverlayClient client)
          Removes the given controller client for node overlays.
 void removeTreeExplorer(TreeExplorer tree)
          Removes a tree explorer from node overlay control.
 void repaintOverlays()
          Refresh, through repainting, all visible node overlays.
 void validateOverlay(Element e)
          Validates the overlay for the given element.
 void validateOverlays()
          Validates all controlled overlays.
 
Methods inherited from interface oracle.ide.explorer.IconOverlayManager
getOverlayIcon
 

Method Detail

addTreeExplorer

public void addTreeExplorer(TreeExplorer tree)
Adds a tree explorer for node overlay control. This method is called when the explorer's view is created.
Parameters:
tree - the tree explorer to add.

removeTreeExplorer

public void removeTreeExplorer(TreeExplorer tree)
Removes a tree explorer from node overlay control. This method is called when the explorer's view is closed.
Parameters:
tree - the tree explorer to remove.

addClient

public void addClient(NodeOverlayClient client)
Adds a controller client for node overlay retrieval. Clients register in this way and respond to requests for a state representation. At the time of painting the node, the client will supply the appropriate overlay.
Parameters:
client - the overlay client value to add.

removeClient

public void removeClient(NodeOverlayClient client)
Removes the given controller client for node overlays. Note that this method does not remove existing overlays for the client. To effect this change, call #updateOverlays with the client before dropping any local references.
Parameters:
client - the overlay client value to remove.

validateOverlays

public void validateOverlays()
Validates all controlled overlays. This ensures that all overlays will be valid the next time they are rendered by removing any cached (and hence potentially out of date) icons.

validateOverlay

public void validateOverlay(Element e)
Validates the overlay for the given element. This ensures that the overlay for the element will be valid the next time it is rendered by removing any cached (and hence potentially out of date) icon for the element.
Parameters:
e - the element whose overlay must be validated.

repaintOverlays

public void repaintOverlays()
Refresh, through repainting, all visible node overlays. This method assumes that any nodes whose states have changed since they were last rendered have since been invalidated by calling validateOverlay.

Extension SDK