|
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.DefaultDocument oracle.ide.model.DefaultNode oracle.ide.model.DataNode oracle.ide.model.DataContainer
Field Summary | |
protected java.util.List |
_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.DataNode |
_objectStore |
Fields inherited from interface oracle.ide.addin.Subject |
OBJECT_MODIFIED |
Fields inherited from interface oracle.ide.model.Category |
UNDEFINED |
Constructor Summary | |
DataContainer()
Default constructor. |
|
DataContainer(java.net.URL url)
|
Method Summary | |
boolean |
add(java.util.Collection childElements,
boolean notify)
Adds a Collection of Element objects to the child
list for the container. |
boolean |
add(Element element)
Part of the Folder interface. |
boolean |
add(Element element,
boolean notify)
This is a variant of the Folder.add(Element) method
that accepts an additional flag that indicates whether or not
notifications of the change should be sent to registered observers. |
boolean |
canAdd(Element element)
Part of the Folder interface. |
boolean |
canRemove(Element element)
Part of the Folder interface. |
void |
close()
Closes the Document and unloads any associated data. |
boolean |
containsChild(Element child)
Returns true if the folder contains the
specified child Element ; returns false
otherwise. |
protected void |
copyToImpl(DataContainer copy)
Design pattern for supporting strongly typed copying. |
java.lang.String |
getBaseDirectory()
|
java.util.Iterator |
getChildren()
Part of the Element interface. |
java.util.List |
getListOfChildren()
Fulfills the public accessor part of the Folder
contract. |
boolean |
mayHaveChildren()
Part of the Element interface. |
boolean |
remove(Element element)
Part of the Folder interface. |
boolean |
remove(Element element,
boolean notify)
This is a variant of the Folder.remove(Element) method
that accepts an additional flag that indiciates whether or not
notifications of the change should be sent to registered observers. |
void |
removeAll()
Removes all children from the folder. |
void |
removeAll(boolean notify)
Removes all elements in the Container . |
protected void |
resetSubDirtyableOwners(java.util.List children)
Resets the owner of each element listed. |
void |
setListOfChildren(java.util.List list)
Fulfills the public accessor part of the Folder
contract. |
protected void |
setSubDirtyableOwner(Element element,
Dirtyable owner)
Sets the owner of this element to the specified element. |
int |
size()
Returns the current number of children in the folder. |
Methods inherited from class oracle.ide.model.DataNode |
currentObjectStore, fireObjectOpened, getURL, open, open, reopen, save, setObjectStore |
Methods inherited from class oracle.ide.model.DefaultNode |
equalsImpl, getCategory, setURL |
Methods inherited from class oracle.ide.model.DefaultDocument |
attach, copyToImpl, createSubject, detach, ensureOpen, equalsImpl, getInputStream, getLongLabel, getShortLabel, getSubject, getTimestamp, getTimestampDirectly, getToolTipText, isDirty, isNew, isOpen, isReadOnly, markDirty, notifyObservers, refreshTimestamp, setOpen, setTimestampDirectly, setURLDirectly |
Methods inherited from class oracle.ide.model.DefaultElement |
getAttributes, getData |
Methods inherited from class oracle.ide.model.DefaultDisplayable |
getIcon, 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.Document |
getInputStream, getTimestamp, isNew, isReadOnly, open, save |
Methods inherited from interface oracle.ide.model.Locatable |
getURL, setURL |
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 |
getIcon, getLongLabel, getShortLabel, getToolTipText, toString |
Methods inherited from interface oracle.ide.addin.Subject |
attach, detach, notifyObservers |
Methods inherited from interface oracle.ide.model.Dirtyable |
isDirty, markDirty |
Methods inherited from interface oracle.ide.model.LazyLoadable |
isOpen |
Methods inherited from interface oracle.ide.model.Category |
getCategory |
Field Detail |
protected final java.util.List _children
final
" modifier makes it possible to synchronize
on the _children
object, since its value can never
change.
Constructor Detail |
public DataContainer()
public DataContainer(java.net.URL url)
Method Detail |
public java.util.List getListOfChildren()
Folder
contract.
List
view of the child @{link Element}s contained
by this DataFolder
.public void setListOfChildren(java.util.List list)
Folder
contract.
Sets the child list of the DataFolder
instance
to match the specified List
. Only objects in the
List
that can be cast to Element
are added. The
implementation uses the DefaultFolder.add(Element)
method
to add the child to the list, so that subclass implementations can
override DefaultFolder.add(Element)
without having to also
override this method.
public boolean mayHaveChildren()
Element
interface. This implementation always
returns true
.
mayHaveChildren
in interface Element
mayHaveChildren
in class DefaultElement
Element.mayHaveChildren()
public java.util.Iterator getChildren()
Element
interface. This implementation returns
an Iterator
over the current list of children.
getChildren
in interface Element
getChildren
in class DefaultElement
Element.getChildren()
public boolean canAdd(Element element)
Folder
interface. The default implementation
returns true
if and only if the specified
Element
is not null
.
canAdd
in interface Folder
element
- the Element
that is about to be added
to this Folder
.
true
if and only if the specified
Element
is not null
.Folder.canAdd(Element)
public boolean add(Element element)
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.
add
in interface Folder
Folder.add(oracle.ide.model.Element)
public boolean canRemove(Element element)
Folder
interface. The default implementation
returns true
if and only if the specified
Element
is not null
.
canRemove
in interface Folder
element
- the Element
that is about to be removed
from this Folder
.
true
if and only if the specified
Element
is not null
.Folder.canRemove(Element)
public boolean remove(Element element)
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.
remove
in interface Folder
element
- The child object to remove.Folder.remove(Element)
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 boolean add(Element element, boolean notify)
Container
Folder.add(Element)
method
that accepts an additional flag that indicates whether or not
notifications of the change should be sent to registered observers.
add
in interface Container
element
- The Element
to be added to this
Container
.notify
- If true
, any observers are notified
of the change. If false
, no notification is sent.public boolean remove(Element element, boolean notify)
Container
Folder.remove(Element)
method
that accepts an additional flag that indiciates whether or not
notifications of the change should be sent to registered observers.
remove
in interface Container
element
- The Element
to be removed from this
Container
.notify
- If true
, any observers are notified
of the change. If false
, no notification is sent.public void removeAll(boolean notify)
Container
Container
. The
notify
flag indicates whether observers should be
notified of the change.
removeAll
in interface Container
notify
- If true
, any observers are notified
of the change. If false
, no notification is sent.public final java.lang.String getBaseDirectory()
public void close()
Document
Document
and unloads any associated data.
When this method returns, the state of the Document
object should be equivalent to when the Document
object has just been instantiated but not yet opened.
close
in interface Document
close
in class DataNode
public boolean add(java.util.Collection childElements, boolean notify)
Collection
of Element
objects to the child
list for the container. Each Element
is added with the
add(Element, boolean)
method. If an Object
in the
Collection
is not an Element
or if an Element
cannot be added to the container, then it is skipped and
false
is returned; the other Element
objects in
the Collection
will still be added, however.
protected final void copyToImpl(DataContainer copy)
This method is intended to be helper method that subclasses can use,
if they implement the Copyable
interface.
The copy of the children list is a shallow copy. That is, the
children themselves are not copied, but the list is copied.
protected void resetSubDirtyableOwners(java.util.List children)
SubDirtyable
element. When
a sub-dirtyable element is made dirty it actually makes its owner
dirty.
protected void setSubDirtyableOwner(Element element, Dirtyable owner)
|
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.