This is an automated email from the ASF dual-hosted git repository.
piotrz 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 1b7a70f9f7 Jewel DataGrid: Missing event import and COMPILE:JS section
for styling
1b7a70f9f7 is described below
commit 1b7a70f9f7184956851651a2461340075397fb0c
Author: Piotr Zarzycki <[email protected]>
AuthorDate: Sat Jun 22 06:18:29 2024 +0200
Jewel DataGrid: Missing event import and COMPILE:JS section for styling
---
.../royale/jewel/beads/views/DataGridView.as | 13 ++-
.../supportClasses/datagrid/DataGridColumn.as | 109 +++++++++++----------
2 files changed, 64 insertions(+), 58 deletions(-)
diff --git
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DataGridView.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DataGridView.as
index 48ca6d14a3..ff1817f993 100644
---
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DataGridView.as
+++
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DataGridView.as
@@ -545,15 +545,20 @@ package org.apache.royale.jewel.beads.views
var newDataGridColumnList:IDataGridColumnList =
createColumnList(elementIndex, columnListLength, sharedModel.columns[i]);
- (newDataGridColumnList as
IChild).element.style["minWidth"] = (dataGridColumnList as
IChild).element.style["minWidth"];
- (newDataGridColumnList as
IChild).element.style["maxWidth"] = (dataGridColumnList as
IChild).element.style["maxWidth"];
- (newDataGridColumnList as IChild).element.style["width"]
= (dataGridColumnList as IChild).element.style["width"];
- (newDataGridColumnList as IChild).element.style["flex"] =
(dataGridColumnList as IChild).element.style["flex"];
+ COMPILE::JS
+ {
+ (newDataGridColumnList as
IChild).element.style["minWidth"] = (dataGridColumnList as
IChild).element.style["minWidth"];
+ (newDataGridColumnList as
IChild).element.style["maxWidth"] = (dataGridColumnList as
IChild).element.style["maxWidth"];
+ (newDataGridColumnList as
IChild).element.style["width"] = (dataGridColumnList as
IChild).element.style["width"];
+ (newDataGridColumnList as
IChild).element.style["flex"] = (dataGridColumnList as
IChild).element.style["flex"];
+ }
(_listArea as IParent).addElementAt(newDataGridColumnList
as IChild, elementIndex);
columnLists[elementIndex] = newDataGridColumnList;
newDataGridColumnList.dataProvider = dp;
+
+ break;
}
}
}
diff --git
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/datagrid/DataGridColumn.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/datagrid/DataGridColumn.as
index 7941ed60f7..36d8d46406 100644
---
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/datagrid/DataGridColumn.as
+++
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/datagrid/DataGridColumn.as
@@ -18,72 +18,73 @@
////////////////////////////////////////////////////////////////////////////////
package org.apache.royale.jewel.supportClasses.datagrid
{
-import org.apache.royale.core.IStyledUIBase;
-import org.apache.royale.jewel.supportClasses.table.TableColumn;
-import org.apache.royale.core.IFactory;
+ import org.apache.royale.core.IStyledUIBase;
+ import org.apache.royale.jewel.supportClasses.table.TableColumn;
+ import org.apache.royale.core.IFactory;
+ import org.apache.royale.events.Event;
-/**
- * The DataGridColumn class is the collection of properties that describe
- * a column of the org.apache.royale.jewel.DataGrid: 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.7
- */
-public class DataGridColumn extends TableColumn implements IDataGridColumn
-{
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.9.7
- */
- public function DataGridColumn()
- {
- }
-
- private var _itemRenderer:IFactory;
-
/**
- * The itemRenderer class or factory to use to make instances of
itemRenderers for
- * display of data.
+ * The DataGridColumn class is the collection of properties that describe
+ * a column of the org.apache.royale.jewel.DataGrid: 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.11
+ * @productversion Royale 0.9.7
*/
- override public function get itemRenderer():IFactory
+ public class DataGridColumn extends TableColumn implements IDataGridColumn
{
- return _itemRenderer;
- }
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.7
+ */
+ public function DataGridColumn()
+ {
+ }
- override public function set itemRenderer(value:IFactory):void
- {
- if (_itemRenderer != value)
+ private var _itemRenderer:IFactory;
+
+ /**
+ * The itemRenderer class or factory to use to make instances of
itemRenderers for
+ * display of data.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.11
+ */
+ override public function get itemRenderer():IFactory
{
- _itemRenderer = value;
+ return _itemRenderer;
+ }
- dispatchEvent(new Event('itemRendererChanged'));
+ override public function set itemRenderer(value:IFactory):void
+ {
+ if (_itemRenderer != value)
+ {
+ _itemRenderer = value;
+
+ dispatchEvent(new Event('itemRendererChanged'));
+ }
}
- }
- private var _visible:Boolean = true;
- public function set visible(value:Boolean):void{
- if (value != _visible) {
- _visible = value;
- //somehow, invalidate layout
- }
- }
+ private var _visible:Boolean = true;
+ public function set visible(value:Boolean):void{
+ if (value != _visible) {
+ _visible = value;
+ //somehow, invalidate layout
+ }
+ }
- public function get visible():Boolean{
- return _visible;
- }
-}
+ public function get visible():Boolean{
+ return _visible;
+ }
+ }
}