EGF Engine
Release 0.1.0

org.eclipse.egf.core.ui.internal.data
Class AbstractUiContainer

java.lang.Object
  extended by org.eclipse.egf.core.ui.internal.data.AbstractUiContainer
Direct Known Subclasses:
UiReferencedFactoryComponent, UiReferencedFactoryComponentContainer

public abstract class AbstractUiContainer
extends Object

Defines an API to describe an UI container displayed in TreeViewer.


Constructor Summary
protected AbstractUiContainer(Object parent_p)
          Constructor.
protected AbstractUiContainer(Object parent_p, Set<Object> children_p)
          Constructor.
 
Method Summary
 boolean addChild(Object child_p)
          Add a child in the children set.
 Object[] getChildren()
          Return the children as an array of objects.
 Image getImage()
          Return the image used as icon for this UI container.
 Object getParent()
          Return the parent of this container or null if none.
abstract  String getText()
          Return the text used as label for this UI container.
 boolean hasChildren()
          Return whether or not this container has children.
 boolean isEmpty()
          Return true if this container contains no elements.
 boolean removeChild(Object child_p)
          Remove a child from the children set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractUiContainer

protected AbstractUiContainer(Object parent_p,
                              Set<Object> children_p)
Constructor.

Parameters:
parent_p -
children_p -

AbstractUiContainer

protected AbstractUiContainer(Object parent_p)
Constructor.

Parameters:
parent_p -
Method Detail

addChild

public boolean addChild(Object child_p)
Add a child in the children set.

Parameters:
child_p -

removeChild

public boolean removeChild(Object child_p)
Remove a child from the children set.

Parameters:
child_p -

isEmpty

public boolean isEmpty()
Return true if this container contains no elements.

Returns:

getParent

public Object getParent()
Return the parent of this container or null if none.

Returns:

getChildren

public Object[] getChildren()
Return the children as an array of objects.

Returns:

hasChildren

public boolean hasChildren()
Return whether or not this container has children.

Returns:

getText

public abstract String getText()
Return the text used as label for this UI container.

Returns:

getImage

public Image getImage()
Return the image used as icon for this UI container.
Default implementation returns null.

Returns:
an image or null if not provided.

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.