Commit d1ab65692402946295f1dc3f1c9ec508776f081e

Authored by Xiangyin Ma
1 parent 4a96597a

Update script: table-view.json

Change-Id: I4e7c3b06fd29a7aa0ad76529b09f6303b9118516
resources/scripts/table-view.json
1 1 /*
2   - * Copyright (c) 2014 Samsung Electronics Co., Ltd.
  2 + * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3 3 *
4 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 5 * you may not use this file except in compliance with the License.
... ... @@ -16,70 +16,104 @@
16 16 */
17 17 {
18 18 // a tree of actors
  19 + /*
  20 + * 4 by 4 table:
  21 + * |------------------------------------|
  22 + * | | 2(right,top)| | |
  23 + * | - - - |----------------|---|----|
  24 + * | | | | |
  25 + * | | | | |
  26 + * | | | | |
  27 + * | - - - | - - - - - |--------|
  28 + * | | | | |
  29 + * | 1 | | | |
  30 + * | | 3 | 4 | |
  31 + * | |aligned to | | |
  32 + * | |(left, center) | | |
  33 + * | - - - | - - - - - |--------|
  34 + * | | | ' |
  35 + * | | | ' |
  36 + * | | | 5 |
  37 + * | | | ' |
  38 + * | | | ' |
  39 + * |------------------------------------|
  40 + */
  41 +
19 42 "stage": [{
20 43 "name":"simple-table",
21 44 "type":"TableView",
22 45 "background-color": [0.5,0.5,0,1],
23 46 "parent-origin": "CENTER",
24 47 "draw-mode": "OVERLAY",
25   - "size":[400,500,1],
  48 + "size":[400,400,1],
  49 + "rows": 4,
  50 + "columns": 4,
26 51 "cell-padding": [10, 5],
27 52 "layout-rows": { // set the height of the rows
28 53 "0": { "policy": "fixed", "value": 40 },
29 54 "1": { "policy": "relative", "value": 0.33 },
30   - "2": { "policy": "fixed", "value": 120 }
  55 + "2": { "policy": "fit", "value": 0 }
31 56 },
32 57 "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 }
  58 + "0": { "policy": "fit", "value": 0 },
  59 + "2": { "policy": "relative", "value": 0.2 },
  60 + "3": { "policy": "fixed", "value": 30 }
36 61 },
37 62 "actors": [{
38 63 "name":"gallery-1",
39 64 "type":"ImageActor",
40   - "width-resize-policy":"FILL_TO_PARENT",
41 65 "height-resize-policy":"FILL_TO_PARENT",
42 66 "image": {
43   - "filename": "{DALI_IMAGE_DIR}gallery-large-1.jpg"
  67 + "filename": "{DALI_IMAGE_DIR}gallery-small-1.jpg"
44 68 },
45 69 "custom-properties": { // properties registered dynamically
46   - "cell-indices": [0,0], // property to specify the top-left cell this child occupies
  70 + "cell-index": [0,0], // property to specify the top-left cell this child occupies
47 71 "row-span":4, // property to specify how many rows this child occupies, if not set, default value is 1
48 72 "column-span":1 // property to specify how many columns this child occupies, if nor set, defualt cvalue is 1
49 73 }
50 74 },{
51 75 "name":"gallery-2",
52 76 "type":"ImageActor",
53   - "width-resize-policy":"FILL_TO_PARENT",
54 77 "height-resize-policy":"FILL_TO_PARENT",
55 78 "image": {
56   - "filename": "{DALI_IMAGE_DIR}gallery-large-2.jpg"
  79 + "filename": "{DALI_IMAGE_DIR}gallery-small-2.jpg"
  80 + },
  81 + "custom-properties": { // properties registered dynamically
  82 + "cell-index": [0,1],
  83 + "cell-horizontal-alignment": "right" // property to specify how to align horizontally inside the cells, if not set, default value is 'left'
  84 + }
  85 + },{
  86 + "name":"gallery-3",
  87 + "type":"ImageActor",
  88 + "image": {
  89 + "filename": "{DALI_IMAGE_DIR}gallery-small-3.jpg"
57 90 },
58 91 "custom-properties": {
59   - "cell-indices":[1,1],
60   - "row-span":3
  92 + "cell-index":[1,1],
  93 + "row-span":3,
  94 + "cell-horizontal-alignment": "left",// property to specify how to align horizontally inside the cells, if not set, default value is 'left'
  95 + "cell-vertical-alignment": "center" // property to specify how to align vertically inside the cells, if not set, default value is 'top'
61 96 }
62 97 }, {
63   - "name":"gallery-3",
  98 + "name":"gallery-4",
64 99 "type":"ImageActor",
65 100 "width-resize-policy":"FILL_TO_PARENT",
66   - "height-resize-policy":"FILL_TO_PARENT",
67 101 "image": {
68   - "filename": "{DALI_IMAGE_DIR}gallery-large-3.jpg"
  102 + "filename": "{DALI_IMAGE_DIR}gallery-small-4.jpg"
69 103 },
70 104 "custom-properties": {
71   - "cell-indices":[2,2]
  105 + "cell-index":[2,2]
72 106 }
73 107 }, {
74   - "name":"gallery-4",
  108 + "name":"gallery-5",
75 109 "type":"ImageActor",
76 110 "width-resize-policy":"FILL_TO_PARENT",
77 111 "height-resize-policy":"FILL_TO_PARENT",
78 112 "image": {
79   - "filename": "{DALI_IMAGE_DIR}gallery-large-4.jpg"
  113 + "filename": "{DALI_IMAGE_DIR}gallery-small-5.jpg"
80 114 },
81 115 "custom-properties": {
82   - "cell-indices":[3,2],
  116 + "cell-index":[3,2],
83 117 "column-span": 2
84 118 }
85 119 }]
... ...