Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.ide.model
Class DefaultContainer

java.lang.Object
  extended by oracle.ide.model.Node
      extended by oracle.ide.model.DefaultContainer

All Implemented Interfaces:
Displayable, Element, Folder, LazyLoadable, Locatable, Subject, Dirtyable
Direct Known Subclasses:
ConnectionListFilterNode, ConnectionNodeDecorator

public abstract class DefaultContainer
extends Node
implements Folder

The DefaultContainer class is a default implementation of a Node that implements the Folder interface.

See Also:
Node, Folder

Field Summary
protected  java.util.ArrayList _children
          The "final" modifier makes it possible to synchronize on the _children object, since its value can never change.

 

Fields inherited from class oracle.ide.model.Node
LOG_READONLY

 

Constructor Summary
DefaultContainer()
           
DefaultContainer(java.net.URL url)
           

 

Method Summary
 boolean add(Element element)
          Part of the Folder interface.
 boolean add(Element element, boolean notify)
           
 boolean canAdd(Element element)
          Part of the Folder interface.
 boolean canRemove(Element element)
          Part of the Folder interface.
 boolean containsChild(Element child)
          Returns true if the folder contains the specified child Element; returns false otherwise.
 java.util.Iterator getChildren()
          Part of the Element interface.
 boolean mayHaveChildren()
          Part of the Element interface.
 boolean remove(Element element)
          Part of the Folder interface.
 boolean remove(Element element, boolean notify)
           
 void removeAll()
          Removes all children from the folder.
 void removeAll(boolean notify)
           
 int size()
          Returns the current number of children in the folder.

 

Methods inherited from class oracle.ide.model.Node
addNodeListener, addNodeListenerForType, addNodeListenerForTypeHierarchy, attach, beginThreadNodeUsageCycle, callUnderReadLock, callUnderWriteLock, close, closeImpl, createSubject, delete, deleteImpl, detach, endThreadNodeUsage, endThreadNodeUsageCycle, ensureOpen, equalsImpl, getAttributes, getData, getIcon, getInputStream, getLongLabel, getShortLabel, getSubject, getTimestamp, getTimestampLoadedUnsafe, getToolTipText, getTransientProperties, getUnmodifiedTimestamp, getURL, isDirty, isLoaded, isMigrating, isNew, isOpen, isReadLocked, isReadOnly, isReadOrWriteLocked, isTrackedInNodeCache, isWriteLocked, lockCount, markDirty, markDirtyImpl, nodeLock, notifyObservers, open, openImpl, readLock, readLockCount, readLockInterruptibly, readUnlock, refreshTimestamp, removeNodeListener, removeNodeListenerForType, removeNodeListenerForTypeHierarchy, rename, renameImpl, reportOpenException, revert, revertImpl, runUnderReadLock, runUnderWriteLock, save, saveImpl, setEventLog, setMigrating, setOpen, setReadOnly, setTimestampDirectly, setURL, toString, tryRunUnderReadLock, unsetMigrating, upgradeLock, upgradeUnlock, urlReadOnlyChanged, writeLock, writeLockCount, writeLockInterruptibly, writeUnlock

 

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, getData

 

Methods inherited from interface oracle.ide.model.Displayable
getIcon, getLongLabel, getShortLabel, getToolTipText, toString

 

Field Detail

_children

protected final java.util.ArrayList _children
The "final" modifier makes it possible to synchronize on the _children object, since its value can never change.

Constructor Detail

DefaultContainer

public DefaultContainer()

DefaultContainer

public DefaultContainer(java.net.URL url)

Method Detail

mayHaveChildren

public boolean mayHaveChildren()
Part of the Element interface. This implementation always returns true.
Specified by:
mayHaveChildren in interface Element
Overrides:
mayHaveChildren in class Node
Returns:
true if this Element may contain child Elements.
See Also:
Element.mayHaveChildren()

getChildren

public java.util.Iterator getChildren()
Part of the Element interface. This implementation returns an Iterator over the current list of children.
Specified by:
getChildren in interface Element
Overrides:
getChildren in class Node
Returns:
an Iterator over any child Elements contained by this Element. If there are no children, null is returned.
See Also:
Element.getChildren()

canAdd

public boolean canAdd(Element element)
Part of the Folder interface. The default implementation returns true if and only if the specified Element is not null.
Specified by:
canAdd in interface Folder
Parameters:
element - the Element that is about to be added to this Folder.
Returns:
true if and only if the specified Element is not null.
See Also:
Folder.canAdd(Element)

add

public boolean add(Element element)
Part of the Folder interface. The specified Element is added to the end of the child list. However, if the Element is null, this method does nothing.

No notification is fired by this method.

Specified by:
add in interface Folder
See Also:
Folder.add(oracle.ide.model.Element)

canRemove

public boolean canRemove(Element element)
Part of the Folder interface. The default implementation returns true if and only if the specified Element is not null.
Specified by:
canRemove in interface Folder
Parameters:
element - the Element that is about to be removed from this Folder.
Returns:
true if and only if the specified Element is not null.
See Also:
Folder.canRemove(Element)

remove

public boolean remove(Element element)
Part of the Folder interface. The specified Element is removed from the child list. However, if the Element is null, this method does nothing. If the Element occurs more than once in the child list, then only the first instance is removed.

No notification is fired by this method.

Specified by:
remove in interface Folder
Parameters:
element - The child object to remove.
See Also:
Folder.remove(Element)

containsChild

public boolean containsChild(Element child)
Description copied from interface: Folder
Returns true if the folder contains the specified child Element; returns false otherwise.
Specified by:
containsChild in interface Folder

size

public int size()
Description copied from interface: Folder
Returns the current number of children in the folder.
Specified by:
size in interface Folder

removeAll

public void removeAll()
Description copied from interface: Folder
Removes all children from the folder.
Specified by:
removeAll in interface Folder

add

public boolean add(Element element,
                   boolean notify)

remove

public boolean remove(Element element,
                      boolean notify)

removeAll

public void removeAll(boolean notify)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


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