Setting : add image and Resource data 91/27191/1
authorheeyoung <heeyoung1008.hwang@samsung.com>
Sun, 7 Sep 2014 04:57:15 +0000 (13:57 +0900)
committerheeyoung <heeyoung1008.hwang@samsung.com>
Sun, 7 Sep 2014 04:57:15 +0000 (13:57 +0900)
Change-Id: I31cda63be3e3124dce7d614d5d2ce29536ea0802
Signed-off-by: heeyoung <heeyoung1008.hwang@samsung.com>
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/src/org/tizen/dynamicanalyzer/widgets/da/base/DAText.java
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_custom.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/toggle/DACustomToggleButtonRenderer.java

index f923fcc..967ff0a 100755 (executable)
@@ -533,16 +533,12 @@ public class ColorResources {
        \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_CONTENTS_NORMAL_ODD = getColor("setting_table_contents_normal_odd"); //$NON-NLS-1$\r
+       public static Color SETTING_TABLE_CONTENTS_NORMAL_EVEN = getColor("setting_table_contents_normal_even"); //$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 = getColor("setting_table_contents_selected"); //$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
index 0960560..3a7d899 100644 (file)
@@ -202,8 +202,8 @@ public class FontResources {
                        "time_tick", resizeDefaultFont(8, 3));//$NON-NLS-1$\r
        public static final Font TIMELINE_BALLOON_FONT = getFont(\r
                        "time_balloon", resizeDefaultFont(8, 3));//$NON-NLS-1$\r
-\r
-       // setting\r
+       \r
+       // * seting\r
        public static final Font SETTING_BUTTON_FONT = getFont(\r
                        "setting_button_font", resizeDefaultFont(8, 3));//$NON-NLS-1$\r
        \r
index 8dd17d8..0f51ad9 100644 (file)
@@ -443,6 +443,7 @@ public class ImageResources {
        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
+       public static final Image TEMPLATE_CUSTOM = getPngImage("feature_template_custom"); //$NON-NLS-1$\r
 \r
        \r
        private static Image getImage(String pluginId, String folderName,\r
index 6b77f9c..316a960 100644 (file)
@@ -540,16 +540,13 @@ public class DAThemeWhite extends DATheme {
 
                /** 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_normal_odd", new RGB(255, 255, 255)); //$NON-NLS-1$
+               setColor("setting_table_contents_normal_even", new RGB(240, 240, 240)); //$NON-NLS-1$
+               setColor("setting_table_contents_hover", new RGB(197, 231, 235)); //$NON-NLS-1$
+               setColor("setting_table_contents_selected", 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 **/
        }
 
index c81c035..5e6585e 100644 (file)
@@ -6,6 +6,7 @@ import org.eclipse.swt.events.FocusListener;
 import org.eclipse.swt.events.PaintEvent;
 import org.eclipse.swt.events.PaintListener;
 import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.widgets.Composite;
@@ -107,4 +108,8 @@ public class DAText {
        public void setForeground(Color color) {
                this.text.setForeground(color);
        }
+       
+       public void setFont(Font font) {
+               this.text.setFont(font);
+       }
 }
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_custom.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_custom.png
new file mode 100644 (file)
index 0000000..cd894a4
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_custom.png differ
index 2c628f8..ea3eff1 100644 (file)
@@ -28,6 +28,7 @@
 package org.tizen.dynamicanalyzer.widgets.button.toggle;
 
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.Image;
@@ -61,6 +62,44 @@ public class DACustomToggleButtonRenderer extends DACustomButtonRenderer {
                }
        }
 
+       protected void drawButton(GC gc, Rectangle rect, int state,
+                       DACustomButtonAttribute attr) {
+               if (attr.getDrawType() == DACustomButton.TYPE_COLOR) {
+                       gc.setBackground(attr.getColor(state));
+                       gc.fillRectangle(rect);
+               } else {
+                       int index = state * 2;
+                       gc.setForeground(attr.getColor(index));
+                       gc.setBackground(attr.getColor(index + 1));
+                       gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height,
+                                       true);
+               }
+
+               Rectangle r = new Rectangle(0, 0, rect.width - 1, rect.height - 1);
+//             if (attr.getButtonImage() == null) {
+                       drawButtonText(gc, r, attr, state);
+//             }
+                       
+               // draw outline
+               Color c = gc.getForeground();
+               if (null != attr.getOutlineColor(state)) {
+                       gc.setForeground(attr.getOutlineColor(state));
+                       gc.drawRectangle(r);
+//             } else {
+//                     gc.setForeground(ColorResources.BLACK);
+               }
+               Rectangle ir = new Rectangle(r.x + 1, r.y + 1, r.width - 2,
+                               r.height - 2);
+               if (null != attr.getOutlineInColor(state)) {
+                       gc.setForeground(attr.getOutlineInColor(state));
+                       gc.drawRectangle(ir);
+//             } else {
+//                     gc.setForeground(c);
+//                     return;
+               }
+               gc.setForeground(c);
+       }
+       
        private void drawButtonToggleImage(GC gc, Rectangle rect,
                        int state, DACustomButtonAttribute attr) {
                Point p = null;