Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.ide.explorer
Class ChildFilter

java.lang.Object
  extended by oracle.ide.explorer.ChildFilter
All Implemented Interfaces:
Displayable
Direct Known Subclasses:
DefaultFilter

public abstract class ChildFilter
extends java.lang.Object
implements 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

Field Summary
static int NO_OPTIONS
           
 
Constructor Summary
ChildFilter()
           
 
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(UpdateMessage message, 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(UpdateMessage message, TNode parent, TreeExplorer tree)
          The childrenRemoved method is called when the UI is notified that an element has been removed from 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.
 javax.swing.Icon getIcon()
          Returns an Icon that can be shown in association with this Displayable.
 java.lang.String getLongLabel()
          Returns a long label that can be displayed to the user.
 int getOptions()
          Accessors to filter options.
 TNode getOwner()
           
 java.lang.String getShortLabel()
          Returns a short label that can be displayed to the user.
 java.lang.String getToolTipText()
          Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Displayable.
 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
 java.lang.String toString()
          Returns the Short Label displayed to a user.
 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_OPTIONS

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

ChildFilter

public ChildFilter()
Method Detail

getShortLabel

public java.lang.String getShortLabel()
Description copied from interface: Displayable
Returns a short label that can be displayed to the user. Generally, the value of the returned String is considered translatable and should therefore be placed in an appropriate resource file. When possible, the returned label should be reasonably short enough to show in the navigator or explorer windows but long enough to clearly identify and distinguish the Displayable.

Specified by:
getShortLabel in interface Displayable
Returns:
a short descriptive label of the Displayable that can be shown to the user.

getLongLabel

public java.lang.String getLongLabel()
Description copied from interface: Displayable
Returns a long label that can be displayed to the user. Generally, the value of the returned String is considered translatable and should therefore be placed in an appropriate resource file. The long label differs from the short label essentially on length. Usually the long label will only be shown on-demand and in places where horizontal space is more available. Examples are the status bar and tooltips.

Specified by:
getLongLabel in interface Displayable
Returns:
a long descriptive label of the Displayable that can be shown to the user.

getIcon

public javax.swing.Icon getIcon()
Description copied from interface: Displayable
Returns an Icon that can be shown in association with this Displayable. Typically the icon will be used in a tree control or list control. Therefore the icon must fit naturally within the space normally given to items within those controls. Such icons are usually 16x16 in size or, if there is a one-pixel transparent padding around the edge, 18x18 in size. It is strongly recommended that icons returned by this method be either 16x16 or 18x18 in size. If null is returned, the control may show a default icon, or it may show no icon, whichever is appropriate.

Specified by:
getIcon in interface Displayable
Returns:
the Icon to be displayed for the Displayable.

getToolTipText

public java.lang.String getToolTipText()
Description copied from interface: Displayable
Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Displayable. In many cases it may be appropriate for this method to return the same value as Displayable.getLongLabel().

Specified by:
getToolTipText in interface Displayable
Returns:
the tooltip to show when the mouse pointer pauses over a UI component that represents this Displayable.

toString

public java.lang.String toString()
Description copied from interface: Displayable
Returns the Short Label displayed to a user. This overrides the toString method in java.lang.Object.

Implementors of the Displayable interface should override this as appropriate. The default implementation is the same as getShortLabel

Specified by:
toString in interface Displayable
Overrides:
toString in class java.lang.Object
See Also:
Object.toString(), Displayable.getShortLabel()

getChildren

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


childrenAdded

public TNode childrenAdded(UpdateMessage message,
                           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(UpdateMessage message,
                             TNode parent,
                             TreeExplorer tree)
The childrenRemoved method is called when the UI is notified that an element has been removed from the node that owns this filter. This method should return the tnode to be selected in the tree.


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.


getComparator

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


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)

getOwner

public final TNode getOwner()

setOwner

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


getURLFilter

public URLFilter getURLFilter()

setURLFilter

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


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)

canRefresh

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


refresh

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


canUpdate

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


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.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

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