|
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.CategoryFolder
The CategoryFolder
class is responsible for collecting
all nodes whose category cannot be determined.
Field Summary | |
protected java.util.ArrayList |
children
|
static java.lang.String |
DISPLAY_URL_PROTOCOL
Deprecated. Replaced by ProtocolConstants.IDE_DISPLAY_PROTOCOL . |
Fields inherited from interface oracle.ide.model.Category |
UNDEFINED |
Constructor Summary | |
CategoryFolder()
|
|
CategoryFolder(java.lang.String label)
|
|
CategoryFolder(java.net.URL url)
|
Method Summary | |
boolean |
add(Element element)
Add the specified Element to this Folder. |
boolean |
canAdd(Element element)
Other classes can call this method to determine whether the given Element can be added to the Folder . |
boolean |
canRemove(Element element)
Other classes can call this method to determine whether the specified Element can be removed from this
Folder . |
boolean |
checkRefresh(UpdateMessage change)
|
boolean |
containsChild(Element child)
Returns true if the folder contains the
specified child Element ; returns false
otherwise. |
Attributes |
getAttributes()
Category elements do not define any attributes. |
int |
getCategory()
Get the bit field identifying the different categories this data node falls under. |
java.util.Iterator |
getChildren()
This method is part of the Element interface to
provide a convenient way of getting an Iterator over any
contained child Element s without having to test the
object's type with the instanceof operator or having
to downcast to a more specific type. |
java.lang.Object |
getData()
Gets the data element that implements this interface. |
protected URLPath |
getExcludePath()
Returns the URLPath which is to be excluded from consideration
when determining whether a particular Locatable element is on
the sourcepath. |
javax.swing.Icon |
getIcon()
Returns an Icon that can be shown in association with this
Displayable . |
java.lang.String |
getLongLabel()
Gets a fully qualified label for display purpose. |
Folder |
getOwner()
|
java.lang.String |
getShortLabel()
Gets a short label for display purpose. |
URLPath |
getSourcePath()
|
java.lang.String |
getToolTipText()
Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Displayable . |
java.net.URL |
getURL()
Returns the URL that identifies this
Locatable . |
boolean |
isStrict()
When true indicates that the filter used to filter this folder children should be strict with name and children |
static boolean |
matchElement(Element element,
CategoryFolder category)
|
boolean |
mayHaveChildren()
This method is part of the Element interface to
provide a convenient way of determining whether an object may
have children without having to test the object's type with the
instanceof operator or having to downcast to a
more specific type. |
boolean |
remove(Element element)
Remove the specified Element from this Folder. |
void |
removeAll()
Removes all children from the folder. |
void |
setCategory(int category)
|
void |
setIcon(javax.swing.Icon icon)
|
void |
setOwner(Folder owner)
|
void |
setURL(java.net.URL url)
Sets the URL associated with this Locatable . |
int |
size()
Returns the current number of children in the folder. |
java.lang.String |
toString()
Returns the Short Label displayed to a user. |
protected boolean |
useFactory()
If the children of this folder should be created using a factory return true from this method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String DISPLAY_URL_PROTOCOL
ProtocolConstants.IDE_DISPLAY_PROTOCOL
.
protected java.util.ArrayList children
Constructor Detail |
public CategoryFolder()
public CategoryFolder(java.lang.String label)
public CategoryFolder(java.net.URL url)
Method Detail |
public boolean add(Element element)
add
in interface Folder
public boolean remove(Element element)
remove
in interface Folder
element
- Element to be removed from this container.public boolean canRemove(Element element)
Folder
Element
can be removed from this
Folder
.
canRemove
in interface Folder
element
- the Element being checked for removal from this folder
public boolean canAdd(Element element)
Folder
Element
can be added to the Folder
.
canAdd
in interface Folder
element
- the Element
that is about to be added
to this Folder
.
true
if the specified Element
can be
added to this Folder
; false
if the
Element
cannot be added.public boolean containsChild(Element child)
Folder
true
if the folder contains the
specified child Element
; returns false
otherwise.
containsChild
in interface Folder
public int size()
Folder
size
in interface Folder
public void removeAll()
Folder
removeAll
in interface Folder
public java.lang.Object getData()
getData
in interface Data
public java.lang.String getShortLabel()
getShortLabel
in interface Displayable
public java.lang.String getLongLabel()
getLongLabel
in interface Displayable
public javax.swing.Icon getIcon()
Displayable
Icon
that can be shown in association with this
Displayable
. Typically the icon will be used in a
tree control or list control. Therefore the icon must fit
naturally within the space normally given to items within those
controls. Such icons are usually 16x16 in size or, if there is a
one-pixel transparent padding around the edge, 18x18 in size. It
is strongly recommended that icons returned by this method be
either 16x16 or 18x18 in size. If null
is returned,
the control may show a default icon, or it may show no icon,
whichever is appropriate.
getIcon
in interface Displayable
public java.lang.String getToolTipText()
Displayable
Displayable
.
In many cases it may be appropriate for this method to return the
same value as Displayable.getLongLabel()
.
getToolTipText
in interface Displayable
public java.lang.String toString()
Displayable
toString
method in java.lang.Object
.
Implementors of the Displayable
interface should
override this as appropriate. The default implementation is
the same as getShortLabel
toString
in interface Displayable
public Attributes getAttributes()
Attributes
object with the attribute
ElementAttributes.NODE
set.
getAttributes
in interface Element
public boolean mayHaveChildren()
Element
Element
interface to
provide a convenient way of determining whether an object may
have children without having to test the object's type with the
instanceof
operator or having to downcast to a
more specific type.
An implementation of Element
that represents a leaf
in a tree structure should return false
from this
method. An implementation of Element
that could
represent a non-leaf in a tree structure should return
true
from this method, even if it does not currently
contain any children.
mayHaveChildren
in interface Element
public java.util.Iterator getChildren()
Element
Element
interface to
provide a convenient way of getting an Iterator
over any
contained child Element
s without having to test the
object's type with the instanceof
operator or having
to downcast to a more specific type.
An implementation of Element
that represents a leaf
in a tree structure should return null
from this
method. An implementation of Element
that could
represent a non-leaf in a tree structure should return either an
Iterator
over the child Element
s or
null
if there are no children.
getChildren
in interface Element
public void setURL(java.net.URL url)
Locatable
URL
associated with this Locatable
.
It is important that the URL
only be changed when the
Locatable
has just been created or when all caches
keyed on the previous URL
can also be updated.
setURL
in interface Locatable
url
- The URL
to set.public java.net.URL getURL()
Locatable
URL
that identifies this
Locatable
. Parts of the IDE will use the value of
this URL
as a hash key for caching UI components for this
Locatable
. Therefore, URL
uniqueness is
important.
getURL
in interface Locatable
URL
identifying this Locatable
.public int getCategory()
Category
getCategory
in interface Category
public Folder getOwner()
public void setOwner(Folder owner)
public void setCategory(int category)
public void setIcon(javax.swing.Icon icon)
public boolean checkRefresh(UpdateMessage change)
public URLPath getSourcePath()
public boolean isStrict()
public static boolean matchElement(Element element, CategoryFolder category)
protected URLPath getExcludePath()
URLPath
which is to be excluded from consideration
when determining whether a particular Locatable
element is on
the sourcepath.
protected boolean useFactory()
true
from this method. This implementation
always returns false
.
|
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.