This is an automated email from the ASF dual-hosted git repository. aharui pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit fb618bfbad0f2f04c6151e2967ed2c6039f6b6b2 Author: Alex Harui <aha...@apache.org> AuthorDate: Sat Mar 7 23:07:47 2020 -0800 outerDocument emulation --- .../MXRoyale/src/main/resources/defaults.css | 2 +- .../MXRoyale/src/main/royale/MXRoyaleClasses.as | 1 + .../AdvancedDataGridItemRendererInitializer.as | 3 +- ...edDataGridSelectableItemRendererClassFactory.as | 55 ++++++++++++++++++++++ 4 files changed, 58 insertions(+), 3 deletions(-) diff --git a/frameworks/projects/MXRoyale/src/main/resources/defaults.css b/frameworks/projects/MXRoyale/src/main/resources/defaults.css index e5d8117..3abd24c 100644 --- a/frameworks/projects/MXRoyale/src/main/resources/defaults.css +++ b/frameworks/projects/MXRoyale/src/main/resources/defaults.css @@ -120,7 +120,7 @@ adg|AdvancedDataGridColumnList { IBeadView: ClassReference("mx.containers.beads.AdvancedDataGridListVirtualListView"); IBeadController: ClassReference("mx.controls.advancedDataGridClasses.AdvancedDataGridSingleSelectionMouseController"); IBeadLayout: ClassReference("mx.controls.beads.layouts.AdvancedDataGridVirtualListVerticalLayout"); - IItemRendererClassFactory: ClassReference("org.apache.royale.core.SelectableItemRendererClassFactory"); + IItemRendererClassFactory: ClassReference("mx.controls.beads.AdvancedDataGridSelectableItemRendererClassFactory"); IItemRenderer: ClassReference("mx.controls.advancedDataGridClasses.AdvancedDataGridItemRenderer"); IItemRendererInitializer: ClassReference("mx.controls.beads.AdvancedDataGridItemRendererInitializer"); ISelectableItemRenderer: ClassReference("mx.controls.advancedDataGridClasses.AdvancedDataGridSelectableItemRendererBead"); diff --git a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as index 574262e..f100ec2 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as +++ b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as @@ -248,6 +248,7 @@ internal class MXRoyaleClasses import mx.controls.beads.ListItemRendererInitializer; ListItemRendererInitializer; import mx.controls.beads.TreeItemRendererInitializer; TreeItemRendererInitializer; import mx.controls.beads.AdvancedDataGridItemRendererInitializer; AdvancedDataGridItemRendererInitializer; + import mx.controls.beads.AdvancedDataGridSelectableItemRendererClassFactory; AdvancedDataGridSelectableItemRendererClassFactory; import mx.containers.PanelTitleBar; PanelTitleBar; import mx.containers.beads.PanelView; PanelView; diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/AdvancedDataGridItemRendererInitializer.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/AdvancedDataGridItemRendererInitializer.as index 748f1d9..b5026ca 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/AdvancedDataGridItemRendererInitializer.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/AdvancedDataGridItemRendererInitializer.as @@ -96,8 +96,7 @@ package mx.controls.beads (ir as IListDataItemRenderer).listData = treeListData; if (firstColumn && adgColumnList.adg.groupLabelField) - (ir as ILabelFieldItemRenderer).labelField = adgColumnList.adg.groupLabelField; - + (ir as ILabelFieldItemRenderer).labelField = adgColumnList.adg.groupLabelField; } override protected function setupVisualsForItemRenderer(ir:IIndexedItemRenderer):void diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/AdvancedDataGridSelectableItemRendererClassFactory.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/AdvancedDataGridSelectableItemRendererClassFactory.as new file mode 100644 index 0000000..68ebe5b --- /dev/null +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/AdvancedDataGridSelectableItemRendererClassFactory.as @@ -0,0 +1,55 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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 mx.controls.beads +{ + import org.apache.royale.core.IItemRenderer; + import org.apache.royale.core.SelectableItemRendererClassFactory; + import mx.controls.advancedDataGridClasses.AdvancedDataGridColumnList; + + /** + * The AdvancedDataGridItemRendererInitializer class initializes item renderers + * in tree classes. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion Royale 0.0 + */ + public class AdvancedDataGridSelectableItemRendererClassFactory extends SelectableItemRendererClassFactory + { + /** + * constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion Royale 0.0 + */ + public function AdvancedDataGridSelectableItemRendererClassFactory() + { + } + + override public function createItemRenderer():IItemRenderer + { + var ir:IItemRenderer = super.createItemRenderer(); + ir["outerDocument"] = (_strand as AdvancedDataGridColumnList).adg.mxmlDocument; + return ir; + } + } +}