NSCREEN : Modify NscreenDescriptor. 31/20931/2
authoryonghwan82.jeon <yonghwan82.jeon@samsung.com>
Wed, 14 May 2014 05:03:29 +0000 (14:03 +0900)
committeryonghwan82.jeon <yonghwan82.jeon@samsung.com>
Wed, 14 May 2014 05:26:57 +0000 (14:26 +0900)
Modify Nscreen Data and  Remove unused data.

Change-Id: Idc2508c81db1b5d72f7d786183046a7412e95bc1
Signed-off-by: yonghwan82.jeon <yonghwan82.jeon@samsung.com>
org.tizen.webuibuilder/src/org/tizen/webuibuilder/model/app/io/HtmlMetaReader_ver_1.java
org.tizen.webuibuilder/src/org/tizen/webuibuilder/model/app/io/HtmlMetaWriter_ver_1.java
org.tizen.webuibuilder/src/org/tizen/webuibuilder/model/nscreen/descriptors/NScreenDescriptor.java

index c00c4d7..6445b62 100644 (file)
@@ -192,11 +192,6 @@ public class HtmlMetaReader_ver_1 {
                     model.setScan(Scan.INTERLACE);
             }
 
-            // cssfile
-//            if (screen.getAttribute("cssFileName").length() > 0) {
-//                model.setFileName(screen.getAttribute("cssFileName"));
-//            }
-
             // menu
             if (screen.getAttribute("defaultInMenu").length() > 0) {
                 model.setDefaultInMenu(Boolean.parseBoolean(screen.getAttribute("defaultInMenu")));
index 3b32c14..1aa0af6 100644 (file)
@@ -214,10 +214,6 @@ public class HtmlMetaWriter_ver_1 {
                 }
             }
 
-            if (!nsModel.getFileName().isEmpty()) {
-                screenElement.setAttribute("cssFileName", nsModel.getFileName());
-            }
-
             // menu flag
             screenElement.setAttribute("defaultInMenu", String.valueOf(nsModel.getDefaultInMenu()));
             screenElement.setAttribute("enableInMenu", String.valueOf(nsModel.getEnableInMenu()));
