trace/traceanalyser/com.nokia.s60tools.traceanalyser/src/com/nokia/s60tools/traceanalyser/ui/views/RuleTableLabelProvider.java
changeset 9 14dc2103a631
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/trace/traceanalyser/com.nokia.s60tools.traceanalyser/src/com/nokia/s60tools/traceanalyser/ui/views/RuleTableLabelProvider.java	Wed Jun 23 13:57:56 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+package com.nokia.s60tools.traceanalyser.ui.views;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+
+import com.nokia.s60tools.traceanalyser.containers.RuleInformation;
+
+/**
+ * class RuleTableLabelProvider
+ * label provider for rule table.
+ *
+ */
+
+class RuleTableLabelProvider extends LabelProvider implements ITableLabelProvider {
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+	 */
+	public String getColumnText(Object obj, int index) {
+		RuleInformation rule = (RuleInformation)obj;
+		return rule.getText(index);
+
+
+	}
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 */
+	public Image getColumnImage(Object obj, int index) {
+		/*if (index == MemSpyFileBundle.INDEX_FILE_TYPE){
+			return getImage(obj);
+		}
+		else{
+			return null;
+		}*/
+		return null;
+
+	}
+	
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+	 */
+	
+	public Image getImage(Object obj) {
+		/*MemSpyFileBundle bundle = (MemSpyFileBundle)obj;
+		if( bundle.isHeapDumpFile() ){
+			return ImageResourceManager.getImage(ImageKeys.IMG_HEAP_DUMP);
+		}
+		else{
+			return ImageResourceManager.getImage(ImageKeys.IMG_SWMT_LOG);
+		}*/
+		return PlatformUI.getWorkbench().
+		getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT);
+	}
+}
\ No newline at end of file