aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/labelProviders/CompositeLabelProviderTableTest.java')
-rw-r--r--tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/labelProviders/CompositeLabelProviderTableTest.java33
1 files changed, 17 insertions, 16 deletions
diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/labelProviders/CompositeLabelProviderTableTest.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/labelProviders/CompositeLabelProviderTableTest.java
index 00878c5..9d2d1e3 100644
--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/labelProviders/CompositeLabelProviderTableTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/labelProviders/CompositeLabelProviderTableTest.java
@@ -11,6 +11,7 @@
package org.eclipse.jface.tests.labelProviders;
+import org.eclipse.jface.tests.viewers.TestElement;
import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IFontProvider;
import org.eclipse.jface.viewers.IViewerLabelProvider;
@@ -29,53 +30,53 @@ import org.eclipse.swt.widgets.TableItem;
* {@link IColorProvider}, {@link org.eclipse.jface.viewers.IColorProvider},
* {@link IFontProvider}
* @since 3.3
- *
+ *
*/
public class CompositeLabelProviderTableTest extends CompositeLabelProviderTest {
- class MyLabelProvider extends LabelProvider implements IColorProvider,
- IViewerLabelProvider, IFontProvider {
+ class MyLabelProvider extends LabelProvider<TestElement> implements IColorProvider<TestElement>,
+ IViewerLabelProvider<TestElement>, IFontProvider<TestElement> {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
*/
- public Color getForeground(Object element) {
+ public Color getForeground(TestElement element) {
return foreground;
}
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
*/
- public Color getBackground(Object element) {
+ public Color getBackground(TestElement element) {
return background;
}
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.IViewerLabelProvider#updateLabel(org.eclipse.jface.viewers.ViewerLabel,
* java.lang.Object)
*/
- public void updateLabel(ViewerLabel label, Object element) {
+ public void updateLabel(ViewerLabel label, TestElement element) {
label.setText(getText(element));
}
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
*/
- public Font getFont(Object element) {
+ public Font getFont(TestElement element) {
return font;
}
}
/**
* Create a new instance of the recevier.
- *
+ *
* @param name
*/
public CompositeLabelProviderTableTest(String name) {
@@ -84,13 +85,13 @@ public class CompositeLabelProviderTableTest extends CompositeLabelProviderTest
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.tests.viewers.ViewerTestCase#createViewer(org.eclipse.swt.widgets.Composite)
*/
- protected StructuredViewer createViewer(Composite parent) {
-
+ protected StructuredViewer<TestElement,TestElement> createViewer(Composite parent) {
+
initializeColors(parent);
- final TableViewer v = new TableViewer(parent);
+ final TableViewer<TestElement,TestElement> v = new TableViewer<TestElement,TestElement> (parent);
v.setContentProvider(new LabelTableContentProvider());
v.setLabelProvider(new MyLabelProvider());
v.getTable().setLinesVisible(true);