added json example of TableView 62/24762/3
authorXiangyin Ma <x1.ma@samsung.com>
Mon, 21 Jul 2014 10:52:55 +0000 (11:52 +0100)
committerXiangyin Ma <x1.ma@samsung.com>
Thu, 24 Jul 2014 13:45:13 +0000 (14:45 +0100)
Change-Id: I400a812c9e5c80578e8d2573fea5d74e38c0b7b0
Signed-off-by: Xiangyin Ma <x1.ma@samsung.com>
demo/scripts/table-view.json [new file with mode: 0644]

diff --git a/demo/scripts/table-view.json b/demo/scripts/table-view.json
new file mode 100644 (file)
index 0000000..1be3c9d
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ *
+ */
+{
+  // a tree of actors
+  "stage": [{
+      "name":"simple-table",
+      "type":"TableView",
+      "background-color": [0.5,0.5,0,1],
+      "parent-origin": "CENTER",
+      "size":[400,500,1],
+      "rows": 4,
+      "columns":4,
+      "cell-padding": [10, 5],
+      "layout-animation-duration": 0.5,
+      "layout-rows": {  // set the height of the rows
+        "0": { "policy": "fixed", "value": 40 },
+        "1": { "policy": "relative", "value": 0.33 },
+        "2": { "policy": "fixed", "value": 120 }
+      },
+      "layout-columns": { // set the widths of the columns
+        "1": { "policy": "fixed", "value": 150 },
+        "2": { "policy": "relative", "value": 0.35 },
+        "3": { "policy": "relative", "value": 0.15 }
+      },
+      "actors": [{
+          "name":"gallery-1",
+          "type":"ImageActor",
+          "image": {
+            "filename": "{DALI_IMAGE_DIR}gallery-large-1.jpg"
+          },
+          "custom-properties": { // properties registered dynamically
+            "cell-indices": [0,0],// property to specify the top-left cell this child occupies
+            "row-span":4, // property to specify how many rows this child occupies, if not set, default value is 1
+            "column-spam":1 // property to specify how many columns this child occupies, if nor set, defualt cvalue is 1
+          }
+        },{
+          "name":"gallery-2",
+          "type":"ImageActor",
+          "image": {
+            "filename": "{DALI_IMAGE_DIR}gallery-large-2.jpg"
+          },
+          "custom-properties": {
+            "cell-indices":[1,1],
+            "row-span":3
+          }
+        }, {
+          "name":"gallery-3",
+          "type":"ImageActor",
+          "image": {
+            "filename": "{DALI_IMAGE_DIR}gallery-large-3.jpg"
+          },
+          "custom-properties": {
+            "cell-indices":[2,2]
+          }
+        }, {
+          "name":"gallery-4",
+          "type":"ImageActor",
+          "image": {
+            "filename": "{DALI_IMAGE_DIR}gallery-large-4.jpg"
+          },
+          "custom-properties": {
+            "cell-indices":[3,2],
+            "column-span": 2
+          }
+        }]
+    }]
+}