站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

SourceElementFilter (NetBeans Java Hierarchy API) - NetBeans API Javadoc 4.1.0

 

org.openide.src.nodes
Class SourceElementFilter

java.lang.Object
  extended byorg.openide.src.nodes.SourceElementFilter
Direct Known Subclasses:
ClassElementFilter

public class SourceElementFilter
extends Object

Interface for filtering and ordering the items in the visual presentation of a source element. Used to control the children of a source element node.

Note that this does not fire events for changes in its properties; it is expected that a new filter will instead be created and applied to the source children.

See Also:
SourceElement, SourceChildren

Field Summary
static int ALL
          Does not specify any top-level element.
static int ALL_MODIFIERS
          Does not specify any member access.
static int CLASS
          Specifies a child representing a (top-level) class.
static int[] DEFAULT_ORDER
          Default order of the top-level element types in the hierarchy.
static int IMPORT
          Specifies a child representing a package or class import.
static int INTERFACE
          Specifies a child representing a (top-level) interface.
static int PACKAGE
          Specifies package-private member access.
static int PRIVATE
          Specifies private member access.
static int PROTECTED
          Specifies protected member access.
static int PUBLIC
          Specifies public member access.
 
Constructor Summary
SourceElementFilter()
           
 
Method Summary
 int getModifiers()
          Get permitted access modes.
 int[] getOrder()
          Get the current order for elements.
 boolean isAllClasses()
          Test whether all classes in the source should be recursively shown.
 void setAllClasses(boolean allClasses)
          Set whether all classes should be shown.
 void setModifiers(int modifiers)
          Set permitted access modes.
 void setOrder(int[] order)
          Set a new order for elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMPORT

public static final int IMPORT
Specifies a child representing a package or class import.

See Also:
Constant Field Values

CLASS

public static final int CLASS
Specifies a child representing a (top-level) class.

See Also:
Constant Field Values

INTERFACE

public static final int INTERFACE
Specifies a child representing a (top-level) interface.

See Also:
Constant Field Values

ALL

public static final int ALL
Does not specify any top-level element.

See Also:
Constant Field Values

PACKAGE

public static final int PACKAGE
Specifies package-private member access.

See Also:
Constant Field Values

PUBLIC

public static final int PUBLIC
Specifies public member access.

See Also:
Constant Field Values

PRIVATE

public static final int PRIVATE
Specifies private member access.

See Also:
Constant Field Values

PROTECTED

public static final int PROTECTED
Specifies protected member access.

See Also:
Constant Field Values

ALL_MODIFIERS

public static final int ALL_MODIFIERS
Does not specify any member access.

See Also:
Constant Field Values

DEFAULT_ORDER

public static final int[] DEFAULT_ORDER
Default order of the top-level element types in the hierarchy. A list, each of whose elements is a bitwise disjunction of element types. By default, only classes and interfaces are listed, and these together.

Constructor Detail

SourceElementFilter

public SourceElementFilter()
Method Detail

isAllClasses

public boolean isAllClasses()
Test whether all classes in the source should be recursively shown.

Returns:
true to include inner classes/interfaces, false to only include top-level classes/interfaces

setAllClasses

public void setAllClasses(boolean allClasses)
Set whether all classes should be shown.

Parameters:
allClasses - true if so
See Also:
isAllClasses()

getOrder

public int[] getOrder()
Get the current order for elements.

Returns:
the current order, as a list of bitwise disjunctions among element types (e.g. CLASS). If null, the DEFAULT_ORDER, or no particular order at all, may be used.

setOrder

public void setOrder(int[] order)
Set a new order for elements. Should update the children list of the source element node.

Parameters:
order - the new order, or null for the default
See Also:
getOrder()

getModifiers

public int getModifiers()
Get permitted access modes. Members with excluded access modes will not be displayed.

Returns:
a modifier mask, as a bitwise disjunction of modes, e.g. PROTECTED

setModifiers

public void setModifiers(int modifiers)
Set permitted access modes.

Parameters:
modifiers - the new modifier mask
See Also:
getModifiers()

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.