[SRADA-742] Apply #008aee tooltip outline
authorjoon.c.baek <joon.c.baek@samsung.com>
Wed, 15 Jun 2016 00:51:22 +0000 (09:51 +0900)
committerdongkyu6 lee <dongkyu6.lee@samsung.com>
Thu, 16 Jun 2016 06:16:44 +0000 (15:16 +0900)
Apply #008aee tooltip outline,
Replace round rectangle to rectangle.

Change-Id: I12035d4fd4f6523643efcdc0ba566273a2899ad8
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/ColorResources.java
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/tooltip/DACustomTooltip.java

index 97661c7..cbdb178 100644 (file)
@@ -3,7 +3,7 @@
  *\r
  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
  *\r
- * Contact: \r
+ * Contact:\r
  * Jungwook Ryu <jungwook.ryu@samsung.com>\r
  * Jooyoul Lee <jy.exe.lee@samsung.com>\r
  * Juyoung Kim <j0.kim@samsung.com>\r
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- * \r
+ *\r
  * Contributors:\r
  * - S-Core Co., Ltd\r
- * \r
+ *\r
  */\r
 package org.tizen.dynamicanalyzer.widgets.helper;\r
 \r
@@ -42,15 +42,15 @@ public class ColorResources {
        public static final Color YELLOW = getColor("yellow", new RGB(250, 210, 10)); //$NON-NLS-1$\r
        public static final Color DARK_YELLOW = getColor("dark_yellow", new RGB(219, 192, 10)); //$NON-NLS-1$\r
        public static final Color CHART_INFO = getColor("chart_info", new RGB(121, 121, 121));\r
-       \r
+\r
        public static final Color GRAY_130 = getColor("gray_130", new RGB(130, 130, 130));\r
        public static final Color GRAY_170 = getColor("gray_170", new RGB(170, 170, 170));\r
        public static final Color GRAY_210 = getColor("gray_210", new RGB(210, 210, 210));\r
        public static final Color GRAY_230 = getColor("gray_230", new RGB(230, 230, 230));\r
        public static final Color GRAY_245 = getColor("gray_245", new RGB(245, 245, 245));\r
-       \r
+\r
        public static final Color POINT = getColor("point", new RGB(0, 138, 238));\r
-       \r
+\r
        // scale widget //[UX] 05 Feature list\r
        public static Color SCALE_OUTLINE_COLOR = getColor(\r
                        "scale_outline_color", new RGB(177, 177, 177)); //$NON-NLS-1$\r
@@ -78,7 +78,7 @@ public class ColorResources {
                        "chart_size_toggle_hover_stroke", new RGB(47, 85, 92)); //$NON-NLS-1$\r
        public static Color CHART_SIZE_TOGGLE_PUSH_STROKE = getColor(\r
                        "chart_size_toggle_push_stroke", new RGB(168, 168, 168)); //$NON-NLS-1$\r
-       \r
+\r
        // timeline\r
        public static Color TIMELINE_NUMBER_COLOR = getColor(\r
                        "timeline_number", new RGB(92, 92, 92)); //$NON-NLS-1$\r
@@ -86,8 +86,8 @@ public class ColorResources {
                        "timeline_tick", new RGB(168, 168, 168)); //$NON-NLS-1$\r
        public static Color TIMELINE_BG_COLOR = getColor(\r
                        "timeline_bg", new RGB(252, 252, 252)); //$NON-NLS-1$\r
-       \r
-       // chart        \r
+\r
+       // chart\r
        public static Color CHART_BACKGROUND_NORMAL_TOP = getColor(\r
                        "chart_background_normal_top", new RGB(244, 249, 251));\r
        public static Color CHART_BACKGROUND_NORMAL_BOTTOM = getColor(\r
@@ -106,7 +106,7 @@ public class ColorResources {
                        "chart_name_parent_select_end", new RGB(129, 170, 186)); //$NON-NLS-1$\r
        public static Color CHART_NAME_ADD_INFO_TEXT = getColor(\r
                        "chart_name_add_info_text", new RGB(94, 94, 94)); //$NON-NLS-1$\r
-       \r
+\r
        public static Color CHART_NAME_CHILD_NORMAL_START = getColor(\r
                        "chart_name_child_normal_start", new RGB(153, 165, 169)); //$NON-NLS-1$\r
        public static Color CHART_NAME_CHILD_NORMAL_END = getColor(\r
@@ -125,7 +125,7 @@ public class ColorResources {
                        "screenshot_chart_selected_line", new RGB(59, 188, 232)); //$NON-NLS-1$\r
        public static Color SCREENSHOT_CHART_BORDER_LINE = getColor(\r
                        "screenshot_chart_border_line", new RGB(117, 117, 117)); //$NON-NLS-1$\r
-       \r
+\r
        public static Color SCREENSHOT_CHART_DOT = getColor(\r
                        "screenshot_chart_dot", new RGB(142, 142, 142));\r
 \r
@@ -139,29 +139,29 @@ public class ColorResources {
 \r
        public static Color CHART_SELECTION_RANGE = getColor(\r
                        "chart_selection_range", new RGB(23, 98, 132)); //$NON-NLS-1$\r
-       \r
+\r
        public static Color CHART_AXIS = getColor(\r
                        "chart_axis", new RGB(94, 144, 160)); //$NON-NLS-1$\r
-       \r
+\r
        public static Color CHART_TOOLTIP_BACKGROUND_BACKGROUND = getColor(\r
                        "chart_tooltip_background_background", new RGB(193, 193,\r
                                        193)); //$NON-NLS-1$\r
-       \r
+\r
        public static Color CHART_TOOLTIP_BACKGROUND = getColor(\r
                        "chart_tooltip_background", new RGB(204, 228, 247)); //$NON-NLS-1$\r
-       \r
+\r
        public static Color CHART_TOOLTIP_FOREGROUND = getColor(\r
                        "chart_tooltip_foreground", new RGB(240, 249, 255)); //$NON-NLS-1$\r
-       \r
+\r
        public static Color CHART_TOOLTIP_LINE = getColor(\r
                        "chart_tooltip_line", new RGB(0, 0, 0)); //$NON-NLS-1$\r
-       \r
+\r
        public static Color CHART_TOOLTIP_TEXT = getColor(\r
                        "chart_tooltip_text", new RGB(108, 108, 108)); //$NON-NLS-1$ [UX] 06 chart area - 1\r
-       \r
+\r
        public static Color CHART_TOOLTIP_TIME = getColor(\r
                        "chart_tooltip_time", new RGB(169, 169, 169)); //$NON-NLS-1$ [UX] 06 chart area - 2\r
-       \r
+\r
        public static Color CHART_TOOLTIP_TIME_NOW = getColor("chart_tooltip_time", new RGB(88, 88, 88));\r
 \r
        // tooltip for feature dialog\r
@@ -170,10 +170,10 @@ public class ColorResources {
        public static Color FEATURELIST_TOOLTIP_FOREGROUND = getColor(\r
                        "featurelist_tooltip_foreground", new RGB(244, 244, 244));\r
        public static Color FEATURELIST_TOOLTIP_LINE = getColor(\r
-                       "featurelist_tooltip_line", new RGB(88, 88, 88));\r
+                       "featurelist_tooltip_line", new RGB(0, 138, 248));\r
        public static Color FEATURELIST_TOOLTIP_TEXT = getColor(\r
                        "featurelist_tooltip_text", new RGB(88, 88, 88));\r
-       \r
+\r
        // chart auto series color\r
        public static Color CHART_SERIES_BLUE = getColor(\r
                        "chart_series_blue", new RGB(78, 129, 246)); //$NON-NLS-1$\r
index 6028731..f9b1b37 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Contact: 
+ * Contact:
  * Heeyoung Hwang <heeyoung1008.hwang@samsung.com>
  * Juyoung Kim <j0.kim@samsung.com>
  *
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * Contributors:
  * - S-Core Co., Ltd
- * 
+ *
  */
 
 package org.tizen.dynamicanalyzer.widgets.tooltip;
@@ -54,7 +54,7 @@ public abstract class DACustomTooltip {
        public static final int TOOLTIP_TEXT_MARGIN = 8;
        public static final int TOOLTIP_LOCATION_LEFT = 10;
        public static final int TOOLTIP_LOCATION_TOP = 20;
-       
+
        private int height = 0;
        private int width = 0;
        private Color backgroundColor = ColorResources.FEATURELIST_TOOLTIP_BACKGROUND;
@@ -62,14 +62,14 @@ public abstract class DACustomTooltip {
        private Color strokeColor = ColorResources.FEATURELIST_TOOLTIP_LINE;
        private Color fontColor = ColorResources.FEATURELIST_TOOLTIP_TEXT;
        private Font font = FontResources.TIMELINE_FONT;
-       
+
        protected Shell parent = null;
        protected Shell tooltipShell = null;
        protected Canvas tooltipCanvas = null;
        protected String selectedItem = null;
        protected List<String> tooltipMessage = new ArrayList<String>();
        protected boolean hidden = false;
-       
+
        public void openAndMove(Shell parent) {
                if (!tooltipMessage.isEmpty() && !hidden) {
                        if (null == tooltipShell) {
@@ -101,21 +101,21 @@ public abstract class DACustomTooltip {
                                        drawTooltip(e.gc);
                                }
                        });
-                                               
+
                        tooltipCanvas.addKeyListener(keyListener);
-                       
+
                        // tooltipShell open
                        tooltipShell.open();
                }
        }
-       
-       public void move() {            
+
+       public void move() {
                if (null != tooltipShell) {
                        // set size size and location
                        setTooltipShellSizeAndLocation();
                }
        }
-       
+
        public void close() {
                if (tooltipShell != null)
                        tooltipShell.setVisible(false);
@@ -127,7 +127,7 @@ public abstract class DACustomTooltip {
 
        public void setSeletedItem(String selectedItem) {
                this.selectedItem = selectedItem;
-               
+
                if (null != selectedItem) {
                        // update tooltip message
                        setTooltipMessage();
@@ -140,30 +140,29 @@ public abstract class DACustomTooltip {
                // draw background
                Rectangle rect = tooltipCanvas.getClientArea();
                gc.setAlpha(150);
-               gc.setForeground(foregroundColor);
                gc.setBackground(backgroundColor);
-               gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height, true);
-               
+               gc.fillRectangle(rect.x, rect.y, rect.width, rect.height);
+
                // draw stroke
                gc.setAlpha(255);
                gc.setForeground(strokeColor);
-               gc.drawRoundRectangle(rect.x, rect.y, rect.width-1, rect.height-1, 5, 5);
+               gc.drawRectangle(rect.x, rect.y, rect.width-1, rect.height-1);
 
                // draw text
                gc.setForeground(fontColor);
                gc.setFont(font);
                for (int i = 0; i < tooltipMessage.size(); i++) {
-                       gc.drawText(tooltipMessage.get(i), TOOLTIP_HEIGHT_MARGIN, 
-                                       TOOLTIP_HEIGHT_MARGIN + TOOLTIP_HEIGHT * i, 
+                       gc.drawText(tooltipMessage.get(i), TOOLTIP_HEIGHT_MARGIN,
+                                       TOOLTIP_HEIGHT_MARGIN + TOOLTIP_HEIGHT * i,
                                        SWT.DRAW_DELIMITER | SWT.DRAW_TRANSPARENT);
                }
        }
-       
+
        private void setTooltipShellSizeAndLocation() {
-               generateTooltipSize();                  
+               generateTooltipSize();
                Point p = Display.getCurrent().getCursorLocation();
                tooltipShell.setSize(width, height);
-               tooltipShell.setLocation(p.x + TOOLTIP_LOCATION_LEFT, 
+               tooltipShell.setLocation(p.x + TOOLTIP_LOCATION_LEFT,
                                p.y + TOOLTIP_LOCATION_TOP);
        }
 
@@ -180,7 +179,7 @@ public abstract class DACustomTooltip {
                        height = tooltipMessage.size() * TOOLTIP_TEXT_HEIGHT +
                                        (tooltipMessage.size() - 1) * TOOLTIP_TEXT_MARGIN +
                                        (TOOLTIP_HEIGHT_MARGIN * 2);
-                       
+
                        // set width
                        GC gc = new GC(parent.getDisplay(), SWT.NONE);
                        gc.setFont(font);
@@ -195,17 +194,17 @@ public abstract class DACustomTooltip {
                        gc.dispose();
                }
        }
-       
+
        private KeyListener keyListener = new KeyListener() {
 
                @Override
                public void keyReleased(KeyEvent e) {
                        // TODO Auto-generated method stub
                }
-               
+
                @Override
                public void keyPressed(KeyEvent e) {
-                       // TODO Auto-generated method stub                                      
+                       // TODO Auto-generated method stub
                }
        };