Commit d1ab65692402946295f1dc3f1c9ec508776f081e
1 parent
4a96597a
Update script: table-view.json
Change-Id: I4e7c3b06fd29a7aa0ad76529b09f6303b9118516
Showing
1 changed file
with
54 additions
and
20 deletions
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 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. | 5 | * you may not use this file except in compliance with the License. |
| @@ -16,70 +16,104 @@ | @@ -16,70 +16,104 @@ | ||
| 16 | */ | 16 | */ |
| 17 | { | 17 | { |
| 18 | // a tree of actors | 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 | "stage": [{ | 42 | "stage": [{ |
| 20 | "name":"simple-table", | 43 | "name":"simple-table", |
| 21 | "type":"TableView", | 44 | "type":"TableView", |
| 22 | "background-color": [0.5,0.5,0,1], | 45 | "background-color": [0.5,0.5,0,1], |
| 23 | "parent-origin": "CENTER", | 46 | "parent-origin": "CENTER", |
| 24 | "draw-mode": "OVERLAY", | 47 | "draw-mode": "OVERLAY", |
| 25 | - "size":[400,500,1], | 48 | + "size":[400,400,1], |
| 49 | + "rows": 4, | ||
| 50 | + "columns": 4, | ||
| 26 | "cell-padding": [10, 5], | 51 | "cell-padding": [10, 5], |
| 27 | "layout-rows": { // set the height of the rows | 52 | "layout-rows": { // set the height of the rows |
| 28 | "0": { "policy": "fixed", "value": 40 }, | 53 | "0": { "policy": "fixed", "value": 40 }, |
| 29 | "1": { "policy": "relative", "value": 0.33 }, | 54 | "1": { "policy": "relative", "value": 0.33 }, |
| 30 | - "2": { "policy": "fixed", "value": 120 } | 55 | + "2": { "policy": "fit", "value": 0 } |
| 31 | }, | 56 | }, |
| 32 | "layout-columns": { // set the widths of the columns | 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 | "actors": [{ | 62 | "actors": [{ |
| 38 | "name":"gallery-1", | 63 | "name":"gallery-1", |
| 39 | "type":"ImageActor", | 64 | "type":"ImageActor", |
| 40 | - "width-resize-policy":"FILL_TO_PARENT", | ||
| 41 | "height-resize-policy":"FILL_TO_PARENT", | 65 | "height-resize-policy":"FILL_TO_PARENT", |
| 42 | "image": { | 66 | "image": { |
| 43 | - "filename": "{DALI_IMAGE_DIR}gallery-large-1.jpg" | 67 | + "filename": "{DALI_IMAGE_DIR}gallery-small-1.jpg" |
| 44 | }, | 68 | }, |
| 45 | "custom-properties": { // properties registered dynamically | 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 | "row-span":4, // property to specify how many rows this child occupies, if not set, default value is 1 | 71 | "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 | 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 | "name":"gallery-2", | 75 | "name":"gallery-2", |
| 52 | "type":"ImageActor", | 76 | "type":"ImageActor", |
| 53 | - "width-resize-policy":"FILL_TO_PARENT", | ||
| 54 | "height-resize-policy":"FILL_TO_PARENT", | 77 | "height-resize-policy":"FILL_TO_PARENT", |
| 55 | "image": { | 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 | "custom-properties": { | 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 | "type":"ImageActor", | 99 | "type":"ImageActor", |
| 65 | "width-resize-policy":"FILL_TO_PARENT", | 100 | "width-resize-policy":"FILL_TO_PARENT", |
| 66 | - "height-resize-policy":"FILL_TO_PARENT", | ||
| 67 | "image": { | 101 | "image": { |
| 68 | - "filename": "{DALI_IMAGE_DIR}gallery-large-3.jpg" | 102 | + "filename": "{DALI_IMAGE_DIR}gallery-small-4.jpg" |
| 69 | }, | 103 | }, |
| 70 | "custom-properties": { | 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 | "type":"ImageActor", | 109 | "type":"ImageActor", |
| 76 | "width-resize-policy":"FILL_TO_PARENT", | 110 | "width-resize-policy":"FILL_TO_PARENT", |
| 77 | "height-resize-policy":"FILL_TO_PARENT", | 111 | "height-resize-policy":"FILL_TO_PARENT", |
| 78 | "image": { | 112 | "image": { |
| 79 | - "filename": "{DALI_IMAGE_DIR}gallery-large-4.jpg" | 113 | + "filename": "{DALI_IMAGE_DIR}gallery-small-5.jpg" |
| 80 | }, | 114 | }, |
| 81 | "custom-properties": { | 115 | "custom-properties": { |
| 82 | - "cell-indices":[3,2], | 116 | + "cell-index":[3,2], |
| 83 | "column-span": 2 | 117 | "column-span": 2 |
| 84 | } | 118 | } |
| 85 | }] | 119 | }] |