Extension SDK

oracle.ide.explorer
Interface IconOverlayCache


public interface IconOverlayCache

The observable icon overlay cache associated with an overlay manager.

An IconOverlayCache stores overlay icons for any number of explorer views and provides accessor and mutator methods for the cache. Overlay clients are required to update the cache when the state of an element changes and fire change notification for repainting.

Since multiple simultaneous overlays cannot be supported by an explorer, there must be a client consensus for controlled element types and a clear separation of responsibility. Nodes requiring the use of overlay icons must implement the oracle.ide.model.Subject interface.


Method Summary
 void fireOverlaysChanged()
          Repaints all pending element overlay icons after cache updates.
 java.util.Set getElementKeySet()
          Gets the current set of elements in the overlay cache.
 javax.swing.Icon getOverlayIcon(Element e)
          Gets an overlay icon for the given element from the cache.
 boolean hasOverlayIcon(Element e)
          Asks whether the given element has an overlay icon in the cache.
 void putOverlayIcon(Element e, javax.swing.Icon icon)
          Puts an overlay icon for the given element into the cache.
 void removeOverlayIcon(Element e)
          Removes an overlay icon for the given element from the cache.
 

Method Detail

getElementKeySet

public java.util.Set getElementKeySet()
Gets the current set of elements in the overlay cache.

Returns:
the element set.

putOverlayIcon

public void putOverlayIcon(Element e,
                           javax.swing.Icon icon)
Puts an overlay icon for the given element into the cache.

Parameters:
e - the element.

getOverlayIcon

public javax.swing.Icon getOverlayIcon(Element e)
Gets an overlay icon for the given element from the cache.

Parameters:
e - the element.
Returns:
the icon.

removeOverlayIcon

public void removeOverlayIcon(Element e)
Removes an overlay icon for the given element from the cache.

Parameters:
e - the element.

hasOverlayIcon

public boolean hasOverlayIcon(Element e)
Asks whether the given element has an overlay icon in the cache.

Parameters:
e - the element.
Returns:
a verdict.

fireOverlaysChanged

public void fireOverlaysChanged()
Repaints all pending element overlay icons after cache updates.


Extension SDK

 

Copyright ©1997, 2003, Oracle. All rights reserved.