Extension SDK 10.1.2

oracle.ide.model
Class DirectoryFolder

java.lang.Object
  extended byoracle.ide.model.DefaultDisplayable
      extended byoracle.ide.model.DefaultElement
          extended byoracle.ide.model.DefaultFolder
              extended byoracle.ide.model.HierarchicalFolder
                  extended byoracle.ide.model.DirectoryFolder
All Implemented Interfaces:
Category, Data, Displayable, Element, Folder, Locatable

public final class DirectoryFolder
extends HierarchicalFolder

The DirectoryFolder class encapsulates a directory element managed by the DirectoryFilter.


Field Summary
 
Fields inherited from class oracle.ide.model.HierarchicalFolder
filter, isOpen, longName, shortName, url
 
Fields inherited from class oracle.ide.model.DefaultFolder
_children
 
Fields inherited from interface oracle.ide.model.Category
UNDEFINED
 
Constructor Summary
protected DirectoryFolder(java.lang.Object key, DirectoryFilter filter)
          Protected constructor that constructs a DirectoryFolder given a folder key and a DirectoryFilter that will manage this directory folder.
  DirectoryFolder(java.net.URL url, DirectoryFilter filter)
          Constructs a DirectoryFolder given an URL and a DirectoryFilter that will manage this directory folder.
 
Method Summary
 boolean equals(java.lang.Object obj)
          One DirectoryFolder is equal to another if their HierarchicalFolder.url members are identical.
 java.lang.String getShortLabel()
          Returns the short label for this Displayable.
protected  boolean isInProject()
          Tests whether any Element objects belonging to the project are contained by this directory folder.
protected  boolean isSrcRoot()
          Returns true if this directory is a source path root.
protected  java.net.URL[] list()
          Lists the files and directories belonging to this directory folder.
protected  void setIsSrcRoot(boolean isSrcRoot)
          Marks this directory folder as either a source path root or a subfolder.
 
Methods inherited from class oracle.ide.model.HierarchicalFolder
add, canAdd, canRemove, containsChild, getCategory, getChildren, getFilter, getLongLabel, getToolTipText, getURL, getViewAllFiles, getViewHierarchically, isStrict, remove, removeAll, setFilter, setURL
 
Methods inherited from class oracle.ide.model.DefaultFolder
copyToImpl, equalsImpl, getIcon, mayHaveChildren, size
 
Methods inherited from class oracle.ide.model.DefaultElement
getAttributes, getData
 
Methods inherited from class oracle.ide.model.DefaultDisplayable
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.ide.model.Element
getAttributes
 
Methods inherited from interface oracle.ide.model.Data
getData
 
Methods inherited from interface oracle.ide.model.Displayable
toString
 

Constructor Detail

DirectoryFolder

public DirectoryFolder(java.net.URL url,
                       DirectoryFilter filter)
Constructs a DirectoryFolder given an URL and a DirectoryFilter that will manage this directory folder.

Parameters:
url - the URL for this folder.
filter - the HierarchicalFilter that manages this folder.

DirectoryFolder

protected DirectoryFolder(java.lang.Object key,
                          DirectoryFilter filter)
Protected constructor that constructs a DirectoryFolder given a folder key and a DirectoryFilter that will manage this directory folder. The given key should be created by DirectoryFilter.getFolderKey(URL) or DirectoryFilter.getParentKey(Object).

This constructor is not for general use and should only ever be called by the DirectoryFilter.createFolder(Object) method.

Parameters:
key - the key for this folder.
filter - the HierarchicalFilter that manages this folder.
Method Detail

list

protected java.net.URL[] list()
Lists the files and directories belonging to this directory folder. This implementation lists the contents of the directory URL for this folder.

Specified by:
list in class HierarchicalFolder
Returns:
an array of URL objects naming the files and directories contained by the URL for this directory; if the contents of this directory folder cannot be listed, then null is returned.

isInProject

protected boolean isInProject()
Tests whether any Element objects belonging to the project are contained by this directory folder.

Specified by:
isInProject in class HierarchicalFolder
Returns:
returns true if the URL for this directory folder contains one or more Element objects belonging to the project.

getShortLabel

public java.lang.String getShortLabel()
Returns the short label for this Displayable. This implementation returns the full platform path name of this directory folder if this folder is a source path root; otherwise, it defers to the superclass implementation.

Specified by:
getShortLabel in interface Displayable
Overrides:
getShortLabel in class HierarchicalFolder

equals

public boolean equals(java.lang.Object obj)
One DirectoryFolder is equal to another if their HierarchicalFolder.url members are identical.


isSrcRoot

protected boolean isSrcRoot()
Returns true if this directory is a source path root.


setIsSrcRoot

protected void setIsSrcRoot(boolean isSrcRoot)
Marks this directory folder as either a source path root or a subfolder.

Parameters:
isSrcRoot - if true, marks this directory folder as a source path root.

Extension SDK

 

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