public class DefaultManageableFolder extends DefaultManageableElement implements Folder
DefaultManageableElement.TypeIterator<T>
manageable_, STATE_CHANGED, STRUCTURE_CHANGED
Constructor and Description |
---|
DefaultManageableFolder(CompositeManageable cm) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Element child)
Appends a child
Element to the end of the
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 |
containsChild(Element child)
|
protected void |
fetchOnBackgroundThread() |
java.util.Iterator |
getChildren()
Part of the
Element interface. |
java.util.List<Element> |
getChildrenList() |
javax.swing.Icon |
getIcon()
This implementation returns a plain document icon.
|
CompositeManageable |
getManageable() |
protected java.util.List<Element> |
loadChildren()
Refresh the children cache.
|
boolean |
mayHaveChildren()
Part of the
Element interface. |
protected void |
moStateChanged(AsAdapterEvent e)
Called when the element detects that the MO it wraps has emitted a
state-changed event.
|
protected void |
moStructureChanged(StructureChangeEvent e)
Called when the element detects that the MO it wraps has emitted a
structure-change event.
|
protected Element |
recognize(Manageable mo) |
void |
refresh()
Refreshes the state of the folder and/or its children.
|
protected void |
refreshFolder()
Refresh a folder.
|
protected void |
reloadChildren() |
boolean |
remove(Element child)
Removes the specified child
Element . |
void |
removeAll()
Removes all children from the folder.
|
protected boolean |
setStateIf(oracle.jdeveloper.asnav.nodes.DefaultManageableFolder.ChildrenListState newState,
oracle.jdeveloper.asnav.nodes.DefaultManageableFolder.ChildrenListState ifState)
Change state only if it is already in a given state.
|
int |
size()
Returns the current number of children in the folder.
|
attach, detach, fireStateChanged, fireStructureChanged, getData, getParent, getWaitCursor, isWaitCursorEnabled, notifyObservers, setManageable, setWaitCursorEnabled, update
getAttributes
getLongLabel, getShortLabel, getToolTipText, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttributes, getData
getLongLabel, getShortLabel, getToolTipText, toString
public DefaultManageableFolder(CompositeManageable cm)
public CompositeManageable getManageable()
getManageable
in class DefaultManageableElement
protected final boolean setStateIf(oracle.jdeveloper.asnav.nodes.DefaultManageableFolder.ChildrenListState newState, oracle.jdeveloper.asnav.nodes.DefaultManageableFolder.ChildrenListState ifState)
newState
- ifState
- the state precondition.public boolean mayHaveChildren()
DefaultElement
Element
interface. This implementation always
returns false
.mayHaveChildren
in interface Element
mayHaveChildren
in class DefaultElement
true
if this Element
may contain
child Element
s.Element.mayHaveChildren()
public javax.swing.Icon getIcon()
DefaultDisplayable
getIcon
in interface Displayable
getIcon
in class DefaultManageableElement
Icon
to be displayed for the
Displayable
.Displayable.getIcon()
public boolean canAdd(Element element)
Folder
Element
can be added to the Folder
.public boolean add(Element child)
Folder
Element
to the end of the
Folder
.public boolean canRemove(Element element)
Folder
Element
can be removed from this
Folder
.public boolean remove(Element child)
Folder
Element
. If the child object
appears more than once, only the first instance is removed.public boolean containsChild(Element child)
Folder
containsChild
in interface Folder
public java.util.Iterator getChildren()
DefaultElement
Element
interface. This implementation always
returns null
.getChildren
in interface Element
getChildren
in class DefaultElement
Iterator
over any child Element
s
contained by this Element
. If there are no children,
null
is returned.Element.getChildren()
public void refresh()
refresh
in class DefaultManageableElement
DefaultManageableFolder
protected void refreshFolder()
reloadChildren
.
If the current folder also has some state that needs to be refreshed, it should
override this method and then refresh children.protected void fetchOnBackgroundThread()
public int size()
Folder
public void removeAll()
Folder
public java.util.List<Element> getChildrenList()
protected java.util.List<Element> loadChildren()
protected Element recognize(Manageable mo)
protected void reloadChildren()
protected void moStateChanged(AsAdapterEvent e)
DefaultManageableElement
moStateChanged
in class DefaultManageableElement
protected void moStructureChanged(StructureChangeEvent e)
DefaultManageableElement
moStructureChanged
in class DefaultManageableElement