|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.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.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()
|
|
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. |
boolean |
containsChild(Element child)
Returns true if the folder contains the
specified child Element ; returns false
otherwise. |
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. |
HierarchicalFilter |
getFilter()
Get the HierarchicalFilter . |
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. |
boolean |
isStrict()
When true indicates that this folder is strict with name and children. |
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 |
setFilter(HierarchicalFilter filter)
Set the HierarchicalFilter associated with this folder. |
void |
setURL(java.net.URL url)
Sets the URL for this Locatable . |
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, 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
.
Constructor Detail |
public HierarchicalFolder()
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 containsChild(Element child)
Folder
true
if the folder contains the
specified child Element
; returns false
otherwise.
containsChild
in interface Folder
containsChild
in class DefaultFolder
public boolean canAdd(Element element)
Element
short label is unique in this
folder.
canAdd
in interface Folder
canAdd
in class DefaultFolder
true
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 Folder
canRemove
in class DefaultFolder
true
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 Folder
add
in class DefaultFolder
Folder.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 Folder
remove
in class DefaultFolder
Folder.remove(Element)
public void removeAll()
Set
of unique names
belonging to this folder.
removeAll
in interface Folder
removeAll
in class DefaultFolder
public java.util.Iterator getChildren()
Iterator
over the child Element
objects
belonging to this folder.
getChildren
in interface Element
getChildren
in class DefaultFolder
Element.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 Displayable
getShortLabel
in class DefaultDisplayable
Displayable.getShortLabel()
public java.lang.String getLongLabel()
Displayable
. The default
implementation returns the full platform path name of this folder.
getLongLabel
in interface Displayable
getLongLabel
in class DefaultDisplayable
Displayable.getLongLabel()
public java.lang.String getToolTipText()
Displayable
. The default
implementation returns the String
version of the URL
for this folder.
getToolTipText
in interface Displayable
getToolTipText
in class DefaultDisplayable
Displayable.getToolTipText()
public void setURL(java.net.URL url)
URL
for this Locatable
.
setURL
in interface Locatable
url
- The URL
to set.public java.net.URL getURL()
URL
for this Locatable
.
getURL
in interface Locatable
URL
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 Category
public HierarchicalFilter getFilter()
HierarchicalFilter
.
public void setFilter(HierarchicalFilter filter)
HierarchicalFilter
associated with this folder. The
specified filter
will only be set if it has never
been set.
public boolean isStrict()
protected 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, 2004, Oracle. All rights reserved.