You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2020/03/08 00:59:13 UTC
[royale-asjs] branch develop updated: tour-de-jewel: some datagrid
updates to examples
This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new e4dcf68 tour-de-jewel: some datagrid updates to examples
e4dcf68 is described below
commit e4dcf68711f657f7a48e0122949019ea5bbef69f
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sun Mar 8 01:59:05 2020 +0100
tour-de-jewel: some datagrid updates to examples
---
.../src/main/royale/DataGridPlayGround.mxml | 49 +++++++++++-----------
1 file changed, 25 insertions(+), 24 deletions(-)
diff --git a/examples/royale/TourDeJewel/src/main/royale/DataGridPlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/DataGridPlayGround.mxml
index 1c67aa3..b71c942 100644
--- a/examples/royale/TourDeJewel/src/main/royale/DataGridPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/DataGridPlayGround.mxml
@@ -36,6 +36,9 @@ limitations under the License.
import vos.Product;
import org.apache.royale.jewel.DataGrid;
+ [Bindable]
+ public var listModel:ListsModel = new ListsModel();
+
private function dataGridProductChange(grid:DataGrid, output:Label) : void
{
output.text = "Clicked on row " + grid.selectedIndex + " (Title: " + (grid.selectedItem as Product).title + ")";
@@ -80,29 +83,6 @@ limitations under the License.
// productModel.productList.removeAll();
}
- private function describeItem(item:*):String {
- const intro:String = "<strong>DataGrid selectedItem:</strong> ";
- var evaluated:String;
- if (item is String) {
- evaluated = "String value: '" + item + "'";
- } else {
- if (item === null || item === undefined) {
- evaluated = "Nothing Selected";
- }
- else {
- if (item is IconListVO) {
- evaluated = "Object's label field: '" + IconListVO(item).label + "'";
- } else {
- evaluated = "Object : " + item;
- }
- }
- }
- return intro + evaluated;
- }
-
- [Bindable]
- public var listModel:ListsModel = new ListsModel();
-
/**
* DataGridColumnLabelsChange nead needed
*/
@@ -134,6 +114,26 @@ limitations under the License.
datagrid.dataProvider = null;
}
+ private function describeItem(item:*):String {
+ const intro:String = "<strong>DataGrid selectedItem:</strong> ";
+ var evaluated:String;
+ if (item is String) {
+ evaluated = "String value: '" + item + "'";
+ } else {
+ if (item === null || item === undefined) {
+ evaluated = "Nothing Selected";
+ }
+ else {
+ if (item is IconListVO) {
+ evaluated = "Object's label field: '" + IconListVO(item).label + "'";
+ } else {
+ evaluated = "Object : " + item;
+ }
+ }
+ }
+ return intro + evaluated;
+ }
+
private function loadDataProvider(datagrid:DataGrid):void
{
datagrid.dataProvider = new ArrayList([
@@ -249,6 +249,7 @@ limitations under the License.
</j:CardActions>
</j:Card>
</j:GridCell>
+ <!-- <j:IconButton click="dg2.dataProvider = productModel.productList;" emphasis="primary" outlined="true"> -->
<j:GridCell desktopNumerator="1" desktopDenominator="2" tabletNumerator="1" tabletDenominator="2" phoneNumerator="1" phoneDenominator="1">
@@ -380,7 +381,7 @@ limitations under the License.
<j:Label text="Basic configuration, width = 100%, no column widths, rowHeight=42 and emphasis='secondary', middle column has center alignment. Clicking on row icon, remove the entire row."
multiline="true"/>
- <j:DataGrid width="100%" emphasis="secondary" rowHeight="42"
+ <j:DataGrid width="100%" height="240" emphasis="secondary" rowHeight="42"
change="dataGridIconListChange(event.target as DataGrid, datagrid3_lb)">
<j:beads>
<js:ConstantBinding