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/11/15 10:41:26 UTC
[royale-asjs] branch develop updated: jewel-virtualdatagrid: add
VirtualDataGridColumn
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 6473c73 jewel-virtualdatagrid: add VirtualDataGridColumn
6473c73 is described below
commit 6473c733fc673bde3e44c33135991bd3400d3d95
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sun Nov 15 11:41:13 2020 +0100
jewel-virtualdatagrid: add VirtualDataGridColumn
---
.../src/main/royale/VirtualListsPlayGround.mxml | 4 +-
.../Jewel/src/main/resources/jewel-manifest.xml | 1 +
.../datagrid/VirtualDataGridColumn.as | 63 ++++++++++++++++++++++
.../Jewel/src/main/sass/components/_datagrid.sass | 5 +-
4 files changed, 70 insertions(+), 3 deletions(-)
diff --git a/examples/jewel/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml b/examples/jewel/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
index 05a3bc2..397189e 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
+++ b/examples/jewel/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
@@ -172,8 +172,8 @@ limitations under the License.
<j:VirtualDataGrid localId="virtualDataGrid"
dataProvider="{productModel.productList}">
<j:columns>
- <j:DataGridColumn label="Title" dataField="title"/>
- <j:DataGridColumn label="Sales" dataField="sales"/>
+ <j:VirtualDataGridColumn label="Title" dataField="title"/>
+ <j:VirtualDataGridColumn label="Sales" dataField="sales"/>
</j:columns>
</j:VirtualDataGrid>
</j:Card>
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index a60a666..5370713 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -55,6 +55,7 @@
<component id="VirtualDataGrid" class="org.apache.royale.jewel.VirtualDataGrid"/>
<component id="VirtualDataGridColumnList" class="org.apache.royale.jewel.supportClasses.datagrid.VirtualDataGridColumnList"/>
+ <component id="VirtualDataGridColumn" class="org.apache.royale.jewel.supportClasses.datagrid.VirtualDataGridColumn"/>
<component id="DataGridColumnLabelsChange" class="org.apache.royale.jewel.beads.controls.datagrid.DataGridColumnLabelsChange"/>
<component id="DataGridSort" class="org.apache.royale.jewel.beads.controls.datagrid.DataGridSort"/>
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/datagrid/VirtualDataGridColumn.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/datagrid/VirtualDataGridColumn.as
new file mode 100644
index 0000000..8db1ab6
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/datagrid/VirtualDataGridColumn.as
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel.supportClasses.datagrid
+{
+ import org.apache.royale.core.IStyledUIBase;
+
+ /**
+ * The VirtualDataGridColumn class is the collection of properties that describe
+ * a column of the org.apache.royale.jewel.VirtualDataGrid: which renderer
+ * to use for each cell in the column, the width of the column, the label for the
+ * column, and the name of the field in the data containing the value to display
+ * in the column.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.8
+ */
+ public class VirtualDataGridColumn extends DataGridColumn
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.8
+ */
+ public function VirtualDataGridColumn()
+ {
+ }
+
+ /**
+ * Returns a new instance of a UIBase component to be used as the actual
+ * column in the grid.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.8
+ */
+ override public function createColumn():IStyledUIBase
+ {
+ return new VirtualDataGridColumnList();
+ }
+ }
+}
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_datagrid.sass b/frameworks/projects/Jewel/src/main/sass/components/_datagrid.sass
index 481abf7..131358c 100644
--- a/frameworks/projects/Jewel/src/main/sass/components/_datagrid.sass
+++ b/frameworks/projects/Jewel/src/main/sass/components/_datagrid.sass
@@ -85,5 +85,8 @@ j|DataGridButtonBar
IItemRenderer: ClassReference("org.apache.royale.jewel.itemRenderers.DatagridHeaderRenderer")
+
j|VirtualDataGrid
- columnClass: ClassReference("org.apache.royale.jewel.supportClasses.datagrid.VirtualDataGridColumnList")
\ No newline at end of file
+ columnClass: ClassReference("org.apache.royale.jewel.supportClasses.datagrid.VirtualDataGridColumnList")
+
+j|VirtualDataGridColumnList