[SRADA-400] Feature dialog, alpha2 version
authorjoon.c.baek <joon.c.baek@samsung.com>
Mon, 2 May 2016 09:58:45 +0000 (18:58 +0900)
committerjoon.c baek <joon.c.baek@samsung.com>
Wed, 4 May 2016 02:44:20 +0000 (11:44 +0900)
1. Font resized
2. Title is setted as vertical center alignment
3. Feature list toggle button working well
4. Hover image show at info button
5. Tooltip box show at info button
6. Adjust label composite size to fit Ubuntu, Win
7. Set background color to title composite
8. Confirmed working under Mac, Ubuntu, Win.
7. Block old setting dialog

Change-Id: I1d76eaf1256d9adef785bad7d8451787d079d0c1
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
[SRADA-400] Add info button hover image showing

Change-Id: I2c0f93c87db43d8eda70fa26b874dd510a5a82e1
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/resources/FontResources.java
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/tooltip/DACustomTooltip.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/PostWindowOpenCallback.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/shortcut/ShortCutKeyBindingHandler.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/BaseView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FlatFeatureDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FlatFeatureDialogFeatureListPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FlatFeatureDialogSelectedFeaturePage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FlatFeatureDialogTargetPage.java

index 6ab8ad7..8109375 100644 (file)
@@ -217,7 +217,7 @@ public class FontResources {
                        "setting_button_font", resizeDefaultFont(8, 3));//$NON-NLS-1$
        
        public static final Font SETTING_TITLE_FONT = getFont(
-                       "setting_title_font", resizeDefaultFont(9, 3));//$NON-NLS-1$
+                       "setting_title_font", resizeDefaultFont(13, 3));//$NON-NLS-1$
        
        public static final Font SETTING_DESCRIPTION_FONT = getFont(
                        "setting_description_font", resizeDefaultFont(8, 3));//$NON-NLS-1$
index 8165293..9c592be 100644 (file)
@@ -170,6 +170,12 @@ public abstract class DACustomTooltip {
                                p.y + TOOLTIP_LOCATION_TOP);
        }
 
