[Title] Cell renderer fixed
authorjooyoul_lee <jy.exe.lee@samsung.com>
Sun, 10 Nov 2013 04:39:59 +0000 (13:39 +0900)
committerjooyoul_lee <jy.exe.lee@samsung.com>
Sun, 10 Nov 2013 04:39:59 +0000 (13:39 +0900)
[Desc.]
[Issue]

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/platform/ui/FileExplorer/DAFileExplorerEmptyCellRenderer.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/platform/ui/FileExplorer/DAFileExplorerTableRenderer.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/table/DATableCellRenderer.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/table/DATableEmptyCellRenderer.java

index cd14c4d..1f40961 100644 (file)
@@ -17,43 +17,15 @@ public class DAFileExplorerEmptyCellRenderer extends DATableEmptyCellRenderer {
                        return;
                }
 
-               boolean drawBackground = true;
-
                if (isSelected()) {
                        gc.setForeground(ColorResources.TABLE_CONTENTS_SELECTED_START);
                        gc.setBackground(ColorResources.TABLE_CONTENTS_SELECTED_END);
                } else {
-                       if (table.isEnabled()) {
-                               drawBackground = false;
-                       } else {
-                               gc.setBackground(getDisplay().getSystemColor(
-                                               SWT.COLOR_WIDGET_BACKGROUND));
-                       }
+                       gc.setBackground(getDisplay().getSystemColor(
+                                       SWT.COLOR_WIDGET_BACKGROUND));
                        gc.setForeground(table.getForeground());
                }
 
-               if (drawBackground && isSelected()) {
-                       gc.fillGradientRectangle(getBounds().x, getBounds().y + 1,
-                                       getBounds().width, getBounds().height, true);
-               } else if (drawBackground) {
-                       gc.fillRectangle(getBounds().x, getBounds().y + 1,
-                                       getBounds().width, getBounds().height);
-               }
-
-//             if (table.getLinesVisible()) {
-//                     if (isCellSelected()) {
-//                             gc.setForeground(ColorResources.TABLE_LINE);
-//                     } else {
-//                             gc.setForeground(ColorResources.TABLE_LINE);
-//                     }
-//                     gc.drawLine(getBounds().x, getBounds().y + getBounds().height,
-//                                     getBounds().x + getBounds().width - 1, getBounds().y
-//                                                     + getBounds().height);
-//                     gc.drawLine(getBounds().x + getBounds().width - 1, getBounds().y,
-//                                     getBounds().x + getBounds().width - 1, getBounds().y
-//                                                     + getBounds().height);
-//             }
-
        }
 
 }
index 9e9dce7..023b71d 100644 (file)
@@ -18,6 +18,7 @@ import org.tizen.sdblib.service.FileEntry;
 public class DAFileExplorerTableRenderer extends DATableCellRenderer {
        @Override
        public void paint(GC gc, Object value) {
+               textTopMargin = 15;
                if (getColumn() != 1) {
                        return;
                }
index 58a1dbf..d05dacd 100644 (file)
@@ -44,7 +44,7 @@ public class DATableCellRenderer extends DefaultCellRenderer {
        protected int rightMargin = 4;
        protected int topMargin = 0;
        protected int bottomMargin = 0;
-       protected int textTopMargin = 15;
+       protected int textTopMargin = 1;
        protected int insideMargin = 3;
 
        protected DATableToggleRenderer toggleRenderer;
index 21bad2b..e5dd077 100644 (file)
@@ -59,13 +59,13 @@ public class DATableEmptyCellRenderer extends GridCellRenderer {
                        gc.setForeground(table.getForeground());
                }
 
-//             if (drawBackground && isSelected()) {
-//                     gc.fillGradientRectangle(getBounds().x, getBounds().y + 1,
-//                                     getBounds().width, getBounds().height, true);
-//             } else if (drawBackground) {
-//                     gc.fillRectangle(getBounds().x, getBounds().y + 1,
-//                                     getBounds().width, getBounds().height);
-//             }
+               if (drawBackground && isSelected()) {
+                       gc.fillGradientRectangle(getBounds().x, getBounds().y + 1,
+                                       getBounds().width, getBounds().height, true);
+               } else if (drawBackground) {
+                       gc.fillRectangle(getBounds().x, getBounds().y + 1,
+                                       getBounds().width, getBounds().height);
+               }
 
                if (table.getLinesVisible()) {
                        if (isCellSelected()) {