sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.util/src/com/nokia/carbide/cpp/pi/util/TestDataMiningPalette.java
changeset 12 ae255c9aa552
parent 5 844b047e260d
--- a/sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.util/src/com/nokia/carbide/cpp/pi/util/TestDataMiningPalette.java	Wed Jun 23 14:49:59 2010 +0300
+++ b/sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.util/src/com/nokia/carbide/cpp/pi/util/TestDataMiningPalette.java	Wed Jun 23 15:05:09 2010 +0300
@@ -20,6 +20,7 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 
 import org.eclipse.swt.SWT;
@@ -48,24 +49,25 @@
 
 	private Shell sShell = null;
 
-	private Map<Button,CLabel> dataMiningColors = new HashMap<Button,CLabel>();
-	private DataMiningPalette palette = new DataMiningPalette();
-	private ArrayList<Integer> sosThreadlist = new ArrayList<Integer>();
-	private ArrayList<Integer> threadlist = new ArrayList<Integer>();
+	private final Map<Button,CLabel> dataMiningColors = new HashMap<Button,CLabel>();
+	private final DataMiningPalette palette = new DataMiningPalette();
+	private final List<Integer> sosThreadlist = new ArrayList<Integer>();
+	private final List<Integer> threadlist = new ArrayList<Integer>();
 
 	
 	/**
 	 * @param args
 	 */
-	public static void main(String[] args) {
+	public static void main(final String[] args) {
 		Display display = Display.getDefault();
 		TestDataMiningPalette thisClass = new TestDataMiningPalette();
 		thisClass.createSShell();
 		thisClass.sShell.open();
 
 		while (!thisClass.sShell.isDisposed()) {
-			if (!display.readAndDispatch())
+			if (!display.readAndDispatch()){
 				display.sleep();
+			}
 		}
 		display.dispose();
 	}
@@ -102,7 +104,7 @@
 			button.setText(entry.toString());
 			button.setBackground(new Color(Display.getCurrent(), palette.getRGB(entry)));
 			button.addSelectionListener(new SelectionAdapter() {
-            	public void widgetSelected(SelectionEvent e) {
+            	public void widgetSelected(final SelectionEvent e) {
             		Integer index = Integer.valueOf(button.getText());
             		if(palette.recolorEntryDialog(sShell, index))
             		{