|
Extension SDK 9.0.5 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.ide.model.DefaultFilter
oracle.ide.model.HierarchicalFilter
oracle.ide.model.DirectoryFilter
The DirectoryFilter
organizes the children of a source
folder into a directory structure view. A DirectoryFilter
typically organizes its children in a nested directory structure view.
As a subclass of HierarchicalFilter
, the
DirectoryFilter
can also theoretically display its children
in a flat directory structure view, although it is not particularly
meaningful for it to do so.
Nested Class Summary |
Nested classes inherited from class oracle.ide.model.HierarchicalFilter |
HierarchicalFilter.HierarchicalComparator |
Nested classes inherited from class oracle.ide.model.DefaultFilter |
DefaultFilter.SortedComparator, DefaultFilter.SortedFolderFirstComparator |
Field Summary |
Fields inherited from class oracle.ide.model.HierarchicalFilter |
childMap, children, isOpen, miscFolder, nodeCache, NULL_KEY, options, sourcePath, TOP_FOLDER_KEY, urlFilter, VIEW_HIERARCHICALLY, VIEW_PROJECT_FILES_ONLY, VIEW_SORT_BY_TYPE |
Fields inherited from class oracle.ide.model.DefaultFilter |
folderFirstComparator, folderFirstComparator2, sortedComparator |
Fields inherited from interface oracle.ide.explorer.ChildFilter |
NO_OPTIONS |
Constructor Summary | |
DirectoryFilter()
Constructs a DirectoryFilter . |
Method Summary | |
protected Folder |
createFolder(java.lang.Object key)
Creates a DirectoryFolder instance given the specified folder
key. |
protected Folder |
createFolder(java.net.URL url)
Creates a DirectoryFolder instance given the specified
directory URL . |
protected java.lang.String |
getChildName(java.lang.Object parentKey,
java.lang.Object childKey)
Returns just the name part of a child folder given a parent folder key and the child folder key, or null if the first folder key
is not a parent key of the second folder key. |
protected java.lang.Object |
getFolderKey(java.net.URL url)
Returns the folder key for the folder that contains the specified URL . |
protected java.lang.Object |
getParentKey(java.lang.Object key)
Returns the parent folder key for the specified folder key. |
java.lang.String |
getToolTipText()
Returns the filter owner tool tip text. |
int |
getType()
Returns FilterTypes.DIRECTORY_FILTER . |
protected void |
initChildren()
Initializes the collection of top-level children for the filter. |
protected static java.net.URL |
keyToURL(java.lang.Object key)
Converts a folder key to an URL . |
protected static java.lang.Object |
urlToKey(java.net.URL url)
Converts an URL to a folder key. |
protected TNode |
validateParent(TNode cachedParent,
TNode parent,
java.net.URL parentURL,
java.net.URL childURL)
This method makes sure that the right parent is used to parent the child pointed by the childURL . |
Methods inherited from class oracle.ide.model.DefaultFilter |
canUpdate, checkElementAttributes, getComparator, getIcon, getLongLabel, getOwner, getShortLabel, refreshExplorerNode, setOwner, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DirectoryFilter()
DirectoryFilter
.
Method Detail |
public int getType()
FilterTypes.DIRECTORY_FILTER
.
getType
in interface ChildFilter
getType
in class DefaultFilter
public java.lang.String getToolTipText()
getToolTipText
in interface Displayable
getToolTipText
in class DefaultFilter
protected Folder createFolder(java.net.URL url)
DirectoryFolder
instance given the specified
directory URL
.
createFolder
in class HierarchicalFilter
url
- the URL
of the Folder
to create.
Folder
instance, or null
if the Folder
could not be created for the specified URL
.protected Folder createFolder(java.lang.Object key)
DirectoryFolder
instance given the specified folder
key.
createFolder
in class HierarchicalFilter
Folder
instance, or null
if the Folder
could not be created for the specified folder key.getFolderKey(URL)
,
getParentKey(Object)
protected java.lang.Object getFolderKey(java.net.URL url)
URL
. The folder key for a DirectoryFolder
is simply
string version of the URL
for that directory.
getFolderKey
in class HierarchicalFilter
url
- the directory URL
of the folder; if the URL
specifies a file, then the parent URL
of the file is used.
URL
, or
HierarchicalFilter.NULL_KEY
if the URL
is not on the source path.protected java.lang.Object getParentKey(java.lang.Object key)
DirectoryFolder
is the string version of the
directory's parent directory URL
.
getParentKey
in class HierarchicalFilter
key
- the folder key to get the parent key of.
HierarchicalFilter.NULL_KEY
if the
parent folder is no longer on the source path.getFolderKey(URL)
protected java.lang.String getChildName(java.lang.Object parentKey, java.lang.Object childKey)
null
if the first folder key
is not a parent key of the second folder key.
Since each folder key is the folder's directory URL
, just
return the tail of the child's key URL-spec string without the
trailing slash.
getChildName
in class HierarchicalFilter
parentKey
- the prospective parent folder key.childKey
- the prospective child folder key.protected void initChildren()
When there is more than one directory on the project's sourcepath,
then a DirectoryFolder
is created for each entry on the
sourcepath, and those folders are added to the collection of top-level
children.
When there is only one directory on the sourcepath, then the children of that directory are instead added to the collection of top-level children. This reduces the amount of nesting in the Navigator.
initChildren
in class HierarchicalFilter
protected static java.lang.Object urlToKey(java.net.URL url)
URL
to a folder key.
protected static java.net.URL keyToURL(java.lang.Object key)
URL
.
protected TNode validateParent(TNode cachedParent, TNode parent, java.net.URL parentURL, java.net.URL childURL)
HierarchicalFilter
childURL
. This is a workaround
rename bug 3323473.
validateParent
in class HierarchicalFilter
cachedParent
- the parent tnode found in the cache.parent
- the category node.parentURL
- the parent url.childURL
- the child url.
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.