Merge remote-tracking branch 'origin/tizen' into devel/new_mesh
[platform/core/uifw/dali-demo.git] / resources / scripts / table-view.json
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 {
18   // a tree of actors
19   "stage": [{
20       "name":"simple-table",
21       "type":"TableView",
22       "background-color": [0.5,0.5,0,1],
23       "parent-origin": "CENTER",
24       "draw-mode": "OVERLAY",
25       "size":[400,500,1],
26       "cell-padding": [10, 5],
27       "layout-rows": {  // set the height of the rows
28         "0": { "policy": "fixed", "value": 40 },
29         "1": { "policy": "relative", "value": 0.33 },
30         "2": { "policy": "fixed", "value": 120 }
31       },
32       "layout-columns": { // set the widths of the columns
33         "1": { "policy": "fixed", "value": 150 },
34         "2": { "policy": "relative", "value": 0.35 },
35         "3": { "policy": "relative", "value": 0.15 }
36       },
37       "actors": [{
38           "name":"gallery-1",
39           "type":"ImageActor",
40           "width-resize-policy":"FILL_TO_PARENT",
41           "height-resize-policy":"FILL_TO_PARENT",
42           "image": {
43             "filename": "{DALI_IMAGE_DIR}gallery-large-1.jpg"
44           },
45           "custom-properties": { // properties registered dynamically
46             "cell-indices": [0,0], // property to specify the top-left cell this child occupies
47             "row-span":4, // property to specify how many rows this child occupies, if not set, default value is 1
48             "column-span":1 // property to specify how many columns this child occupies, if nor set, defualt cvalue is 1
49           }
50         },{
51           "name":"gallery-2",
52           "type":"ImageActor",
53           "width-resize-policy":"FILL_TO_PARENT",
54           "height-resize-policy":"FILL_TO_PARENT",
55           "image": {
56             "filename": "{DALI_IMAGE_DIR}gallery-large-2.jpg"
57           },
58           "custom-properties": {
59             "cell-indices":[1,1],
60             "row-span":3
61           }
62         }, {
63           "name":"gallery-3",
64           "type":"ImageActor",
65           "width-resize-policy":"FILL_TO_PARENT",
66           "height-resize-policy":"FILL_TO_PARENT",
67           "image": {
68             "filename": "{DALI_IMAGE_DIR}gallery-large-3.jpg"
69           },
70           "custom-properties": {
71             "cell-indices":[2,2]
72           }
73         }, {
74           "name":"gallery-4",
75           "type":"ImageActor",
76           "width-resize-policy":"FILL_TO_PARENT",
77           "height-resize-policy":"FILL_TO_PARENT",
78           "image": {
79             "filename": "{DALI_IMAGE_DIR}gallery-large-4.jpg"
80           },
81           "custom-properties": {
82             "cell-indices":[3,2],
83             "column-span": 2
84           }
85         }]
86     }]
87 }