[Title] modifying heap chart
authorkamuru <kamuru@kamuru-Samsung-Desktop-System.(none)>
Wed, 13 Nov 2013 07:56:36 +0000 (16:56 +0900)
committerkamuru <kamuru@kamuru-Samsung-Desktop-System.(none)>
Wed, 13 Nov 2013 07:56:36 +0000 (16:56 +0900)
[Desc.] modifying heap chart's series name from platform to total
[Issue]

13 files changed:
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DAChartRenderer.java
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DAChartSeries.java
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DAChartBoard.java
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DAChartBoardHeightChangeableItem.java [new file with mode: 0644]
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DAChartBoardItem.java
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DAChartBoardItemCell.java
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DAChartBoardItemList.java
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/ColorResources.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelineChartLabels.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelineChartLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/CPUChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/HeapChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/UIEventChart.java

index 7f3fe71..6ef5004 100644 (file)
@@ -60,7 +60,7 @@ public class DAChartRenderer {
        private static final int SCREENSHOT_SELECTED_LINE_WIDTH = 2;
        private static final int SCREENSHOT_BORDER_LINE_WIDTH = 1;
 
-       private static final int MULTY_CHECK_BAR_WIDTH = 2;
+       private static final int MULTI_CHECK_BAR_WIDTH = 2;
 
        private static final int AXIS_LINE_WIDTH = 4;
        private static final int AXIS_MARGIN = 2;
@@ -142,8 +142,8 @@ public class DAChartRenderer {
                                case DAChartSeries.SERIES_STYLE_AREA:
                                        drawAreaSeries(gc, series, false);
                                        break;
-                               case DAChartSeries.SERIES_STYLE_MULTY_CHECK_BAR:
-                                       drawMultyCheckBarSeries(gc, series, seriesSize, i);
+                               case DAChartSeries.SERIES_STYLE_MULTI_CHECK_BAR:
+                                       drawMultiCheckBarSeries(gc, series, i, seriesSize);
                                        break;
                                case DAChartSeries.SERIES_STYLE_STEP:
                                        drawStepSeries(gc, series, true);
@@ -163,6 +163,9 @@ public class DAChartRenderer {
                                case DAChartSeries.SERIES_STYLE_LAST_CONTINUE_STEP:
                                        drawStepSeries(gc, series, false);
                                        break;
+                               case DAChartSeries.SERIES_STYLE_MULTI_LINE:
+                                       drawMultiLineSeries(gc, series, i, seriesSize);
+                                       break;
                                default:
                                        System.out.println("Undefined series style");
                                        break;
@@ -173,7 +176,6 @@ public class DAChartRenderer {
                                        for (int i = 0; i < seriesSize; i++) {
                                                series = seriesList.get(i);
                                                if (0 == i) {
-//                                                     drawAxis(gc, r, 0, series.getEndY(), true);
                                                        drawAxis(gc, r, plot.getVisibleStartY(),
                                                                        plot.getVisibleEndY(), true);
                                                } else if (1 == i) {
@@ -747,35 +749,36 @@ public class DAChartRenderer {
                }
        }
 
-       private void drawMultyCheckBarSeries(GC gc, DAChartSeries series,
-                       int seriesSize, int seriesIndex) {
+       private void drawMultiCheckBarSeries(GC gc, DAChartSeries series,
+                       int seriesIndex, int seriesSize) {
                List<DAChartSeriesItem> seriesItems = series.getSeriesItemList();
                if (null == seriesItems) {
                        return;
                }
 
                int seriesItemSize = seriesItems.size();
+               if (seriesItemSize < 1) {
+                       return;
+               }
+               
                Rectangle rect = new Rectangle(r.x, r.y
                                + (r.height / seriesSize * seriesIndex), r.width, r.height
                                / seriesSize);
                if (r.height == DAChartBoard.DEFAULT_ITEM_HEIGHT - 1) {
-                       gc.setForeground(ColorResources.UI_EVENT_CHART_TEXT);
-                       Font tempFont = gc.getFont();
-                       Font multiCheckBarFont = series.getFont();
-                       gc.setFont(multiCheckBarFont);
+                       gc.setForeground(ColorResources.SERIES_NAME_ANNOTATION);
+                       Font oriFont = gc.getFont();
+                       Font nameAnnotationFont = series.getFont();
+                       gc.setFont(nameAnnotationFont);
                        gc.drawText(series.getName(), rect.x + 3, rect.y + rect.height / 2
                                        - gc.stringExtent(series.getName()).y / 2 + seriesIndex,
                                        true);
-                       gc.setFont(tempFont);
+                       gc.setFont(oriFont);
                }
                if (seriesIndex != 0) {
                        gc.setForeground(ColorResources.UI_EVENT_CHART_SEPERATE_LINE);
                        gc.drawLine(rect.x, rect.y, rect.width, rect.y);
                }
 
-               if (seriesItemSize < 1) {
-                       return;
-               }
                DAChartSeriesItem seriesItem;
                Color color = series.getColor();
                gc.setBackground(color);
@@ -804,11 +807,11 @@ public class DAChartRenderer {
                        if (null != color) {
                                gc.setBackground(color);
                                gc.fillRectangle(pixcelStartX, pixcelStartY,
-                                               MULTY_CHECK_BAR_WIDTH, rect.height - MARGIN);
+                                               MULTI_CHECK_BAR_WIDTH, rect.height - MARGIN);
                                gc.setBackground(series.getColor());
                        } else {
                                gc.fillRectangle(pixcelStartX, pixcelStartY,
-                                               MULTY_CHECK_BAR_WIDTH, rect.height - MARGIN);
+                                               MULTI_CHECK_BAR_WIDTH, rect.height - MARGIN);
                        }
                        if (currentX > plot.getVisibleEndX()) {
                                break;
@@ -818,7 +821,7 @@ public class DAChartRenderer {
 
        private void drawLineSeries(GC gc, DAChartSeries series, boolean bEndVal) {
                List<DAChartSeriesItem> seriesItems = series.getSeriesItemList();
-               if (null == seriesItems) {
+               if (seriesItems == null) {
                        return;
                }
                int seriesItemSize = seriesItems.size();
@@ -1496,7 +1499,7 @@ public class DAChartRenderer {
                                break;
                        }
 
-                       if (null != color) {
+                       if (color != null) {
                                gc.setBackground(series.getColor());
                        }
                        if (currentX > plot.getVisibleEndX()) {
@@ -1504,4 +1507,88 @@ public class DAChartRenderer {
                        }
                }
        }
+
+       private void drawMultiLineSeries(GC gc, DAChartSeries series,
+                       int seriesIndex, int seriesSize) {
+               Rectangle rect = new Rectangle(r.x, r.y
+                               + (r.height / seriesSize * seriesIndex), r.width, r.height
+                               / seriesSize);
+
+               if (seriesIndex != 0) {
+                       gc.setForeground(ColorResources.UI_EVENT_CHART_SEPERATE_LINE);
+                       gc.drawLine(rect.x, rect.y, rect.width, rect.y);
+               }
+
+               gc.setForeground(ColorResources.SERIES_NAME_ANNOTATION);
+               Font oriFont = gc.getFont();
+               Font nameAnnotationFont = series.getFont();
+               gc.setFont(nameAnnotationFont);
+               gc.drawText(series.getName(), rect.x + 3,
+                               rect.y + rect.height / 2 - gc.stringExtent(series.getName()).y
+                                               / 2 + seriesIndex, true);
+               gc.setFont(oriFont);
+               
+               List<DAChartSeriesItem> seriesItems = series.getSeriesItemList();
+               if (seriesItems == null) {
+                       return;
+               }
+               int seriesItemSize = seriesItems.size();
+               if (seriesItemSize < 1) {
+                       return;
+               }
+               
+               int index = series.getPrevIndexByXvalue(plot.getVisibleStartX());
+               if (index < 0) {
+                       index = 0;
+               }
+               
+               double maxY = getMaxYToDraw(series, index);
+               
+               DAChartSeriesItem seriesItem = seriesItems.get(0);
+               int oldPixcelX = plot.getXPixcelFromX(seriesItem.getX(), r);
+               int oldPixcelY = plot.getYPixcelFromY(maxY, seriesItem.getY(), r);
+
+               if (seriesItemSize == 1) {
+                       if (oldPixcelX < r.x) {
+                               return;
+                       }
+                       Color color = seriesItem.getEventColor();
+                       if (null == color) {
+                               color = series.getColor();
+                       }
+                       gc.setForeground(color);
+                       gc.drawPoint(oldPixcelX, oldPixcelY);
+                       return;
+               }
+
+               Color color = series.getColor();
+               gc.setForeground(color);
+               gc.setLineStyle(SWT.LINE_SOLID);
+               gc.setAntialias(SWT.ON);
+
+               seriesItem = seriesItems.get(index);
+               double currentX = seriesItem.getX();
+
+               int newPixcelX = plot.getXPixcelFromX(currentX, r);
+               int newPixcelY = plot.getYPixcelFromY(maxY, seriesItem.getY(), r);
+
+               for (int i = index; i < seriesItemSize; i++) {
+                       seriesItem = seriesItems.get(i);
+                       currentX = seriesItem.getX();
+
+                       oldPixcelX = newPixcelX;
+                       oldPixcelY = newPixcelY;
+
+                       newPixcelX = plot.getXPixcelFromX(currentX, r);
+                       newPixcelY = plot.getYPixcelFromY(maxY, seriesItem.getY(), r);
+
+                       gc.drawLine(oldPixcelX, 
+                                       oldPixcelY / seriesSize + r.height * seriesIndex / seriesSize, 
+                                       newPixcelX,
+                                       newPixcelY / seriesSize + r.height * seriesIndex / seriesSize);
+                       if (currentX > plot.getVisibleEndX()) {
+                               return;
+                       }
+               }
+       }
 }
index 599614c..7f91b42 100644 (file)
@@ -43,11 +43,12 @@ public class DAChartSeries {
        public static final int SERIES_STYLE_IMAGE = 7;
        public static final int SERIES_STYLE_EVENT = 8;
        public static final int SERIES_STYLE_EVENT_AREA = 9;
-       public static final int SERIES_STYLE_MULTY_CHECK_BAR = 10;
+       public static final int SERIES_STYLE_MULTI_CHECK_BAR = 10;
        public static final int SERIES_STYLE_LOAD = 11;
        public static final int SERIES_STYLE_ARROW = 12;
        public static final int SERIES_STYLE_STATE = 13;
        public static final int SERIES_STYLE_LAST_CONTINUE_STEP = 14;
+       public static final int SERIES_STYLE_MULTI_LINE = 15;
 
        public static final double SERIES_DEFAULT_BAR_WIDTH = 0.5;
        public static final int SERIES_BAR_ALIGN_LEFT = 0;
@@ -57,7 +58,7 @@ public class DAChartSeries {
        private String name;
        private int style = SERIES_STYLE_NONE;
        private List<DAChartSeriesItem> seriesItems = new ArrayList<DAChartSeriesItem>();
-       private Color seriesColor;
+       private Color color;
        private double barWidth = SERIES_DEFAULT_BAR_WIDTH;
        private int barAlign = SERIES_BAR_ALIGN_LEFT;
        private double maxX = 0;
@@ -70,18 +71,18 @@ public class DAChartSeries {
        private String summarizeString;
        private boolean disableTooltip = false;
 
-       public DAChartSeries(String name, int chartStyle) {
+       public DAChartSeries(String name, int style) {
                this.name = name;
-               this.style = chartStyle;
+               this.style = style;
        }
 
-       public DAChartSeries(String name, int chartStyle, Color seriesColor) {
-               this(name, chartStyle);
-               this.seriesColor = seriesColor;
+       public DAChartSeries(String name, int style, Color color) {
+               this(name, style);
+               this.color = color;
        }
        
-       public DAChartSeries(String name, int chartStyle, Color seriesColor, boolean disableTooltip) {
-               this(name, chartStyle, seriesColor);
+       public DAChartSeries(String name, int style, Color color, boolean disableTooltip) {
+               this(name, style, color);
                this.disableTooltip = disableTooltip;
        }
 
@@ -94,11 +95,11 @@ public class DAChartSeries {
        }
 
        public Color getColor() {
-               return seriesColor;
+               return color;
        }
 
        public void setColor(Color Color) {
-               this.seriesColor = Color;
+               this.color = Color;
        }
        
        public boolean isDisableTooltip() {
index f0703eb..67fa0c6 100644 (file)
@@ -71,7 +71,7 @@ public class DAChartBoard extends Composite {
 
        // private DACustomButton titleButton;
        private Composite titleComp;
-       private DACustomToggleButton itemCollapseButton;
+       private DACustomToggleButton itemMinimizeButton;
        private DATimeline timeline;
        private LifecycleBar lifecycleBar;
        private DefaultToolTip lifecycleBarTooltip;
@@ -88,21 +88,20 @@ public class DAChartBoard extends Composite {
        private List<DAChartBoardSelectionListener> selectionListenrers;
        private List<DAChartPlotMarker> markers;
        private boolean isSelectable = true;
-       private int itemListHeight = 0;
        private Font nameFont;
 
        // private final static int DEFAULT_CHART_ZOOMOUT_HEIGHT = 50;
        public final static int DEFAULT_ITEM_HEIGHT = 80;
        private final static int DEFAULT_CHARTBOARD_HEADER_HEIGHT = 20;
        private final static int DEFAULT_CHARTBOARD_TITLE_BUTTON_WIDTH = 78;
-       private final static int DEFAULT_CHARTBOARD_COLLAPSE_BUTTON_WIDTH = 21;
+       private final static int DEFAULT_CHARTBOARD_MINIMIZE_BUTTON_WIDTH = 21;
        private final static int DEFAULT_CHARTBOARD_FOOTER_HEIGHT = 20;
        private final static int DEFAULT_CHARTBOARD_SCALE_WIDTH = 99;
        
-       protected final static double ITEM_HEIGHT_RATIO_SHORT = 0.5;
-       protected final static double ITEM_HEIGHT_RATIO_NORMAL = 1;
-       protected final static double ITEM_HEIGHT_RATIO_TALL = 2;
-       private double currentItemHeightRatio = ITEM_HEIGHT_RATIO_NORMAL;
+       public static final double ITEM_HEIGHT_RATIO_SHORT = 0.5;
+       public static final double ITEM_HEIGHT_RATIO_NORMAL = 1;
+       protected static final double ITEM_HEIGHT_RATIO_TALL = 2;
+       private double itemHeightRatio = ITEM_HEIGHT_RATIO_NORMAL;
        private int interval;
 
        private int itemHeight = DEFAULT_ITEM_HEIGHT;
@@ -122,17 +121,17 @@ public class DAChartBoard extends Composite {
                titleComp = new Composite(this, SWT.NONE);
                titleComp.setLayout(new FillLayout());
 
-               itemCollapseButton = new DACustomToggleButton(this,
+               itemMinimizeButton = new DACustomToggleButton(this,
                                ImageResources.CHART_ALL_SIZE_MIN_NORMAL,
                                ImageResources.CHART_ALL_SIZE_MIN_PUSH,
                                ImageResources.CHART_ALL_SIZE_MIN_HOVER, null,
                                ImageResources.CHART_ALL_SIZE_RESTORE_NORMAL,
                                ImageResources.CHART_ALL_SIZE_RESTORE_HOVER);
-               itemCollapseButton
+               itemMinimizeButton
                                .addClickListener(new DACustomButtonClickEventListener() {
                                        @Override
                                        public void handleClickEvent(DACustomButton button) {
-                                               adjustItemsHeight(itemCollapseButton.isToggled());
+                                               minimizeItem(itemMinimizeButton.isToggled());
                                        }
                                });
 
@@ -184,7 +183,6 @@ public class DAChartBoard extends Composite {
                        }
                });
                itemListScrollComp.addPaintListener(new PaintListener() {
-
                        @Override
                        public void paintControl(PaintEvent e) {
                                Rectangle rt = getClientArea();
@@ -193,7 +191,7 @@ public class DAChartBoard extends Composite {
                                e.gc.setForeground(ColorResources.CHART_BOARD_ITEM_LINE);
                                e.gc.fillRectangle(rt);
 
-                               int height = (int) (itemHeight * currentItemHeightRatio);
+                               int height = (int) (itemHeight * itemHeightRatio);
                                int nItemSize = rt.height / height + 1;
                                for (int i = 0; i < nItemSize; i++) {
                                        e.gc.drawRectangle(rt.x, i * height - 1,
@@ -212,7 +210,6 @@ public class DAChartBoard extends Composite {
                itemListScrollComp.setExpandHorizontal(true);
                itemList.setLayout(new FormLayout());
                itemList.addControlListener(new ControlListener() {
-
                        @Override
                        public void controlResized(ControlEvent e) {
                                if (null != boardManager) {
@@ -240,13 +237,13 @@ public class DAChartBoard extends Composite {
                data.left = new FormAttachment(titleComp, 0);
                data.top = new FormAttachment(0, 0);
                // data.width = 0;
-               data.width = DEFAULT_CHARTBOARD_COLLAPSE_BUTTON_WIDTH;
+               data.width = DEFAULT_CHARTBOARD_MINIMIZE_BUTTON_WIDTH;
                data.height = DEFAULT_CHARTBOARD_HEADER_HEIGHT;
-               itemCollapseButton.setLayoutData(data);
+               itemMinimizeButton.setLayoutData(data);
 
                if (BOARD_STYLE_TIME == boardStyle) {
                        data = new FormData();
-                       data.left = new FormAttachment(itemCollapseButton, 0);
+                       data.left = new FormAttachment(itemMinimizeButton, 0);
                        data.top = new FormAttachment(0, 0);
                        data.right = new FormAttachment(100, 0);
                        data.height = DEFAULT_CHARTBOARD_HEADER_HEIGHT
@@ -254,14 +251,14 @@ public class DAChartBoard extends Composite {
                        timeline.setLayoutData(data);
 
                        data = new FormData();
-                       data.left = new FormAttachment(itemCollapseButton, 0);
+                       data.left = new FormAttachment(itemMinimizeButton, 0);
                        data.right = new FormAttachment(100, 0);
                        data.top = new FormAttachment(timeline, 0);
                        data.height = LifecycleBar.HEIGHT;
                        lifecycleBar.setLayoutData(data);
                } else { // BOARD_STYLE_FRAME == boardStyle
                        data = new FormData();
-                       data.left = new FormAttachment(itemCollapseButton, 0);
+                       data.left = new FormAttachment(itemMinimizeButton, 0);
                        data.top = new FormAttachment(0, 0);
                        data.right = new FormAttachment(100, 0);
                        data.height = DEFAULT_CHARTBOARD_HEADER_HEIGHT;
@@ -295,34 +292,30 @@ public class DAChartBoard extends Composite {
                boardManager = new DAChartBoardManager(this);
        }
 
-       private void adjustItemsHeight(boolean minimize) {
+       private void minimizeItem(boolean minimize) {
                if (minimize) {
-                       currentItemHeightRatio = ITEM_HEIGHT_RATIO_SHORT;
+                       itemHeightRatio = ITEM_HEIGHT_RATIO_SHORT;
+                       itemList.minimize();
                } else {
-                       currentItemHeightRatio = ITEM_HEIGHT_RATIO_NORMAL;
+                       itemHeightRatio = ITEM_HEIGHT_RATIO_NORMAL;
+                       itemList.unMinimize();
                }
-               itemList.setListHeightRatio(currentItemHeightRatio, false);
-               itemListHeight = itemList.getListHeight();
+               itemList.setSize(itemListScrollComp.getClientArea().width,
+                               itemList.getListHeight());
                itemList.layout();
-               itemList.setSize(itemListScrollComp.getClientArea().width, itemListHeight);
                itemListScrollComp.redraw();
        }
 
-       protected void zoomoutFoldItem() {
-               itemList.zoomoutFoldItem();
-               itemList.layout();
-       }
-
        public boolean isItemMinimized() {
-               return itemCollapseButton.isToggled();
+               return itemMinimizeButton.isToggled();
        }
 
        public void setItemsHeightMode(boolean minimize) {
-               if (itemCollapseButton.isToggled() == minimize) {
+               if (itemMinimizeButton.isToggled() == minimize) {
                        return;
                }
-               itemCollapseButton.setToggled(minimize);
-               adjustItemsHeight(minimize);
+               itemMinimizeButton.setToggled(minimize);
+               minimizeItem(minimize);
        }
 
        public int getVisibleStart() {
@@ -479,8 +472,8 @@ public class DAChartBoard extends Composite {
                hScroll.setSelection(selection);
        }
 
-       protected void registeItem(DAChartBoardItem item) {
-               itemList.registeItem(item);
+       protected void registerItem(DAChartBoardItem item) {
+               itemList.registerItem(item);
                
                int listHeight = itemList.getListHeight();
                itemList.setSize(itemListScrollComp.getClientArea().width, listHeight);
@@ -491,18 +484,15 @@ public class DAChartBoard extends Composite {
        }
 
        protected void notifyResizeChild(DAChartBoardItem item) {
-               if (null == itemList) {
+               if (itemList == null) {
                        return;
                }
 
-               int height = itemList.notifyResizeChild(item);
-               if (height == -1) {
-                       return;
-               } else {
-                       itemListHeight = height;
-               }
+               itemList.notifyResizeChild(item);
+
                itemList.layout();
-               itemList.setSize(itemListScrollComp.getClientArea().width, itemListHeight);
+               itemList.setSize(itemListScrollComp.getClientArea().width,
+                               itemList.getListHeight());
        }
 
        public void setTotalEndTime(long time) {
@@ -559,7 +549,6 @@ public class DAChartBoard extends Composite {
        }
 
        public void clear() {
-               itemListHeight = 0;
                itemList.clear();
                itemList.setSize(0, 0);
                setTotalEndTime(0);
@@ -648,28 +637,28 @@ public class DAChartBoard extends Composite {
 
        public void selectItem(int parentIndex, int childIndex) {
                int itemSize = itemList.getItemSize();
-
                if (0 == itemSize || parentIndex >= itemSize) {
                        return;
                }
+               
                DAChartBoardItem item = itemList.get(parentIndex);
-
                if (null == item) {
                        return;
                }
 
-               DAChartBoardItemList childList = item.getChildChartComposite();
+               DAChartBoardItemList childItemList = item.getChildItemList();
 
-               int childSize = childList.getItemSize();
+               int childSize = childItemList.getItemSize();
 
                if (0 == childSize || childIndex >= childSize) {
                        return;
                }
-               item.unFold();
-               DAChartBoardItem childItem = childList.get(childIndex);
+               item.getItemCell().setFoldButtonTrue();
+               
+               DAChartBoardItem childItem = childItemList.get(childIndex);
                selectRow(childItem);
                int selection = itemList.getItemYPos(parentIndex)
-                               + childList.getItemYPos(childIndex);
+                               + childItemList.getItemYPos(childIndex);
                itemListScrollComp.setOrigin(0, selection);
        }
 
@@ -704,7 +693,7 @@ public class DAChartBoard extends Composite {
        }
 
        protected double getItemHeightRatio() {
-               return currentItemHeightRatio;
+               return itemHeightRatio;
        }
 
        public LifecycleBar getLifecycleBar() {
@@ -743,13 +732,15 @@ public class DAChartBoard extends Composite {
        };
 
        public void hideItem(int index) {
-               int listHeight = itemList.hideItem(index);
-               itemList.setSize(itemListScrollComp.getClientArea().width, listHeight);
+               itemList.hideItem(index);
+               itemList.setSize(itemListScrollComp.getClientArea().width,
+                               itemList.getListHeight());
        }
 
        public void showItem(int index) {
-               int listHeight = itemList.showItem(index);
-               itemList.setSize(itemListScrollComp.getClientArea().width, listHeight);
+               itemList.showItem(index);
+               itemList.setSize(itemListScrollComp.getClientArea().width,
+                               itemList.getListHeight());
        }
 
        public void reArrangeItem(Integer a[]) {
diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DAChartBoardHeightChangeableItem.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DAChartBoardHeightChangeableItem.java
new file mode 100644 (file)
index 0000000..d4c81c6
--- /dev/null
@@ -0,0 +1,51 @@
+package org.tizen.dynamicanalyzer.widgets.chartBoard;
+
+import org.eclipse.swt.layout.FormData;
+
+public class DAChartBoardHeightChangeableItem extends DAChartBoardItem {
+       private double originalHeightRatio = -1;
+
+       public DAChartBoardHeightChangeableItem(DAChartBoardItem parent,
+                       String itemName) {
+               super(parent, itemName);
+       }
+
+       public void setHeightRatio(double ratio) {
+               originalHeightRatio = ratio;
+
+               if (getBoardItemHeightRatio() == DAChartBoard.ITEM_HEIGHT_RATIO_SHORT) {
+                       heightRatio = DAChartBoard.ITEM_HEIGHT_RATIO_SHORT;
+               } else {
+                       heightRatio = ratio;
+               }
+
+               FormData data = (FormData) getLayoutData();
+               data.height = getItemHeight();
+               setLayoutData(data);
+
+               refreshItemCellHeight();
+
+               callNotifyResizeChild();
+       }
+
+       @Override
+       void unMinimize() {
+               heightRatio = originalHeightRatio;
+
+               if (childItemList != null && !childFolded) {
+                       childItemList.unMinimize();
+
+                       childItemList.setSize(childItemList.getBounds().width,
+                                       childItemList.getListHeight());
+                       childItemList.layout();
+               }
+
+               FormData data = (FormData) getLayoutData();
+               data.height = getItemHeight();
+               ;
+               setLayoutData(data);
+
+               itemCell.setExpandButtonNormal();
+               refreshItemCellHeight();
+       }
+}
index c499bd1..a27075d 100644 (file)
@@ -38,39 +38,30 @@ import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlot;
 public class DAChartBoardItem extends Composite {
        private DAChartBoard parentBoard = null;
        private DAChartBoardItem parentItem = null;
-       private DAChartBoardItemCell itemCell = null;
-       private DAChartBoardItemList childList = null;
-       // private String itemName;
+       protected DAChartBoardItemCell itemCell = null;
+       protected DAChartBoardItemList childItemList = null;
 
-       private double expandRatio;
-       private double normalRatio;
+       protected double heightRatio;
 
-       private boolean isFold = true;
+       protected boolean childFolded = true;
        private boolean isHide = false;
 
-       // private boolean isExpand = false;
-       public final static int DEFAULT_ITEM_HEIGHT = 80; // FIXME get from
+       private final static int DEFAULT_ITEM_HEIGHT = 80;
        public final static int DEFAULT_NAME_CELL_WIDTH = 99;
        private int depth = 0;
 
-       private int itemCellHeight = 0;
-       private int itemChildListHeight = 0;
-
-       private void initWidget(String name, Image icon) {
-               initWidget(name, icon, DAChart.CHART_STYLE_NORMAL);
-       }
-
        private void initWidget(String name, Image icon, int chartStyle) {
+               heightRatio = getBoardItemHeightRatio();
+
                this.setLayout(new FormLayout());
                itemCell = new DAChartBoardItemCell(this, name, icon, chartStyle);
-               initRatio();
                itemCell.addExpandToggleButton();
 
                FormData data = new FormData();
                data.top = new FormAttachment(0, 0);
                data.left = new FormAttachment(0, 0);
                data.right = new FormAttachment(100, 0);
-               data.height = (int) (normalRatio * DEFAULT_ITEM_HEIGHT);
+               data.height = (int) (heightRatio * DEFAULT_ITEM_HEIGHT);
                itemCell.setLayoutData(data);
                this.layout();
        }
@@ -78,8 +69,8 @@ public class DAChartBoardItem extends Composite {
        public DAChartBoardItem(DAChartBoard parent, String itemName) {
                super(parent.getChartComposite(), SWT.NONE);
                parentBoard = parent;
-               initWidget(itemName, null);
-               parentBoard.registeItem(this);
+               initWidget(itemName, null, DAChart.CHART_STYLE_NORMAL);
+               parentBoard.registerItem(this);
        }
 
        public DAChartBoardItem(DAChartBoard parent, String itemName, Image icon,
@@ -87,172 +78,159 @@ public class DAChartBoardItem extends Composite {
                super(parent.getChartComposite(), SWT.NONE);
                parentBoard = parent;
                initWidget(itemName, icon, chartStyle);
-               parentBoard.registeItem(this);
+               parentBoard.registerItem(this);
        }
 
        public DAChartBoardItem(DAChartBoardItem parent, String itemName) {
-               super(parent.getChildChartComposite(), SWT.NONE);
+               super(parent.getChildItemList(), SWT.NONE);
                parentItem = parent;
                depth = parent.getDepth() + 1;
-               initWidget(itemName, null);
+               initWidget(itemName, null, DAChart.CHART_STYLE_NORMAL);
                parentItem.registerItem(this);
        }
 
-       protected double getItemHeightRatio() {
+       double getBoardItemHeightRatio() {
                double itemHeightRatio;
-               if (null != parentBoard) {
+               if (depth == 0) {
                        itemHeightRatio = parentBoard.getItemHeightRatio();
-               } else if (null != parentItem) {
-                       itemHeightRatio = parentItem.getItemHeightRatio();
                } else {
-                       itemHeightRatio = DAChartBoard.ITEM_HEIGHT_RATIO_TALL;
+                       itemHeightRatio = parentItem.getBoardItemHeightRatio();
                }
                return itemHeightRatio;
        }
 
-       protected void initRatio() {
-               normalRatio = getItemHeightRatio();
-               expandRatio = normalRatio;
-       }
-
        public void useExpand(boolean bUseExpand) {
-               if (true == bUseExpand) {
+               if (bUseExpand == true) {
                        itemCell.addExpandToggleButton();
                } else {
                        itemCell.removeExpandToggleButton();
                }
        }
 
-       protected int getDepth() {
+       int getDepth() {
                return depth;
        }
 
-       private void callNotifyResizeChild() {
-               if (null != parentBoard) {
+       protected void callNotifyResizeChild() {
+               if (depth == 0) {
                        parentBoard.notifyResizeChild(this);
-               } else if (null != parentItem) {
-                       parentItem.notifyResizeChild(this);
                } else {
-                       return;
+                       parentItem.notifyResizeChild(this);
                }
        }
 
        private void notifyResizeChild(DAChartBoardItem item) {
-               int height = childList.notifyResizeChild(item);
-
-               if (height == -1) {
-                       return;
-               }
-               itemChildListHeight = height;
+               childItemList.notifyResizeChild(item);
 
-               FormData childDListata = (FormData) childList.getLayoutData();
-               childDListata.height = itemChildListHeight;
-               childList.setLayoutData(childDListata);
+               FormData childDListata = (FormData) childItemList.getLayoutData();
+               childDListata.height = childItemList.getListHeight();
+               childItemList.setLayoutData(childDListata);
                callNotifyResizeChild();
        }
 
-       protected void expandItem(boolean isFold) {
-               itemCellHeight = (int) (expandRatio * DEFAULT_ITEM_HEIGHT);
-               if (isFold == false) {
-                       FormData data = (FormData) itemCell.getLayoutData();
-                       data.height = itemCellHeight;
-                       itemCell.setLayoutData(data);
-               }
-       }
-
-       protected void expandFoldItem() {
+       protected void refreshItemCellHeight() {
                FormData data = (FormData) itemCell.getLayoutData();
-               data.height = itemCellHeight;
+               data.height = (int) (heightRatio * DEFAULT_ITEM_HEIGHT);
                itemCell.setLayoutData(data);
        }
 
-       protected void registerItem(DAChartBoardItem child) {
-               if (0 == childList.getItemSize()) {
+       public void refreshItemHeight() {
+               childItemList.setSize(childItemList.getBounds().width,
+                               childItemList.getListHeight());
+               childItemList.layout();
+
+               FormData data = (FormData) getLayoutData();
+               data.height = getItemHeight();
+               setLayoutData(data);
+
+               refreshItemCellHeight();
+       }
+
+       private void registerItem(DAChartBoardItem child) {
+               if (childItemList.getItemSize() == 0) {
                        itemCell.addChildFoldToggleButton();
                }
-               childList.registeItem(child);
-               itemChildListHeight = childList.getListHeight();
+               childItemList.registerItem(child);
 
-               FormData childDListata = (FormData) childList.getLayoutData();
-               childDListata.height = itemChildListHeight;
-               childList.setLayoutData(childDListata);
+               FormData childDListata = (FormData) childItemList.getLayoutData();
+               childDListata.height = childItemList.getListHeight();
+               childItemList.setLayoutData(childDListata);
 
                callNotifyResizeChild();
        }
 
-       protected void callbackFold(boolean bFold) {
-               if (isFold == bFold) {
-                       return;
-               }
+       void foldChild() {
+               childFolded = true;
 
-               zoomoutFoldItem();
+               FormData childListData = (FormData) childItemList.getLayoutData();
+               childListData.height = 0;
+               childItemList.setLayoutData(childListData);
 
-               isFold = bFold;
-               childList.setFold(isFold);
+               callNotifyResizeChild();
+       }
 
-               FormData childDListata = (FormData) childList.getLayoutData();
-               if (false == isFold) {
-                       childDListata.height = itemChildListHeight;
-               } else {
-                       childDListata.height = 0;
-               }
-               childList.setLayoutData(childDListata);
+       void unFoldChild() {
+               childFolded = false;
+
+               FormData childListData = (FormData) childItemList.getLayoutData();
+               childListData.height = childItemList.getListHeight();
+               childItemList.setLayoutData(childListData);
 
                callNotifyResizeChild();
        }
 
-       protected void callbackExpand(boolean bExpand) {
-               if (true == bExpand) {
-                       expandRatio = DAChartBoard.ITEM_HEIGHT_RATIO_TALL;
+       void callbackExpand(boolean bExpand) {
+               if (bExpand == true) {
+                       heightRatio = DAChartBoard.ITEM_HEIGHT_RATIO_TALL;
                } else {
-                       expandRatio = normalRatio;
+                       heightRatio = getBoardItemHeightRatio();
                }
-               expandItem(false);
-               callNotifyResizeChild();
-       }
-       
-       public void setRatio(double ratio) {
-               expandRatio = ratio;
-               expandItem(false);
+               refreshItemCellHeight();
                callNotifyResizeChild();
        }
 
-       protected void setItemHeightRatio(double zoomRatio, boolean isFold) {
-               normalRatio = zoomRatio;
-               expandRatio = normalRatio;
-
-               if (null != childList) {
-                       childList.setListHeightRatio(zoomRatio, this.isFold);
-                       itemChildListHeight = childList.getListHeight();
-                       
-                       if (this.isFold == false) {
-                               FormData childDListata = (FormData) childList.getLayoutData();
-                               childDListata.height = itemChildListHeight;
-                               childList.setLayoutData(childDListata);
+       void minimize() {
+               heightRatio = DAChartBoard.ITEM_HEIGHT_RATIO_SHORT;
+
+               if (childItemList != null) {
+                       childItemList.minimize();
+
+                       if (!childFolded) {
+                               childItemList.layout();
                        }
                }
 
+               FormData data = (FormData) getLayoutData();
+               data.height = getItemHeight();
+               setLayoutData(data);
+
                itemCell.setExpandButtonNormal();
-               expandItem(isFold);
+               refreshItemCellHeight();
        }
 
-       protected int zoomoutFoldItem() {
-               if (null != childList) {
-                       childList.zoomoutFoldItem();
-                       int height = childList.getListHeight();
-                       if (this.isFold == true) {
-                               FormData childDListata = (FormData) childList.getLayoutData();
-                               childDListata.height = height;
-                               childList.setLayoutData(childDListata);
+       void unMinimize() {
+               heightRatio = DAChartBoard.ITEM_HEIGHT_RATIO_NORMAL;
+
+               if (childItemList != null) {
+                       childItemList.unMinimize();
+
+                       if (!childFolded) {
+                               FormData data = (FormData) childItemList.getLayoutData();
+                               data.height = childItemList.getListHeight();
+                               childItemList.setLayoutData(data);
+                               childItemList.layout();
                        }
                }
 
-               expandFoldItem();
+               FormData data = (FormData) getLayoutData();
+               data.height = getItemHeight();
+               setLayoutData(data);
 
-               return getItemHeight();
+               itemCell.setExpandButtonNormal();
+               refreshItemCellHeight();
        }
 
-       protected void NotifyCallbackSelection(DAChartBoardItem item) {
+       private void NotifyCallbackSelection(DAChartBoardItem item) {
                if (null != parentBoard) {
                        parentBoard.NotifyCallbackSelection(item);
                } else if (null != parentItem) {
@@ -262,7 +240,7 @@ public class DAChartBoardItem extends Composite {
                }
        }
 
-       protected void callbackSelect(boolean bSelect) {
+       void callbackSelect(boolean bSelect) {
                if (true == bSelect) {
                        NotifyCallbackSelection(this);
                } else {
@@ -270,39 +248,35 @@ public class DAChartBoardItem extends Composite {
                }
        }
 
-       protected DAChartBoardItemList getChildChartComposite() {
-               if (null == childList) {
-                       childList = new DAChartBoardItemList(this);
-                       childList.setLayout(new FormLayout());
+       DAChartBoardItemList getChildItemList() {
+               if (childItemList == null) {
+                       childItemList = new DAChartBoardItemList(this);
+                       childItemList.setLayout(new FormLayout());
                        FormData childDListata = new FormData();
                        childDListata.left = new FormAttachment(0, 0);
                        childDListata.top = new FormAttachment(itemCell, 0);
                        childDListata.right = new FormAttachment(100, 0);
                        childDListata.height = 0;
-                       childList.setLayoutData(childDListata);
-                       childList.setFold(true);
-                       childList.setItemRatio(normalRatio);
+                       childItemList.setLayoutData(childDListata);
                        this.layout();
                }
-               return childList;
-       }
 
-       public Composite getChartComposite() {
-               if (null == itemCell) {
-                       return null;
-               } else {
-                       return itemCell.getChartCell();
-               }
+               return childItemList;
        }
 
        public DAChart getChart() {
-               if (null == itemCell) {
+               if (itemCell == null) {
                        return null;
                }
+
                return itemCell.getChartCell();
        }
 
-       protected void setChartAxis(double startX, double endX) {
+       DAChartBoardItemCell getItemCell() {
+               return itemCell;
+       }
+
+       void setChartAxis(double startX, double endX) {
                DAChart chart = getChart();
                if (null == chart) {
                        return;
@@ -316,14 +290,14 @@ public class DAChartBoardItem extends Composite {
                plot.setAxisRangeX(startX, endX);
                chart.redraw();
 
-               if (null == childList) {
+               if (null == childItemList) {
                        return;
                }
 
-               childList.setChartAxis(startX, endX);
+               childItemList.setChartAxis(startX, endX);
        }
 
-       protected void setChartValidX(double endX) {
+       void setChartValidX(double endX) {
                DAChart chart = getChart();
                if (null == chart) {
                        return;
@@ -337,50 +311,40 @@ public class DAChartBoardItem extends Composite {
                plot.setValidEndX(endX);
                chart.redraw();
 
-               if (null == childList) {
+               if (null == childItemList) {
                        return;
                }
 
-               childList.setChartValidX(endX);
+               childItemList.setChartValidX(endX);
        }
 
-       protected void selectItem(boolean select) {
+       void selectItem(boolean select) {
                itemCell.setSelectCell(select);
        }
 
-       public void setNameNormalImage(Image image) {
-               itemCell.setNameCellNormalImage(image);
-       }
-
-       public void setNameSelectImage(Image image) {
-               itemCell.setNameCellSelectImage(image);
-       }
-
-       public void clear() {
-               if (null != childList) {
-                       childList.clear();
-                       childList.dispose();
+       void clear() {
+               if (null != childItemList) {
+                       childItemList.clear();
+                       childItemList.dispose();
                }
                itemCell.clear();
                itemCell.dispose();
        }
 
-       public void contentsClear() {
-               if (null != childList) {
-                       childList.contentsClear();
+       void contentsClear() {
+               if (null != childItemList) {
+                       childItemList.contentsClear();
                }
 
                itemCell.contentsClear();
-
        }
 
-       public boolean setHide(boolean isHide) {
+       boolean setHide(boolean isHide) {
                if (this.isHide == isHide) {
                        return false;
                } else {
                        this.isHide = isHide;
                        if (false == isHide) {
-                               itemCellHeight = (int) (expandRatio * DEFAULT_ITEM_HEIGHT);
                                FormData data = (FormData) itemCell.getLayoutData();
                                data.height = getItemHeight();
                                itemCell.setLayoutData(data);
@@ -390,33 +354,18 @@ public class DAChartBoardItem extends Composite {
                }
        }
 
-       public void setItemCellHeight(int itemCellHeight) {
-               this.itemCellHeight = itemCellHeight;
-       }
-
-       public int getItemCellHeight() {
-               return itemCellHeight;
-       }
-
-       public int getItemHeight() {
-               if (true == isHide) {
+       int getItemHeight() {
+               if (isHide) {
                        return 0;
-               } else if (true == isFold) {
-                       return itemCellHeight;
+               } else if (childFolded) {
+                       return (int) (heightRatio * DEFAULT_ITEM_HEIGHT);
                } else {
-                       return itemCellHeight + itemChildListHeight;
+                       return (int) (heightRatio * DEFAULT_ITEM_HEIGHT + childItemList
+                                       .getListHeight());
                }
        }
 
-       public void unFold() {
-               if (!isFold) {
-                       return;
-               }
-               itemCell.unFoldChild();
-               callbackFold(false);
-       }
-
-       public Font getNameFont() {
+       Font getNameFont() {
                if (null != parentBoard) {
                        return parentBoard.getNameFont();
                } else if (null != parentItem) {
@@ -425,7 +374,7 @@ public class DAChartBoardItem extends Composite {
                        return null;
                }
        }
-       
+
        public DAChartBoard getChartBoard() {
                return parentBoard;
        }
index 093c4fe..7a67eb0 100644 (file)
@@ -48,7 +48,7 @@ import org.tizen.dynamicanalyzer.widgets.helper.ColorResources;
 import org.tizen.dynamicanalyzer.widgets.helper.ImageResources;
 
 class DAChartBoardItemCell extends Composite {
-       private DAChartBoardItem parent;
+       private DAChartBoardItem parentItem;
        private Canvas nameCell;
        private DAChart chartCell;
        private DACustomToggleButton childFoldButton;
@@ -58,18 +58,22 @@ class DAChartBoardItemCell extends Composite {
        private final static int DEFAULT_TOGGLE_BUTTON_MARGIN = 5;
        private final static int DEFAULT_NAME_ICON_MARGIN = 5;
        private int nameCellWidth = DAChartBoardItem.DEFAULT_NAME_CELL_WIDTH;
-       private boolean selectCell = false;
-       private Image nameCellNormalImage;
-       private Image nameCellSelectImage;
-       private Image nameCellCurrentImage;
+       private Image nameCellNormalBGImage;
+       private Image nameCellSelectBGImage;
+       private Image nameCellCurrentBGImage;
        private String itemName;
        private Image itemIcon;
        private Image foldBackBuffer;
 
+       //FIXME for debugging
+       public String getItemName() {
+               return itemName;
+       }
+       
        protected DAChartBoardItemCell(final DAChartBoardItem parent, String name,
                        Image icon, int chartStyle) {
                super(parent, SWT.NONE);
-               this.parent = parent;
+               this.parentItem = parent;
                itemName = name;
                itemIcon = icon;
                this.setBackground(ColorResources.CHART_BOARD_ITEM_LINE);
@@ -77,23 +81,22 @@ class DAChartBoardItemCell extends Composite {
 
                nameCell = new Canvas(this, SWT.NONE);
                if (parent.getDepth() == 0) {
-                       setNameCellNormalImage(ImageResources.CHART_NAME_BG_NORMAL);
-                       setNameCellSelectImage(ImageResources.CHART_NAME_BG_SELECT);
+                       nameCellNormalBGImage = ImageResources.CHART_NAME_BG_NORMAL;
+                       nameCellSelectBGImage = ImageResources.CHART_NAME_BG_SELECT;
                } else {
-                       setNameCellNormalImage(ImageResources.CHART_NAME_CHILD_BG_NORMAL);
-                       setNameCellSelectImage(ImageResources.CHART_NAME_CHILD_BG_SELECT);
+                       nameCellNormalBGImage = ImageResources.CHART_NAME_CHILD_BG_NORMAL;
+                       nameCellSelectBGImage = ImageResources.CHART_NAME_CHILD_BG_SELECT;
                }
-               nameCellCurrentImage = nameCellNormalImage;
+               nameCellCurrentBGImage = nameCellNormalBGImage;
                redrawFoldBackground();
                nameCell.addPaintListener(new PaintListener() {
-
                        @Override
                        public void paintControl(PaintEvent e) {
                                Rectangle rect = ((Canvas) (e.widget)).getClientArea();
 
-                               if (null != nameCellCurrentImage) {
-                                       Rectangle imageRect = nameCellCurrentImage.getBounds();
-                                       e.gc.drawImage(nameCellCurrentImage, imageRect.x,
+                               if (nameCellCurrentBGImage != null) {
+                                       Rectangle imageRect = nameCellCurrentBGImage.getBounds();
+                                       e.gc.drawImage(nameCellCurrentBGImage, imageRect.x,
                                                        imageRect.y, imageRect.width, imageRect.height,
                                                        rect.x, rect.y, rect.width, rect.height);
                                }
@@ -103,8 +106,8 @@ class DAChartBoardItemCell extends Composite {
                                drawNameIcon(e.gc, rect);
                        }
                });
+               
                nameCell.addMouseListener(new MouseListener() {
-
                        @Override
                        public void mouseUp(MouseEvent e) {
                        }
@@ -119,10 +122,14 @@ class DAChartBoardItemCell extends Composite {
                                if (null == childFoldButton) {
                                        return;
                                }
-                               boolean isToggle = childFoldButton.isToggled();
-                               childFoldButton.setToggled(!isToggle);
-                               parent.callbackFold(isToggle);
 
+                               if(childFoldButton.isToggled()) {
+                                       childFoldButton.setToggled(false);
+                                       parentItem.foldChild();
+                               } else {
+                                       childFoldButton.setToggled(true);
+                                       parentItem.unFoldChild();
+                               }
                        }
                });
 
@@ -130,7 +137,6 @@ class DAChartBoardItemCell extends Composite {
 
                chartCell = new DAChart(this, itemName, chartStyle);
                chartCell.addMouseListener(new MouseListener() {
-
                        @Override
                        public void mouseUp(MouseEvent e) {
                        }
@@ -160,9 +166,8 @@ class DAChartBoardItemCell extends Composite {
                chartCell.setLayoutData(data);
        }
 
-       protected void unFoldChild() {
+       void setFoldButtonTrue() {
                if (null == childFoldButton) {
-                       System.out.println("error - childFoldButton is not exist");
                        return;
                }
                boolean isFold = !childFoldButton.isToggled();
@@ -171,8 +176,8 @@ class DAChartBoardItemCell extends Composite {
                }
                childFoldButton.setToggled(true);
        }
-
-       protected void addChildFoldToggleButton() {
+       
+       void addChildFoldToggleButton() {
                if (null != childFoldButton) {
                        return;
                }
@@ -183,12 +188,14 @@ class DAChartBoardItemCell extends Composite {
 
                childFoldButton
                                .addClickListener(new DACustomButtonClickEventListener() {
-
                                        @Override
                                        public void handleClickEvent(DACustomButton button) {
-                                               boolean bToggled = childFoldButton.isToggled();
-                                               parent.callbackSelect(true);
-                                               parent.callbackFold(!bToggled);
+                                               parentItem.callbackSelect(true);
+                                               if(childFoldButton.isToggled()) {
+                                                       parentItem.unFoldChild();
+                                               } else {
+                                                       parentItem.foldChild();
+                                               }
                                                nameCell.redraw();
                                        }
                                });
@@ -209,7 +216,7 @@ class DAChartBoardItemCell extends Composite {
                redrawFoldBackground();
        }
 
-       protected void addExpandToggleButton() {
+       void addExpandToggleButton() {
                if (null != expandButton) {
                        return;
                }
@@ -224,8 +231,8 @@ class DAChartBoardItemCell extends Composite {
                        @Override
                        public void handleClickEvent(DACustomButton button) {
                                boolean bToggled = expandButton.isToggled();
-                               parent.callbackSelect(true);
-                               parent.callbackExpand(bToggled);
+                               parentItem.callbackSelect(true);
+                               parentItem.callbackExpand(bToggled);
                                nameCell.redraw();
                        }
                });
@@ -239,24 +246,23 @@ class DAChartBoardItemCell extends Composite {
                expandButton.setVisible(true);
                nameCell.layout();
        }
-
-       protected void removeExpandToggleButton() {
+       void removeExpandToggleButton() {
                expandButton.dispose();
                expandButton = null;
        }
 
-       protected void setExpandButtonNormal() {
-               if (null != expandButton) {
+       void setExpandButtonNormal() {
+               if (expandButton != null) {
                        expandButton.setToggled(false);
                }
        }
 
-       protected DAChart getChartCell() {
+       DAChart getChartCell() {
                return chartCell;
        }
 
        private void drawNameIcon(GC gc, Rectangle nameCellRect) {
-               if (null == itemName) {
+               if (itemName == null) {
                        return;
                }
                Point allNamep = gc.textExtent(itemName, SWT.DRAW_DELIMITER);
@@ -265,7 +271,7 @@ class DAChartBoardItemCell extends Composite {
                int startY = nameCellRect.height / 2 - allNamep.y / 2;
 
                // drawIcon
-               if (null != itemIcon) {
+               if (itemIcon != null) {
                        iconRect = itemIcon.getBounds();
                        int NameIconHeight = allNamep.y + iconRect.height
                                        + DEFAULT_NAME_ICON_MARGIN;
@@ -293,48 +299,27 @@ class DAChartBoardItemCell extends Composite {
                }
        }
 
-       protected boolean isSelectCell() {
-               return selectCell;
-       }
-
-       protected void setSelectCell(boolean selectCell) {
-               this.selectCell = selectCell;
-               if (true == selectCell) {
-                       nameCellCurrentImage = nameCellSelectImage;
+       void setSelectCell(boolean selectCell) {
+               if (selectCell == true) {
+                       nameCellCurrentBGImage = nameCellSelectBGImage;
                } else {
-                       nameCellCurrentImage = nameCellNormalImage;
+                       nameCellCurrentBGImage = nameCellNormalBGImage;
                }
                redrawFoldBackground();
                nameCell.redraw();
        }
 
-       protected Image getNameCellNormalImage() {
-               return nameCellNormalImage;
-       }
-
-       protected void setNameCellNormalImage(Image nameCellNormalImage) {
-               this.nameCellNormalImage = nameCellNormalImage;
-       }
-
-       protected Image getNameCellSelectImage() {
-               return nameCellSelectImage;
-       }
-
-       protected void setNameCellSelectImage(Image nameCellSelectImage) {
-               this.nameCellSelectImage = nameCellSelectImage;
-       }
-
        private void redrawFoldBackground() {
                if (null == childFoldButton) {
                        return;
                }
                GC bufGc = new GC(foldBackBuffer);
                Rectangle nameCellRect = nameCell.getClientArea();
-               Rectangle imageRect = nameCellCurrentImage.getBounds();
+               Rectangle imageRect = nameCellCurrentBGImage.getBounds();
                int copyHeight = DEFAULT_FOLD_TOGGLE_BUTTON_SIZE * imageRect.height
                                / nameCellRect.height;
 
-               bufGc.drawImage(nameCellCurrentImage, 0, imageRect.height / 2
+               bufGc.drawImage(nameCellCurrentBGImage, 0, imageRect.height / 2
                                - copyHeight / 2, 1, copyHeight, 0, 0,
                                DEFAULT_FOLD_TOGGLE_BUTTON_SIZE,
                                DEFAULT_FOLD_TOGGLE_BUTTON_SIZE);
@@ -344,7 +329,7 @@ class DAChartBoardItemCell extends Composite {
                bufGc.dispose();
        }
        
-       public void clear() {
+       void clear() {
                if(null != foldBackBuffer){
                        foldBackBuffer.dispose();
                        foldBackBuffer = null;
@@ -357,7 +342,8 @@ class DAChartBoardItemCell extends Composite {
                        nameCell.dispose();
                }
        }
-       public void contentsClear() {
+       
+       void contentsClear() {
                if(null != chartCell){
                        chartCell.contentsClear();
                }
index 735f460..7d2b051 100644 (file)
@@ -35,29 +35,28 @@ import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.widgets.Composite;
 
 class DAChartBoardItemList extends Composite {
-       private List<DAChartBoardItem> items = new ArrayList<DAChartBoardItem>();
-       private int defaultItemHeight = DAChartBoard.DEFAULT_ITEM_HEIGHT;
-       private double itemRatio = 1;
-       private boolean isFold = false;
-       private int listHeight = 0;
+       private List<DAChartBoardItem> childItems = new ArrayList<DAChartBoardItem>();
+       private DAChartBoard parentBoard;
+       private DAChartBoardItem parentItem;
 
-       public DAChartBoardItemList(DAChartBoard parent) {
-               super(parent.getListComposite(), SWT.NONE);
+       public DAChartBoardItemList(DAChartBoard parentBoard) {
+               super(parentBoard.getListComposite(), SWT.NONE);
+               this.parentBoard = parentBoard;
        }
 
-       public DAChartBoardItemList(DAChartBoardItem parent) {
-               super(parent, SWT.NONE);
+       public DAChartBoardItemList(DAChartBoardItem parentItem) {
+               super(parentItem, SWT.NONE);
+               this.parentItem = parentItem;
        }
 
-       public void registeItem(DAChartBoardItem item) {
-               int itemHeight = (int) (defaultItemHeight * itemRatio);
-               listHeight += itemHeight;
+       public void registerItem(DAChartBoardItem item) {
+               int itemHeight = (int) (DAChartBoard.DEFAULT_ITEM_HEIGHT * getBoardItemHeightRatio());
                FormData data = new FormData();
-               int itemSize = items.size();
+               int itemSize = childItems.size();
                if (0 == itemSize) {
                        data.top = new FormAttachment(0, 0);
                } else {
-                       data.top = new FormAttachment(items.get(itemSize - 1), 0);
+                       data.top = new FormAttachment(childItems.get(itemSize - 1), 0);
                }
                data.left = new FormAttachment(0, 0);
                data.right = new FormAttachment(100, 0);
@@ -65,197 +64,116 @@ class DAChartBoardItemList extends Composite {
                data.height = itemHeight;
 
                item.setLayoutData(data);
-               item.setItemCellHeight(itemHeight);
 
-               items.add(item);
+               childItems.add(item);
                this.layout();
        }
 
-       public int getDefaultItemHeight() {
-               return defaultItemHeight;
-       }
-
-       public void setDefaultItemHeight(int defaultItemHeight) {
-               this.defaultItemHeight = defaultItemHeight;
-       }
-
-       public double getItemRatio() {
-               return itemRatio;
-       }
-
-       public void setItemRatio(double itemRatio) {
-               this.itemRatio = itemRatio;
-       }
-
-       public boolean isFold() {
-               return isFold;
-       }
-
-       public void setFold(boolean isFold) {
-               this.isFold = isFold;
-       }
-
-       public int getNewItemHeight() {
-               return (int) (defaultItemHeight * itemRatio);
-       }
-
        public int getListHeight() {
+               int listHeight = 0;
+               for(DAChartBoardItem childItem : childItems) {
+                       listHeight += childItem.getItemHeight();
+               }
+               
                return listHeight;
        }
 
-       public int notifyResizeChild(DAChartBoardItem item) {
-               int listHeight = 0;
-               DAChartBoardItem child;
-               for (int i = 0; i < items.size(); i++) {
-                       child = items.get(i);
-                       int itemHeight = child.getItemHeight();
-                       listHeight += itemHeight;
-                       if (child.equals(item)) {
-                               FormData data = (FormData) child.getLayoutData();
-                               data.height = itemHeight;
-                               child.setLayoutData(data);
+       public void notifyResizeChild(DAChartBoardItem item) {
+               for (DAChartBoardItem childItem : childItems) {
+                       if (childItem.equals(item)) {
+                               FormData data = (FormData) childItem.getLayoutData();
+                               data.height = childItem.getItemHeight();
+                               childItem.setLayoutData(data);
                        }
                }
-
-               if (this.listHeight != listHeight) {
-                       this.listHeight = listHeight;
-                       return this.listHeight;
-               } else {
-                       return -1;
-               }
        }
 
        public int getItemSize() {
-               return items.size();
+               return childItems.size();
        }
 
-       protected void setListHeightRatio(double zoomRatio, boolean isFold) {
-               itemRatio = zoomRatio;
-               listHeight = 0;
-
-               for (DAChartBoardItem item : items) {
-                       item.setItemHeightRatio(zoomRatio, isFold);
-                       int itemHeight = item.getItemHeight();
-
-                       if (isFold == false) {
-                               FormData data = (FormData) item.getLayoutData();
-                               data.height = itemHeight;
-                               item.setLayoutData(data);
-                       }
-                       listHeight += itemHeight;
+       public void minimize() {
+               for(DAChartBoardItem item : childItems) {
+                       item.minimize();
                }
        }
-
-       protected void zoomoutFoldItem() {
-               int itemsSize = items.size();
-
-               for (int i = 0; i < itemsSize; i++) {
-                       final DAChartBoardItem item = items.get(i);
-                       final int height = item.zoomoutFoldItem();
-                       if (isFold == true) {
-                               FormData data = (FormData) item.getLayoutData();
-                               data.height = height;
-                               item.setLayoutData(data);
-                       }
+       
+       public void unMinimize() {
+               for(DAChartBoardItem item : childItems) {
+                       item.unMinimize();
                }
        }
 
        protected void setChartAxis(double startX, double endX) {
-               if (null == items) {
+               if (null == childItems) {
                        return;
                }
-               int itemsSize = items.size();
+               int itemsSize = childItems.size();
                for (int i = 0; i < itemsSize; i++) {
-                       items.get(i).setChartAxis(startX, endX);
+                       childItems.get(i).setChartAxis(startX, endX);
                }
        }
 
        protected void setChartValidX(double endX) {
-               if (null == items) {
+               if (null == childItems) {
                        return;
                }
-               int itemsSize = items.size();
+               int itemsSize = childItems.size();
                for (int i = 0; i < itemsSize; i++) {
-                       items.get(i).setChartValidX(endX);
+                       childItems.get(i).setChartValidX(endX);
                }
        }
 
        public void clear() {
-               if (null == items) {
+               if (null == childItems) {
                        return;
                }
-               int itemsSize = items.size();
+               int itemsSize = childItems.size();
                for (int i = 0; i < itemsSize; i++) {
-                       items.get(i).clear();
-                       items.get(i).dispose();
+                       childItems.get(i).clear();
+                       childItems.get(i).dispose();
                }
-               items.clear();
-               listHeight = 0;
+               childItems.clear();
        }
 
        public void contentsClear() {
-               if (null == items) {
+               if (null == childItems) {
                        return;
                }
-               int itemsSize = items.size();
+               int itemsSize = childItems.size();
                for (int i = 0; i < itemsSize; i++) {
-                       items.get(i).contentsClear();
+                       childItems.get(i).contentsClear();
                }
        }
 
-       public int hideItem(int index) {
-               if (null == items) {
-                       return -1;
-               }
-               int itemsSize = items.size();
-
-               if (index >= itemsSize || index < 0) {
-                       return -1;
-               }
-
-               DAChartBoardItem child = items.get(index);
-               int height = child.getItemHeight();
+       public void hideItem(int index) {
+               DAChartBoardItem child = childItems.get(index);
 
                if (true == child.setHide(true)) {
-                       listHeight -= height;
                        FormData data = (FormData) child.getLayoutData();
                        data.height = 0;
                        child.setLayoutData(data);
                }
                this.layout();
-               
-               return listHeight;
        }
 
-       public int showItem(int index) {
-               if (null == items) {
-                       return -1;
-               }
-               int itemsSize = items.size();
-
-               if (index >= itemsSize || index < 0) {
-                       return -1;
-               }
-
-               DAChartBoardItem child = items.get(index);
+       public void showItem(int index) {
+               DAChartBoardItem child = childItems.get(index);
 
                if (true == child.setHide(false)) {
                        int height = child.getItemHeight();
-                       listHeight += height;
                        FormData data = (FormData) child.getLayoutData();
                        data.height = height;
                        child.setLayoutData(data);
                }
                this.layout();
-
-               return listHeight;
        }
 
        public void reArrangeItem(Integer a[]) {
-               if (null == items) {
+               if (null == childItems) {
                        return;
                }
-               int itemSize = items.size();
+               int itemSize = childItems.size();
 
                if (a.length != itemSize) {
                        return;
@@ -268,7 +186,7 @@ class DAChartBoardItemList extends Composite {
 
                for (int i = 0; i < itemSize; i++) {
                        index = a[i];
-                       temp = items.get(index);
+                       temp = childItems.get(index);
                        data = (FormData) temp.getLayoutData();
                        if (0 == i) {
                                data.top = new FormAttachment(0, 0);
@@ -278,8 +196,8 @@ class DAChartBoardItemList extends Composite {
                        temp.setLayoutData(data);
                        itemsTemp.add(temp);
                }
-               items.clear();
-               items.addAll(itemsTemp);
+               childItems.clear();
+               childItems.addAll(itemsTemp);
                itemsTemp.clear();
                itemsTemp = null;
        }
@@ -295,22 +213,35 @@ class DAChartBoardItemList extends Composite {
        }
 
        protected DAChartBoardItem get(int index) {
-               int itemSize = items.size();
+               int itemSize = childItems.size();
                if (index >= itemSize) {
                        return null;
                }
-               return items.get(index);
+               return childItems.get(index);
        }
 
        protected int getItemYPos(int index) {
                int pos = 0;
-               int itemSize = items.size();
+               int itemSize = childItems.size();
                if (itemSize == 0 || index >= itemSize) {
                        return -1;
                }
                for (int i = 0; i < index; i++) {
-                       pos += items.get(i).getItemHeight();
+                       pos += childItems.get(i).getItemHeight();
                }
                return pos;
        }
+       
+       private double getBoardItemHeightRatio() {
+               double itemHeightRatio;
+               if (parentBoard != null) {
+                       itemHeightRatio = parentBoard.getItemHeightRatio();
+               } else if (parentItem != null) {
+                       itemHeightRatio = parentItem.getBoardItemHeightRatio();
+               } else {
+                       itemHeightRatio = DAChartBoard.ITEM_HEIGHT_RATIO_TALL;
+               }
+               
+               return itemHeightRatio;
+       }
 }
index c3ff4ea..502ee01 100644 (file)
@@ -73,7 +73,7 @@ public class ColorResources {
 \r
        public static Color UI_EVENT_CHART_SEPERATE_LINE = getColor(\r
                        "UI_event_chart_seperate_line", new RGB(189, 207, 213)); //$NON-NLS-1$\r
-       public static Color UI_EVENT_CHART_TEXT = getColor(\r
+       public static Color SERIES_NAME_ANNOTATION = getColor(\r
                        "UI_event _chat_text", new RGB(83, 83, 83)); //$NON-NLS-1$\r
 \r
        public static Color SCREENSHOT_CHART_SELECTED_LINE = getColor(\r
index 3abf201..eaf8a83 100644 (file)
@@ -49,8 +49,8 @@ public class TimelineChartLabels extends NLS {
        public static String FILE_CHART_SERIES_NAME_WRITE;
        public static String FILE_CHART_TITLE;
        
-       public static String HEAP_CHART_SERIES_NAME_PLATFORM_ALLOCATION;
-       public static String HEAP_CHART_SERIES_NAME_USER_ALLOCATION;
+       public static String HEAP_CHART_SERIES_NAME_TOTAL_ALLOCATION;
+       public static String HEAP_CHART_SERIES_NAME_APP_ALLOCATION;
        public static String HEAP_CHART_TITLE;
        
        public static String PROCESS_MEMORY_CHART_PSS;
index 0d4ee69..f452a28 100644 (file)
@@ -24,8 +24,8 @@ FILE_CHART_SERIES_NAME_READ=Read size
 FILE_CHART_SERIES_NAME_WRITE=Write size
 FILE_CHART_TITLE=File
 
-HEAP_CHART_SERIES_NAME_PLATFORM_ALLOCATION=Platform
-HEAP_CHART_SERIES_NAME_USER_ALLOCATION=Application
+HEAP_CHART_SERIES_NAME_TOTAL_ALLOCATION=Total
+HEAP_CHART_SERIES_NAME_APP_ALLOCATION=Application
 HEAP_CHART_TITLE=Heap allocation
 
 PROCESS_MEMORY_CHART_PSS=Proportional set size
index 521f862..15bc1eb 100644 (file)
@@ -56,6 +56,7 @@ import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlotTooltip;
 import org.tizen.dynamicanalyzer.widgets.chart.DAChartSeries;
 import org.tizen.dynamicanalyzer.widgets.chart.DAChartSeriesItem;
 import org.tizen.dynamicanalyzer.widgets.chartBoard.DAChartBoard;
+import org.tizen.dynamicanalyzer.widgets.chartBoard.DAChartBoardHeightChangeableItem;
 import org.tizen.dynamicanalyzer.widgets.chartBoard.DAChartBoardItem;
 import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenu;
 import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenuItem;
@@ -69,7 +70,7 @@ public class CPUChart extends TimelineChart {
 
        DAChartBoard chartBoard = null;
        DAChartBoardItem item = null;
-       private DAChartBoardItem childItem = null;
+       private DAChartBoardHeightChangeableItem processItem = null;
        private Map<Integer, DAChartSeries> childSeriesMap;
 
        public static CPUChart getInstance() {
@@ -152,14 +153,14 @@ public class CPUChart extends TimelineChart {
                        ne.printStackTrace();
                }
 
-               if (childItem == null) {
+               if (processItem == null) {
                        Display.getDefault().syncExec(new Runnable() {
                                @Override
                                public void run() {
-                                       childItem = new DAChartBoardItem(item, "Processes");
-                                       childItem.useExpand(false);
+                                       processItem = new DAChartBoardHeightChangeableItem(item, "Processes");
+                                       processItem.useExpand(false);
 
-                                       DAChart childChart = childItem.getChart();
+                                       DAChart childChart = processItem.getChart();
                                        DAChartPlot childPlot = childChart.getPlot();
                                        DAChartPlotTooltip tooltip = new DAChartPlotTooltip(-1);
 
@@ -221,6 +222,16 @@ public class CPUChart extends TimelineChart {
 
                String[] processLoadDatas = logData.getProcessLoad().split(COMMA);
 
+               if (time > 7) {
+                       processLoadDatas = new String[] { processLoadDatas[0],
+                                       processLoadDatas[1], "1", "10", "2", "20", "3", "70", "4",
+                                       "50", "5", "90", "6", "30" };
+               } else if (time > 4) {
+                       processLoadDatas = new String[] { processLoadDatas[0],
+                                       processLoadDatas[1], "1", "10", "2", "20", "3", "70", "4",
+                                       "50" };
+               }
+
                int prevChildSize = childSeriesMap.size();
                for (int i = 0; i < processLoadDatas.length; i++) {
                        String processLoad = processLoadDatas[i];
@@ -236,13 +247,13 @@ public class CPUChart extends TimelineChart {
                                if (load != 0) {
                                        DAChartSeries newSeries = new DAChartSeries(
                                                        Integer.toString(pid),
-                                                       DAChartSeries.SERIES_STYLE_LINE,
+                                                       DAChartSeries.SERIES_STYLE_MULTI_LINE,
                                                        ColorResources.SERIES_COLOR_CPU_SYSTEM);
                                        newSeries.addSeriesItem(new DAChartSeriesItem(time, load,
                                                        Formatter.toPercentageFormat(load)));
                                        //FIXME debug
                                        try {
-                                               childItem.getChart().addSeries(newSeries);
+                                               processItem.getChart().addSeries(newSeries);
                                        } catch (NullPointerException e) {
                                                e.printStackTrace();
                                        }
@@ -259,7 +270,14 @@ public class CPUChart extends TimelineChart {
                        Display.getDefault().asyncExec(new Runnable() {
                                @Override
                                public void run() {
-                                       childItem.setRatio(childSeriesMap.size() / 3.0);
+                                       int size = childSeriesMap.size();
+                                       if(size > 1) {
+                                               processItem.getChart().getPlot().setShowAxis(false);
+                                       }
+                                       
+                                       if (size > 3) {
+                                               processItem.setHeightRatio(size / 3.0);
+                                       }
                                }
                        });
                }
@@ -274,7 +292,7 @@ public class CPUChart extends TimelineChart {
                super.clear();
 
                chartBoard = null;
-               childItem = null;
+               processItem = null;
                childSeriesMap.clear();
        }
 }
index b14cbe3..4eeea79 100644 (file)
@@ -75,11 +75,11 @@ public class HeapChart extends TimelineChart {
                addIcon = ImageResources.ADD_CHART_HEAP;
 
                totalAllocationSeries = new DAChartSeries(
-                               TimelineChartLabels.HEAP_CHART_SERIES_NAME_PLATFORM_ALLOCATION,
+                               TimelineChartLabels.HEAP_CHART_SERIES_NAME_TOTAL_ALLOCATION,
                                DAChartSeries.SERIES_STYLE_AREA,
                                ColorResources.SERIES_COLOR_HEAP_SYSTEM);
                userAllocationSeries = new DAChartSeries(
-                               TimelineChartLabels.HEAP_CHART_SERIES_NAME_USER_ALLOCATION,
+                               TimelineChartLabels.HEAP_CHART_SERIES_NAME_APP_ALLOCATION,
                                DAChartSeries.SERIES_STYLE_AREA,
                                ColorResources.SERIES_COLOR_HEAP_USER);
        }
@@ -100,21 +100,20 @@ public class HeapChart extends TimelineChart {
 
        @Override
        public void parseLogPackage(LogPackage logPack) {
-               Logs memoryLogs = logPack.getLogs(DataChannelConstants.MSG_PROBE_MEMORY);
+               Logs memoryLogs = logPack
+                               .getLogs(DataChannelConstants.MSG_PROBE_MEMORY);
                Logs deviceLogs = logPack.getLogs(probeType);
 
-               List<LogData> memoryLogList = memoryLogs == null ? null
-                               : memoryLogs.getLogs();
-               List<LogData> deviceLogList = deviceLogs == null ? null
-                               : deviceLogs.getLogs();
+               List<LogData> memoryLogList = memoryLogs == null ? null : memoryLogs
+                               .getLogs();
+               List<LogData> deviceLogList = deviceLogs == null ? null : deviceLogs
+                               .getLogs();
 
                parseLog(memoryLogList, deviceLogList);
        }
 
        private void parseLog(List<LogData> memoryLogList,
                        List<LogData> deviceLogList) {
-               boolean isUserAllocUpdated = false;
-
                /* user alloc */
                try {
                        if (memoryLogList != null) {
@@ -133,8 +132,7 @@ public class HeapChart extends TimelineChart {
                                                        time = logData.getTime()
                                                                        / TimelineConstants.MEGA_DOUBLE;
 
-                                                       isUserAllocUpdated = addNewSeriesUserAllocData(
-                                                                       memApiType, time, logData);
+                                                       addNewSeriesUserAllocData(memApiType, logData);
                                                }
                                        }
                                }
@@ -151,16 +149,15 @@ public class HeapChart extends TimelineChart {
                                        SystemData log = (SystemData) deviceLogList.get(i);
 
                                        double time = log.getTime() / TimelineConstants.MEGA_DOUBLE;
-                                       double value = log.getTotalAllocSize();
+                                       double totalAlloc = log.getTotalAllocSize() + allocByte;
                                        totalAllocationSeries.addSeriesItem(new DAChartSeriesItem(
-                                                       time, value, Formatter.toByteFormat(value)));
+                                                       time, totalAlloc, Formatter
+                                                                       .toByteFormat(totalAlloc)));
 
-                                       if (!isUserAllocUpdated) {
-                                               userAllocationSeries
-                                                               .addSeriesItem(new DAChartSeriesItem(time,
-                                                                               allocByte, Formatter
-                                                                                               .toByteFormat(allocByte)));
-                                       }
+                                       userAllocationSeries
+                                                       .addSeriesItem(new DAChartSeriesItem(time,
+                                                                       allocByte, Formatter
+                                                                                       .toByteFormat(allocByte)));
                                }
                        }
                } catch (NumberFormatException ne) {
@@ -168,13 +165,12 @@ public class HeapChart extends TimelineChart {
                }
        }
 
-       private boolean addNewSeriesUserAllocData(int fdApiType, double time,
-                       MemoryData log) {
+       private void addNewSeriesUserAllocData(int fdApiType, MemoryData log) {
                long size = 0;
 
                long address = log.getAddress();
                if (address == 0) {
-                       return false;
+                       return;
                }
 
                if (MEM_API_TYPE_ALLOC == fdApiType) {
@@ -188,18 +184,14 @@ public class HeapChart extends TimelineChart {
                        }
                } else if (MEM_API_TYPE_FREE == fdApiType) {
                        if (!allocationSeriesDataSetMap.containsKey(address)) {
-                               return false;
+                               return;
                        }
                        size = allocationSeriesDataSetMap.get(address);
 
                        allocByte -= size;
                }
-               userAllocationSeries.addSeriesItem(new DAChartSeriesItem(time,
-                               allocByte, Formatter.toByteFormat(allocByte)));
-
-               return true;
        }
-       
+
        @Override
        public void clear() {
                super.clear();
index 32bedb6..b67f366 100644 (file)
@@ -91,15 +91,15 @@ public class UIEventChart extends TimelineChart {
 
                touchEventSeries = new DAChartSeries(
                                TimelineChartLabels.UI_EVENT_CHART_SERIES_NAME_TOUCH,
-                               DAChartSeries.SERIES_STYLE_MULTY_CHECK_BAR,
+                               DAChartSeries.SERIES_STYLE_MULTI_CHECK_BAR,
                                ColorResources.SERIES_COLOR_UI_EVENT_TOUCH);
                gestureEventSeries = new DAChartSeries(
                                TimelineChartLabels.UI_EVENT_CHART_SERIES_NAME_GESTURE,
-                               DAChartSeries.SERIES_STYLE_MULTY_CHECK_BAR,
+                               DAChartSeries.SERIES_STYLE_MULTI_CHECK_BAR,
                                ColorResources.SERIES_COLOR_UI_EVENT_GESTURE);
                orientationEventSeries = new DAChartSeries(
                                TimelineChartLabels.UI_EVENT_CHART_SERIES_NAME_ORIENTATION,
-                               DAChartSeries.SERIES_STYLE_MULTY_CHECK_BAR,
+                               DAChartSeries.SERIES_STYLE_MULTI_CHECK_BAR,
                                ColorResources.SERIES_COLOR_UI_EVENT_ORIENTATION);
 
                touchEventSeries.setFont(FontResources.TIMELINE_UIEVENT_FONT);