|
Extension SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.ide.model.DefaultDisplayable
oracle.ide.model.DefaultElement
oracle.ide.model.DefaultFolder
oracle.ide.model.HierarchicalFolder
The HierarchicalFolder defines common behavior for folder
elements managed by a HierarchicalFilter. The
HierarchicalFolder also defines an abstract interface which
all concrete subclasses must implement.
HierarchicalFilter,
DirectoryFolder,
PackageFolder| Field Summary | |
protected HierarchicalFilter |
filter
The ChildFilter that manages this
folder. |
protected boolean |
isOpen
Flag denoting whether the contents of this folder have been read. |
protected java.lang.String |
longName
Cached version of the long name for this Displayable. |
protected java.lang.String |
shortName
Cached version of the short name for this Displayable. |
protected java.util.Set |
uniqueNames
The Set of unique child names already belonging to this
folder. |
protected java.net.URL |
url
The URL that describes this folder. |
| Fields inherited from class oracle.ide.model.DefaultFolder |
_children |
| Fields inherited from interface oracle.ide.model.Category |
UNDEFINED |
| Constructor Summary | |
HierarchicalFolder(java.net.URL url,
HierarchicalFilter filter)
Constructs a HierarchicalFolder given an URL and
a HierarchicalFilter that will manage this folder. |
|
| Method Summary | |
boolean |
add(Element element)
Allows the Element to be added if the element short label is
unique in this folder and the superclass add(Element)
method allows the element to be added. |
boolean |
canAdd(Element element)
Returns true if the Element short label is unique in this
folder. |
boolean |
canRemove(Element element)
Returns true if the Element short label occurs in this folder. |
int |
getCategory()
Returns the category of the CategoryFolder that owns this
folder's parent filter; if the filter is not owned by a
CategoryFolder, then returns Category.UNDEFINED. |
java.util.Iterator |
getChildren()
Returns an Iterator over the child Element objects
belonging to this folder. |
java.lang.String |
getLongLabel()
Returns the long label for this Displayable. |
java.lang.String |
getShortLabel()
Returns the short label for this Displayable. |
java.lang.String |
getToolTipText()
Returns the tool tip for this Displayable. |
java.net.URL |
getURL()
Gets the URL for this Locatable. |
protected boolean |
getViewAllFiles()
Convenience method that calls HierarchicalFilter.getViewAllFiles(). |
protected boolean |
getViewHierarchically()
Convenience method that calls HierarchicalFilter.getViewHierarchically(). |
protected abstract boolean |
isInProject()
Tests whether any Element belonging to the project is
contained by this folder. |
protected abstract java.net.URL[] |
list()
Lists the files and directories contained by this folder. |
boolean |
remove(Element element)
Allows the Element to be removed if the element short label
occurs in this folder and the superclass remove(Element)
method allows the element to be removed. |
void |
removeAll()
Overridden in order to also clear the Set of unique names
belonging to this folder. |
void |
setURL(java.net.URL url)
Sets the URL for this Locatable. |
| Methods inherited from class oracle.ide.model.DefaultFolder |
containsChild, 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, equals, 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 |
| Field Detail |
protected boolean isOpen
protected java.net.URL url
URL that describes this folder.
protected HierarchicalFilter filter
ChildFilter that manages this
folder.
protected java.lang.String longName
Displayable.
protected java.lang.String shortName
Displayable.
protected java.util.Set uniqueNames
Set of unique child names already belonging to this
folder.
| Constructor Detail |
public HierarchicalFolder(java.net.URL url,
HierarchicalFilter filter)
HierarchicalFolder given an URL and
a HierarchicalFilter that will manage this folder.
url - the URL for this folder.filter - the HierarchicalFilter that manages this folder.| Method Detail |
protected abstract java.net.URL[] list()
This method is only called when all files in the folder need to be
shown; if only project files are to be shown, then the owning filter is called to provide the list of children.
URL objects naming the files and
directories contained by this folder; if the contents of this folder
cannot be listed, then null is returned.protected abstract boolean isInProject()
Element belonging to the project is
contained by this folder. Subclasses should provide an appropriate
implementation.
This method is called by the owning filter to determine
whether or not to gray the icon for this folder.
true if any Element belonging to the
project is contained by this folder; otherwise, false.public boolean canAdd(Element element)
Element short label is unique in this
folder.
canAdd in interface FoldercanAdd in class DefaultFoldertrue if and only if the specified
Element is not null.Folder.canAdd(Element)public boolean canRemove(Element element)
Element short label occurs in this folder.
canRemove in interface FoldercanRemove in class DefaultFoldertrue if and only if the specified
Element is not null.Folder.canRemove(Element)public boolean add(Element element)
Element to be added if the element short label is
unique in this folder and the superclass add(Element)
method allows the element to be added.
add in interface Folderadd in class DefaultFolderFolder.add(oracle.ide.model.Element)public boolean remove(Element element)
Element to be removed if the element short label
occurs in this folder and the superclass remove(Element)
method allows the element to be removed.
remove in interface Folderremove in class DefaultFolderFolder.remove(Element)public void removeAll()
Set of unique names
belonging to this folder.
removeAll in interface FolderremoveAll in class DefaultFolderpublic java.util.Iterator getChildren()
Iterator over the child Element objects
belonging to this folder.
getChildren in interface ElementgetChildren in class DefaultFolderElement.getChildren()public java.lang.String getShortLabel()
Displayable. The default
implementation returns the full platform path name of this folder when
in flat view, and it returns just the file name when in nested view.
getShortLabel in interface DisplayablegetShortLabel in class DefaultDisplayableDisplayable.getShortLabel()public java.lang.String getLongLabel()
Displayable. The default
implementation returns the full platform path name of this folder.
getLongLabel in interface DisplayablegetLongLabel in class DefaultDisplayableDisplayable.getLongLabel()public java.lang.String getToolTipText()
Displayable. The default
implementation returns the String version of the URL
for this folder.
getToolTipText in interface DisplayablegetToolTipText in class DefaultDisplayableDisplayable.getToolTipText()public void setURL(java.net.URL url)
URL for this Locatable.
setURL in interface Locatableurl - The URL to set.public java.net.URL getURL()
URL for this Locatable.
getURL in interface LocatableURL identifying this Locatable.public int getCategory()
CategoryFolder that owns this
folder's parent filter; if the filter is not owned by a
CategoryFolder, then returns Category.UNDEFINED.
getCategory in interface Categoryprotected boolean getViewAllFiles()
HierarchicalFilter.getViewAllFiles().
protected boolean getViewHierarchically()
HierarchicalFilter.getViewHierarchically().
|
Extension SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©1997, 2003, Oracle. All rights reserved.