g-Eclipse
Release 1.0.0

eu.geclipse.ui.views.filters
Class JobStatusFilter

java.lang.Object
  extended by ViewerFilter
      extended by eu.geclipse.ui.views.filters.AbstractGridViewerFilter
          extended by eu.geclipse.ui.views.filters.JobStatusFilter
All Implemented Interfaces:
IGridFilter, java.lang.Cloneable

public class JobStatusFilter
extends AbstractGridViewerFilter

Filter using job-status to filter jobs


Constructor Summary
JobStatusFilter()
           
 
Method Summary
 java.lang.String getFilterId()
           
 boolean getStatusState(int jobStatus)
           
 boolean isEnabled()
          Useful when in given filter configuration user doesn't want to use all filters (e.g. user want to filter jobs using status, but he haven't specified submission date)
 IGridFilter makeClone()
          Cloning is used in ConfigureFiltersDialog, so it's important that every IGridFilter implement clone
 void readState(IMemento filterMemento)
          Read filter state from IMemento
 void saveState(IMemento filterMemento)
          Saves filter state into IMemento
 boolean select(Viewer viewer, java.lang.Object parentElement, java.lang.Object element)
           
 void setStatusState(int jobStatus, boolean showOnView)
           
 
Methods inherited from class eu.geclipse.ui.views.filters.AbstractGridViewerFilter
getFilter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobStatusFilter

public JobStatusFilter()
Method Detail

makeClone

public IGridFilter makeClone()
                      throws java.lang.CloneNotSupportedException
Description copied from interface: IGridFilter
Cloning is used in ConfigureFiltersDialog, so it's important that every IGridFilter implement clone

Returns:
cloned filter
Throws:
java.lang.CloneNotSupportedException

setStatusState

public void setStatusState(int jobStatus,
                           boolean showOnView)
Parameters:
jobStatus -
showOnView - true if jobs with given jobStatus should be visibled on view

select

public boolean select(Viewer viewer,
                      java.lang.Object parentElement,
                      java.lang.Object element)

getStatusState

public boolean getStatusState(int jobStatus)
Parameters:
jobStatus -
Returns:
true if job with given jobStatus is visibled on view according to this filter

saveState

public void saveState(IMemento filterMemento)
Description copied from interface: IGridFilter
Saves filter state into IMemento

Parameters:
filterMemento - memento, in which filter state should be stored

isEnabled

public boolean isEnabled()
Description copied from interface: IGridFilter
Useful when in given filter configuration user doesn't want to use all filters (e.g. user want to filter jobs using status, but he haven't specified submission date)

Returns:
true if this filter should be applied to the view

readState

public void readState(IMemento filterMemento)
Description copied from interface: IGridFilter
Read filter state from IMemento

Parameters:
filterMemento - memento, from which filter state will be restored

getFilterId

public java.lang.String getFilterId()
Returns:
filter id used to find filter in memento. Every IGridFilter class should has unique id. Objects of the same class should have the same id.

g-Eclipse
Release 1.0.0