Extension SDK

oracle.ide.model
Class DefaultFilter

java.lang.Object
  extended byoracle.ide.model.DefaultFilter
All Implemented Interfaces:
ChildFilter, Displayable
Direct Known Subclasses:
FilelistFilter, HierarchicalFilter

public class DefaultFilter
extends java.lang.Object
implements ChildFilter

The DefaultFilter class. This is an abstract class implementing default filter behavior. This class mainly provides default Displayable behavior.


Nested Class Summary
static class DefaultFilter.SortedComparator
          Builtin Comparator class for ordering the children of a container node in locale-sensitive collation order.
static class DefaultFilter.SortedFolderFirstComparator
          Builtin Comparator class for ordering the children of a container node, with container children ordered before non-container children.
 
Field Summary
static java.util.Comparator folderFirstComparator
          Builtin DefaultFilter.SortedComparator for ordering container children before non-container children in locale-sensitive collation order.
static java.util.Comparator sortedComparator
          Builtin DefaultFilter.SortedComparator for ordering the children of a container node in locale-sensitive collation order.
 
Fields inherited from interface oracle.ide.explorer.ChildFilter
NO_OPTIONS
 
Constructor Summary
DefaultFilter()
          Constructor.
 
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 navigator is needs to determine the sensitivity of the Refresh menu item.
 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.
 java.util.Iterator getChildren()
          Get the filtered children list.
 java.util.Comparator getComparator()
          Returns the DefaultFilter.SortedComparator that is used to sort the children of the owner TNode.
 javax.swing.Icon getIcon()
          Returns the filter owner icon.
 java.lang.String getLongLabel()
          Returns the filter owner long label.
 int getOptions()
          Accessors to filter options.
 TNode getOwner()
           
 java.lang.String getShortLabel()
          Returns the filter owner short label.
 java.lang.String getToolTipText()
          Returns the filter owner tool tip text.
 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.
protected  void refreshExplorerNode(TNode tnode)
           
 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 filter owner short label.
 void uncache(TNode node)
           
 TNode update(TNode node, UpdateMessage change)
          This method will be called when the navigator is 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

sortedComparator

public static final java.util.Comparator sortedComparator
Builtin DefaultFilter.SortedComparator for ordering the children of a container node in locale-sensitive collation order.


folderFirstComparator

public static final java.util.Comparator folderFirstComparator
Builtin DefaultFilter.SortedComparator for ordering container children before non-container children in locale-sensitive collation order.

Constructor Detail

DefaultFilter

public DefaultFilter()
Constructor.

Method Detail

setOwner

public void setOwner(TNode owner)
Description copied from interface: ChildFilter
Sets the node that owns this filter.

Specified by:
setOwner in interface ChildFilter

getOwner

public TNode getOwner()
Specified by:
getOwner in interface ChildFilter

getOptions

public int getOptions()
Description copied from interface: ChildFilter
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.

Specified by:
getOptions in interface ChildFilter

setOptions

public void setOptions(int options)
Specified by:
setOptions in interface ChildFilter

uncache

public void uncache(TNode node)
Specified by:
uncache in interface ChildFilter

cache

public void cache(TNode node)
Description copied from interface: ChildFilter
This method will be called when the UI creates a TNode that is a descendant of a filtered node.

Specified by:
cache in interface ChildFilter

refresh

public void refresh(TNode[] nodes)
Description copied from interface: ChildFilter
This method will be called when the UI is requested to refresh.

Specified by:
refresh in interface ChildFilter

canRefresh

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

Specified by:
canRefresh in interface ChildFilter

update

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

Specified by:
update in interface ChildFilter

getURLFilter

public URLFilter getURLFilter()
Specified by:
getURLFilter in interface ChildFilter

setURLFilter

public void setURLFilter(URLFilter filter)
Description copied from interface: ChildFilter
Sets the file filter used to exclude specific files

Specified by:
setURLFilter in interface ChildFilter

getChildren

public java.util.Iterator getChildren()
Description copied from interface: ChildFilter
Get the filtered children list.

Specified by:
getChildren in interface ChildFilter

childrenAdded

public TNode childrenAdded(java.util.List children,
                           TNode parent,
                           TreeExplorer tree)
Description copied from interface: ChildFilter
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.

Specified by:
childrenAdded in interface ChildFilter

childrenRemoved

public TNode childrenRemoved(java.util.List children,
                             TNode parent,
                             TreeExplorer tree)
Description copied from interface: ChildFilter
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.

Specified by:
childrenRemoved in interface ChildFilter

getType

public int getType()
Description copied from interface: ChildFilter
This method should return bitfield specifying the filter type. Filters types are created by calling FilterTypes.newType().

Specified by:
getType in interface ChildFilter

getComparator

public java.util.Comparator getComparator()
Description copied from interface: ChildFilter
Returns the Comparator that is used to sort the children of the owner TNode.

Specified by:
getComparator in interface ChildFilter

getShortLabel

public java.lang.String getShortLabel()
Returns the filter owner short label.

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()
Returns the filter owner long label.

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()
Returns the filter owner icon.

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

getToolTipText

public java.lang.String getToolTipText()
Returns the filter owner tool tip text.

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()
Returns the filter owner short label.

Specified by:
toString in interface Displayable

refreshExplorerNode

protected void refreshExplorerNode(TNode tnode)

Extension SDK

 

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