|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.util.jobs.JobStatusTableContentProvider
Manages a collection of JobStatus objects and supplies the
data to a JFace TableViewer instance.
| Field Summary | |
static String[] |
COLUMN_IDENTIFIERS
The column identifiers used |
static int |
DURATION_COLUMN
The index of thecolumn to display the duration of a IJob
|
private List |
jobStatusList
The List of JobStatus objects |
static int |
NAME_COLUMN
The index of the column to display the name of an IJob
|
static int |
PRIORITY_COLUMN
The index of the priority column which shows an Image
representing an IJob priority
|
static int |
PROGRESS_COLUMN
The index of the column to display the progress of a running IJob
|
static int |
START_TIME_COLUMN
The index of the column to display the start time of an IJob
|
static int |
STATUS_COLUMN
The index of the column to display the status of a IJob
|
private TableViewer |
viewer
The TableViewer served |
| Constructor Summary | |
JobStatusTableContentProvider(TableViewer viewer)
Creates a new JobStatusTableContentProvider.
|
|
| Method Summary | |
void |
addJob(JobStatus status)
Adds the specified JobStatus to this
JobStatusTableContentProvider.
|
private void |
createReaper()
Creates an IdleJobStatusReaper and binds it to
this JobStatusTableContentProvider.
|
void |
defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the default language changes. |
void |
dispose()
Disposes of this content provider. |
Object[] |
getElements(Object inputElement)
Returns the elements to display in the viewer when its input is set to the given element. |
JobStatus[] |
getJobStates()
Gets all JobStatus objects currently managed by
this JobStatusTableContentProvider.
|
void |
inputChanged(Viewer viewer,
Object oldInput,
Object newInput)
Notifies this content provider that the given viewer's input has been switched to a different element. |
void |
removeJob(JobStatus status)
Removes the specified JobStatus from this
JobStatusTableContentProvider.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PRIORITY_COLUMN
The index of the priority column which shows an Image
representing an IJob priority
public static final int START_TIME_COLUMN
The index of the column to display the start time of an IJob
public static final int NAME_COLUMN
The index of the column to display the name of an IJob
public static final int PROGRESS_COLUMN
The index of the column to display the progress of a running
IJob
public static final int DURATION_COLUMN
IJob
public static final int STATUS_COLUMN
The index of the column to display the status of a IJob
public static final String[] COLUMN_IDENTIFIERS
The column identifiers used
private List jobStatusList
The List of JobStatus objects
private TableViewer viewer
The TableViewer served
| Constructor Detail |
public JobStatusTableContentProvider(TableViewer viewer)
Creates a new JobStatusTableContentProvider.
viewer - the TableViewer to serve| Method Detail |
public void defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the default language changes.
defaultLanguageChanged in interface ILanguageResourceChangeListenerlrce - the triggered LanguageResourceChangeEventpublic void addJob(JobStatus status)
Adds the specified JobStatus to this
JobStatusTableContentProvider.
status - the JobStatus to addpublic void removeJob(JobStatus status)
Removes the specified JobStatus from this
JobStatusTableContentProvider.
status - the JobStatus to removepublic JobStatus[] getJobStates()
Gets all JobStatus objects currently managed by
this JobStatusTableContentProvider.
JobStatus objects currently managed by
this JobStatusTableContentProviderpublic Object[] getElements(Object inputElement)
Returns the elements to display in the viewer when its input is set to the given element. These elements can be presented as rows in a table, items in a list, etc. The result is not modified by the viewer.
getElements in interface IStructuredContentProviderinputElement - the input element
IStructuredContentProvider.getElements(java.lang.Object)public void dispose()
Disposes of this content provider. This is called by the viewer when it is disposed.
The viewer should not be updated during this call, as it is in the process of being disposed.
dispose in interface IContentProviderIContentProvider.dispose()
public void inputChanged(Viewer viewer,
Object oldInput,
Object newInput)
Notifies this content provider that the given viewer's input has been switched to a different element.
A typical use for this method is registering the content provider as a listener to changes on the new input (using model-specific means), and deregistering the viewer from the old input. In response to these change notifications, the content provider should update the viewer (see the add, remove, update and refresh methods on the viewers).
The viewer should not be updated during this call, as it might be in the process of being disposed.
inputChanged in interface IContentProviderviewer - the vieweroldInput - the old input element, or null if the
viewer did not previously have an inputnewInput - the new input element, or null if the
viewer does not have an inputIContentProvider.inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)private void createReaper()
Creates an IdleJobStatusReaper and binds it to
this JobStatusTableContentProvider.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||