Removed gradation and Modified visible setting of 'process combo box'
authordongkyu6 lee <dongkyu6.lee@samsung.com>
Fri, 12 Feb 2016 05:13:49 +0000 (14:13 +0900)
committerdongkyu6 lee <dongkyu6.lee@samsung.com>
Fri, 12 Feb 2016 05:13:49 +0000 (14:13 +0900)
Change-Id: I2a4e1251d6561563deb80b9c4094dd291c606fc5

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/Toolbar.java

index 9902a9a..6a69920 100755 (executable)
@@ -671,13 +671,13 @@ public enum Toolbar {
        private DACustomCombo makeDACustomCombo(Composite parent) {
                DACustomCombo returnCombo = new DACustomCombo(parent, SWT.NONE);
                returnCombo.setComboGradation(ColorResources.TOOLBAR_COMBO_NORMAL_START,
-                               ColorResources.TOOLBAR_COMBO_NORMAL_END, ColorResources.TOOLBAR_COMBO_PUSH_START,
-                               ColorResources.TOOLBAR_COMBO_PUSH_END, ColorResources.TOOLBAR_COMBO_HOVER_START,
-                               ColorResources.TOOLBAR_COMBO_HOVER_END, ColorResources.TOOLBAR_COMBO_DISABLE_START,
-                               ColorResources.TOOLBAR_COMBO_DISABLE_END);
+                               ColorResources.TOOLBAR_COMBO_NORMAL_START, ColorResources.TOOLBAR_COMBO_PUSH_START,
+                               ColorResources.TOOLBAR_COMBO_PUSH_START, ColorResources.TOOLBAR_COMBO_HOVER_START,
+                               ColorResources.TOOLBAR_COMBO_HOVER_START, ColorResources.TOOLBAR_COMBO_DISABLE_START,
+                               ColorResources.TOOLBAR_COMBO_DISABLE_START);
                returnCombo.setOutlineColors(ColorResources.TOOLBAR_COMBO_OUTLINE_NORMAL_IN_COLOR,
                                ColorResources.TOOLBAR_COMBO_OUTLINE_PUSH_IN_COLOR,
-                               ColorResources.TOOLBAR_COMBO_OUTLINE_HOVER_IN_COLOR,
+                               ColorResources.TOOLBAR_COMBO_OUTLINE_DISABLE_IN_COLOR,
                                ColorResources.TOOLBAR_COMBO_OUTLINE_DISABLE_IN_COLOR);
                returnCombo.setComboImages(ImageResources.TOOLBAR_COMBO_BUTTON_NORMAL,
                                ImageResources.TOOLBAR_COMBO_BUTTON_NORMAL,
@@ -1207,6 +1207,7 @@ public enum Toolbar {
                processCombo.initCombo();
                processCombo.add(ALL_PROCESS);
                processCombo.select(0);
+               processCombo.setVisible(false);
        }
 
        public int getSelectedPid() {
@@ -1266,6 +1267,7 @@ public enum Toolbar {
                                } else if (fState == DAState.DONE || fState == DAState.INIT) {
                                        toggleStartButtonUI(false);
                                        setAllControlState(true);
+                                       checkProcessList();
                                } else {
                                        // known state
                                        setAllControlState(false);
@@ -1433,4 +1435,18 @@ public enum Toolbar {
                return button.isButtonEnabled();
        }
 
+       private void checkProcessList() {
+               Project project = Global.getProject();
+               if (null == project) {
+                       return;
+               }
+
+               int pidsize = project.getProcessIDs().length;
+
+               if( pidsize > 1 )
+                       processCombo.setVisible(true);
+               else
+                       processCombo.setVisible(false);
+       }
+
 }