|
g-Eclipse Release 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPlatformObject
eu.geclipse.core.model.impl.AbstractGridElement
eu.geclipse.core.model.impl.AbstractGridContainer
public abstract class AbstractGridContainer
Base implementation of the IGridContainer interface that
implements basic functionalities of a grid container.
| Method Summary | |
|---|---|
boolean |
canContain(IGridElement element)
Determines if this may contain the specified element. |
boolean |
contains(IGridElement element)
Determines if this container holds the specified element as child. |
IGridElement |
create(IGridElementCreator creator)
Create a new Grid element from the specified IGridElementCreator and add the newly created element
to the list of children. |
void |
delete(IGridElement child)
Delete the specified child. |
void |
deleteAll()
Remove all children from this container and call their dispose() methods. |
void |
dispose()
Clean up all resources that this element uses internally. |
IGridElement |
findChild(java.lang.String name)
Search for a child with the specified name and return it. |
IGridElement |
findChildWithResource(java.lang.String resourceName)
Search for a child that has an IResource with the
specified name. |
int |
getChildCount()
Get the number of children currently contained in this container. |
IGridElement[] |
getChildren(IProgressMonitor monitor)
Get the children that are currently contained in this container. |
boolean |
hasChildren()
Determine if this container contains any children. |
boolean |
isDirty()
Returns if this container is dirty. |
void |
refresh(IProgressMonitor monitor)
Refresh the content of this container. |
void |
setDirty()
Mark this container as dirty. |
| Methods inherited from class eu.geclipse.core.model.impl.AbstractGridElement |
|---|
getAdapter, getProject, isHidden, isVirtual |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface eu.geclipse.core.model.IGridContainer |
|---|
isLazy |
| Methods inherited from interface eu.geclipse.core.model.IGridElement |
|---|
getFileStore, getName, getParent, getPath, getProject, getResource, isHidden, isLocal, isVirtual |
| Method Detail |
|---|
public boolean canContain(IGridElement element)
IGridContainer
canContain in interface IGridContainerelement - The element that may be contained in
this container.
public boolean contains(IGridElement element)
IGridContainer
contains in interface IGridContainerelement - The element to be checked if it is contained
in this container.
public IGridElement create(IGridElementCreator creator)
throws ProblemException
IGridContainerIGridElementCreator and add the newly created element
to the list of children. If a child with the same name already
exists this old child is replaced by the new child.
Note that this is the only way to add children to an
IGridContainer.
create in interface IGridContainercreator - The IGridElementCreator from which to
create the new element.
null and there was such an old element
found. null in all other cases.
ProblemException
public void delete(IGridElement child)
throws ProblemException
IGridContainer
delete in interface IGridContainerchild - The element to be deleted.
ProblemException - If a problem occurs during the deletion.IGridElement.dispose()public void dispose()
IGridElement
dispose in interface IGridElementdispose in class AbstractGridElementpublic int getChildCount()
IGridContainer
getChildCount in interface IGridContainer
public IGridElement[] getChildren(IProgressMonitor monitor)
throws ProblemException
IGridContainer
getChildren in interface IGridContainermonitor - A progress monitor that is used to indicate progress
for lazy containers. May be null.
ProblemException - If this is a lazy container it may be
possible that an exception occurs while the children are fetched.public boolean hasChildren()
IGridContainer
hasChildren in interface IGridContainerpublic IGridElement findChild(java.lang.String name)
IGridContainernull if no such element was found.
findChild in interface IGridContainername - The name of the element to be searched for.
null.public IGridElement findChildWithResource(java.lang.String resourceName)
IGridContainerIResource with the
specified name. If the child is not virtual this method is
equivalent to IGridContainer.findChild(String).
findChildWithResource in interface IGridContainerresourceName - The name of the corresponding resource of
the child.
null.public boolean isDirty()
IGridContainerIGridContainer.getChildren(IProgressMonitor monitor) is called.
To avoid confusions non-lazy containers should always return true here.
isDirty in interface IGridContainer
public void refresh(IProgressMonitor monitor)
throws ProblemException
IGridContainer
refresh in interface IGridContainermonitor - A progress monitor used to give the caller feedback about
the progress of the operation.
ProblemException - If a problem occurs during the refresh
operation.public void setDirty()
IGridContainerIGridContainer.getChildren(IProgressMonitor monitor)
is called. This methods does not affect non-lazy containers.
setDirty in interface IGridContainerpublic void deleteAll()
dispose() methods.
deleteAll in interface IGridContainerIGridContainer.delete(IGridElement)
|
g-Eclipse Release 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||