[CheckPoint] : fix bug about Edit chart dialog of CheckPoint page
authorjungwook.ryu <jungwook.ryu@samsung.com>
Wed, 18 Nov 2015 07:06:06 +0000 (16:06 +0900)
committerjungwook ryu <jungwook.ryu@samsung.com>
Wed, 18 Nov 2015 07:10:47 +0000 (16:10 +0900)
"Edit chart dialog" of CheckPoint page use same data of Timeline page's.
so same chart is shown.

Change-Id: Ifd4948ae480856cf004786bb036cc8a26a1eae19
Signed-off-by: jungwook.ryu <jungwook.ryu@samsung.com>
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/interactive/chart/InteractiveEditItemsDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineEditItemsDialog.java

index 6080ea0..dd62370 100644 (file)
@@ -27,7 +27,9 @@
 package org.tizen.dynamicanalyzer.ui.interactive.chart;
 
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.TableItem;
@@ -47,6 +49,16 @@ public class InteractiveEditItemsDialog extends TimelineEditItemsDialog {
                setOkButtonListener(okButtonListener);
        }
 
+       @Override
+       protected Set<String> getSelectedChartSet() {
+               Set<String> chartNameList = new HashSet<String>();
+               List<TimelineChart> selectedChartList = InteractiveDataManager.getInstance().getShowTimelineChartList();
+               for (int i = 0; i < selectedChartList.size(); i++) {
+                       chartNameList.add(selectedChartList.get(i).getChartName());
+               }
+               return chartNameList;
+       }
+
        private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() {
                @Override
                public void handleClickEvent(DACustomButton button) {
index c18ba63..cf163f7 100644 (file)
@@ -136,6 +136,10 @@ public class TimelineEditItemsDialog extends DAMessageBox {
                this.okButtonListener = okButtonListener;
        }
 
+       protected Set<String> getSelectedChartSet() {
+               return UILayoutDataManager.INSTANCE.getSelectedChartSet();
+       }
+
        protected boolean run() {
                shell.setText(TimelineChartLabels.EDIT_CHART_DLG_TITLE);
                shell.setBackground(ColorResources.WINDOW_BG_COLOR);
@@ -174,7 +178,7 @@ public class TimelineEditItemsDialog extends DAMessageBox {
                // Column for Title text
                new TableColumn(chartTableViewer.getTable(), SWT.NONE).setWidth(TEXT_COLUMN_WIDTH);
 
-               Set<String> selectedChartSet = UILayoutDataManager.INSTANCE.getSelectedChartSet();
+               Set<String> selectedChartSet = getSelectedChartSet();
 
                GC gc = new GC(Display.getCurrent());
                gc.setFont(FontResources.EDIT_CHART_DLG_ITEM_SUB_NAME);