[SRADA-596] Remove delay for color transition on feature list
authorjoon.c.baek <joon.c.baek@samsung.com>
Thu, 26 May 2016 11:04:18 +0000 (20:04 +0900)
committerdongkyu6 lee <dongkyu6.lee@samsung.com>
Thu, 26 May 2016 23:44:49 +0000 (08:44 +0900)
Remove delay for color transition at select feature

Change-Id: I3afd4c6ccd3955b214b0181f2dbadd0771a83e10
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FlatFeatureDialogFeatureListPage.java

index 049351c..0c8fca1 100644 (file)
@@ -224,6 +224,17 @@ public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
                        featuretoggleGroup.getButton(featurName).getTooltipButton().setBackground(ColorResources.FEATURE_FEATURELISTCOMP_NORMAL_BACKGROUND);
                }
        }
+       
+       private Listener toggleDownListener = new Listener() {
+               @Override
+               public void handleEvent(Event event) {
+                       DACustomFeatureToggleButton toggleButton = (DACustomFeatureToggleButton) event.widget;
+                       if (toggleButton.isToggled()) {
+                               toggleButton.getParent().setBackground(ColorResources.FEATURE_FEATURELISTCOMP_NORMAL_BACKGROUND);
+                               toggleButton.getTooltipButton().setBackground(ColorResources.FEATURE_FEATURELISTCOMP_NORMAL_BACKGROUND);
+                       }
+               }
+       };
 
        private Listener toggleListener = new Listener() {
                @Override
@@ -395,6 +406,7 @@ public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
                                // TODO: Set title, description, page font size
                                featuretoggleGroup.addToggleButton(toggle);
                                toggle.addListener(SWT.MouseUp,  toggleListener);
+                               toggle.addListener(SWT.MouseDown, toggleDownListener);
                        }
                        if (target.isSelectedFlatFeature(feature.getName())) {
                                featuretoggleGroup.setSelection(feature.getName(), true);