g-Eclipse
Release 1.0.0

eu.geclipse.ui.views.filters
Class GridFilterConfigurationsManager

java.lang.Object
  extended by eu.geclipse.ui.views.filters.GridFilterConfigurationsManager

public abstract class GridFilterConfigurationsManager
extends java.lang.Object

Manager handling IGridFilterConfiguration Every view should create class inherit from GridFilterConfigurationsManager with abstract methods implementation


Field Summary
static java.lang.String ID_JOBVIEW
          Id for filters for GridJobView.
 
Constructor Summary
GridFilterConfigurationsManager(java.lang.String id)
           
 
Method Summary
 void addConfigurationListener(IFilterConfigurationListener listener)
          Add listener if this listener hasn't added yet
 boolean configure(Shell shell)
          Opens dialog to add/delete/change filter configurations
abstract  IGridFilterConfiguration createConfiguration(java.lang.String name)
          Implementators should create and return new objects implementing IGridFilterConfiguration
 void enableConfiguration(IGridFilterConfiguration configuration)
          Enables given configuration, and disables rest of configurations
 java.util.List<IGridFilterConfiguration> getConfigurations()
           
 ViewerFilter[] getEnabledFilters()
           
 void readState(IMemento memento)
          Read configurations state from memento
 void removeConfigurationListener(IFilterConfigurationListener listener)
           
 void saveState(IMemento memento)
          Save configurations state into memento
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_JOBVIEW

public static final java.lang.String ID_JOBVIEW
Id for filters for GridJobView. Used to read/save filters state

See Also:
Constant Field Values
Constructor Detail

GridFilterConfigurationsManager

public GridFilterConfigurationsManager(java.lang.String id)
Parameters:
id - identifier used to read/save state into IMemento. Should be unique. The best - view class name
Method Detail

createConfiguration

public abstract IGridFilterConfiguration createConfiguration(java.lang.String name)
Implementators should create and return new objects implementing IGridFilterConfiguration

Parameters:
name - for configuration
Returns:
created configuration

saveState

public void saveState(IMemento memento)
Save configurations state into memento

Parameters:
memento - into, which configurations will be saved

readState

public void readState(IMemento memento)
Read configurations state from memento

Parameters:
memento - from which state will be read

getEnabledFilters

public ViewerFilter[] getEnabledFilters()
Returns:
filters, which are active in given configuration, and should be applied to current view (when this configuration is enabled)

getConfigurations

public final java.util.List<IGridFilterConfiguration> getConfigurations()
Returns:
all created filter configurations

configure

public boolean configure(Shell shell)
Opens dialog to add/delete/change filter configurations

Parameters:
shell - parent for dialog
Returns:
true if dialog was closed by OK, and all changes should be stored

enableConfiguration

public void enableConfiguration(IGridFilterConfiguration configuration)
Enables given configuration, and disables rest of configurations

Parameters:
configuration -

addConfigurationListener

public void addConfigurationListener(IFilterConfigurationListener listener)
Add listener if this listener hasn't added yet

Parameters:
listener -

removeConfigurationListener

public void removeConfigurationListener(IFilterConfigurationListener listener)
Parameters:
listener -

g-Eclipse
Release 1.0.0