index 916ba3a..e8709be 100644 (file)
@@ -57,62 +57,37 @@ public class NScreenDescriptor {
     }
 
     public void createCommonNscreen() {
-        addNscreenModel(BuilderConstants.NSCREENCOMMON, NScreenType.COMMON, null, 0, 0, 0,
-                        BuilderConstants.NSCREENCOMMON.toLowerCase());
+        addNscreenModel(BuilderConstants.NSCREENCOMMON, NScreenType.COMMON, null, 0, 0, 0);
     }
 
     public void createOrientationNscreen() {
         addNscreenModel(BuilderConstants.NSCREENPORTRAIT, NScreenType.ORIENTATION,
-                        Orientation.PORTRAIT, 0, 0, 0,
-                        BuilderConstants.NSCREENPORTRAIT.toLowerCase());
+                        Orientation.PORTRAIT, 0, 0, 0);
         addNscreenModel(BuilderConstants.NSCREENLANDSCAPE, NScreenType.ORIENTATION,
-                        Orientation.LANDSCAPE, 0, 0, 0,
-                        BuilderConstants.NSCREENLANDSCAPE.toLowerCase());
+                        Orientation.LANDSCAPE, 0, 0, 0);
     }
 
     public void createPixelRatioNscreen() {
-        addNscreenModel("Pixcel Ratio 1.0", NScreenType.PIXELRATIO, null, 1.0, 0, 0,
-                        "pixcel_ratio_1_0");
-        addNscreenModel("Pixcel Ratio 1.5", NScreenType.PIXELRATIO, null, 1.5, 0, 0,
-                        "pixcel_ratio_1_5");
-        addNscreenModel("Pixcel Ratio 2.0", NScreenType.PIXELRATIO, null, 2.0, 0, 0,
-                        "pixcel_ratio_2_0");
-        addNscreenModel("Pixcel Ratio 3.0", NScreenType.PIXELRATIO, null, 3.0, 0, 0,
-                        "pixcel_ratio_3_0");
+        addNscreenModel("Pixel Ratio 1.0", NScreenType.PIXELRATIO, null, 1.0, 0, 0);
+        addNscreenModel("Pixel Ratio 1.5", NScreenType.PIXELRATIO, null, 1.5, 0, 0);
+        addNscreenModel("Pixel Ratio 2.0", NScreenType.PIXELRATIO, null, 2.0, 0, 0);
+        addNscreenModel("Pixel Ratio 3.0", NScreenType.PIXELRATIO, null, 3.0, 0, 0);
     }
 
     public void createDeviceNscreen() {
-        addNscreenModel("Wearable 320x320 (1:1)", NScreenType.RESOLUTION, null, 0, 320, 320,
-                        "wearable_320x320");
-        addNscreenModel("Wearable 360x480 (3:4)", NScreenType.RESOLUTION, null, 0, 360, 480,
-                        "wearable_360x480");
-        addNscreenModel("Wearable 480x360 (4:3)", NScreenType.RESOLUTION, null, 0, 480, 360,
-                        "wearable_480x360");
-        addNscreenModel("Wearable 312x496 (10:16)", NScreenType.RESOLUTION, null, 0, 312, 496,
-                        "wearable_312x496");
-        addNscreenModel("Wearable 496x312 (16:10)", NScreenType.RESOLUTION, null, 0, 496, 312,
-                        "wearable_496x312");
-        addNscreenModel("Mobile 320x480 (2:3)", NScreenType.RESOLUTION, null, 0, 320, 480,
-                        "mobile_320x480");
-        addNscreenModel("Mobile 480x320 (3:2)", NScreenType.RESOLUTION, null, 0, 480, 320,
-                        "mobile_480x320");
-        addNscreenModel("Mobile 360x640 (9:16)", NScreenType.RESOLUTION, null, 0, 360, 640,
-                        "mobile_360x640");
-        addNscreenModel("Mobile 640x360 (16:9)", NScreenType.RESOLUTION, null, 0, 640, 360,
-                        "mobile_640x360");
-        addNscreenModel("Mobile 800x1280 (10:16)", NScreenType.RESOLUTION, null, 0, 800, 1280,
-                        "mobile_800x1280");
-        addNscreenModel("Mobile 1280x800 (16:10)", NScreenType.RESOLUTION, null, 0, 1280, 800,
-                        "mobile_1280x800");
-        addNscreenModel("TV 1920x1080 (16:9)", NScreenType.RESOLUTION, null, 0, 1920, 1080,
-                        "tv_1920x1080");
-        addNscreenModel("TV 1080x1920 (9:16)", NScreenType.RESOLUTION, null, 0, 1080, 1920,
-                        "tv_1080x1920");
+        addNscreenModel("Wearable 320x320 (1:1)", NScreenType.RESOLUTION, null, 0, 320, 320);
+        addNscreenModel("Wearable 360x480 (3:4)", NScreenType.RESOLUTION, null, 0, 360, 480);
+        addNscreenModel("Wearable 480x360 (4:3)", NScreenType.RESOLUTION, null, 0, 480, 360);
+        addNscreenModel("Mobile 320x480 (2:3)", NScreenType.RESOLUTION, null, 0, 320, 480);
+        addNscreenModel("Mobile 480x320 (3:2)", NScreenType.RESOLUTION, null, 0, 480, 320);
+        addNscreenModel("Mobile 360x640 (9:16)", NScreenType.RESOLUTION, null, 0, 360, 640);
+        addNscreenModel("Mobile 640x360 (16:9)", NScreenType.RESOLUTION, null, 0, 640, 360);
+        addNscreenModel("Mobile 800x1280 (10:16)", NScreenType.RESOLUTION, null, 0, 800, 1280);
+        addNscreenModel("Mobile 1280x800 (16:10)", NScreenType.RESOLUTION, null, 0, 1280, 800);
     }
 
     public void addNscreenModel(String name, NScreenType type, Orientation orientation,
-                                double devicePixelRatio, int deviceWidth, int deviceHeight,
-                                String fileName) {
+                                double devicePixelRatio, int deviceWidth, int deviceHeight) {
         if (name == null) {
             return;
         }
@@ -142,11 +117,6 @@ public class NScreenDescriptor {
             model.setDeviceHeight(deviceHeight);
         }
 
-//        if (fileName != null) {
-//            if (!fileName.isEmpty()) {
-//                model.setFileName(fileName);
-//            }
-//        }
         this.setMenuFlag(model);
         this.list.add(model);
     }