[Title] Title bar maximize / titlebar design
authorLee <jy.exe.lee@samsung.com>
Wed, 14 Nov 2012 13:05:52 +0000 (22:05 +0900)
committerLee <jy.exe.lee@samsung.com>
Wed, 14 Nov 2012 13:05:52 +0000 (22:05 +0900)
[Desc.] titlebar double click -> view maximize
[Issue] redmine 4997

25 files changed:
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogParser.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/DAView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/resources/ColorResources.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/theme/DAThemeBlack.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/theme/DAThemeWhite.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDetailInfoView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FilePage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/ImageViewer.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/SnapshotView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfilingView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadAPIListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadDetailInfoView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/CallTraceView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/ToolbarArea.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/UserInterfaceControlListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/UserInterfaceFormBasedLeakListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/UserInterfaceFunctionProfilingView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/UserInterfaceSceneTransformListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/ViewContainer.java
org.tizen.dynamicanalyzer/theme/black/img/empty_snapshot.png
org.tizen.dynamicanalyzer/theme/white/img/empty_snapshot.png

index 0826c70..51adc5b 100644 (file)
@@ -136,7 +136,8 @@ public class LogParser implements Runnable {
                        slicedLog = log[0].split(AnalyzerConstants.DATA_PARSING_TOKEN);
                        logId = slicedLog[LogCenterConstants.ID_INDEX];
                        int id = Integer.parseInt(logId);
-                       if (LogCenterConstants.LOG_DEVICE != id) {
+                       if (LogCenterConstants.LOG_DEVICE != id){
+//                     if (LogCenterConstants.LOG_DEVICE != id && LogCenterConstants.LOG_SNAPSHOT != id) {
                                if (null == pid) {
                                        pid = slicedLog[LogCenterConstants.PROCESS_ID_INDEX];
                                } else {
@@ -146,6 +147,9 @@ public class LogParser implements Runnable {
                                        }
                                }
                        }
+                       if (LogCenterConstants.LOG_SNAPSHOT == id) {
+                               System.out.println("break point");
+                       }
 
                        String currentTime = null;
                        try {
index 8b0b58a..c03a59f 100644 (file)
@@ -26,6 +26,7 @@
 
 package org.tizen.dynamicanalyzer.model;
 
+import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
@@ -34,6 +35,11 @@ import org.tizen.dynamicanalyzer.ui.page.ViewAction;
 
 public class DAView extends Composite implements ViewAction {
        protected String name = null;
+       protected int[] oldInnerLayout = null;
+       protected int[] oldOuterLayout = null;
+
+       private int[] innerMaxWeight = null;
+       private int[] outerMaxWeight = null;
 
        public DAView(Composite parent, int style) {
                super(parent, style);
@@ -75,8 +81,47 @@ public class DAView extends Composite implements ViewAction {
                // TODO Auto-generated method stub
 
        }
+
        @Override
        public String getViewName() {
                return name;
        }
+
+       public void setMaxSize(boolean maximized) {
+
+               if (null == innerMaxWeight || null == outerMaxWeight) {
+                       return;
+               }
+               
+               Composite parent = getParent();
+               if (!(parent instanceof SashForm)) {
+                       parent = parent.getParent();
+                       if (!(parent instanceof SashForm)) {
+                               return;
+                       }
+               }
+
+               Composite pParent = parent.getParent();
+               if (!(pParent instanceof SashForm)) {
+                       return;
+               }
+
+               SashForm innerForm = (SashForm) parent;
+               SashForm outerForm = (SashForm) pParent;
+
+               if (maximized) {
+                       oldInnerLayout = innerForm.getWeights();
+                       oldOuterLayout = outerForm.getWeights();
+                       innerForm.setWeights(innerMaxWeight);
+                       outerForm.setWeights(outerMaxWeight);
+               } else {
+                       innerForm.setWeights(oldInnerLayout);
+                       outerForm.setWeights(oldOuterLayout);
+               }
+       }
+
+       public void setMaxWeight(int[] inner, int[] outer) {
+               innerMaxWeight = inner;
+               outerMaxWeight = outer;
+       }
 }
index 7bc2cc7..230649c 100755 (executable)
@@ -77,6 +77,10 @@ public class ColorResources {
        /** title bar colors **/\r
        public static Color TITLEBAR_TEXT_COLOR = getColor("titlebar_text_color"); //$NON-NLS-1$\r
        public static Color TITLEBAR_BG_COLOR = getColor("titlebar_bg"); //$NON-NLS-1$\r
+       public static Color TITLEBAR_START_COLOR = getColor("titlebar_start_color"); //$NON-NLS-1$\r
+       public static Color TITLEBAR_END_COLOR = getColor("titlebar_end_color"); //$NON-NLS-1$\r
+       public static Color TITLEBAR_BOTTOM_STROKE_1 = getColor("titlebar_bottom_stroke_1"); //$NON-NLS-1$\r
+       public static Color TITLEBAR_BOTTOM_STROKE_2 = getColor("titlebar_bottom_stroke_2"); //$NON-NLS-1$\r
 \r
        /** Coolbar bg color **/\r
        public static Color COOLBAR_BG_COLOR = getColor("coolbar_bg_color"); //$NON-NLS-1$\r
@@ -426,6 +430,8 @@ public class ColorResources {
                /** title bar colors **/\r
                TITLEBAR_TEXT_COLOR = getColor("titlebar_text_color"); //$NON-NLS-1$\r
                TITLEBAR_BG_COLOR = getColor("titlebar_bg"); //$NON-NLS-1$\r
+               TITLEBAR_START_COLOR = getColor("titlebar_start_color"); //$NON-NLS-1$\r
+               TITLEBAR_END_COLOR = getColor("titlebar_end_color"); //$NON-NLS-1$\r
 \r
                /** Coolbar bg color **/\r
                COOLBAR_BG_COLOR = getColor("coolbar_bg_color"); //$NON-NLS-1$\r
index 9a6e946..42b1142 100644 (file)
@@ -42,8 +42,7 @@ public class DAThemeBlack extends DATheme {
        DAThemeBlack() {
                super();
                name = "black";
-               
-               
+
                // defaule
                setColor("blue", new RGB(0, 102, 134));
                setColor("green", new RGB(68, 98, 12));
@@ -64,8 +63,7 @@ public class DAThemeBlack extends DATheme {
                setColor("orchid", new RGB(175, 49, 200));
                setColor("sandybrown", new RGB(201, 168, 58));
                setColor("mediumpurple", new RGB(160, 108, 224));
-                               
-                               
+
                // shell window background color
                setColor("window_bg_color", new RGB(51, 52, 53)); //$NON-NLS-1$
                setColor("dialg_bg_upper", new RGB(51, 52, 53));
@@ -85,6 +83,10 @@ public class DAThemeBlack extends DATheme {
                /** title bar colors **/
                setColor("titlebar_text_color", new RGB(64, 208, 255)); //$NON-NLS-1$
                setColor("titlebar_bg", new RGB(78, 79, 81)); //$NON-NLS-1$
+               setColor("titlebar_start_color", new RGB(103, 103, 104)); //$NON-NLS-1$
+               setColor("titlebar_end_color", new RGB(133, 133, 133)); //$NON-NLS-1$
+               setColor("titlebar_bottom_stroke_1", new RGB(0, 0, 0));
+               setColor("titlebar_bottom_stroke_2", new RGB(128, 128, 128));
 
                /** device and application combo specific colors start **/
                setColor("device_application_enable_font", new RGB(255, 255, 255)); //$NON-NLS-1$
@@ -239,9 +241,9 @@ public class DAThemeBlack extends DATheme {
                setColor("page_open_end_stop", new RGB(232, 73, 73)); //$NON-NLS-1$
                setColor("page_closed_start", new RGB(168, 198, 71)); //$NON-NLS-1$
                setColor("page_closed_end", new RGB(130, 152, 54)); //$NON-NLS-1$
-               setColor("page_use_start", new RGB(78,176,255)); //$NON-NLS-1$
-               setColor("page_use_end", new RGB(44,104,153)); //$NON-NLS-1$
-               
+               setColor("page_use_start", new RGB(78, 176, 255)); //$NON-NLS-1$
+               setColor("page_use_end", new RGB(44, 104, 153)); //$NON-NLS-1$
+
                /** Thread chart colors **/
                setColor("thread_open_start_run", new RGB(244, 252, 82)); //$NON-NLS-1$
                setColor("thread_open_end_run", new RGB(235, 231, 56)); //$NON-NLS-1$
@@ -263,13 +265,13 @@ public class DAThemeBlack extends DATheme {
                setColor("file_open_end_stop", new RGB(232, 73, 73)); //$NON-NLS-1$
                setColor("file_failed_start", new RGB(226, 58, 242)); //$NON-NLS-1$
                setColor("file_failed_end", new RGB(164, 40, 176)); //$NON-NLS-1$
-               setColor("file_read_start", new RGB(41,162,118)); //$NON-NLS-1$
-               setColor("file_read_end", new RGB(6,75,44)); //$NON-NLS-1$
-               setColor("file_write_start", new RGB(84,71,214)); //$NON-NLS-1$
-               setColor("file_write_end", new RGB(18,17,105)); //$NON-NLS-1$
-               setColor("file_other_start", new RGB(255,222,125)); //$NON-NLS-1$
-               setColor("file_other_end", new RGB(255,186,29)); //$NON-NLS-1$
-               
+               setColor("file_read_start", new RGB(41, 162, 118)); //$NON-NLS-1$
+               setColor("file_read_end", new RGB(6, 75, 44)); //$NON-NLS-1$
+               setColor("file_write_start", new RGB(84, 71, 214)); //$NON-NLS-1$
+               setColor("file_write_end", new RGB(18, 17, 105)); //$NON-NLS-1$
+               setColor("file_other_start", new RGB(255, 222, 125)); //$NON-NLS-1$
+               setColor("file_other_end", new RGB(255, 186, 29)); //$NON-NLS-1$
+
                setColor("file_chart_selection_bg_start", new RGB(0, 151, 201)); //$NON-NLS-1$
                setColor("file_chart_selection_bg_end", new RGB(0, 151, 201)); //$NON-NLS-1$
                setColor("file_chart_parent_bg_start", new RGB(84, 85, 86)); //$NON-NLS-1$
@@ -331,21 +333,21 @@ public class DAThemeBlack extends DATheme {
                setColor("add_chart_enable_color_end", new RGB(38, 104, 138)); //$NON-NLS-1$
                setColor("add_chart_disable_color_start", new RGB(123, 124, 124)); //$NON-NLS-1$
                setColor("add_chart_disable_color_end", new RGB(244, 244, 244)); //$NON-NLS-1$
-               
+
                /** Timeline chart **/
                setColor("seriesColorCPUSystem", new RGB(212, 150, 57)); //$NON-NLS-1$
                setColor("seriesColorCPUApp", new RGB(1, 102, 134)); //$NON-NLS-1$
-               
+
                setColor("seriesColorCPUCoreCore0", new RGB(72, 185, 221)); //$NON-NLS-1$
                setColor("seriesColorCPUCoreCore1", new RGB(129, 172, 50)); //$NON-NLS-1$
                setColor("seriesColorCPUCoreCore2", new RGB(226, 109, 201)); //$NON-NLS-1$
                setColor("seriesColorCPUCoreCore3", new RGB(72, 194, 168)); //$NON-NLS-1$
-               
+
                setColor("seriesColorCPUFreq", new RGB(72, 185, 221)); //$NON-NLS-1$
-               
+
                setColor("seriesColorHeapSystem", new RGB(1, 102, 134)); //$NON-NLS-1$
                setColor("seriesColorHeapApp", new RGB(72, 185, 221)); //$NON-NLS-1$
-               
+
                setColor("seriesColorProcessVSS", new RGB(1, 102, 134)); //$NON-NLS-1$
                setColor("seriesColorProcessRSS", new RGB(111, 148, 43)); //$NON-NLS-1$
                setColor("seriesColorProcessPSS", new RGB(201, 168, 58)); //$NON-NLS-1$
@@ -353,27 +355,27 @@ public class DAThemeBlack extends DATheme {
                setColor("seriesColorMemorySysMax", new RGB(105, 2, 126)); //$NON-NLS-1$
                setColor("seriesColorMemorySysUsed", new RGB(1, 102, 134)); //$NON-NLS-1$
                setColor("seriesColorMemoryAppUsed", new RGB(111, 148, 43)); //$NON-NLS-1$
-               
+
                setColor("seriesColorFileRead", new RGB(126, 41, 2)); //$NON-NLS-1$
                setColor("seriesColorFileWrite", new RGB(27, 110, 92)); //$NON-NLS-1$
                setColor("seriesColorFileFD", new RGB(129, 172, 50)); //$NON-NLS-1$
-               
+
                setColor("seriesColorUIEventKey", new RGB(200, 0, 0)); //$NON-NLS-1$
                setColor("seriesColorUIEventTouch", new RGB(200, 0, 0)); //$NON-NLS-1$
                setColor("seriesColorUIEventGesture", new RGB(200, 0, 0)); //$NON-NLS-1$
                setColor("seriesColorUIEventOrientation", new RGB(200, 0, 0)); //$NON-NLS-1$
                setColor("seriesColorUIEventListener", new RGB(200, 0, 0)); //$NON-NLS-1$
-               
+
                setColor("selectionRange", new RGB(193, 253, 255)); //$NON-NLS-1$
                setColor("selectionLine", new RGB(193, 253, 255)); //$NON-NLS-1$
-               
-               /***  scale ***/
+
+               /*** scale ***/
                setColor("scale_outline_color", new RGB(31, 31, 31)); //$NON-NLS-1$
                setColor("scale_bg_color_start", new RGB(177, 177, 177)); //$NON-NLS-1$
                setColor("scale_bg_color_end", new RGB(99, 99, 99)); //$NON-NLS-1$
                setColor("scale_area_color", new RGB(46, 46, 47)); //$NON-NLS-1$
                setColor("scale_area_outline_color", new RGB(208, 208, 208)); //$NON-NLS-1$
-               
+
                /*** stop progress dialog ***/
                setColor("stop_progress_line1_color", new RGB(2, 171, 208)); //$NON-NLS-1$
                setColor("stop_progress_line2_color", new RGB(86, 86, 86)); //$NON-NLS-1$
@@ -398,4 +400,3 @@ public class DAThemeBlack extends DATheme {
        }
 
 }
-
index f90a56f..75aab13 100644 (file)
@@ -85,6 +85,11 @@ public class DAThemeWhite extends DATheme {
                /** title bar colors **/
                setColor("titlebar_text_color", new RGB(64, 208, 255)); //$NON-NLS-1$
                setColor("titlebar_bg", new RGB(78, 79, 81)); //$NON-NLS-1$
+               setColor("titlebar_start_color", new RGB(240, 240, 240)); //$NON-NLS-1$
+               setColor("titlebar_end_color", new RGB(165, 165, 165)); //$NON-NLS-1$
+               setColor("titlebar_bottom_stroke_1", new RGB(115, 115, 115));
+               setColor("titlebar_bottom_stroke_2", new RGB(160, 160, 160));
+               
 
                /** device and application combo specific colors start **/
                setColor("device_application_enable_font", new RGB(0, 0, 0)); //$NON-NLS-1$
index 037aa88..9a3729d 100644 (file)
@@ -47,6 +47,8 @@ public class FileApiListView extends DAView {
 
        public static final String ID = FileApiListView.class.getName();
        private String lastSelectionKey = null;
+       int[] innerMaxWeight = { 0, 100 };
+       int[] outerMaxWeight = { 100, 0 };
 
        private String[] columnNames = { FilePageLabels.FILE_API_LIST_VIEW_INDEX,
                        FilePageLabels.FILE_API_LIST_VIEW_TIME,
@@ -79,6 +81,7 @@ public class FileApiListView extends DAView {
 
                ViewContainer viewContainer = new ViewContainer(this, true);
                viewContainer.setTitleText(FilePageLabels.FILE_API_LIST_VIEW_TITLE);
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
 
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.WINDOW_BG_COLOR);
index 31d717d..bba51ac 100644 (file)
@@ -62,6 +62,9 @@ public class FileDetailInfoView extends DAView {
        private int apiCount = 0;
        private int failedApiCount = 0;
 
+       int[] innerMaxWeight = { 0, 100 };
+       int[] outerMaxWeight = { 0, 100 };
+
        private void init() {
                fileName = AnalyzerLabels.EMPTY_STRING;
                filePath = AnalyzerLabels.EMPTY_STRING;
@@ -80,7 +83,8 @@ public class FileDetailInfoView extends DAView {
 
                ViewContainer viewContainer = new ViewContainer(this, true);
                viewContainer.setTitleText(FilePageLabels.FILE_DETAILS_TITLE);
-
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
+               
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.VIEW_BG_COLOR);
                contents.setLayout(new FillLayout());
@@ -110,7 +114,8 @@ public class FileDetailInfoView extends DAView {
                                {
                                        String pathLabel = FilePageLabels.FILE_DETAILS_FILE_PATH;
                                        e.gc.drawString(pathLabel, x, y + fontHeight);
-                                       Point pathSize = e.gc.textExtent(pathLabel,SWT.DRAW_MNEMONIC);
+                                       Point pathSize = e.gc.textExtent(pathLabel,
+                                                       SWT.DRAW_MNEMONIC);
                                        int xPos = x + pathSize.x;
                                        int width = rect.width - xPos;
                                        String text = filePath;
@@ -134,14 +139,24 @@ public class FileDetailInfoView extends DAView {
                                        }
                                }
 
+                               e.gc.drawString(FilePageLabels.FILE_DETAILS_TOTAL_SIZE
+                                               + Integer.toString(totalSize), x, y += fontHeight);
+                               e.gc.drawString(
+                                               FilePageLabels.FILE_DETAILS_READ_SIZE
+                                                               + Integer.toString(readSize), x,
+                                               y += fontHeight);
+                               e.gc.drawString(FilePageLabels.FILE_DETAILS_WRITE_SIZE
+                                               + Integer.toString(writeSize), x, y += fontHeight);
+                               e.gc.drawString(FilePageLabels.FILE_DETAILS_TOTAL_USE_TIME
+                                               + Formatter.toTimeFormat(Long.toString(totalUseTime)),
+                                               x, y += fontHeight);
+                               e.gc.drawString(
+                                               FilePageLabels.FILE_DETAILS_API_COUNT
+                                                               + Integer.toString(apiCount), x,
+                                               y += fontHeight);
+                               e.gc.drawString(FilePageLabels.FILE_DETAILS_FAILED_API_COUNT
+                                               + Integer.toString(failedApiCount), x, y += fontHeight);
 
-                               e.gc.drawString(FilePageLabels.FILE_DETAILS_TOTAL_SIZE+ Integer.toString(totalSize), x,y += fontHeight);
-                               e.gc.drawString(FilePageLabels.FILE_DETAILS_READ_SIZE+ Integer.toString(readSize), x,y += fontHeight);
-                               e.gc.drawString(FilePageLabels.FILE_DETAILS_WRITE_SIZE+ Integer.toString(writeSize), x, y += fontHeight);
-                               e.gc.drawString(FilePageLabels.FILE_DETAILS_TOTAL_USE_TIME+ Formatter.toTimeFormat(Long.toString(totalUseTime)),x, y += fontHeight);
-                               e.gc.drawString(FilePageLabels.FILE_DETAILS_API_COUNT+ Integer.toString(apiCount), x, y += fontHeight);
-                               e.gc.drawString(FilePageLabels.FILE_DETAILS_FAILED_API_COUNT+ Integer.toString(failedApiCount), x, y += fontHeight);
-                               
                        }
                });
        }
@@ -162,9 +177,9 @@ public class FileDetailInfoView extends DAView {
                writeSize = 0;
                apiCount = 0;
                failedApiCount = 0;
-               if (!item.isParent()) 
-               {
-                       item = FileChartManager.getInstance().getFileRegister().get(item.getParentKey());
+               if (!item.isParent()) {
+                       item = FileChartManager.getInstance().getFileRegister()
+                                       .get(item.getParentKey());
                }
                fileName = item.getFileName();
                filePath = item.getPath();
@@ -172,15 +187,13 @@ public class FileDetailInfoView extends DAView {
                int writeSize = 0;
                int totalSize = 0;
                int size = item.getChildern().size();
-               for (int i = 0; i < size; i++) 
-               {
+               for (int i = 0; i < size; i++) {
                        FileChartItemData child = item.getChildern().get(i);
                        readSize += child.getReadSize();
                        writeSize += child.getWriteSize();
                        totalSize += child.getTotalSize();
-                       
-                       for (int ii = 0; ii < child.getData().size(); ii++) 
-                       {
+
+                       for (int ii = 0; ii < child.getData().size(); ii++) {
                                apiCount += child.getData().get(ii).getRelations().size();
                        }
                }
index 3352fea..29030f0 100644 (file)
@@ -69,7 +69,6 @@ public class FilePage extends DAPageComposite {
                leftForm = new SashForm(baseForm, SWT.VERTICAL);
                FileChartView fileChartView = new FileChartView(leftForm, SWT.NONE);
                addView(fileChartView);
-
                FileApiListView fileApiListView = new FileApiListView(leftForm,
                                SWT.NONE);
                addView(fileApiListView);
index 2d9a764..32f1cc0 100644 (file)
@@ -57,416 +57,420 @@ import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.ImageResources;
 import org.tizen.dynamicanalyzer.ui.timeline.DATimelineTabComposite;
 
-
 public class ImageViewer extends Composite {
 
-    class ImageData {
-        public GC gc;
-        public int imgWidth;
-        public int imgHeight;
-        public int marginX;
-        public int marginY;
-        public int maxImageWidth;
-        public int maxImageHeight;
-        public int minImageWidth;
-        public int minImageHeight;
-        public double imgWidthRate;
-        public double imgHeightRate;
-
-        public ImageData(int type) {
-            gc = null;
-
-            if (type == SnapshotConstants.IMAGE_TYPE_WIDE) {
-                imgWidth = SnapshotConstants.DEFAULT_W_IMAGE_WIDTH;
-                imgHeight = SnapshotConstants.DEFAULT_W_IMAGE_HEIGHT;
-                marginX = SnapshotConstants.DEFAULT_IMAGE_MARGIN_X;
-                marginY = SnapshotConstants.DEFAULT_IMAGE_MARGIN_Y;
-                maxImageWidth = SnapshotConstants.MAX_W_IMAGE_WIDTH;
-                maxImageHeight = SnapshotConstants.MAX_W_IMAGE_HEIGHT;
-                minImageWidth = SnapshotConstants.MIN_W_IMAGE_WIDTH;
-                minImageHeight = SnapshotConstants.MIN_W_IMAGE_HEIGHT;
-                imgWidthRate = SnapshotConstants.W_IMAGE_WIDTH_RATE;
-                imgHeightRate = SnapshotConstants.W_IMAGE_HEIGHT_RATE;
-            } else {
-                imgWidth = SnapshotConstants.DEFAULT_IMAGE_WIDTH;
-                imgHeight = SnapshotConstants.DEFAULT_IMAGE_HEIGHT;
-                marginX = SnapshotConstants.DEFAULT_IMAGE_MARGIN_X;
-                marginY = SnapshotConstants.DEFAULT_IMAGE_MARGIN_Y;
-                maxImageWidth = SnapshotConstants.MAX_IMAGE_WIDTH;
-                maxImageHeight = SnapshotConstants.MAX_IMAGE_HEIGHT;
-                minImageWidth = SnapshotConstants.MIN_IMAGE_WIDTH;
-                minImageHeight = SnapshotConstants.MIN_IMAGE_HEIGHT;
-                imgWidthRate = SnapshotConstants.IMAGE_WIDTH_RATE;
-                imgHeightRate = SnapshotConstants.IMAGE_HEIGHT_RATE;
-            }
-        }
-    }
-
-    private final int MOUSE_EXIT = 0;
-    private final int MOUSE_LEFT = 1;
-    private final int MOUSE_RIGHT = 2;
-    private final int MOUSE_DOWN_LEFT = 3;
-    private final int MOUSE_DOWN_RIGHT = 4;
-
-    private Image image;
-    private Canvas canvas;
-    private Canvas popup;
-    private HashMap<String, ImageSelectionListener> listeners;
-    private Shell childShell;
-    private Composite parent;
-    int childShellWidth = 0;
-    int childShellHeight = 0;
-    private int state = MOUSE_EXIT;
-    private boolean mouseDown = false;
-    private int currentImageIndex = 0;
-    private boolean leftEnable = false;
-    private boolean rightEnable = false;
-
-    // +2 means outer offset
-    private final int shellMaxWidth = 480 / 2 + 2;
-    private final int shellMaxHeight = 800 / 2 + 2;
-    private Timer timer = null;
-
-    public ImageViewer(Composite parent, int style) {
-        super(parent, style);
-        this.parent = parent;
-        this.setLayout(new FillLayout());
-
-        canvas = new Canvas(this, SWT.NONE);
-        setImage(ImageResources.NO_IMAGE);
-        canvas.addListener(SWT.MouseEnter, mouseListener);
-        canvas.addListener(SWT.MouseExit, mouseListener);
-        canvas.addListener(SWT.MouseUp, mouseListener);
-        canvas.addListener(SWT.MouseMove, mouseListener);
-        canvas.addListener(SWT.MouseDown, mouseListener);
-        canvas.addPaintListener(new PaintListener() {
-            @Override
-            public void paintControl(PaintEvent e) {
-                if (null == image || null == e.gc) {
-                    return;
-                }
-
-                try {
-                    Rectangle bounds = image.getBounds();
-                    int iw = bounds.width;
-                    int ih = bounds.height;
-
-                    int imageType =
-                            iw > ih ? SnapshotConstants.IMAGE_TYPE_WIDE
-                                    : SnapshotConstants.IMAGE_TYPE_NORMAL;
-                    ImageData imageData = new ImageData(imageType);
-
-                    imageData.gc = e.gc;
-                    imageData.imgWidth = iw;
-                    imageData.imgHeight = ih;
-                    drawThumbnail(imageData);
-                    imageData.gc.dispose();
-                } catch (SWTException se) {
-                       se.printStackTrace();
-                }
-            }
-        });
-
-    }
-
-    public void setEnable(boolean enabled) {
-        canvas.setEnabled(enabled);
-    }
-
-    public HashMap<String, ImageSelectionListener> getSelectionListeners() {
-        if (null == listeners) {
-            listeners = new HashMap<String, ImageSelectionListener>();
-        }
-        return listeners;
-    }
-
-    private void setImage(Image input) {
-        if (input == null) {
-            image = null;
-            return;
-        }
-
-        if (null != image && !image.isDisposed() && !image.equals(ImageResources.NO_IMAGE)) {
-            image.dispose();
-        }
-        image = input;
-    }
-
-    public void clear() {
-        setImage(ImageResources.NO_IMAGE);
-        canvas.redraw();
-        currentImageIndex = 0;
-    }
-
-    private void drawThumbnail(ImageData imgData) {
-        Rectangle bounds = canvas.getBounds();
-        int cw = bounds.width;
-        int ch = bounds.height;
-
-        imgData.gc.drawImage(image, 0, 0, imgData.imgWidth, imgData.imgHeight, 0, 0, cw, ch);
-        if (state == MOUSE_LEFT && leftEnable) {
-            imgData.gc.drawImage(ImageResources.SNAPSHOT_LEFT_HOVER, 0, 0);
-        } else if (state == MOUSE_RIGHT && rightEnable) {
-            Rectangle rect = ImageResources.SNAPSHOT_RIGHT_HOVER.getBounds();
-            imgData.gc.drawImage(ImageResources.SNAPSHOT_RIGHT_HOVER, rect.width, 0);
-        } else if (state == MOUSE_DOWN_LEFT && leftEnable) {
-            imgData.gc.drawImage(ImageResources.SNAPSHOT_LEFT_PUSH, 0, 0);
-        } else if (state == MOUSE_DOWN_RIGHT && rightEnable) {
-            Rectangle rect = ImageResources.SNAPSHOT_RIGHT_HOVER.getBounds();
-            imgData.gc.drawImage(ImageResources.SNAPSHOT_RIGHT_PUSH, rect.width, 0);
-        }
-    }
-
-    public void drawSnapshot(String time) {
-        if (null != time && !time.isEmpty()) {
-            int index = AnalyzerManager.getImageIndexByTime(time);
-            ImageInfo imageInfo = AnalyzerManager.getImageInfoByTime(time);
-            if (null == imageInfo) {
-                return;
-            }
-            String path = null;
-            if (imageInfo.getSeq().equals("-1") || index < 0) { //$NON-NLS-1$
-                path = AnalyzerConstants.DEFAULT_IMAGE_NAME;
-            } else {
-                path =
-                        AnalyzerManager.getProject().getSavePath() + File.separator
-                                + AnalyzerConstants.IMAGE_FOLDER_NAME + File.separator
-                                + imageInfo.getSeq() + CommonConstants.EXTENSION_PNG_IMAGE;
-            }
-            Image img = null;
-            if (path.equals(AnalyzerConstants.DEFAULT_IMAGE_NAME)) {
-                img = ImageResources.NO_IMAGE;
-            } else {
-                try {
-                    img = new Image(Display.getDefault(), path);
-                } catch (SWTError err) {
-                    err.printStackTrace();
-                    img = ImageResources.NO_IMAGE;
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    img = ImageResources.NO_IMAGE;
-                }
-                if (img.isDisposed()) {
-                    System.out.println("before set image : disposed"); //$NON-NLS-1$
-                }
-            }
-            setImage(img);
-            currentImageIndex = index;
-            canvas.redraw();
-            if (childShell != null) {
-                popup.redraw();
-            }
-        }
-    }
-
-    private Listener mouseListener = new Listener() {
-
-        @Override
-        public void handleEvent(Event event) {
-            if (event.type == SWT.MouseEnter) {
-                setButtonCondition();
-
-                if (childShell == null) {
-                    openChildShell();
-                }
-            } else if (event.type == SWT.MouseExit) {
-                if (childShell != null) {
-                    if (timer != null) {
-                        timer.cancel();
-                        timer = null;
-                    }
-                    childShell.close();
-                    childShell = null;
-                    // ready = false;
-                }
-                state = MOUSE_EXIT;
-                canvas.redraw();
-            } else if (event.type == SWT.MouseMove) {
-                if (!mouseDown) {
-                    Rectangle rect = canvas.getBounds();
-                    int prevState = state;
-                    if (event.x < rect.x + rect.width / 2) {
-                        state = MOUSE_LEFT;
-                    } else if (event.x > rect.x + rect.width / 2) {
-                        state = MOUSE_RIGHT;
-                    } else {
-                        state = MOUSE_EXIT;
-                    }
-                    if (prevState != state) {
-                        canvas.redraw();
-                    }
-                }
-            } else if (event.type == SWT.MouseDown) {
-                mouseDown = true;
-                Rectangle rect = canvas.getBounds();
-                int prevState = state;
-                if (event.x < rect.x + rect.width / 2) {
-                    state = MOUSE_DOWN_LEFT;
-                } else if (event.x > rect.x + rect.width / 2) {
-                    state = MOUSE_DOWN_RIGHT;
-                } else {
-                    state = MOUSE_EXIT;
-                }
-                if (prevState != state) {
-                    canvas.redraw();
-                }
-            } else if (event.type == SWT.MouseUp) {
-                mouseDown = false;
-                Rectangle rect = canvas.getBounds();
-                int prevState = state;
-                if (event.x < rect.x + rect.width / 2) {
-                    if (state == MOUSE_DOWN_LEFT && leftEnable) {
-                        leftArrowAction();
-                        setButtonCondition();
-                    }
-                    state = MOUSE_LEFT;
-                } else if (event.x > rect.x + rect.width / 2) {
-                    if (state == MOUSE_DOWN_RIGHT && rightEnable) {
-                        rightArrowAction();
-                        setButtonCondition();
-                    }
-                    state = MOUSE_RIGHT;
-                } else {
-                    state = MOUSE_EXIT;
-                }
-                if (prevState != state) {
-                    canvas.redraw();
-                }
-            }
-        }
-    };
-
-    private void setButtonCondition() {
-        List<ImageInfo> imageList = AnalyzerManager.getImageList();
-        ImageInfo imgInfo = imageList.get(currentImageIndex);
-        drawSnapshot(imgInfo.getTime());
-        if (imageList.size() < 2) {
-            leftEnable = false;
-            rightEnable = false;
-        } else {
-            if (currentImageIndex == 0) {
-                leftEnable = false;
-                if (imageList.size() > 1) {
-                    rightEnable = true;
-                } else {
-                    rightEnable = false;
-                }
-            } else {
-                leftEnable = true;
-                if (imageList.size() - 1 == currentImageIndex) {
-                    rightEnable = false;
-                } else {
-                    rightEnable = true;
-                }
-            }
-        }
-    }
-
-    private void widgetSelected(String timeStr) {
-        long time = Long.parseLong(timeStr);
-        AnalyzerManager.getCurrentPage().updatePage(new DASelectionData(DATimelineTabComposite.ID,
-                                                                        time, time, null, null));
-    }
-
-    private void leftArrowAction() {
-        List<ImageInfo> imageList = AnalyzerManager.getImageList();
-        ImageInfo imgInfo = imageList.get(--currentImageIndex);
-        drawSnapshot(imgInfo.getTime());
-        widgetSelected(imgInfo.getTime());
-    }
-
-    private void rightArrowAction() {
-        List<ImageInfo> imageList = AnalyzerManager.getImageList();
-        if (imageList.size() <= currentImageIndex + 1) {
-            return;
-        }
-        ImageInfo imgInfo = imageList.get(++currentImageIndex);
-        drawSnapshot(imgInfo.getTime());
-        widgetSelected(imgInfo.getTime());
-    }
-
-    private void openChildShell() {
-        childShell = new Shell(parent.getShell(), SWT.ON_TOP);
-        childShell.setLayout(new FillLayout());
-        Point p = canvas.toDisplay(0, 0);
-
-        childShellWidth = shellMaxWidth;
-        childShellHeight = shellMaxHeight;
-
-        childShell.setSize(childShellWidth, childShellHeight);
-        childShell.setLocation(p.x - childShellWidth, p.y);
-        popup = new Canvas(childShell, SWT.DOUBLE_BUFFERED | SWT.TRANSPARENCY_ALPHA);
-
-        popup.addPaintListener(new PaintListener() {
-            @Override
-            public void paintControl(PaintEvent e) {
-                if (null == image || null == e.gc) {
-                    return;
-                }
-                // if (ready) {
-                try {
-                    Rectangle bounds = image.getBounds();
-                    int iw = bounds.width;
-                    int ih = bounds.height;
-                    int imageType =
-                            iw > ih ? SnapshotConstants.IMAGE_TYPE_WIDE
-                                    : SnapshotConstants.IMAGE_TYPE_NORMAL;
-                    ImageData imageData = new ImageData(imageType);
-
-                    imageData.gc = e.gc;
-                    imageData.imgWidth = iw;
-                    imageData.imgHeight = ih;
-
-                    Rectangle rects = popup.getBounds();
-                    int cw = rects.width - 2;
-                    int ch = rects.height - 2;
-
-                    e.gc.setForeground(ColorResources.SNAPSHOT_VIEWER_BORDER);
-                    imageData.gc.drawRectangle(rects.x, rects.y, rects.width - 1, rects.height - 1);
-
-                    imageData.gc.drawImage(image, 0, 0, imageData.imgWidth, imageData.imgHeight, 1,
-                                           1, cw, ch);
-
-                    imageData.gc.dispose();
-                } catch (SWTException se) {
-                       se.printStackTrace();
-                }
-            }
-        });
-        childShell.open();
-        // if (timer != null) {
-        // timer.cancel();
-        // timer = null;
-        // }
-        // timer = new Timer();
-        // timer.schedule(new TimerTask() {
-        // @Override
-        // public void run() {
-        // Display.getDefault().syncExec(new Runnable() {
-        // @Override
-        // public void run() {
-        // if (null == childShell
-        // || childShellWidth > shellMaxWidth) {
-        // if (timer != null) {
-        // timer.cancel();
-        // timer = null;
-        // }
-        // ready = true;
-        // childShell.redraw();
-        // return;
-        // }
-        // Rectangle rect = canvas.getBounds();
-        // int x = (int) ((float) shellMaxWidth / rect.width) * 50;
-        // int y = (int) ((float) shellMaxHeight / rect.height) * 50;
-        // childShellWidth += x;
-        // childShellHeight += y;
-        // childShell.setSize(childShellWidth, childShellHeight);
-        // Point p = canvas.toDisplay(0, 0);
-        // childShell.setLocation(p.x - childShellWidth, p.y);
-        // childShell.redraw();
-        // }
-        // });
-        // }
-        // }, 10, 5);
-    }
+       class ImageData {
+               public GC gc;
+               public int imgWidth;
+               public int imgHeight;
+               public int marginX;
+               public int marginY;
+               public int maxImageWidth;
+               public int maxImageHeight;
+               public int minImageWidth;
+               public int minImageHeight;
+               public double imgWidthRate;
+               public double imgHeightRate;
+
+               public ImageData(int type) {
+                       gc = null;
+
+                       if (type == SnapshotConstants.IMAGE_TYPE_WIDE) {
+                               imgWidth = SnapshotConstants.DEFAULT_W_IMAGE_WIDTH;
+                               imgHeight = SnapshotConstants.DEFAULT_W_IMAGE_HEIGHT;
+                               marginX = SnapshotConstants.DEFAULT_IMAGE_MARGIN_X;
+                               marginY = SnapshotConstants.DEFAULT_IMAGE_MARGIN_Y;
+                               maxImageWidth = SnapshotConstants.MAX_W_IMAGE_WIDTH;
+                               maxImageHeight = SnapshotConstants.MAX_W_IMAGE_HEIGHT;
+                               minImageWidth = SnapshotConstants.MIN_W_IMAGE_WIDTH;
+                               minImageHeight = SnapshotConstants.MIN_W_IMAGE_HEIGHT;
+                               imgWidthRate = SnapshotConstants.W_IMAGE_WIDTH_RATE;
+                               imgHeightRate = SnapshotConstants.W_IMAGE_HEIGHT_RATE;
+                       } else {
+                               imgWidth = SnapshotConstants.DEFAULT_IMAGE_WIDTH;
+                               imgHeight = SnapshotConstants.DEFAULT_IMAGE_HEIGHT;
+                               marginX = SnapshotConstants.DEFAULT_IMAGE_MARGIN_X;
+                               marginY = SnapshotConstants.DEFAULT_IMAGE_MARGIN_Y;
+                               maxImageWidth = SnapshotConstants.MAX_IMAGE_WIDTH;
+                               maxImageHeight = SnapshotConstants.MAX_IMAGE_HEIGHT;
+                               minImageWidth = SnapshotConstants.MIN_IMAGE_WIDTH;
+                               minImageHeight = SnapshotConstants.MIN_IMAGE_HEIGHT;
+                               imgWidthRate = SnapshotConstants.IMAGE_WIDTH_RATE;
+                               imgHeightRate = SnapshotConstants.IMAGE_HEIGHT_RATE;
+                       }
+               }
+       }
+
+       private final int MOUSE_EXIT = 0;
+       private final int MOUSE_LEFT = 1;
+       private final int MOUSE_RIGHT = 2;
+       private final int MOUSE_DOWN_LEFT = 3;
+       private final int MOUSE_DOWN_RIGHT = 4;
+
+       private Image image;
+       private Canvas canvas;
+       private Canvas popup;
+       private HashMap<String, ImageSelectionListener> listeners;
+       private Shell childShell;
+       private Composite parent;
+       int childShellWidth = 0;
+       int childShellHeight = 0;
+       private int state = MOUSE_EXIT;
+       private boolean mouseDown = false;
+       private int currentImageIndex = 0;
+       private boolean leftEnable = false;
+       private boolean rightEnable = false;
+
+       // +2 means outer offset
+       private final int shellMaxWidth = 480 / 2 + 2;
+       private final int shellMaxHeight = 800 / 2 + 2;
+       private Timer timer = null;
+
+       public ImageViewer(Composite parent, int style) {
+               super(parent, style);
+               this.parent = parent;
+               this.setLayout(new FillLayout());
+
+               canvas = new Canvas(this, SWT.NONE);
+               setImage(ImageResources.NO_IMAGE);
+               canvas.addListener(SWT.MouseEnter, mouseListener);
+               canvas.addListener(SWT.MouseExit, mouseListener);
+               canvas.addListener(SWT.MouseUp, mouseListener);
+               canvas.addListener(SWT.MouseMove, mouseListener);
+               canvas.addListener(SWT.MouseDown, mouseListener);
+               canvas.addPaintListener(new PaintListener() {
+                       @Override
+                       public void paintControl(PaintEvent e) {
+                               if (null == image || null == e.gc) {
+                                       return;
+                               }
+
+                               try {
+                                       Rectangle bounds = image.getBounds();
+                                       int iw = bounds.width;
+                                       int ih = bounds.height;
+
+                                       int imageType = iw > ih ? SnapshotConstants.IMAGE_TYPE_WIDE
+                                                       : SnapshotConstants.IMAGE_TYPE_NORMAL;
+                                       ImageData imageData = new ImageData(imageType);
+
+                                       imageData.gc = e.gc;
+                                       imageData.imgWidth = iw;
+                                       imageData.imgHeight = ih;
+                                       drawThumbnail(imageData);
+                                       imageData.gc.dispose();
+                               } catch (SWTException se) {
+                                       se.printStackTrace();
+                               }
+                       }
+               });
+
+       }
+
+       public void setEnable(boolean enabled) {
+               canvas.setEnabled(enabled);
+       }
+
+       public HashMap<String, ImageSelectionListener> getSelectionListeners() {
+               if (null == listeners) {
+                       listeners = new HashMap<String, ImageSelectionListener>();
+               }
+               return listeners;
+       }
+
+       private void setImage(Image input) {
+               if (input == null) {
+                       image = null;
+                       return;
+               }
+
+               if (null != image && !image.isDisposed()
+                               && !image.equals(ImageResources.NO_IMAGE)) {
+                       image.dispose();
+               }
+               image = input;
+       }
+
+       public void clear() {
+               setImage(ImageResources.NO_IMAGE);
+               canvas.redraw();
+               currentImageIndex = 0;
+       }
+
+       private void drawThumbnail(ImageData imgData) {
+               Rectangle bounds = canvas.getBounds();
+               int cw = bounds.width;
+               int ch = bounds.height;
+
+               imgData.gc.drawImage(image, 0, 0, imgData.imgWidth, imgData.imgHeight,
+                               0, 0, cw, ch);
+               if (state == MOUSE_LEFT && leftEnable) {
+                       imgData.gc.drawImage(ImageResources.SNAPSHOT_LEFT_HOVER, 0, 0);
+               } else if (state == MOUSE_RIGHT && rightEnable) {
+                       Rectangle rect = ImageResources.SNAPSHOT_RIGHT_HOVER.getBounds();
+                       imgData.gc.drawImage(ImageResources.SNAPSHOT_RIGHT_HOVER,
+                                       rect.width, 0);
+               } else if (state == MOUSE_DOWN_LEFT && leftEnable) {
+                       imgData.gc.drawImage(ImageResources.SNAPSHOT_LEFT_PUSH, 0, 0);
+               } else if (state == MOUSE_DOWN_RIGHT && rightEnable) {
+                       Rectangle rect = ImageResources.SNAPSHOT_RIGHT_HOVER.getBounds();
+                       imgData.gc.drawImage(ImageResources.SNAPSHOT_RIGHT_PUSH,
+                                       rect.width, 0);
+               }
+       }
+
+       public void drawSnapshot(String time) {
+               if (null != time && !time.isEmpty()) {
+                       int index = AnalyzerManager.getImageIndexByTime(time);
+                       ImageInfo imageInfo = AnalyzerManager.getImageInfoByTime(time);
+                       if (null == imageInfo) {
+                               return;
+                       }
+                       String path = null;
+                       if (imageInfo.getSeq().equals("-1") || index < 0) { //$NON-NLS-1$
+                               path = AnalyzerConstants.DEFAULT_IMAGE_NAME;
+                       } else {
+                               path = AnalyzerManager.getProject().getSavePath()
+                                               + File.separator + AnalyzerConstants.IMAGE_FOLDER_NAME
+                                               + File.separator + imageInfo.getSeq()
+                                               + CommonConstants.EXTENSION_PNG_IMAGE;
+                       }
+                       Image img = null;
+                       if (path.equals(AnalyzerConstants.DEFAULT_IMAGE_NAME)) {
+                               img = ImageResources.NO_IMAGE;
+                       } else {
+                               try {
+                                       img = new Image(Display.getDefault(), path);
+                               } catch (SWTError err) {
+                                       err.printStackTrace();
+                                       img = ImageResources.NO_IMAGE;
+                               } catch (Exception e) {
+                                       e.printStackTrace();
+                                       img = ImageResources.NO_IMAGE;
+                               }
+                               if (img.isDisposed()) {
+                                       System.out.println("before set image : disposed"); //$NON-NLS-1$
+                               }
+                       }
+                       setImage(img);
+                       currentImageIndex = index;
+                       canvas.redraw();
+                       if (childShell != null) {
+                               popup.redraw();
+                       }
+               }
+       }
+
+       private Listener mouseListener = new Listener() {
+
+               @Override
+               public void handleEvent(Event event) {
+                       if (event.type == SWT.MouseEnter) {
+                               setButtonCondition();
+
+                               if (childShell == null) {
+                                       openChildShell();
+                               }
+                       } else if (event.type == SWT.MouseExit) {
+                               if (childShell != null) {
+                                       if (timer != null) {
+                                               timer.cancel();
+                                               timer = null;
+                                       }
+                                       childShell.close();
+                                       childShell = null;
+                                       // ready = false;
+                               }
+                               state = MOUSE_EXIT;
+                               canvas.redraw();
+                       } else if (event.type == SWT.MouseMove) {
+                               if (!mouseDown) {
+                                       Rectangle rect = canvas.getBounds();
+                                       int prevState = state;
+                                       if (event.x < rect.x + rect.width / 2) {
+                                               state = MOUSE_LEFT;
+                                       } else if (event.x > rect.x + rect.width / 2) {
+                                               state = MOUSE_RIGHT;
+                                       } else {
+                                               state = MOUSE_EXIT;
+                                       }
+                                       if (prevState != state) {
+                                               canvas.redraw();
+                                       }
+                               }
+                       } else if (event.type == SWT.MouseDown) {
+                               mouseDown = true;
+                               Rectangle rect = canvas.getBounds();
+                               int prevState = state;
+                               if (event.x < rect.x + rect.width / 2) {
+                                       state = MOUSE_DOWN_LEFT;
+                               } else if (event.x > rect.x + rect.width / 2) {
+                                       state = MOUSE_DOWN_RIGHT;
+                               } else {
+                                       state = MOUSE_EXIT;
+                               }
+                               if (prevState != state) {
+                                       canvas.redraw();
+                               }
+                       } else if (event.type == SWT.MouseUp) {
+                               mouseDown = false;
+                               Rectangle rect = canvas.getBounds();
+                               int prevState = state;
+                               if (event.x < rect.x + rect.width / 2) {
+                                       if (state == MOUSE_DOWN_LEFT && leftEnable) {
+                                               leftArrowAction();
+                                               setButtonCondition();
+                                       }
+                                       state = MOUSE_LEFT;
+                               } else if (event.x > rect.x + rect.width / 2) {
+                                       if (state == MOUSE_DOWN_RIGHT && rightEnable) {
+                                               rightArrowAction();
+                                               setButtonCondition();
+                                       }
+                                       state = MOUSE_RIGHT;
+                               } else {
+                                       state = MOUSE_EXIT;
+                               }
+                               if (prevState != state) {
+                                       canvas.redraw();
+                               }
+                       }
+               }
+       };
+
+       private void setButtonCondition() {
+               List<ImageInfo> imageList = AnalyzerManager.getImageList();
+               ImageInfo imgInfo = imageList.get(currentImageIndex);
+               drawSnapshot(imgInfo.getTime());
+               if (imageList.size() < 2) {
+                       leftEnable = false;
+                       rightEnable = false;
+               } else {
+                       if (currentImageIndex == 0) {
+                               leftEnable = false;
+                               if (imageList.size() > 1) {
+                                       rightEnable = true;
+                               } else {
+                                       rightEnable = false;
+                               }
+                       } else {
+                               leftEnable = true;
+                               if (imageList.size() - 1 == currentImageIndex) {
+                                       rightEnable = false;
+                               } else {
+                                       rightEnable = true;
+                               }
+                       }
+               }
+       }
+
+       private void widgetSelected(String timeStr) {
+               long time = Long.parseLong(timeStr);
+               AnalyzerManager.getCurrentPage().updatePage(
+                               new DASelectionData(DATimelineTabComposite.ID, time, time,
+                                               null, null));
+       }
+
+       private void leftArrowAction() {
+               List<ImageInfo> imageList = AnalyzerManager.getImageList();
+               ImageInfo imgInfo = imageList.get(--currentImageIndex);
+               drawSnapshot(imgInfo.getTime());
+               widgetSelected(imgInfo.getTime());
+       }
+
+       private void rightArrowAction() {
+               List<ImageInfo> imageList = AnalyzerManager.getImageList();
+               if (imageList.size() <= currentImageIndex + 1) {
+                       return;
+               }
+               ImageInfo imgInfo = imageList.get(++currentImageIndex);
+               drawSnapshot(imgInfo.getTime());
+               widgetSelected(imgInfo.getTime());
+       }
+
+       private void openChildShell() {
+               childShell = new Shell(parent.getShell(), SWT.ON_TOP);
+               childShell.setLayout(new FillLayout());
+               Point p = canvas.toDisplay(0, 0);
+
+               childShellWidth = shellMaxWidth;
+               childShellHeight = shellMaxHeight;
+
+               childShell.setSize(childShellWidth, childShellHeight);
+               childShell.setLocation(p.x - childShellWidth, p.y);
+               popup = new Canvas(childShell, SWT.DOUBLE_BUFFERED
+                               | SWT.TRANSPARENCY_ALPHA);
+
+               popup.addPaintListener(new PaintListener() {
+                       @Override
+                       public void paintControl(PaintEvent e) {
+                               if (null == image || null == e.gc) {
+                                       return;
+                               }
+                               // if (ready) {
+                               try {
+                                       Rectangle bounds = image.getBounds();
+                                       int iw = bounds.width;
+                                       int ih = bounds.height;
+                                       int imageType = iw > ih ? SnapshotConstants.IMAGE_TYPE_WIDE
+                                                       : SnapshotConstants.IMAGE_TYPE_NORMAL;
+                                       ImageData imageData = new ImageData(imageType);
+
+                                       imageData.gc = e.gc;
+                                       imageData.imgWidth = iw;
+                                       imageData.imgHeight = ih;
+
+                                       Rectangle rects = popup.getBounds();
+                                       int cw = rects.width - 2;
+                                       int ch = rects.height - 2;
+
+                                       e.gc.setForeground(ColorResources.BLACK);
+                                       imageData.gc.drawRectangle(rects.x, rects.y,
+                                                       rects.width - 1, rects.height - 1);
+
+                                       imageData.gc.drawImage(image, 0, 0, imageData.imgWidth,
+                                                       imageData.imgHeight, 1, 1, cw, ch);
+
+                                       imageData.gc.dispose();
+                               } catch (SWTException se) {
+                                       se.printStackTrace();
+                               }
+                       }
+               });
+               childShell.open();
+               // if (timer != null) {
+               // timer.cancel();
+               // timer = null;
+               // }
+               // timer = new Timer();
+               // timer.schedule(new TimerTask() {
+               // @Override
+               // public void run() {
+               // Display.getDefault().syncExec(new Runnable() {
+               // @Override
+               // public void run() {
+               // if (null == childShell
+               // || childShellWidth > shellMaxWidth) {
+               // if (timer != null) {
+               // timer.cancel();
+               // timer = null;
+               // }
+               // boolean ready = true;
+               // childShell.redraw();
+               // return;
+               // }
+               // Rectangle rect = canvas.getBounds();
+               // int x = (int) ((float) shellMaxWidth / rect.width) * 50;
+               // int y = (int) ((float) shellMaxHeight / rect.height) * 50;
+               // childShellWidth += x;
+               // childShellHeight += y;
+               // childShell.setSize(childShellWidth, childShellHeight);
+               // Point p = canvas.toDisplay(0, 0);
+               // childShell.setLocation(p.x - childShellWidth, p.y);
+               // childShell.redraw();
+               // }
+               // });
+               // }
+               // }, 10, 5);
+       }
 }
index c07c091..621c6ea 100644 (file)
@@ -162,7 +162,7 @@ public class SnapshotView extends DAView {
                data.height = 230;
                snapshot.setLayoutData(data);
                // FIXME : not supported
-               snapshot.setEnable(false);
+               snapshot.setEnable(true);
 
                // icon area
                iconComp = new Composite(innerComp, SWT.NONE);
index bbf41e8..9c900dd 100644 (file)
@@ -42,6 +42,10 @@ import org.tizen.dynamicanalyzer.ui.widgets.table.TableComparator;
 public class FailedApiListView extends DAView {
        public static final String ID = FailedApiListView.class.getName();
        private DATableComposite tableComp = null;
+
+       int[] innerMaxWeight = { 100, 0, 0 };
+       int[] outerMaxWeight = { 100, 0 };
+
        private String[] columnNames = { SummaryLabels.FAILED_API_LIST_VIEW_INDEX,
                        SummaryLabels.FAILED_API_LIST_VIEW_TIME,
                        SummaryLabels.FAILED_API_LIST_VIEW_NAME,
@@ -57,8 +61,7 @@ public class FailedApiListView extends DAView {
                        AnalyzerConstants.SORT_TYPE_STRING,
                        AnalyzerConstants.SORT_TYPE_STRING,
                        AnalyzerConstants.SORT_TYPE_STRING,
-                       AnalyzerConstants.SORT_TYPE_GRID,
-                       AnalyzerConstants.SORT_TYPE_GRID };
+                       AnalyzerConstants.SORT_TYPE_GRID, AnalyzerConstants.SORT_TYPE_GRID };
        int[] sourceColumns = { LogCenterConstants.SEQUENCE_NUMBER_INDEX,
                        LogCenterConstants.TIME_INDEX, LogCenterConstants.APINAME_INDEX,
                        LogCenterConstants.INPUTPARM_INDEX,
@@ -72,7 +75,7 @@ public class FailedApiListView extends DAView {
                ViewContainer viewContainer = new ViewContainer(this, true);
                viewContainer
                                .setTitleText(SummaryLabels.FAILED_API_LIST_VIEW_FAILED_API_LIST);
-
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.WINDOW_BG_COLOR);
                contents.setLayout(new FillLayout());
index 80a33c5..fc1ff4e 100644 (file)
@@ -41,6 +41,10 @@ import org.tizen.dynamicanalyzer.ui.widgets.table.TreeDataComparator;
 public class LeakView extends DAView {
 
        public static final String ID = LeakView.class.getName();
+
+       int[] innerMaxWeight = { 0, 100, 0 };
+       int[] outerMaxWeight = { 100, 0 };
+
        private String[] columnNames = { SummaryLabels.LEAK_VIEW_NAME,
                        SummaryLabels.LEAK_VIEW_INDEX, SummaryLabels.LEAK_VIEW_TYPE,
                        SummaryLabels.LEAK_VIEW_TIME,
@@ -65,6 +69,7 @@ public class LeakView extends DAView {
 
                ViewContainer viewContainer = new ViewContainer(this, true);
                viewContainer.setTitleText(SummaryLabels.LEAK_VIEW_LEAK_VIEW);
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
 
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.WINDOW_BG_COLOR);
index 4d15947..c3d0575 100644 (file)
@@ -40,6 +40,9 @@ public class FunctionUsageProfilingView extends DAView {
 
        public static final String ID = FunctionUsageProfilingView.class.getName();
        private ProfilingTable treeComp = null;
+       int[] innerMaxWeight = { 100, 0 };
+       int[] outerMaxWeight = { 0, 100 };
+       
        private String[] columnNames = {
                        SummaryLabels.FUNCTION_USER_PROFILING_VIEW_NAME,
                        SummaryLabels.FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_TIME,
@@ -71,7 +74,7 @@ public class FunctionUsageProfilingView extends DAView {
                ViewContainer viewContainer = new ViewContainer(this, true);
                viewContainer
                                .setTitleText(SummaryLabels.FUNCTION_USER_PROFILING_VIEW_TITLE);
-
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.WINDOW_BG_COLOR);
                contents.setLayout(new FillLayout());
index 25d511b..06fa3fd 100644 (file)
@@ -27,6 +27,7 @@
 package org.tizen.dynamicanalyzer.ui.summary.warning;
 
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
@@ -43,27 +44,33 @@ public class WarningListView extends DAView {
 
        public static final String ID = WarningListView.class.getName();
 
+       int[] innerMaxWeight = { 0, 100 };
+       int[] outerMaxWeight = { 0, 100 };
+
        private DATableComposite tableComp = null;
-       private String[] columnNames = { SummaryLabels.WARNING_LIST_VIEW_INDEX, SummaryLabels.WARNING_LIST_VIEW_CATEGORY, SummaryLabels.WARNING_LIST_VIEW_WARNING_MESSAGE };
+       private String[] columnNames = { SummaryLabels.WARNING_LIST_VIEW_INDEX,
+                       SummaryLabels.WARNING_LIST_VIEW_CATEGORY,
+                       SummaryLabels.WARNING_LIST_VIEW_WARNING_MESSAGE };
        private int[] columnSizes = { 25, 0, 200 };
        int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM,
-                       AnalyzerConstants.SORT_TYPE_GRID,
-                       AnalyzerConstants.SORT_TYPE_GRID };
+                       AnalyzerConstants.SORT_TYPE_GRID, AnalyzerConstants.SORT_TYPE_GRID };
        int[] sourceColumns = { LogCenterConstants.SEQUENCE_NUMBER_INDEX,
-                       LogCenterConstants.ID_INDEX, LogCenterConstants.APINAME_INDEX};
+                       LogCenterConstants.ID_INDEX, LogCenterConstants.APINAME_INDEX };
 
        public WarningListView(Composite parent, int style) {
                super(parent, style);
                this.setLayout(new FillLayout());
 
                ViewContainer viewContainer = new ViewContainer(this, true);
-               viewContainer.setTitleText(SummaryLabels.WARNING_LIST_VIEW_WARNING_LIST);
+               viewContainer
+                               .setTitleText(SummaryLabels.WARNING_LIST_VIEW_WARNING_LIST);
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
 
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.VIEW_BG_COLOR);
                contents.setLayout(new FillLayout());
-               tableComp = new WarningTable(contents, SWT.NONE, SWT.SINGLE | SWT.BORDER
-                               | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
+               tableComp = new WarningTable(contents, SWT.NONE, SWT.SINGLE
+                               | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
                tableComp.setTableName("Warning List");
                tableComp.setComparator(new TableComparator());
                tableComp.setSortTypes(sortTypes);
@@ -72,7 +79,6 @@ public class WarningListView extends DAView {
                tableComp.setColumnSize(columnSizes);
        }
 
-
        @Override
        public void updateView() {
                tableComp.updateTable();
@@ -92,4 +98,38 @@ public class WarningListView extends DAView {
        public void otherViewSelectionOccured() {
                tableComp.deselectAll();
        }
+
+       @Override
+       public void setMaxSize(boolean maximized) {
+
+               if (null == innerMaxWeight || null == outerMaxWeight) {
+                       return;
+               }
+
+               Composite parent = getParent();
+               if (parent instanceof SashForm) {
+                       parent = parent.getParent();
+                       if (!(parent instanceof SashForm)) {
+                               return;
+                       }
+               }
+
+               Composite pParent = parent.getParent();
+               if (!(pParent instanceof SashForm)) {
+                       return;
+               }
+
+               SashForm innerForm = (SashForm) parent;
+               SashForm outerForm = (SashForm) pParent;
+
+               if (maximized) {
+                       oldInnerLayout = innerForm.getWeights();
+                       oldOuterLayout = outerForm.getWeights();
+                       innerForm.setWeights(innerMaxWeight);
+                       outerForm.setWeights(outerMaxWeight);
+               } else {
+                       innerForm.setWeights(oldInnerLayout);
+                       outerForm.setWeights(oldOuterLayout);
+               }
+       }
 }
index 7c8d400..497ca65 100644 (file)
@@ -46,6 +46,8 @@ public class ThreadAPIListView extends DAView {
 
        public static final String ID = ThreadAPIListView.class.getName();
        private String lastSelectionKey = null;
+       int[] innerMaxWeight = { 0, 100 };
+       int[] outerMaxWeight = { 100, 0 };
 
        private String[] columnNames = {
                        ThreadPageLabels.THREAD_API_LIST_VIEW_INDEX,
@@ -80,7 +82,8 @@ public class ThreadAPIListView extends DAView {
 
                ViewContainer viewContainer = new ViewContainer(this, true);
                viewContainer.setTitleText(ThreadPageLabels.THREAD_API_LIST_VEIW_TITLE);
-
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
+               
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.WINDOW_BG_COLOR);
                contents.setLayout(new FillLayout());
index 9582ec0..e4d1247 100644 (file)
@@ -36,6 +36,9 @@ public class ThreadDetailInfoView extends DAView {
        private long totalUseTime = 0;
        private int apiCount = 0;
        private int failedApiCount = 0;
+       
+       int[] innerMaxWeight = { 0, 100 };
+       int[] outerMaxWeight = { 0, 100 };
 
        private void init() {
                fileName = AnalyzerLabels.EMPTY_STRING;
@@ -55,7 +58,8 @@ public class ThreadDetailInfoView extends DAView {
 
                ViewContainer viewContainer = new ViewContainer(this, true);
                viewContainer.setTitleText(ThreadPageLabels.THREAD_DETAILS_TITLE);
-
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
+               
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.VIEW_BG_COLOR);
                contents.setLayout(new FillLayout());
index 460a96a..0d6a0ff 100644 (file)
@@ -61,6 +61,8 @@ public class CallTraceView extends DAView {
                        AnalyzerConstants.SORT_TYPE_STRING };
        int[] sourceColumns = { LogCenterConstants.TIME_INDEX,
                        LogCenterConstants.APINAME_INDEX };
+       int[] innerMaxWeight = {0, 100};
+       int[] outerMaxWeight = {0, 100};
 
        public CallTraceView(Composite parent, int style) {
                super(parent, style);
@@ -74,13 +76,15 @@ public class CallTraceView extends DAView {
                contents.setLayout(new FillLayout());
                tableComp = new CallTraceTable(contents, SWT.NONE, SWT.MULTI
                                | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
-               tableComp.setTableName("Calltrace");  // test
+               tableComp.setTableName("Calltrace"); // test
                tableComp.setComparator(new TableComparator());
                tableComp.setSortTypes(sortTypes);
                tableComp.setSourceColumns(sourceColumns);
                tableComp.setColumns(columnNames);
                tableComp.setColumnSize(columnSizes);
                tableComp.setColumnVisibility(columnVisibility);
+               
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
        }
 
        @Override
@@ -166,4 +170,6 @@ public class CallTraceView extends DAView {
                        }
                }
        }
+
+
 }
index 2c3b887..d008eb3 100755 (executable)
@@ -52,6 +52,7 @@ import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.common.DesignConstants;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
 import org.tizen.dynamicanalyzer.handlers.ReplayTraceHandler;
+import org.tizen.dynamicanalyzer.logparser.MessageProcess;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.project.AppDesktopInfo;
 import org.tizen.dynamicanalyzer.project.Project;
@@ -104,7 +105,6 @@ public class ToolbarArea {
        private static final int TAB_FILE = 2;
        private static final int TAB_THREAD = 3; // FIXME
        private static final int TAB_UI = 4; // FIXME
-               
 
        private Cursor cursor;
 
@@ -114,7 +114,7 @@ public class ToolbarArea {
 
        public static boolean bThreadPageWork = false; // FIXME
        public static boolean bUIPageWork = false; // FIXME
-       
+
        public static final int TOOLBAR_STATE_RECORDING = 0;
        public static final int TOOLBAR_STATE_READY = 1;
 
@@ -221,13 +221,6 @@ public class ToolbarArea {
 
                createToolbar(toolbarComposite);
 
-               // Creates coolbar bottom line.
-//             Composite lineComposite = new Composite(baseComposite, SWT.NONE);
-//             lineComposite.setLayout(new FormLayout());
-//             lineComposite.setBackground(ColorResources.BLACK);
-
-//             createPageBar(lineComposite);
-               // Sets layout data.
                Control page = configurer.createPageComposite(baseComposite);
 
                FormData data = new FormData();
@@ -237,12 +230,6 @@ public class ToolbarArea {
                data.height = 38;
                toolbarComposite.setLayoutData(data);
 
-//             data = new FormData();
-//             data.top = new FormAttachment(toolbarComposite, 0, SWT.BOTTOM);
-//             data.left = new FormAttachment(0, 0);
-//             data.right = new FormAttachment(100, 0);
-//             lineComposite.setLayoutData(data);
-
                data = new FormData();
                data.top = new FormAttachment(toolbarComposite, 0, SWT.BOTTOM);
                data.left = new FormAttachment(0, 0);
@@ -431,7 +418,16 @@ public class ToolbarArea {
                                .addClickListener(new DACustomButtonClickEventListener() {
                                        @Override
                                        public void handleClickEvent(DACustomButton button) {
-                                               
+
+                                               String[] testLogs = {
+                                                               "5|7`,1002`,snapshot1`,5997316521`,5383`,5383`,testLog, 1, 0`,17`,0`,0`,1`",
+                                                               "5|7`,1003`,snapshot2`,5997316521`,5383`,5383`,testLog, 1, 0`,17`,0`,0`,1`"};
+
+                                               for (int i = 0; i < testLogs.length; i++) {
+                                                       MessageProcess.getInstance().processMessage(
+                                                                       testLogs[i]);
+                                               }
+
                                                // TODO : use for test code...
                                                // System.out.println(SymbolNameDemangler
                                                // .nameDemangle("_ZN3Osp4Base7Runtime14IEventListenerC1Ev"));
@@ -442,10 +438,13 @@ public class ToolbarArea {
                                                // } else {
                                                // AnalyzerManager.setTheme(DAThemeWhite.getInstance());
                                                // }
-//                                             BaseView view = (BaseView) AnalyzerUtil.getView(BaseView.ID);
-//                                             FilePage filePage = new FilePage(view.getMainTab().getContentComposite(),
-//                                                             SWT.NONE);
-//                                             view.getMainTab().addView(filePage, AnalyzerLabels.COOLBAR_AREA_FILE);
+                                               // BaseView view = (BaseView)
+                                               // AnalyzerUtil.getView(BaseView.ID);
+                                               // FilePage filePage = new
+                                               // FilePage(view.getMainTab().getContentComposite(),
+                                               // SWT.NONE);
+                                               // view.getMainTab().addView(filePage,
+                                               // AnalyzerLabels.COOLBAR_AREA_FILE);
                                        }
                                });
        }
@@ -658,7 +657,6 @@ public class ToolbarArea {
                addToolbarListeners();
        }
 
-
        // tab, set selection
 
        public void setSelectionTab(int nTab) {
@@ -861,7 +859,7 @@ public class ToolbarArea {
        public DACustomButton getThreadButton() {
                return pageTab.get(TAB_THREAD);
        }
-       
+
        public DACustomButton getUIButton() {
                return pageTab.get(TAB_UI);
        }
@@ -887,7 +885,7 @@ public class ToolbarArea {
                        }
                });
        }
-       
+
        public void setSourceViewState(final boolean enabled) {
                Display.getDefault().syncExec(new Runnable() {
                        @Override
index baf0758..65ff5f2 100644 (file)
@@ -16,6 +16,9 @@ public class UserInterfaceControlListView extends DAView {
 
        public static final String ID = FileApiListView.class.getName();
 
+       int[] innerMaxWeight = { 100, 0, 0 };
+       int[] outerMaxWeight = { 100, 0 };
+       
        private String[] columnNames = { UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_INDEX,
                        UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_TIME,
                        UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_2,
@@ -41,7 +44,8 @@ public class UserInterfaceControlListView extends DAView {
 
                ViewContainer viewContainer = new ViewContainer(this, true);
                viewContainer.setTitleText(UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_NAME);
-
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
+               
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.WINDOW_BG_COLOR);
                contents.setLayout(new FillLayout());
index 40a5bfe..9e3d5a2 100644 (file)
@@ -16,7 +16,9 @@ import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
 public class UserInterfaceFormBasedLeakListView extends DAView {
 
        public static final String ID = FileApiListView.class.getName();
-
+       int[] innerMaxWeight = { 0, 100 };
+       int[] outerMaxWeight = { 0, 100 };
+       
        private String[] columnNames = { UserInterfacePageLabels.USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_0,
                        UserInterfacePageLabels.USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_1,
                        UserInterfacePageLabels.USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_2,
@@ -34,7 +36,8 @@ public class UserInterfaceFormBasedLeakListView extends DAView {
 
                ViewContainer viewContainer = new ViewContainer(this, true);
                viewContainer.setTitleText(UserInterfacePageLabels.USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_NAME);
-
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
+               
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.WINDOW_BG_COLOR);
                contents.setLayout(new FillLayout());
index cc72494..5a1cbe9 100644 (file)
@@ -26,7 +26,6 @@
 
 package org.tizen.dynamicanalyzer.ui.userinterface;
 
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
@@ -42,38 +41,43 @@ import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
 public class UserInterfaceFunctionProfilingView extends DAView {
 
        public static final String ID = FileApiListView.class.getName();
+       int[] innerMaxWeight = { 100, 0 };
+       int[] outerMaxWeight = { 0, 100 };
 
-       private String[] columnNames = { UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_0,
+       private String[] columnNames = {
+                       UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_0,
                        UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_1,
                        UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_2,
                        UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_3,
                        UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_4,
-                       UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_5
-                       };
+                       UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_5 };
        private int[] columnSizes = { 200, 0, 0, 0, 0, 0 };
        UserInterfaceFunctionProfilingTable treeComp = null;
        private boolean[] columnVisibility = { true, true, true, true, true, true };
        int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NONE,
-                       AnalyzerConstants.SORT_TYPE_NUM,
                        AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
-                       AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM };
+                       AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
+                       AnalyzerConstants.SORT_TYPE_NUM };
        int[] sourceColumns = { ProfilingData.NAME_INDEX,
                        ProfilingData.EXCOUNT_INDEX, ProfilingData.EXCOUNT_INDEX,
                        ProfilingData.INCOUNT_INDEX, ProfilingData.INCOUNT_INDEX,
-                       ProfilingData.CALLCOUNT_INDEX};
-       
+                       ProfilingData.CALLCOUNT_INDEX };
+
        public UserInterfaceFunctionProfilingView(Composite parent, int style) {
                super(parent, style);
                this.setLayout(new FillLayout());
 
                ViewContainer viewContainer = new ViewContainer(this, true);
-               viewContainer.setTitleText(UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME);
+               viewContainer
+                               .setTitleText(UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME);
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
 
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.WINDOW_BG_COLOR);
                contents.setLayout(new FillLayout());
-               treeComp = new UserInterfaceFunctionProfilingTable(contents, SWT.NONE, SWT.SINGLE
-                               | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
+               treeComp = new UserInterfaceFunctionProfilingTable(contents, SWT.NONE,
+                               SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL
+                                               | SWT.V_SCROLL);
                /*** setTree set first!!! ***/
                treeComp.setTree(true);
                treeComp.setSortTypes(sortTypes);
index 10496c5..437ea28 100644 (file)
@@ -17,7 +17,11 @@ public class UserInterfaceSceneTransformListView extends DAView {
 
        public static final String ID = FileApiListView.class.getName();
 
-       private String[] columnNames = { UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_INDEX,
+       int[] innerMaxWeight = { 0, 100, 0 };
+       int[] outerMaxWeight = { 100, 0 };
+
+       private String[] columnNames = {
+                       UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_INDEX,
                        UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_TIME,
                        UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_2,
                        UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_3,
@@ -33,7 +37,9 @@ public class UserInterfaceSceneTransformListView extends DAView {
                this.setLayout(new FillLayout());
 
                ViewContainer viewContainer = new ViewContainer(this, true);
-               viewContainer.setTitleText(UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_NAME);
+               viewContainer
+                               .setTitleText(UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_NAME);
+               setMaxWeight(innerMaxWeight, outerMaxWeight);
 
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.WINDOW_BG_COLOR);
@@ -48,11 +54,13 @@ public class UserInterfaceSceneTransformListView extends DAView {
        public void updateView(DASelectionData data) {
                tableComp.updateTable();
        }
+
        @Override
        public void updateView() {
                tableComp.updateTable();
-       
+
        }
+
        @Override
        public Control getControl() {
                return tableComp;
index 38e17bd..d63031d 100644 (file)
@@ -42,6 +42,7 @@ import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;\r
 import org.tizen.dynamicanalyzer.common.CommonConstants;\r
 import org.tizen.dynamicanalyzer.common.DesignConstants;\r
+import org.tizen.dynamicanalyzer.model.DAView;\r
 import org.tizen.dynamicanalyzer.resources.ColorResources;\r
 import org.tizen.dynamicanalyzer.resources.FontResources;\r
 \r
@@ -52,11 +53,13 @@ public class ViewContainer {
        private String title = CommonConstants.EMPTY;\r
        private Color titleFontColor = ColorResources.VIEW_TITLE_FONT_COLOR;\r
        private static final int OFFSET = 5;\r
+       private Composite parent = null;\r
+       private boolean isMaximized = false;\r
 \r
        public ViewContainer(Composite parent, boolean titleVisibility) {\r
                final Composite composite = new Composite(parent, SWT.NONE);\r
                composite.setLayout(new FormLayout());\r
-\r
+               this.parent = parent;\r
                // Creates title bar.\r
                titleBar = new Canvas(composite, SWT.DOUBLE_BUFFERED);\r
                titleBar.addPaintListener(titlePaintListener);\r
@@ -124,12 +127,18 @@ public class ViewContainer {
 \r
                        Rectangle bounds = titleBar.getBounds();\r
                        int width = bounds.width;\r
-                       int height = bounds.height;\r
+                       int height = bounds.height - 2;\r
 \r
                        // Draws background.\r
-                       gc.setForeground(ColorResources.BUTTON_NORMAL_COLOR_START);\r
-                       gc.setBackground(ColorResources.BUTTON_NORMAL_COLOR_END);\r
+                       gc.setForeground(ColorResources.TITLEBAR_START_COLOR);\r
+                       gc.setBackground(ColorResources.TITLEBAR_END_COLOR);\r
                        gc.fillGradientRectangle(bounds.x, bounds.y, width, height, true);\r
+                       gc.setForeground(ColorResources.TITLEBAR_BOTTOM_STROKE_1);\r
+                       gc.drawLine(bounds.x, bounds.y + height + 1, bounds.x + width,\r
+                                       bounds.y + height + 1);\r
+                       gc.setForeground(ColorResources.TITLEBAR_BOTTOM_STROKE_2);\r
+                       gc.drawLine(bounds.x, bounds.y + height + 2, bounds.x + width,\r
+                                       bounds.y + height + 2);\r
 \r
                        // Draws text.\r
                        Point textSize = gc.textExtent(title, SWT.DRAW_MNEMONIC);\r
@@ -144,7 +153,11 @@ public class ViewContainer {
 \r
                @Override\r
                public void handleEvent(Event event) {\r
-\r
+                       if (parent instanceof DAView) {\r
+                               isMaximized = !isMaximized;\r
+                               ((DAView) parent).setMaxSize(isMaximized);\r
+                       }\r
                }\r
        };\r
+\r
 }\r
index a24b139..5ad8021 100644 (file)
Binary files a/org.tizen.dynamicanalyzer/theme/black/img/empty_snapshot.png and b/org.tizen.dynamicanalyzer/theme/black/img/empty_snapshot.png differ
index a24b139..5ad8021 100644 (file)
Binary files a/org.tizen.dynamicanalyzer/theme/white/img/empty_snapshot.png and b/org.tizen.dynamicanalyzer/theme/white/img/empty_snapshot.png differ