NSCREEN : nscreen features left align 25/21025/1
authorjooyoul_lee <jy.exe.lee@samsung.com>
Wed, 14 May 2014 13:26:50 +0000 (22:26 +0900)
committerjooyoul_lee <jy.exe.lee@samsung.com>
Wed, 14 May 2014 13:26:50 +0000 (22:26 +0900)
nscreen feature names and group names -> left align

Change-Id: I449e147d4f267bc3f2588c8a0493169b324664d3
Signed-off-by: jooyoul_lee <jy.exe.lee@samsung.com>
org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/nscreen/NScreenGroup.java
org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/nscreen/NScreenPage.java
org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/nscreen/NScreenSimpleRenderer.java

index d14471a..04eaa38 100644 (file)
@@ -40,6 +40,8 @@ public class NScreenGroup extends Composite {
     public static final int MIN_GROUP_ITEM_HEIGHT = 38;
     public static final int ITEM_TOP_MARGIN = 0;
     public static final int ITEM_W_MARGIN = 5;
+    
+    public static final int IMAGE_MARGIN = 50;
 
     private int height = MIN_GROUP_ITEM_HEIGHT;
     private NScreenType groupType;
@@ -93,7 +95,8 @@ public class NScreenGroup extends Composite {
 
             e.gc.setFont(FontUtil.NSCREEN_GROUP);
             Point textWH = FontUtil.getTextArea(buffer.toString(), e.gc);
-            int x = rect.x + (rect.width - textWH.x) / 2;
+//            int x = rect.x + (rect.width - textWH.x) / 2;
+            int x = rect.x + IMAGE_MARGIN;
             int y = rect.y + (GROUP_LABEL_HEIGHT - textWH.y) / 2;
 
             if (hasSelection()) {
index 0e816f4..b841b71 100644 (file)
@@ -51,7 +51,7 @@ import org.tizen.webuibuilder.ui.views.nscreen.model.NScreenPageModel;
  */
 public class NScreenPage extends Page {
     // private final int NSCREEN_TITLE_HEIGHT = 40;
-    private final int NSCREEN_MIN_WIDTH = 295;
+    private final int NSCREEN_MIN_WIDTH = 230;
     private final NScreenPageModel mNScreenPageModel;
     private NScreenBaseComposite mParentComposite;
 
index 00d1934..83a98cc 100644 (file)
@@ -20,6 +20,7 @@ import org.tizen.webuibuilder.model.nscreen.NScreenModel.NScreenType;
 
 public class NScreenSimpleRenderer implements INScreenDrawRenderer {
     private static int X_MARGIN = 10;
+    private static int IMAGE_MARGIN = 50;
 
     @Override
     public void draw(GC gc, Canvas canvas, int state, boolean isSelected, boolean isEnabled,
@@ -216,34 +217,35 @@ public class NScreenSimpleRenderer implements INScreenDrawRenderer {
         // int targetY = (canvas.getClientArea().height - IMAGE_SIZE) / 2;
         Rectangle rect = canvas.getClientArea();
         NScreenType type = model.getType();
-        if (type == NScreenType.COMMON || type == NScreenType.ORIENTATION
-                || type == NScreenType.PIXELRATIO) {
+//        if (type == NScreenType.COMMON || type == NScreenType.ORIENTATION
+//                || type == NScreenType.PIXELRATIO) {
             gc.setFont(getGroupFont(model));
             String content = model.getName();
             Point textWH = FontUtil.getTextArea(content, gc);
-            int x = rect.x + (rect.width - textWH.x) / 2;
+//            int x = rect.x + (rect.width - textWH.x) / 2;
+            int x = rect.x + IMAGE_MARGIN;
             int y = rect.y + (rect.height - textWH.y) / 2;
             gc.drawText(content, x, y, true);
-        } else if (type == NScreenType.RESOLUTION) {
-            gc.setFont(getGroupFont(model));
-            String content1 = model.getName();
-            // String content2 =
-            // NScreenUtil.getResolutionText(model.getDeviceWidth(), model.getDeviceHeight(),
-            // false)
-            // + "  "
-            // + NScreenUtil.getRatioText(model.getDeviceWidth(),
-            // model.getDeviceHeight(), true);
-            Point content1WH = FontUtil.getTextArea(content1, gc);
-            // Point content2WH = FontUtil.getTextArea(content2, gc);
-            int x1 = rect.x + (rect.width - content1WH.x) / 2;
-            // int x2 = rect.x + (rect.width - content2WH.x) / 2;
-            // int y1 = rect.y + (rect.height - content1WH.y - content2WH.y) / 2;
-            int y1 = rect.y + (rect.height - content1WH.y) / 2;
-            // int y2 = y1 + content1WH.y;
-            gc.drawText(content1, x1, y1, true);
-            // gc.drawText(content2, x2, y2, true);
-        } else {
-
-        }
+//        } else if (type == NScreenType.RESOLUTION) {
+//            gc.setFont(getGroupFont(model));
+//            String content1 = model.getName();
+//            // String content2 =
+//            // NScreenUtil.getResolutionText(model.getDeviceWidth(), model.getDeviceHeight(),
+//            // false)
+//            // + "  "
+//            // + NScreenUtil.getRatioText(model.getDeviceWidth(),
+//            // model.getDeviceHeight(), true);
+//            Point content1WH = FontUtil.getTextArea(content1, gc);
+//            // Point content2WH = FontUtil.getTextArea(content2, gc);
+//            int x1 = rect.x + (rect.width - content1WH.x) / 2;
+//            // int x2 = rect.x + (rect.width - content2WH.x) / 2;
+//            // int y1 = rect.y + (rect.height - content1WH.y - content2WH.y) / 2;
+//            int y1 = rect.y + (rect.height - content1WH.y) / 2;
+//            // int y2 = y1 + content1WH.y;
+//            gc.drawText(content1, x1, y1, true);
+//            // gc.drawText(content2, x2, y2, true);
+//        } else {
+//
+//        }
     }
 }