Make sure AS-only beads are only seen as AS-only
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ba9331ae Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ba9331ae Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ba9331ae Branch: refs/heads/develop Commit: ba9331ae8a11ba8a82c0375ddea7d50e9bae4ae7 Parents: d63b447 Author: Alex Harui <[email protected]> Authored: Fri Nov 22 09:38:38 2013 -0800 Committer: Alex Harui <[email protected]> Committed: Fri Nov 22 09:38:38 2013 -0800 ---------------------------------------------------------------------- .../FlexJSTest_Panel/src/MyInitialView.mxml | 22 +++++++++++++++----- examples/StockQuote/src/MyInitialView.mxml | 14 +++++++++++-- frameworks/as/projects/FlexJSUI/defaults.css | 10 +++++++++ .../as/projects/FlexJSUI/src/FlexJSUIClasses.as | 2 ++ .../flex/html/staticControls/beads/ListView.as | 6 ++++-- .../html/staticControls/beads/TextAreaView.as | 7 ++++--- .../beads/TextInputWithBorderView.as | 8 ++++--- 7 files changed, 54 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba9331ae/examples/FlexJSTest_Panel/src/MyInitialView.mxml ---------------------------------------------------------------------- diff --git a/examples/FlexJSTest_Panel/src/MyInitialView.mxml b/examples/FlexJSTest_Panel/src/MyInitialView.mxml index 48d3b1b..e5df7da 100644 --- a/examples/FlexJSTest_Panel/src/MyInitialView.mxml +++ b/examples/FlexJSTest_Panel/src/MyInitialView.mxml @@ -84,7 +84,6 @@ limitations under the License. font-weight: bold; text-align: center; background-color: #444444; - iBackgroundBead: ClassReference('org.apache.flex.html.staticControls.beads.SolidBackgroundBead'); } .panel1 { @@ -92,8 +91,6 @@ limitations under the License. background-color: #EEEEEE; border-color: #000000; border-thickness: 1; - iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead'); - iBackgroundBead: ClassReference('org.apache.flex.html.staticControls.beads.SolidBackgroundBead'); } .numStepper { @@ -101,10 +98,25 @@ limitations under the License. border-color: #000000; border-thickness: 1; background-color: #FFFFCC; - iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead'); - iBackgroundBead: ClassReference('org.apache.flex.html.staticControls.beads.SolidBackgroundBead'); } + @media -flex-flash + { + .TitleBar { + iBackgroundBead: ClassReference('org.apache.flex.html.staticControls.beads.SolidBackgroundBead'); + } + + .panel1 { + iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead'); + iBackgroundBead: ClassReference('org.apache.flex.html.staticControls.beads.SolidBackgroundBead'); + } + + .numStepper { + iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead'); + iBackgroundBead: ClassReference('org.apache.flex.html.staticControls.beads.SolidBackgroundBead'); + } + + } </fx:Style> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba9331ae/examples/StockQuote/src/MyInitialView.mxml ---------------------------------------------------------------------- diff --git a/examples/StockQuote/src/MyInitialView.mxml b/examples/StockQuote/src/MyInitialView.mxml index 40ebc93..2b52faa 100644 --- a/examples/StockQuote/src/MyInitialView.mxml +++ b/examples/StockQuote/src/MyInitialView.mxml @@ -73,7 +73,6 @@ limitations under the License. .leftSide { vertical-align: top; margin-right: 10px; - iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead'); border-style: solid; } @@ -81,7 +80,6 @@ limitations under the License. vertical-align: top; margin-left: 10px; padding-left: 10px; - iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead'); border-style: solid; } @@ -89,6 +87,18 @@ limitations under the License. margin-top: 10px; margin-bottom: 10px; } + + @media -flex-flash + { + + .leftSide { + iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead'); + } + + .rightSide { + iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead'); + } + } </fx:Style> <basic:Container x="0" y="0" className="topContainer" > <basic:beads> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba9331ae/frameworks/as/projects/FlexJSUI/defaults.css ---------------------------------------------------------------------- diff --git a/frameworks/as/projects/FlexJSUI/defaults.css b/frameworks/as/projects/FlexJSUI/defaults.css index 69ffc96..d6a01cb 100644 --- a/frameworks/as/projects/FlexJSUI/defaults.css +++ b/frameworks/as/projects/FlexJSUI/defaults.css @@ -200,6 +200,12 @@ Label iMeasurementBead: ClassReference("org.apache.flex.html.staticControls.beads.TextFieldLabelMeasurementBead"); } +List +{ + iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead'); + iBorderModel: ClassReference('org.apache.flex.html.staticControls.beads.models.SingleLineBorderModel'); +} + NumericStepper { IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.RangeModel"); @@ -276,6 +282,8 @@ TextArea IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.TextModel"); IBeadView: ClassReference("org.apache.flex.html.staticControls.beads.TextAreaView"); IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.EditableTextKeyboardController"); + iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead'); + iBorderModel: ClassReference('org.apache.flex.html.staticControls.beads.models.SingleLineBorderModel'); width: 135; height: 20; } @@ -298,6 +306,8 @@ TextInput IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.TextModel"); IBeadView: ClassReference("org.apache.flex.html.staticControls.beads.TextInputWithBorderView"); IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.EditableTextKeyboardController"); + iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead'); + iBorderModel: ClassReference('org.apache.flex.html.staticControls.beads.models.SingleLineBorderModel'); width: 135; height: 20; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba9331ae/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as ---------------------------------------------------------------------- diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as index 1fe8a69..cf552ce 100644 --- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as +++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as @@ -47,6 +47,7 @@ internal class FlexJSUIClasses import org.apache.flex.html.staticControls.beads.RadioButtonView; RadioButtonView; import org.apache.flex.html.staticControls.beads.ScrollBarView; ScrollBarView; import org.apache.flex.html.staticControls.beads.SimpleAlertView; SimpleAlertView; + import org.apache.flex.html.staticControls.beads.SingleLineBorderBead; SingleLineBorderBead; import org.apache.flex.html.staticControls.beads.SliderView; SliderView; import org.apache.flex.html.staticControls.beads.SliderThumbView; SliderThumbView; import org.apache.flex.html.staticControls.beads.SliderTrackView; SliderTrackView; @@ -66,6 +67,7 @@ internal class FlexJSUIClasses import org.apache.flex.html.staticControls.beads.models.DataGridPresentationModel; DataGridPresentationModel; import org.apache.flex.html.staticControls.beads.models.ImageModel; ImageModel; import org.apache.flex.html.staticControls.beads.models.PanelModel; PanelModel; + import org.apache.flex.html.staticControls.beads.models.SingleLineBorderModel; SingleLineBorderModel; import org.apache.flex.html.staticControls.beads.models.TextModel; TextModel; import org.apache.flex.html.staticControls.beads.models.TitleBarModel; TitleBarModel; import org.apache.flex.html.staticControls.beads.models.ToggleButtonModel; ToggleButtonModel; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba9331ae/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ListView.as ---------------------------------------------------------------------- diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ListView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ListView.as index b8c9ab9..c6d33b4 100644 --- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ListView.as +++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ListView.as @@ -21,6 +21,8 @@ package org.apache.flex.html.staticControls.beads import flash.display.DisplayObject; import flash.display.DisplayObjectContainer; + import org.apache.flex.core.IBead; + import org.apache.flex.core.IBeadModel; import org.apache.flex.core.IBeadLayout; import org.apache.flex.core.IBeadView; import org.apache.flex.core.IItemRenderer; @@ -100,8 +102,8 @@ package org.apache.flex.html.staticControls.beads listModel.addEventListener("rollOverIndexChanged", rollOverIndexChangeHandler); _border = new Border(); - _border.model = new SingleLineBorderModel(); - _border.addBead(new SingleLineBorderBead()); + _border.model = new (ValuesManager.valuesImpl.getValue(value, "iBorderModel")) as IBeadModel; + _border.addBead(new (ValuesManager.valuesImpl.getValue(value, "iBorderBead")) as IBead); IParent(_strand).addElement(_border); _dataGroup = new NonVirtualDataGroup(); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba9331ae/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextAreaView.as ---------------------------------------------------------------------- diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextAreaView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextAreaView.as index bea4cb5..5d9f915 100644 --- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextAreaView.as +++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextAreaView.as @@ -24,11 +24,12 @@ package org.apache.flex.html.staticControls.beads import flash.text.TextFieldType; import org.apache.flex.core.IBead; + import org.apache.flex.core.IBeadModel; import org.apache.flex.core.IScrollBarModel; import org.apache.flex.core.IStrand; import org.apache.flex.core.IParent; + import org.apache.flex.core.ValuesManager; import org.apache.flex.html.staticControls.beads.models.ScrollBarModel; - import org.apache.flex.html.staticControls.beads.models.SingleLineBorderModel; import org.apache.flex.html.staticControls.supportClasses.Border; import org.apache.flex.html.staticControls.supportClasses.ScrollBar; @@ -67,8 +68,8 @@ package org.apache.flex.html.staticControls.beads // add a border to this _border = new Border(); - _border.model = new SingleLineBorderModel(); - _border.addBead(new SingleLineBorderBead()); + _border.model = new (ValuesManager.valuesImpl.getValue(value, "iBorderModel")) as IBeadModel; + _border.addBead(new (ValuesManager.valuesImpl.getValue(value, "iBorderBead")) as IBead); IParent(strand).addElement(border); var vb:ScrollBar = vScrollBar; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ba9331ae/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputWithBorderView.as ---------------------------------------------------------------------- diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputWithBorderView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputWithBorderView.as index 8d5e405..dbd3b81 100644 --- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputWithBorderView.as +++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextInputWithBorderView.as @@ -20,9 +20,11 @@ package org.apache.flex.html.staticControls.beads { import flash.display.DisplayObject; + import org.apache.flex.core.IBead; + import org.apache.flex.core.IBeadModel; import org.apache.flex.core.IStrand; import org.apache.flex.core.IParent; - import org.apache.flex.html.staticControls.beads.models.SingleLineBorderModel; + import org.apache.flex.core.ValuesManager; import org.apache.flex.html.staticControls.supportClasses.Border; import org.apache.flex.events.Event; import org.apache.flex.events.IEventDispatcher; @@ -47,8 +49,8 @@ package org.apache.flex.html.staticControls.beads // add a border to this _border = new Border(); - _border.model = new SingleLineBorderModel(); - _border.addBead(new SingleLineBorderBead()); + _border.model = new (ValuesManager.valuesImpl.getValue(value, "iBorderModel")) as IBeadModel; + _border.addBead(new (ValuesManager.valuesImpl.getValue(value, "iBorderBead")) as IBead); IParent(strand).addElement(border); IEventDispatcher(strand).addEventListener("widthChanged", sizeChangedHandler);
