Setting : add image and Resource data 91/27091/1
authorheeyoung <heeyoung1008.hwang@samsung.com>
Thu, 4 Sep 2014 09:33:05 +0000 (18:33 +0900)
committerheeyoung <heeyoung1008.hwang@samsung.com>
Thu, 4 Sep 2014 09:33:05 +0000 (18:33 +0900)
Change-Id: Id6edf999696c1de2b9c85a0fac5ab085ecd10a52
Signed-off-by: heeyoung <heeyoung1008.hwang@samsung.com>
17 files changed:
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/resources/ColorResources.java
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/resources/FontResources.java
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/resources/ImageResources.java
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/theme/DAThemeWhite.java
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_target_mobile.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_target_tv.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_bottleneck.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_energy.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_file.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_memoryleaks.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_network.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_opengl.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_processactivity.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_threadactivity.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_waitstatus.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButton.java
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/toggle/DACustomToggleButtonRenderer.java

index 4fb6456..f923fcc 100755 (executable)
@@ -515,6 +515,37 @@ public class ColorResources {
        public static Color EXPLORER_CELL_BG = getColor("explorer_cell_bg_color"); //$NON-NLS-1$\r
        public static Color EXPLORER_CELL_LINE = getColor("explorer_cell_line_color"); //$NON-NLS-1$\r
 \r
+       // setting\r
+       public static Color SETTING_STROKE = getColor("setting_stroke"); //$NON-NLS-1$\r
+       public static Color SETTING_SUNKEN_LINE_1 = getColor("setting_sunken_line_1"); //$NON-NLS-1$\r
+       public static Color SETTING_SUNKEN_LINE_2 = getColor("setting_sunken_line_2"); //$NON-NLS-1$\r
+       public static Color SETTING_TITLE_BACKGROUND = getColor("setting_title_background"); //$NON-NLS-1$\r
+       \r
+       public static Color SETTING_BUTTON_NORMAL_COLOR = getColor("setting_button_normal_color"); //$NON-NLS-1$\r
+       public static Color SETTING_BUTTON_HOVER_COLOR = getColor("setting_button_hover_color"); //$NON-NLS-1$\r
+       public static Color SETTING_BUTTON_PUSH_COLOR = getColor("setting_button_push_color"); //$NON-NLS-1$\r
+       public static Color SETTING_BUTTON_DISABLE_COLOR = getColor("setting_button_disable_color"); //$NON-NLS-1$\r
+       public static Color SETTING_BUTTON_TOGGLE_NORMAL_COLOR = getColor("setting_button_toggle_normal_color"); //$NON-NLS-1$\r
+       public static Color SETTING_BUTTON_TOGGLE_HOVER_COLOR = getColor("setting_button_toggle_hover_color"); //$NON-NLS-1$\r
+       public static Color SETTING_BUTTON_TOGGLE_PUSH_COLOR = getColor("setting_button_toggle_push_color"); //$NON-NLS-1$\r
+\r
+       public static Color SETTING_COLOR = getColor("setting_font_color");//$NON-NLS-1$\r
+       \r
+       /** setting table colors start **/\r
+       public static Color SETTING_TABLE_HEADER_BG = getColor("setting_table_header_bg"); //$NON-NLS-1$\r
+//     public static Color SETTING_TABLE_LINE = getColor("setting_table_line"); //$NON-NLS-1$\r
+//     public static Color SETTING_TABLE_CONTENTS_NORMAL = getColor("setting_table_contents_normal"); //$NON-NLS-1$\r
+//     public static Color SETTING_TABLE_CONTENTS_HOVER = getColor("setting_table_contents_hover"); //$NON-NLS-1$\r
+       public static Color SETTING_TABLE_CONTENTS_SELECTED_START = getColor("setting_table_contents_selected_start"); //$NON-NLS-1$\r
+       public static Color SETTING_TABLE_CONTENTS_SELECTED_END = getColor("setting_table_contents_selected_end"); //$NON-NLS-1$\r
+       public static Color SETTING_TABLE_CONTENTS_SELECTED_FONT_COLOR = getColor("setting_table_contents_selected_font_color"); //$NON-NLS-1$\r
+       public static Color SETTING_TABLE_HEADER_FONT_COLOR = getColor("setting_table_title_font_color"); //$NON-NLS-1$\r
+       public static Color SETTING_TABLE_CONTENTS_FONT_COLOR = getColor("setting_table_contents_font_color"); //$NON-NLS-1$\r
+//     public static Color SETTING_TABLE_CONTENTS_FAILED_BACGOUND_COLOR = getColor("setting_table_contents_failed_bacgound_color"); //$NON-NLS-1$\r
+//     public static Color SETTING_TABLE_CONTENTS_FAILED_FONT_COLOR = getColor("setting_table_contents_failed_font_color"); //$NON-NLS-1$\r
+       /** setting table colors end **/\r
+\r
+       \r
        // public static void initColors() {\r
        //              WINDOW_BG_COLOR = getColor("window_bg_color"); //$NON-NLS-1$\r
        //\r
index 0619d39..0960560 100644 (file)
@@ -203,6 +203,17 @@ public class FontResources {
        public static final Font TIMELINE_BALLOON_FONT = getFont(\r
                        "time_balloon", resizeDefaultFont(8, 3));//$NON-NLS-1$\r
 \r
+       // setting\r
+       public static final Font SETTING_BUTTON_FONT = getFont(\r
+                       "setting_button_font", resizeDefaultFont(8, 3));//$NON-NLS-1$\r
+       \r
+       public static final Font SETTING_TITLE_FONT = getFont(\r
+                       "setting_title_font", resizeDefaultFont(9, 3));//$NON-NLS-1$\r
+       \r
+       public static final Font SETTING_DESCRIPTION_FONT = getFont(\r
+                       "setting_description_font", resizeDefaultFont(8, 3));//$NON-NLS-1$\r
+       // mac 11\r
+       \r
        private static Font getFont(String fontName, FontData[] fontData) {\r
                if (!fontRegistry.hasValueFor(fontName)) {\r
                        fontRegistry.put(fontName, fontData);\r
index 69f6d97..8dd17d8 100644 (file)
@@ -430,6 +430,21 @@ public class ImageResources {
        public static final Image SCREEN_SHOT_HOVER = getPngImage("toolbar_screen_shot_hover"); //$NON-NLS-1$\r
        public static final Image SCREEN_SHOT_DISABLE = getPngImage("toolbar_screen_shot_disable"); //$NON-NLS-1$\r
        \r
+       /* setting */\r
+       public static final Image TARGET_MOBILE_2_3 = getPngImage("feature_target_tv"); //$NON-NLS-1$\r
+       public static final Image TARGET_TV = getPngImage("feature_target_mobile"); //$NON-NLS-1$\r
+       \r
+       public static final Image TEMPLATE_BOTTLENECK_ANALYSIS = getPngImage("feature_template_bottleneck"); //$NON-NLS-1$\r
+       public static final Image TEMPLATE_MEMORY_LEAK = getPngImage("feature_template_memoryleaks"); //$NON-NLS-1$\r
+       public static final Image TEMPLATE_PROCESS_ACTIVITY = getPngImage("feature_template_processactivity"); //$NON-NLS-1$\r
+       public static final Image TEMPLATE_FILE_ANALYSIS = getPngImage("feature_template_file"); //$NON-NLS-1$\r
+       public static final Image TEMPLATE_THREAD_ACTIVITY_ANALYSIS = getPngImage("feature_template_threadactivity"); //$NON-NLS-1$\r
+       public static final Image TEMPLATE_WAIT_STATUS_ANALYSIS = getPngImage("feature_template_waitstatus"); //$NON-NLS-1$\r
+       public static final Image TEMPLATE_NETWORK_ANALYSIS = getPngImage("feature_template_network"); //$NON-NLS-1$\r
+       public static final Image TEMPLATE_OPEN_GL_ANALYSIS = getPngImage("feature_template_opengl"); //$NON-NLS-1$\r
+       public static final Image TEMPLATE_ENERGY = getPngImage("feature_template_energy"); //$NON-NLS-1$\r
+\r
+       \r
        private static Image getImage(String pluginId, String folderName,\r
                        String imageName, String extension) {\r
                if (null == imageRegistry.get(imageName)\r
index 08276a1..6b77f9c 100644 (file)
@@ -520,6 +520,37 @@ public class DAThemeWhite extends DATheme {
                setColor("explorer_select_end_color", new RGB(109, 219, 255)); //$NON-NLS-1$
                setColor("explorer_cell_bg_color", new RGB(250, 250, 250)); //$NON-NLS-1$
                setColor("explorer_cell_line_color", new RGB(186, 186, 186)); //$NON-NLS-1$
+               
+               
+               /*** setting ***/
+               setColor("setting_stroke", new RGB(186, 186, 186)); //$NON-NLS-1$
+               setColor("setting_sunken_line_1", new RGB(160, 160, 160)); //$NON-NLS-1$
+               setColor("setting_sunken_line_2", new RGB(255, 255, 255)); //$NON-NLS-1$
+               setColor("setting_title_background", new RGB(235, 252, 254)); //$NON-NLS-1$
+               
+               setColor("setting_button_normal_color", new RGB(255, 255, 255)); //$NON-NLS-1$
+               setColor("setting_button_hover_color", new RGB(197, 231, 235)); //$NON-NLS-1$
+               setColor("setting_button_push_color", new RGB(197, 231, 235)); //$NON-NLS-1$
+               setColor("setting_button_disable_color", new RGB(255, 255, 255)); //$NON-NLS-1$
+               setColor("setting_button_toggle_normal_color", new RGB(117, 223, 235)); //$NON-NLS-1$
+               setColor("setting_button_toggle_hover_color", new RGB(197, 231, 235)); //$NON-NLS-1$
+               setColor("setting_button_toggle_push_color", new RGB(197, 231, 235)); //$NON-NLS-1$
+
+               setColor("setting_font_color", new RGB(80, 80, 80)); //$NON-NLS-1$
+
+               /** setting table colors start **/
+               setColor("setting_table_header_bg", new RGB(235, 252, 254)); //$NON-NLS-1$
+//             setColor("setting_table_line", new RGB(186, 186, 186)); //$NON-NLS-1$
+//             setColor("setting_table_contents_normal", new RGB(255, 255, 255)); //$NON-NLS-1$
+//             setColor("setting_table_contents_hover", new RGB(236, 235, 248)); //$NON-NLS-1$
+               setColor("setting_table_contents_selected_start", new RGB(117, 223, 235)); //$NON-NLS-1$
+               setColor("setting_table_contents_selected_end", new RGB(117, 223, 235)); //$NON-NLS-1$
+               setColor("setting_table_contents_selected_font_color", new RGB(80, 80, 80)); //$NON-NLS-1$
+               setColor("setting_table_title_font_color", new RGB(0, 0, 0)); //$NON-NLS-1$
+               setColor("setting_table_contents_font_color", new RGB(80, 80, 80)); //$NON-NLS-1$
+//             setColor("setting_table_contents_failed_bacgound_color", new RGB(244, 199, 197)); //$NON-NLS-1$
+//             setColor("setting_table_contents_failed_font_color", new RGB(212, 75, 69)); //$NON-NLS-1$
+               /** setting table colors end **/
        }
 
        public Color getColor(String colorName, RGB rgb) {
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_target_mobile.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_target_mobile.png
new file mode 100644 (file)
index 0000000..cc814af
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_target_mobile.png differ
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_target_tv.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_target_tv.png
new file mode 100644 (file)
index 0000000..ee9f96b
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_target_tv.png differ
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_bottleneck.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_bottleneck.png
new file mode 100644 (file)
index 0000000..afd169a
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_bottleneck.png differ
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_energy.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_energy.png
new file mode 100644 (file)
index 0000000..3a70959
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_energy.png differ
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_file.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_file.png
new file mode 100644 (file)
index 0000000..a09b1af
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_file.png differ
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_memoryleaks.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_memoryleaks.png
new file mode 100644 (file)
index 0000000..db090b7
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_memoryleaks.png differ
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_network.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_network.png
new file mode 100644 (file)
index 0000000..a8e61e1
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_network.png differ
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_opengl.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_opengl.png
new file mode 100644 (file)
index 0000000..df150e4
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_opengl.png differ
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_processactivity.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_processactivity.png
new file mode 100644 (file)
index 0000000..69b910f
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_processactivity.png differ
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_threadactivity.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_threadactivity.png
new file mode 100644 (file)
index 0000000..5e52d17
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_threadactivity.png differ
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_waitstatus.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_waitstatus.png
new file mode 100644 (file)
index 0000000..3d5b6f9
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_waitstatus.png differ
index e0f4f68..4c1e70d 100644 (file)
@@ -279,6 +279,15 @@ public class DACustomButton extends Canvas {
        }
 
        /**
+        * Gets the text of button <br>
+        * 
+        * @return  the text on the button
+        */
+       public String getText() {
+               return attr.getText();
+       }
+       
+       /**
         * Sets the icon of Icon button <br>
         * image button means background is image. <br>
         * icon button means image draws on text field or front of text
index 52f7ba1..2c628f8 100644 (file)
 
 package org.tizen.dynamicanalyzer.widgets.button.toggle;
 
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Display;
 import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonRenderer;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonAttribute;
+import org.tizen.dynamicanalyzer.widgets.helper.ColorResources;
 
 public class DACustomToggleButtonRenderer extends DACustomButtonRenderer {
        @Override
@@ -96,4 +100,80 @@ public class DACustomToggleButtonRenderer extends DACustomButtonRenderer {
                }
                
        }
+       
+       protected void drawButtonText(GC gc, Rectangle rect,
+                       DACustomButtonAttribute attr, int state) {
+               String text = null;
+               Font font = null;
+               Point p = null;
+
+               Rectangle textRect = new Rectangle(rect.x, rect.y, rect.width,
+                               rect.height);
+               if (null != attr.getIcon()) {
+                       Rectangle iconRect = attr.getIcon().getBounds();
+                       textRect.x = textRect.x + iconRect.width;
+                       textRect.width = textRect.width - iconRect.width;
+               }
+
+               if (null != (text = attr.getText())) {
+                       // set Font
+                       if (null == (font = attr.getFont())) {
+                               font = new Font(Display.getCurrent(), "Arial", //$NON-NLS-1$
+                                               computeFontSize(textRect), SWT.NONE);
+                               attr.setFont(font);
+                       }
+                       gc.setFont(font);
+
+                       // set Font Point
+                       int x = 0, y = 0;
+                       int offset = 0;
+                       if (null == (p = attr.getFontPoint())) {
+                               p = gc.textExtent(text, SWT.DRAW_MNEMONIC);
+                               if (attr.getAlign() == SWT.CENTER) {
+                                       x = (textRect.width - p.x) / 2 + textRect.x;
+                                       x = (x < 0) ? 0 : x;
+                                       offset = -2;
+                               } else {
+                                       x = textRect.x;
+                                       offset = 2;
+                               }
+                               y = (textRect.height - p.y) / 2;
+                       } else {
+                               x = p.x;
+                               y = p.y;
+
+                               if (x < 0) {
+                                       p = gc.textExtent(text, SWT.DRAW_MNEMONIC);
+                                       if (attr.getAlign() == SWT.CENTER) {
+                                               x = (textRect.width - p.x) / 2 + textRect.x;
+                                               x = (x < 0) ? 0 : x;
+                                               offset = -2;
+                                       } else {
+                                               x = textRect.x;
+                                               offset = 2;
+                                       }
+                               }
+                               
+                               if (y < 0) {
+                                       p = gc.textExtent(text, SWT.DRAW_MNEMONIC);
+                                       y = p.y;
+                               }
+                       }
+
+                       // set Font Color
+                       if (null != attr.getFontColor(state)) {
+                               gc.setForeground(attr.getFontColor(state));
+                       } else {
+                               gc.setForeground(ColorResources.BLACK);
+                       }
+
+                       if (state == DACustomButton.STATE_PUSH) {
+                               x += 1;
+                               y += 1;
+                       }
+                       
+                       // draw string
+                       gc.drawString(text, x + offset, y, true);
+               }
+       }
 }