g-Eclipse
Release 1.0.0

eu.geclipse.ui.providers
Class ConfigurableContentProvider

java.lang.Object
  extended by eu.geclipse.ui.providers.GridModelContentProvider
      extended by eu.geclipse.ui.providers.ConfigurableContentProvider
Direct Known Subclasses:
ConnectionViewContentProvider

public class ConfigurableContentProvider
extends GridModelContentProvider

A GridModelContentProvider that may provide the content either in a flat mode or in a hierarchical mode. In flat mode all elements will be represented as direct children of the root node. In hierarchical mode the elements are represented in their normal hierarchical structure as provided by the Grid model.


Field Summary
static int MODE_FLAT
          Static field that denotes the flat representation mode.
static int MODE_HIERARCHICAL
          Static field that denotes the hierarchical representation mode.
 
Constructor Summary
ConfigurableContentProvider()
           
 
Method Summary
 void addConfigurationListener(IConfigurationListener listener)
          Add an IConfigurationListener to the list of currently registered listeners.
 java.lang.Object[] getChildren(java.lang.Object parentElement)
           
 java.lang.Object[] getElements(java.lang.Object inputElement)
           
 int getMode()
          Get the current mode of this ConfigurableContentProvider.
 void removeConfigurationListener(IConfigurationListener listener)
          Remove the specified IConfigurationListener from the list of listeners.
 void setMode(int m)
          Set the current mode of this ConfigurableContentProvider.
 
Methods inherited from class eu.geclipse.ui.providers.GridModelContentProvider
dispose, getParent, hasChildren, inputChanged, treeCollapsed, treeExpanded
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_FLAT

public static final int MODE_FLAT
Static field that denotes the flat representation mode.

See Also:
Constant Field Values

MODE_HIERARCHICAL

public static final int MODE_HIERARCHICAL
Static field that denotes the hierarchical representation mode.

See Also:
Constant Field Values
Constructor Detail

ConfigurableContentProvider

public ConfigurableContentProvider()
Method Detail

addConfigurationListener

public void addConfigurationListener(IConfigurationListener listener)
Add an IConfigurationListener to the list of currently registered listeners.

Parameters:
listener - The new IConfigurationListener to be added.

getChildren

public java.lang.Object[] getChildren(java.lang.Object parentElement)
Overrides:
getChildren in class GridModelContentProvider

getElements

public java.lang.Object[] getElements(java.lang.Object inputElement)
Overrides:
getElements in class GridModelContentProvider

setMode

public void setMode(int m)
Set the current mode of this ConfigurableContentProvider.

Parameters:
m - The new mode, i.e. either MODE_FLAT or MODE_HIERARCHICAL.

getMode

public int getMode()
Get the current mode of this ConfigurableContentProvider.

Returns:
Either MODE_FLAT or MODE_HIERARCHICAL.

removeConfigurationListener

public void removeConfigurationListener(IConfigurationListener listener)
Remove the specified IConfigurationListener from the list of listeners.

Parameters:
listener - The listener to be removed.

g-Eclipse
Release 1.0.0