+       public void setTooltipLocation(Point p, int top, int left) {
+               generateTooltipSize();
+               tooltipShell.setSize(width, height);
+               tooltipShell.setLocation(p.x + left, p.y + top);
+       }
+
        private void generateTooltipSize() {
                if (!tooltipMessage.isEmpty()) {
                        // set height
index bec7a26..98aeae2 100644 (file)
@@ -41,9 +41,10 @@ public class PostWindowOpenCallback implements IExecutionCallback {
                        @Override
                        public void run() {
                                final Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
-                               SettingDialog dialog = new SettingDialog(shell);
-                               dialog.open();
-                               FlatFeatureDialog featureDialog = new FlatFeatureDialog(shell); //FIXME
+                               // replace flat theme feature dialog
+                               //SettingDialog dialog = new SettingDialog(shell);
+                               //dialog.open();
+                               FlatFeatureDialog featureDialog = new FlatFeatureDialog(shell);
                                featureDialog.open();
                        }
                });
index 4b04288..4b185c7 100644 (file)
@@ -96,9 +96,10 @@ public class ShortCutKeyBindingHandler extends AbstractHandler {
                } else if (e.keyCode == SWT.F2) {
                        Logger.debug("configuration");
                        Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
-                       SettingDialog dialog = new SettingDialog(shell);
-                       dialog.open();
-                       FlatFeatureDialog featureDialog = new FlatFeatureDialog(shell); // FIXME
+                       // replace flat theme feature dialog
+                       //SettingDialog dialog = new SettingDialog(shell);
+                       //dialog.open();
+                       FlatFeatureDialog featureDialog = new FlatFeatureDialog(shell);
                        featureDialog.open();
                } else if (e.keyCode == SWT.F3) {
                        Logger.debug("view source toggle");
index 605a8d1..24a1381 100644 (file)
@@ -162,8 +162,9 @@ public class BaseView extends ViewPart {
                        @Override
                        public void run() {
                                final Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
-                               SettingDialog dialog = new SettingDialog(shell);
-                               dialog.open();
+                               // replace Flat theme feature dialog
+                               //SettingDialog dialog = new SettingDialog(shell);
+                               //dialog.open();
                                FlatFeatureDialog featureDialog = new FlatFeatureDialog(shell); // FIXME
                                featureDialog.open();
                        }
index 3b6b9e2..3a4933c 100644 (file)
@@ -28,48 +28,33 @@ package org.tizen.dynamicanalyzer.ui.toolbar.setting;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
 import org.eclipse.swt.events.ShellEvent;
 import org.eclipse.swt.events.ShellListener;
-import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FormAttachment;
 import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.layout.FormLayout;
 import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
-import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.DAState;
 import org.tizen.dynamicanalyzer.communicator.IDECommunicator;
 import org.tizen.dynamicanalyzer.handlers.CommonAction;
 import org.tizen.dynamicanalyzer.handlers.UIAction;
-import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
 import org.tizen.dynamicanalyzer.nl.WidgetLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
 import org.tizen.dynamicanalyzer.setting.SettingDataManager;
 import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
-import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAMessageBox;
-import org.tizen.dynamicanalyzer.widgets.da.view.DABaseComposite;
-import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
-import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
 
 public class FlatFeatureDialog extends DAMessageBox {
        private static boolean opened = false;
        private DACustomButton cancelButton = null;
        private DACustomButton okButton = null;
-       private boolean isApply = false;
-
-       private FlatFeatureDialogTargetPage targetPage = null;
-       private FlatFeatureDialogFeatureListPage featureListPage = null;
+       private FlatFeatureDialogFeatureListPage featureListPage = null;
        private FlatFeatureDialogSelectedFeaturePage selectedFeaturePage = null;
        private Composite buttonContentsComp = null;
 
@@ -153,7 +138,7 @@ public class FlatFeatureDialog extends DAMessageBox {
                compData.bottom = new FormAttachment(100, -60);
                targetComp.setLayoutData(compData);
                
-               // featurelist composite
+               // feature list composite
                Composite featureListComp = new Composite(shell, SWT.NONE);
                compLayout = new FormLayout();
                featureListComp.setLayout(compLayout);
@@ -177,7 +162,7 @@ public class FlatFeatureDialog extends DAMessageBox {
                compData.bottom = new FormAttachment(100, -60);
                selectedFeatureComp.setLayoutData(compData);
                
-               targetPage = new FlatFeatureDialogTargetPage(targetComp, SWT.NONE);
+               new FlatFeatureDialogTargetPage(targetComp, SWT.NONE);
                selectedFeaturePage = new FlatFeatureDialogSelectedFeaturePage(selectedFeatureComp, this, SWT.NONE);
                featureListPage = new FlatFeatureDialogFeatureListPage(featureListComp, this, SWT.NONE);
   
@@ -192,18 +177,6 @@ public class FlatFeatureDialog extends DAMessageBox {
                compData.right = new FormAttachment(100, 0);
                compData.bottom = new FormAttachment(100, 0);
                buttonContentsComp.setLayoutData(compData);
-               buttonContentsComp.addPaintListener(new PaintListener() {
-
-                       @Override
-                       public void paintControl(PaintEvent e) {
-                               Composite comp = (Composite) e.widget;
-                               Rectangle rect = comp.getClientArea();
-                               e.gc.setForeground(ColorResources.SETTING_SUNKEN_LINE_1);
-                               e.gc.drawLine(0, 0, rect.width - 1, 0);
-                               e.gc.setForeground(ColorResources.SETTING_SUNKEN_LINE_2);
-                               e.gc.drawLine(0, 1, rect.width - 1, 1);
-                       }
-               });
 
                okButton = new DAButton(buttonContentsComp, SWT.NONE);
                okButton.addClickListener(okButtonListener);
index a21a9e7..d602c56 100644 (file)
  */
 package org.tizen.dynamicanalyzer.ui.toolbar.setting;
 
-import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FormAttachment;
 import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.layout.FormLayout;
@@ -43,29 +37,19 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
 import org.tizen.dynamicanalyzer.common.DAState;
-import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
-import org.tizen.dynamicanalyzer.nl.WidgetLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
 import org.tizen.dynamicanalyzer.resources.ImageResources;
-import org.tizen.dynamicanalyzer.setting.Feature;
 import org.tizen.dynamicanalyzer.setting.FlatFeature;
 import org.tizen.dynamicanalyzer.setting.SettingDataManager;
 import org.tizen.dynamicanalyzer.setting.TargetData;
-import org.tizen.dynamicanalyzer.setting.Template;
-import org.tizen.dynamicanalyzer.setting.TemplateData;
-import org.tizen.dynamicanalyzer.util.CommonUtil;
-import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
-import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomMultiToggleButtonGroup;
 import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButton;
-import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButtonGroup;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
+import org.tizen.dynamicanalyzer.widgets.tooltip.DACustomTooltip;
 
 public class FlatFeatureDialogFeatureListPage extends DAPageComposite {        
 
@@ -74,13 +58,13 @@ public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
        private Composite featureListComp = null;
        private ScrolledComposite featureListScrolledComp = null;
        private Composite featureListInputComp = null;
-       private Composite featureListInfoComp = null;
        private Label featureListIcon = null;
        private Label featureListLabel = null;
        private Label featureListNameLabel = null;
        private Label featureListDescLabel = null;
        private Label featureListInfoLabel = null;
-       private DACustomButton imageButton = null;
+       private DACustomTooltip tooltip = null;
+       private DACustomMultiToggleButtonGroup featuretoggleGroup = null;
 
        public FlatFeatureDialogFeatureListPage(Composite parent, FlatFeatureDialog parentObject, int style) {
                super(parent, style);
@@ -126,40 +110,6 @@ public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
                }
        }
        
-       private DACustomToggleButton createToggleButton(Composite composit, Image image,
-                       Point imagePoint, String title, Point fontPoint, int width, int height,
-                       int topPosition, int leftPosition) {
-
-               DACustomToggleButton toggle = new DACustomToggleButton(composit, SWT.TRANSPARENT);
-               // color and image
-               toggle.setColors(ColorResources.SETTING_BUTTON_NORMAL_COLOR,
-                               ColorResources.SETTING_BUTTON_NORMAL_COLOR,
-                               ColorResources.SETTING_BUTTON_NORMAL_COLOR,
-                               ColorResources.SETTING_BUTTON_NORMAL_COLOR,
-                               ColorResources.SETTING_BUTTON_NORMAL_COLOR,
-                               ColorResources.SETTING_BUTTON_NORMAL_COLOR,
-                               ColorResources.SETTING_BUTTON_NORMAL_COLOR);
-               toggle.setButtonImages(image, image, image, image, image, image, image);
-               toggle.setButtonImagePoint(imagePoint);
-
-               // font
-               toggle.setTitle(title);
-               toggle.setFontPoint(fontPoint);
-               toggle.setFontColors(ColorResources.SETTING_COLOR, ColorResources.SETTING_COLOR,
-                               ColorResources.SETTING_COLOR, ColorResources.SETTING_COLOR);
-               toggle.setButtonFont(FontResources.SETTING_BUTTON_FONT);
-
-               // layout
-               FormData data = new FormData();
-               data.top = new FormAttachment(0, topPosition);
-               data.left = new FormAttachment(0, leftPosition);
-               data.width = width;
-               data.height = height;
-               toggle.setLayoutData(data);
-
-               return toggle;
-       }
-       
        private DACustomToggleButton createToggleButton(Composite composit,
                        Image normalImage, Image hoverImage, Point imagePoint,
                        String title, Point fontPoint,
@@ -195,23 +145,40 @@ public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
 
                return toggle;
        }   
+       
+       public void featureToggleUnselect(String featurName) {
+               if(featuretoggleGroup != null)
+                       featuretoggleGroup.setSelection(featurName, false);
+       }
 
        public void createFeatureListComposite() {
                initFeatureListWidget();
-
+               
+               featureListComp.setBackground(ColorResources.FEATURE_TITLE_BACKGROUND);
+               
+               // tooltip
+               tooltip = new DACustomTooltip() {
+           
+               @Override
+               public void setTooltipMessage() {
+                   tooltipMessage.clear();
+                   tooltipMessage.add("Tooltip toolTip TOOLTIP");
+               }   
+           };  
+           
                // label
                featureListLabel = new Label(featureListComp, SWT.TRANSPARENT);
                FormData data = new FormData();
-               data.top = new FormAttachment(0, 0); 
-               data.left = new FormAttachment(0, 0); 
-               data.height = 40; 
+               data.top = new FormAttachment(featureListComp, 10); 
+               data.left = new FormAttachment(featureListComp, 20); 
                data.right = new FormAttachment(100, 0);
+               data.bottom = new FormAttachment(0, 40);
                featureListLabel.setLayoutData(data);
                featureListLabel.setText(ConfigureLabels.SETTING_DIALOG_FEATURELIST_TITLE);
                featureListLabel.setBackground(ColorResources.FEATURE_TITLE_BACKGROUND);
                featureListLabel.setForeground(ColorResources.DEFAULT_FONT_COLOR);
                featureListLabel.setFont(FontResources.SETTING_TITLE_FONT);
-               featureListLabel.setAlignment(SWT.CENTER);
+               featureListLabel.setAlignment(SWT.LEFT);
 
                // scrolledComposite
                featureListScrolledComp = new ScrolledComposite(featureListComp, SWT.BORDER | SWT.V_SCROLL
@@ -242,12 +209,14 @@ public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
                featureListInputComp.setLayoutData(data);
                featureListInputComp.setBackground(ColorResources.WHITE);
 
+               
+               
                // listing available feature list
                TargetData target = SettingDataManager.INSTANCE.getTarget(null);
                List<FlatFeature> featureList = target.getAvailableFlatFeatureList();
-               List<FlatFeature> selectedFeatures = target.getSelectedFlatFeatureList();
+               target.getSelectedFlatFeatureList();
                
-               DACustomMultiToggleButtonGroup toggleGroup = new DACustomMultiToggleButtonGroup();
+               featuretoggleGroup = new DACustomMultiToggleButtonGroup();
 
                Point imagePoint = new Point(0, 0);
                int topPosition = 22;
@@ -255,12 +224,12 @@ public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
                for (int i = 0 ; i < featureList.size(); i++) {
                        FlatFeature feature = featureList.get(i);
 
-                       if (toggleGroup.getGroupLength() < featureList.size()) {
+                       if (featuretoggleGroup.getGroupLength() < featureList.size()) {
                                DACustomToggleButton toggle = createToggleButton(featureListInputComp,
                                                feature.getNormalImage(), feature.getFocusImage(), 
                                                imagePoint, feature.getName(),
                                                null, 70, 70, topPosition, 22);
-                               toggleGroup.addToggleButton(toggle);
+                               featuretoggleGroup.addToggleButton(toggle);
 
                                toggle.addListener(SWT.MouseUp, new Listener() {
                                        @Override
@@ -277,10 +246,10 @@ public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
                        }
                        
                        if (target.isSelectedFlatFeature(feature.getName())) {
-                               toggleGroup.setSelection(feature.getName(), true);
+                               featuretoggleGroup.setSelection(feature.getName(), true);
                        }
                        else {
-                               toggleGroup.setSelection(feature.getName(), false);
+                               featuretoggleGroup.setSelection(feature.getName(), false);
                        }
 
                        // label : featureListName
@@ -289,7 +258,7 @@ public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
                        data.top = new FormAttachment(featureListInputComp, topPosition+7);
                        data.left = new FormAttachment(0, 22 + 70 + 28);
                        data.right = new FormAttachment(100, -54);
-                       data.height = 15;
+                       data.height = 20;
                        featureListNameLabel.setLayoutData(data);
                        featureListNameLabel.setText(feature.getName());
                        featureListNameLabel.setBackground(ColorResources.WHITE);
@@ -299,10 +268,10 @@ public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
                        // text : description
                        featureListDescLabel = new Label(featureListInputComp, SWT.WRAP | SWT.READ_ONLY);
                        data = new FormData();
-                       data.top = new FormAttachment(featureListInputComp, topPosition+7+15);
+                       data.top = new FormAttachment(featureListInputComp, topPosition+7+20);
                        data.left = new FormAttachment(0, 22 + 70 + 28);
                        data.right = new FormAttachment(100, -54);
-                       data.height = 70 - 15;
+                       data.height = 70 - 20;
                        featureListDescLabel.setLayoutData(data);
                        featureListDescLabel.setText(feature.getDescription());
                        featureListDescLabel.setBackground(ColorResources.WHITE);
@@ -311,13 +280,38 @@ public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
                        
                        Point infoImagePoint = new Point(0, 0);
                        // info toggle button
-                       DACustomToggleButton infoToggle = createToggleButton(featureListInputComp,
-                                                                                       ImageResources.TOOLTIP_INFO_FEATURELIST_NORMAL,
-                                                                                       ImageResources.TOOLTIP_INFO_FEATURELIST_HOVER,
-                                                                                       infoImagePoint, "info", null,
-                                                                                       20, 20, topPosition+25, 554); //554
-                       infoToggle.setToolTipText("Text text text text");
-               
+                       DACustomButton infoButton = new DACustomButton(featureListInputComp, SWT.NONE);
+                       infoButton.setBackground(ColorResources.WHITE);
+                       infoButton.setImages(ImageResources.TOOLTIP_INFO_FEATURELIST_NORMAL,
+                                                                 ImageResources.TOOLTIP_INFO_FEATURELIST_NORMAL,
+                                                                 ImageResources.TOOLTIP_INFO_FEATURELIST_HOVER,
+                                                                 ImageResources.TOOLTIP_INFO_FEATURELIST_HOVER);
+
+                       // layout
+                       data = new FormData();
+                       data.top = new FormAttachment(0, topPosition+25);
+                       data.left = new FormAttachment(0, 554);
+                       data.width = 20;
+                       data.height = 20;
+                       infoButton.setLayoutData(data);
+                       infoButton.addListener(SWT.MouseEnter, new Listener() {
+                               @Override
+                               public void handleEvent(Event event) {
+                                       Point p = ((DACustomButton)event.widget).getDisplay().getCursorLocation();
+                                       tooltip.open(featureListComp.getShell());
+                                       tooltip.setTooltipMessage();
+                                       tooltip.setTooltipLocation(p, -10, -150);
+                                       System.out.println("Mouse enter!!!!");
+                               }
+                       });
+                       
+                       infoButton.addListener(SWT.MouseExit, new Listener() {
+                               @Override
+                               public void handleEvent(Event event) {
+                                       tooltip.close();
+                                       System.out.println("Mouse exit!!!!");
+                               }
+                       });
 
                        topPosition += (70 + 30);
                }
index 90d6b37..2763625 100644 (file)
 package org.tizen.dynamicanalyzer.ui.toolbar.setting;
 
 import java.util.List;
-import java.util.Map;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FormAttachment;
 import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.layout.FormLayout;
@@ -42,26 +37,15 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
 import org.tizen.dynamicanalyzer.common.DAState;
-import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
-import org.tizen.dynamicanalyzer.nl.WidgetLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
 import org.tizen.dynamicanalyzer.resources.ImageResources;
 import org.tizen.dynamicanalyzer.setting.FlatFeature;
 import org.tizen.dynamicanalyzer.setting.SettingDataManager;
 import org.tizen.dynamicanalyzer.setting.TargetData;
-import org.tizen.dynamicanalyzer.setting.Template;
-import org.tizen.dynamicanalyzer.setting.TemplateData;
-import org.tizen.dynamicanalyzer.util.CommonUtil;
-import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
-import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
-import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButton;
-import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButtonGroup;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
 
 public class FlatFeatureDialogSelectedFeaturePage extends DAPageComposite {    
@@ -120,12 +104,12 @@ public class FlatFeatureDialogSelectedFeaturePage extends DAPageComposite {
                DACustomToggleButton toggle = new DACustomToggleButton(composit, SWT.NONE);
                // color and image
                toggle.setColors(ColorResources.SETTING_BUTTON_NORMAL_COLOR,
-                               ColorResources.SETTING_BUTTON_PUSH_COLOR,
-                               ColorResources.SETTING_BUTTON_HOVER_COLOR,
-                               ColorResources.SETTING_BUTTON_DISABLE_COLOR,
-                               ColorResources.SETTING_BUTTON_TOGGLE_NORMAL_COLOR,
-                               ColorResources.SETTING_BUTTON_TOGGLE_HOVER_COLOR,
-                               ColorResources.SETTING_BUTTON_TOGGLE_PUSH_COLOR);
+                               ColorResources.SETTING_BUTTON_NORMAL_COLOR,
+                               ColorResources.SETTING_BUTTON_NORMAL_COLOR,
+                               ColorResources.SETTING_BUTTON_NORMAL_COLOR,
+                               ColorResources.SETTING_BUTTON_NORMAL_COLOR,
+                               ColorResources.SETTING_BUTTON_NORMAL_COLOR,
+                               ColorResources.SETTING_BUTTON_NORMAL_COLOR);
                toggle.setButtonImages(image, image, image, image, image, image, image);
                toggle.setButtonImagePoint(imagePoint);
 
@@ -153,20 +137,22 @@ public class FlatFeatureDialogSelectedFeaturePage extends DAPageComposite {
        
        public void createSelectedFeatureComposite() {
                initSelectedFeatureCompositeWidget();
+               
+               selectedComp.setBackground(ColorResources.FEATURE_TITLE_BACKGROUND);
 
                // label
                selectedFeatureLabel = new Label(selectedComp, SWT.TRANSPARENT);
                FormData data = new FormData();
-               data.top = new FormAttachment(0, 0);
-               data.left = new FormAttachment(0, 0);
-               data.height = 40;
-               data.width = 235;
+               data.top = new FormAttachment(selectedComp, 10);
+               data.left = new FormAttachment(selectedComp, 20);
+               data.right = new FormAttachment(100, 0);
+               data.bottom = new FormAttachment(0, 40);
                selectedFeatureLabel.setLayoutData(data);
                selectedFeatureLabel.setText(ConfigureLabels.SETTING_DIALOG_SELECTED_TITLE);
                selectedFeatureLabel.setBackground(ColorResources.FEATURE_TITLE_BACKGROUND);
                selectedFeatureLabel.setForeground(ColorResources.DEFAULT_FONT_COLOR);
                selectedFeatureLabel.setFont(FontResources.SETTING_TITLE_FONT);
-               selectedFeatureLabel.setAlignment(SWT.CENTER);
+               selectedFeatureLabel.setAlignment(SWT.LEFT);
 
                // scrolledComposite
                selecetedScrolledComp = new ScrolledComposite(selectedComp, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
@@ -222,7 +208,7 @@ public class FlatFeatureDialogSelectedFeaturePage extends DAPageComposite {
                        data.top = new FormAttachment(selectedInputComp, topPosition+7);
                        data.left = new FormAttachment(0, 20 + 40 + 15);
                        data.right = new FormAttachment(0, 20 + 40 + 15 + 125);
-                       data.height = 15;
+                       data.height = 20;
                        selectedNameLabel.setLayoutData(data);
                        selectedNameLabel.setText(feature.getName());
                        selectedNameLabel.setBackground(ColorResources.WHITE);
@@ -234,16 +220,15 @@ public class FlatFeatureDialogSelectedFeaturePage extends DAPageComposite {
                        delToggle = createToggleButton(selectedInputComp,
                                                                                        ImageResources.DELETE,
                                                                                        delImagePoint, feature.getName(), null,
-                                                                                       15, 15, topPosition+12, 200); //554
-                       delToggle.setToolTipText("Text text text text");
-                       
+                                                                                       15, 15, topPosition+12, 200);
                        delToggle.addListener(SWT.MouseUp, new Listener() {
                                @Override
                                public void handleEvent(Event event) {
                                        DACustomToggleButton toggleButton = (DACustomToggleButton) event.widget;
                                        TargetData target = SettingDataManager.INSTANCE.getTarget(null);
                                        target.removeSelectedFlatFeature(toggleButton.getText());
-                                       featureDialog.getFeatureListPage().createFeatureListComposite();
+                                       featureDialog.getFeatureListPage().featureToggleUnselect(toggleButton.getText());
+                                       createSelectedFeatureComposite();
                                }
                        });
 
index ddf7cd1..ae72b7e 100644 (file)
  */
 package org.tizen.dynamicanalyzer.ui.toolbar.setting;
 
-import java.util.List;
 import java.util.Map;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FormAttachment;
 import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.layout.FormLayout;
@@ -42,23 +38,15 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
 import org.tizen.dynamicanalyzer.common.DAState;
-import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
-import org.tizen.dynamicanalyzer.nl.WidgetLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
 import org.tizen.dynamicanalyzer.resources.ImageResources;
 import org.tizen.dynamicanalyzer.setting.SettingDataManager;
 import org.tizen.dynamicanalyzer.setting.TargetData;
-import org.tizen.dynamicanalyzer.util.CommonUtil;
-import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
-import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
-import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButton;
 import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButtonGroup;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
 
 public class FlatFeatureDialogTargetPage extends DAPageComposite {     
@@ -73,13 +61,11 @@ public class FlatFeatureDialogTargetPage extends DAPageComposite {
                                ImageResources.TARGET_NAME_FLAT_WEARABLE_FOCUS,
                                ImageResources.TARGET_NAME_FLAT_WEARABLE_NORMAL);
                
-               private int id = -1;
                private String displayName = null;
                private Image image = null;
                private Image focusImage = null;
                
                private ProfileDisplayInfo(int id, String displayName, Image focusImage, Image image) {
-                       this.id = id;
                        this.displayName = displayName;
                        this.focusImage = focusImage;
                        this.image = image;
@@ -182,11 +168,13 @@ public class FlatFeatureDialogTargetPage extends DAPageComposite {
        public void createTargetComposite() {
                initTargetCompositeWidget();
 
+               targetComp.setBackground(ColorResources.FEATURE_TITLE_BACKGROUND);
+               
                // label
                targetLabel = new Label(targetComp, SWT.TRANSPARENT);
                FormData data = new FormData();
-               data.top = new FormAttachment(0, 0);
-               data.left = new FormAttachment(0, 0);
+               data.top = new FormAttachment(targetComp, 10);
+               data.left = new FormAttachment(targetComp, 20);
                data.right = new FormAttachment(100, 0);
                data.bottom = new FormAttachment(0, 40);
                targetLabel.setLayoutData(data);
@@ -194,7 +182,7 @@ public class FlatFeatureDialogTargetPage extends DAPageComposite {
                targetLabel.setBackground(ColorResources.FEATURE_TITLE_BACKGROUND);
                targetLabel.setForeground(ColorResources.DEFAULT_FONT_COLOR);
                targetLabel.setFont(FontResources.SETTING_TITLE_FONT);
-               targetLabel.setAlignment(SWT.CENTER);
+               targetLabel.setAlignment(SWT.LEFT);
 
                // scrolledComposite
                targetScrolledComposite = new ScrolledComposite(targetComp, SWT.BORDER | SWT.V_SCROLL
@@ -265,7 +253,7 @@ public class FlatFeatureDialogTargetPage extends DAPageComposite {
                        data.top = new FormAttachment(targetInputComposite, topPosition+8);
                        data.left = new FormAttachment(0, 20 + 40 + 15);
                        data.right = new FormAttachment(100, 0);
-                       data.height = 15;
+                       data.height = 20;
                        targetNameLabel.setLayoutData(data);
                        targetNameLabel.setText(target.getTargetName());
                        targetNameLabel.setBackground(ColorResources.FEATURE_CONTENT_BACKGROUND);