Extension SDK 9.0.5

oracle.ide.explorer
Interface ChildFilter

All Superinterfaces:
Displayable
All Known Implementing Classes:
DefaultFilter

public interface ChildFilter
extends Displayable

The ChildFilter interface defines an API for retrieving a structured collection of Element nodes. The nodes returned may include additional Elements, inserted for organizational purposes, which are not themselves children of the original Element. Additionally, the list may choose to exclude child Elements which are otherwise legitimate children of the original Element. For example; a 'Package' ChildFilter implementation may, when applied to a Project node, return a list containing artificial Elements representing java packages, each of which in turn would contain the legitimate Elements for the individual .java source files of the Project. This same filter might additionaly choose to exclude from its list any Elements which were not .java source files.

This interface intentionally does not offer any means of adding, removing, or searching for individual child Elements which is the responsibility of Container.

See Also:
Element, Container

Field Summary
static int NO_OPTIONS
           
 
Method Summary
 void cache(TNode node)
          This method will be called when the UI creates a TNode that is a descendant of a filtered node.
 boolean canRefresh(TNode[] nodes)
          This method will be called when the UI needs to determine the sensitivity of the Refresh menu item.
 boolean canUpdate(TNode node, UpdateMessage change)
          Call to determine if an update should be done due a property set notification.
 TNode childrenAdded(java.util.List children, TNode parent, TreeExplorer tree)
          The childrenAdded method is called when the UI is notified that an element has been added to the node that owns this filter.
 TNode childrenRemoved(java.util.List children, TNode parent, TreeExplorer tree)
          The childrenRemoved method is called when the UI is notified that an element has been added to the node that owns this filter.
 void closeChildren()
          This method is called when a parent node is closed.
 java.util.Iterator getChildren()
          Get the filtered children list.
 java.util.Comparator getComparator()
          Returns the Comparator that is used to sort the children of the owner TNode.
 int getOptions()
          Accessors to filter options.
 TNode getOwner()
           
 int getType()
          This method should return bitfield specifying the filter type.
 URLFilter getURLFilter()
           
 void refresh(TNode[] nodes)
          This method will be called when the UI is requested to refresh.
 void setOptions(int options)
           
 void setOwner(TNode owner)
          Sets the node that owns this filter.
 void setURLFilter(URLFilter filter)
          Sets the file filter used to exclude specific files
 void uncache(TNode node)
           
 TNode update(TNode node, UpdateMessage change)
          This method will be called when the UI needs to tell a filter that a property set notification has happened.
 
Methods inherited from interface oracle.ide.model.Displayable
getIcon, getLongLabel, getShortLabel, getToolTipText, toString
 

Field Detail

NO_OPTIONS

public static final int NO_OPTIONS
See Also:
Constant Field Values
Method Detail

getChildren

public java.util.Iterator getChildren()
Get the filtered children list.


childrenAdded

public TNode childrenAdded(java.util.List children,
                           TNode parent,
                           TreeExplorer tree)
The childrenAdded method is called when the UI is notified that an element has been added to the node that owns this filter. This method should return the tnode to be selected in the tree.


childrenRemoved

public TNode childrenRemoved(java.util.List children,
                             TNode parent,
                             TreeExplorer tree)
The childrenRemoved method is called when the UI is notified that an element has been added to the node that owns this filter. This method should return the tnode to be selected in the tree.


setOwner

public void setOwner(TNode owner)
Sets the node that owns this filter.


getOwner

public TNode getOwner()

setURLFilter

public void setURLFilter(URLFilter filter)
Sets the file filter used to exclude specific files


getURLFilter

public URLFilter getURLFilter()

cache

public void cache(TNode node)
This method will be called when the UI creates a TNode that is a descendant of a filtered node.


uncache

public void uncache(TNode node)

refresh

public void refresh(TNode[] nodes)
This method will be called when the UI is requested to refresh.


canRefresh

public boolean canRefresh(TNode[] nodes)
This method will be called when the UI needs to determine the sensitivity of the Refresh menu item.


update

public TNode update(TNode node,
                    UpdateMessage change)
This method will be called when the UI needs to tell a filter that a property set notification has happened.


canUpdate

public boolean canUpdate(TNode node,
                         UpdateMessage change)
Call to determine if an update should be done due a property set notification.


getOptions

public int getOptions()
Accessors to filter options. In general, options are meaninful only to the filter. Options should be stored as bits. Filters that define no options should return NO_OPTIONS.


setOptions

public void setOptions(int options)

getType

public int getType()
This method should return bitfield specifying the filter type. Filters types are created by calling FilterTypes.newType().


getComparator

public java.util.Comparator getComparator()
Returns the Comparator that is used to sort the children of the owner TNode.


closeChildren

public void closeChildren()
This method is called when a parent node is closed. The method should make sure that all elements created by the filter are properly closed.


Extension SDK

 

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