[Title]chart graph item renamed to graph series
authoryeongtaik.byeon <yeongtaik.byeon@samsung.com>
Tue, 31 Jul 2012 11:02:07 +0000 (20:02 +0900)
committeryeongtaik.byeon <yeongtaik.byeon@samsung.com>
Tue, 31 Jul 2012 11:02:07 +0000 (20:02 +0900)
[Type]update
[Module]pageChart
[Priority]normal
[CQ#]
[Redmine#]6184
[Problem]
[Cause]
[Solution]
[TestCase]

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/views/CoolbarArea.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/views/pageInfo/PageChartGraphSeries.java [moved from org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/views/pageInfo/PageChartGraphItem.java with 89% similarity]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/views/pageInfo/PageChartGraphSeriesItem.java [new file with mode: 0644]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/views/pageInfo/PageChartItem.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/views/pageInfo/PageDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/views/threadPage/ThreadAPIListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/DAPageChart/DAPageChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/DAPageChart/DAPageChartTimelineCellRenderer.java

index 03a278f..5da09a2 100755 (executable)
@@ -125,7 +125,7 @@ public class CoolbarArea {
 
        private static int COMBO_FIRST_INDEX = 0;
 
-       public static boolean bThreadPageWork = false; // FIXME
+       public static boolean bThreadPageWork = true; // FIXME
 
        private ShellListener shellListener = new ShellListener() {
 
@@ -2,22 +2,23 @@ package org.tizen.dynamicanalyzer.ui.views.pageInfo;
 
 import org.eclipse.swt.graphics.Color;
 
-public class PageChartGraphItem {
+public class PageChartGraphSeries {
        public static final int PAGECHART_GRAPHITEM_STATUS_NONE = 0;
        public static final int PAGECHART_GRAPHITEM_STATUS_EVENT = 1 << 1;
        public static final int PAGECHART_GRAPHITEM_STATUS_BAR = 1 << 2;
        public static final int PAGECHART_GRAPHITEM_STATUS_LINE = 1 << 3;
        public static final int PAGECHART_GRAPHITEM_STATUS_AREA = 1 << 4;
+       //evnet added option
        public static final int PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_START = 1 << 5;
        public static final int PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_END = 1 << 6;
 
        private String name;
        private long x; // time
-       private long y;
+       private long y; // value
        private Color eventColor;
        private int style;
 
-       public PageChartGraphItem(long x, long y, Color eventColor, int chartStyle) {
+       public PageChartGraphSeries(long x, long y, Color eventColor, int chartStyle) {
                this.x = x;
                this.y = y;
                this.eventColor = eventColor;
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/views/pageInfo/PageChartGraphSeriesItem.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/views/pageInfo/PageChartGraphSeriesItem.java
new file mode 100644 (file)
index 0000000..eeb9a88
--- /dev/null
@@ -0,0 +1,41 @@
+package org.tizen.dynamicanalyzer.ui.views.pageInfo;
+
+import org.eclipse.swt.graphics.Color;
+
+public class PageChartGraphSeriesItem {
+       private long x;
+       private long y;
+       private Color eventColor;
+       
+       public PageChartGraphSeriesItem(long x, long y, Color eventColor){
+               this.setX(x);
+               this.setY(y);
+               this.setEventColor(eventColor);
+       }
+
+       public long getX() {
+               return x;
+       }
+
+       public void setX(long x) {
+               this.x = x;
+       }
+
+       public long getY() {
+               return y;
+       }
+
+       public void setY(long y) {
+               this.y = y;
+       }
+
+       public Color getEventColor() {
+               return eventColor;
+       }
+
+       public void setEventColor(Color eventColor) {
+               this.eventColor = eventColor;
+       }
+       
+       
+}
index 13c14c3..be315f1 100644 (file)
@@ -15,7 +15,7 @@ public class PageChartItem {
        private GridItem gridItem = null;
 
        private List<PageChartItem> children = new ArrayList<PageChartItem>();
-       private List<PageChartGraphItem> graphItems = new ArrayList<PageChartGraphItem>();
+       private List<PageChartGraphSeries> graphItems = new ArrayList<PageChartGraphSeries>();
 
        public PageChartItem(final DAPageChart chart, final String text) {
                // super(chart, SWT.NONE);
@@ -35,7 +35,7 @@ public class PageChartItem {
        }
 
        public PageChartItem(DAPageChart chart, String text,
-                       PageChartGraphItem graphItem) {
+                       PageChartGraphSeries graphItem) {
                this(chart, text);
                // TODO Auto-generated constructor stub
                graphItems.add(graphItem);
@@ -59,7 +59,7 @@ public class PageChartItem {
        }
 
        public PageChartItem(PageChartItem parent, String text,
-                       PageChartGraphItem graphItem) {
+                       PageChartGraphSeries graphItem) {
                this(parent, text);
 
                // TODO Auto-generated constructor stub
@@ -99,11 +99,11 @@ public class PageChartItem {
                return children;
        }
 
-       public List<PageChartGraphItem> GetGraphItem() {
+       public List<PageChartGraphSeries> GetGraphItem() {
                return graphItems;
        }
 
-       public void AddGraphItem(PageChartGraphItem item) {
+       public void AddGraphItem(PageChartGraphSeries item) {
                int i;
                for (i = graphItems.size(); i > 0; i--) {
                        if (graphItems.get(i - 1).getX() <= item.getX())
@@ -122,7 +122,7 @@ public class PageChartItem {
                chart.redraw();
        }
 
-       public void AddGraphItems(List<PageChartGraphItem> items) {
+       public void AddGraphItems(List<PageChartGraphSeries> items) {
                for (int i = 0; i < items.size(); i++) {
                        AddGraphItem(items.get(i));
                }
index 2eea00d..d0da270 100644 (file)
@@ -117,14 +117,14 @@ public abstract class PageDataManager {
        public void AddPageChartItem(PageDataItem dataItem, int itemIndex) {
                List<PageChartItem> items = pageChart.GetItems();
                int itemSize = items.size();
-               int graphItemStyle = PageChartGraphItem.PAGECHART_GRAPHITEM_STATUS_EVENT;
+               int graphItemStyle = PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT;
                if(dataItem.GetText(PAGE_COLUMN_APITYPE).matches(LogCenterConstants.FD_API_TYPE_OPEN)){
-                       graphItemStyle |= PageChartGraphItem.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_START;
+                       graphItemStyle |= PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_START;
                }
                else if(dataItem.GetText(PAGE_COLUMN_APITYPE).matches(LogCenterConstants.FD_API_TYPE_CLOSE)){
-                       graphItemStyle |= PageChartGraphItem.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_END;
+                       graphItemStyle |= PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_END;
                }
-               PageChartGraphItem graphItem = new PageChartGraphItem(
+               PageChartGraphSeries graphItem = new PageChartGraphSeries(
                                Long.parseLong(dataItem.GetText(PAGE_COLUMN_TIME)),itemIndex,
                                ColorResources.BLUE,graphItemStyle);
                PageChartItem newItem = null;
index b2b5602..0307d2c 100644 (file)
@@ -14,7 +14,7 @@ import org.tizen.dynamicanalyzer.model.DAView;
 import org.tizen.dynamicanalyzer.nl.FilePageLabels;
 import org.tizen.dynamicanalyzer.nl.ThreadPageLabels;
 import org.tizen.dynamicanalyzer.ui.views.filePage.FileApiListView;
-import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartGraphItem;
+import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartGraphSeries;
 import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartItem;
 import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
 import org.tizen.dynamicanalyzer.ui.widgets.DAPageAPIListTable.DAPageAPIListTable;
@@ -58,7 +58,7 @@ public class ThreadAPIListView extends DAView {
                if (null == item || !(item instanceof PageChartItem)) {
                        return;
                }
-               List<PageChartGraphItem> graphItems = item.GetGraphItem();
+               List<PageChartGraphSeries> graphItems = item.GetGraphItem();
 
                if (null == graphItems) {
                        return;
@@ -67,7 +67,7 @@ public class ThreadAPIListView extends DAView {
                tableComp.clear();
 
                for (int i = 0; i < graphItems.size(); i++) {
-                       PageChartGraphItem graphItem = graphItems.get(i);
+                       PageChartGraphSeries graphItem = graphItems.get(i);
                        int dataItemIndex = (int) graphItem.getY();
 
                        tableComp.addItem(ThreadPageDataManager.getInstance()
index 467fbbe..6afef9c 100644 (file)
@@ -23,7 +23,7 @@ import org.eclipse.swt.widgets.Shell;
 import org.tizen.dynamicanalyzer.ColorResources;
 import org.tizen.dynamicanalyzer.FontResources;
 import org.tizen.dynamicanalyzer.nl.DAPageChartLabels;
-import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartGraphItem;
+import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartGraphSeries;
 import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartItem;
 import org.tizen.dynamicanalyzer.ui.widgets.DATable.DATableEmptyColumnHeaderRenderer;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
@@ -131,8 +131,8 @@ public class DAPageChart extends Composite {
 
        public void printItem(List<PageChartItem> items, int depth) {
                PageChartItem item;
-               PageChartGraphItem graphItem;
-               List<PageChartGraphItem> graphItems;
+               PageChartGraphSeries graphItem;
+               List<PageChartGraphSeries> graphItems;
                if (items != null && items.size() != 0) {
                        for (int i = 0; i < items.size(); i++) {
                                for (int j = 0; j < depth; j++) {
index e7514ef..c25d4f9 100644 (file)
@@ -9,7 +9,7 @@ import org.eclipse.swt.graphics.Rectangle;
 import org.tizen.dynamicanalyzer.ColorResources;
 import org.tizen.dynamicanalyzer.nl.DAPageChartLabels;
 import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
-import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartGraphItem;
+import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartGraphSeries;
 import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartItem;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 
@@ -43,10 +43,10 @@ public class DAPageChartTimelineCellRenderer extends DefaultCellRenderer {
 
                List<PageChartItem> children = (List<PageChartItem>) item
                                .getData("children"); //$NON-NLS-1$
-               List<PageChartGraphItem> graphItems = (List<PageChartGraphItem>) item
+               List<PageChartGraphSeries> graphItems = (List<PageChartGraphSeries>) item
                                .getData("graphItems"); //$NON-NLS-1$
 
-               PageChartGraphItem graphItem;
+               PageChartGraphSeries graphItem;
                int graphItemSize;
                long startPeriodTime = 0;
                if (null != graphItems) {
@@ -55,12 +55,12 @@ public class DAPageChartTimelineCellRenderer extends DefaultCellRenderer {
                        boolean bPeriodStart = false;
                        for (int i = 0; i < graphItemSize; i++) {
                                graphItem = graphItems.get(i);
-                               if((graphItem.getStyle() & PageChartGraphItem.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_START) != 0){
+                               if((graphItem.getStyle() & PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_START) != 0){
                                        bPeriodStart = true;
                                        startPeriodTime = graphItem.getX();
                                        for(; i < graphItemSize; i++){
                                                graphItem = graphItems.get(i);
-                                               if((graphItem.getStyle() & PageChartGraphItem.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_END) != 0){
+                                               if((graphItem.getStyle() & PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_END) != 0){
                                                        long endPeriodTime = graphItem.getX();
                                                        if(endPeriodTime > startTime){
                                                                drawPeriod(gc, startPeriodTime, endPeriodTime, true);
@@ -95,7 +95,7 @@ public class DAPageChartTimelineCellRenderer extends DefaultCellRenderer {
                }
        }
 
-       public void drawEvent(GC gc, PageChartGraphItem graphItem) {
+       public void drawEvent(GC gc, PageChartGraphSeries graphItem) {
                if (null == r)
                        r = getBounds();
                int pixcelX = DAPageChartTimelineRendererHelper.getPixcelXFromTime(