g-Eclipse
Release 1.0.0

eu.geclipse.ui.views.filters
Class JobSubmissionTimeFilter

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

public class JobSubmissionTimeFilter
extends AbstractGridViewerFilter

Filter for jobs using time when job was submitted


Constructor Summary
JobSubmissionTimeFilter()
           
 
Method Summary
 java.util.Date getAfterDate()
           
 java.util.Date getBeforeDate()
           
 java.lang.String getFilterId()
           
 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 setDates(java.util.Date newAfterDate, java.util.Date newBeforeDate)
           
 
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

JobSubmissionTimeFilter

public JobSubmissionTimeFilter()
Method Detail

select

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

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.

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

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

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

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

setDates

public void setDates(java.util.Date newAfterDate,
                     java.util.Date newBeforeDate)
Parameters:
newAfterDate - jobs submitted after this date will be shown on view (may be null)
newBeforeDate - jobs submitted before this date will be shown on view (may be null)

getAfterDate

public java.util.Date getAfterDate()
Returns:
date after, which jobs will be visibled on view, or null if this date shouldn't be used to filter

getBeforeDate

public java.util.Date getBeforeDate()
Returns:
date before, which jobs will be visibled on view, or null if this date shouldn't be used to filter

g-Eclipse
Release 1.0.0