]> git.argeo.org Git - gpl/argeo-slc.git/blob - eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/ProcessDetailLabelProvider.java
First draft of ProcessDetail Implementation
[gpl/argeo-slc.git] / eclipse / plugins / org.argeo.slc.client.ui / src / org / argeo / slc / client / ui / views / ProcessDetailLabelProvider.java
1 package org.argeo.slc.client.ui.views;
2
3 import org.argeo.slc.process.SlcExecution;
4 import org.eclipse.jface.viewers.ITableLabelProvider;
5 import org.eclipse.jface.viewers.LabelProvider;
6 import org.eclipse.swt.graphics.Image;
7
8 /**
9 * @author bsinou
10 *
11 * Fill ProcessDetail view. Deported in an external bundle so that main
12 * slc ui bundle does not depend on DB implementation.
13 */
14 public class ProcessDetailLabelProvider extends LabelProvider implements
15 ITableLabelProvider {
16 public String getColumnText(Object obj, int index) {
17 // log.debug(sessionFactory.getClass().toString());
18
19 SlcExecution se = (SlcExecution) obj;
20 switch (index) {
21
22 case 0:
23 return getText(se.getStartDate());
24 case 1:
25 return se.getHost();
26 case 2:
27 return se.getUuid();
28 case 3:
29 return se.currentStep().getType();
30 }
31 return getText(obj);
32 }
33
34 public Image getColumnImage(Object obj, int index) {
35 return null;
36 }
37
38 }