Last change
on this file was
3,
checked in by zeiss, 15 years ago
|
|
-
Property svn:mime-type set to
text/plain
|
File size:
848 bytes
|
Line | |
---|
1 | package de.ugoe.cs.swe.exercises.lecturer; |
---|
2 | |
---|
3 | import org.eclipse.jface.viewers.ITableLabelProvider; |
---|
4 | import org.eclipse.jface.viewers.LabelProvider; |
---|
5 | import org.eclipse.swt.graphics.Image; |
---|
6 | import org.eclipse.ui.ISharedImages; |
---|
7 | import org.eclipse.ui.PlatformUI; |
---|
8 | |
---|
9 | public class LecturerLabelProvider extends LabelProvider implements |
---|
10 | ITableLabelProvider { |
---|
11 | public String getColumnText(Object obj, int index) { |
---|
12 | |
---|
13 | Lecturer lecturer = (Lecturer) obj; |
---|
14 | |
---|
15 | switch (index) { |
---|
16 | case 0: |
---|
17 | return lecturer.getTitle(); |
---|
18 | case 1: |
---|
19 | return lecturer.getFirstName(); |
---|
20 | case 2: |
---|
21 | return lecturer.getLastName(); |
---|
22 | } |
---|
23 | |
---|
24 | return getText(obj); |
---|
25 | } |
---|
26 | |
---|
27 | public Image getColumnImage(Object obj, int index) { |
---|
28 | return null; |
---|
29 | } |
---|
30 | |
---|
31 | @Override |
---|
32 | public Image getImage(Object obj) { |
---|
33 | return PlatformUI.getWorkbench().getSharedImages().getImage( |
---|
34 | ISharedImages.IMG_OBJ_ELEMENT); |
---|
35 | } |
---|
36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.