Repository: flex-asjs Updated Branches: refs/heads/develop b26fb60fe -> 8da63daf5
End of MDL update docs, more icons and RadioButton refactor to support events Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/8da63daf Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8da63daf Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8da63daf Branch: refs/heads/develop Commit: 8da63daf577e87141d1f06aa98753c74237c1dd1 Parents: b26fb60 Author: Carlos Rovira <[email protected]> Authored: Fri Jan 27 18:47:33 2017 +0100 Committer: Carlos Rovira <[email protected]> Committed: Fri Jan 27 18:47:33 2017 +0100 ---------------------------------------------------------------------- .../MDLExample/src/main/flex/Sliders.mxml | 2 - .../MDLExample/src/main/flex/Toggles.mxml | 43 ++- .../src/main/flex/org/apache/flex/mdl/List.as | 4 +- .../flex/org/apache/flex/mdl/RadioButton.as | 271 ++++++++++++++++--- .../src/main/flex/org/apache/flex/mdl/Spacer.as | 4 +- .../main/flex/org/apache/flex/mdl/Spinner.as | 20 +- .../src/main/flex/org/apache/flex/mdl/Switch.as | 200 +++++++++----- .../src/main/flex/org/apache/flex/mdl/TabBar.as | 29 +- .../flex/org/apache/flex/mdl/TabBarButton.as | 11 +- .../flex/org/apache/flex/mdl/TabBarPanel.as | 14 +- .../src/main/flex/org/apache/flex/mdl/Table.as | 49 ++-- .../main/flex/org/apache/flex/mdl/TableCell.as | 22 +- .../flex/org/apache/flex/mdl/TableColumn.as | 21 +- .../src/main/flex/org/apache/flex/mdl/Tabs.as | 64 ++++- .../flex/mdl/materialIcons/MaterialIconType.as | 127 ++++----- .../src/main/resources/defaults.css | 11 + 16 files changed, 646 insertions(+), 246 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/examples/flexjs/MDLExample/src/main/flex/Sliders.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/MDLExample/src/main/flex/Sliders.mxml b/examples/flexjs/MDLExample/src/main/flex/Sliders.mxml index 919c403..fc82561 100644 --- a/examples/flexjs/MDLExample/src/main/flex/Sliders.mxml +++ b/examples/flexjs/MDLExample/src/main/flex/Sliders.mxml @@ -35,13 +35,11 @@ limitations under the License. private function onValueChange1(event:Event):void { - trace("value 1 change: " + slider1.value); slider1_txt.text = "Slider 1 Value: " + slider1.value; } private function onValueChange2(event:Event):void { - trace("value 2 change: " + slider2.value); slider2_txt.text = "Slider 2 Value: " + slider2.value; } ]]> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml b/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml index 1cc8c43..c356893 100644 --- a/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml +++ b/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml @@ -34,6 +34,18 @@ limitations under the License. [Bindable] public var counter3:int = 0; + + [Bindable] + public var counter4:int = 0; + + [Bindable] + public var counter5:int = 0; + + [Bindable] + public var counter6:int = 0; + + [Bindable] + public var counter7:int = 0; ]]> </fx:Script> @@ -44,16 +56,10 @@ limitations under the License. <mdl:Grid width="250"> <!-- Toggles :: https://getmdl.io/components/index.html#toggles-section --> - <mdl:CheckBox id="mdlchk" text="Disabled at start" className="mdlchk_example" change="counter++"/> + <mdl:CheckBox id="mdlchk" text="Disabled at start" change="counter++"/> <js:Label text="Chebox throw 'change' event {counter} times"/> <mdl:CheckBox id="mdlchk1" text="Selected and with Ripple" selected="true" ripple="true"/> - <mdl:RadioButton groupName="g1" text="Black" className="mdlrb_example"/> - <mdl:RadioButton groupName="g1" text="Ripple" ripple="true"/> - <mdl:RadioButton groupName="g1" text="Red"/> - - <mdl:Switch text="Switch" ripple="true" selected="true"/> - <mdl:IconToggle dataMdlFor="mdlBoldIcon" click="counter2++"> <mdl:materialIcon> <mdl:MaterialIcon text="{MaterialIconType.FORMAT_BOLD}"/> @@ -69,7 +75,28 @@ limitations under the License. </mdl:IconToggle> <js:Label text="IconToggle throw 'change' event {counter3} times"/> - + + <mdl:Button raised="true" text="Change Switch Text Label" colored="true" click="s1.text = 'hello'"/> + <mdl:Switch id="s1" text="Switch" ripple="true" selected="true" change="counter4++" textChange="trace('hello?')"/> + + <js:Label text="Switch throw 'click' event {counter4} times"/> + + <mdl:Switch id="s2" text="Switch" click="counter5++"/> + + <js:Label text="Switch throw 'click' event {counter5} times"/> + + <mdl:RadioButton groupName="g1" text="Ripple 1" ripple="true" change="counter6++"/> + <mdl:RadioButton groupName="g1" text="Ripple 2" ripple="true" change="counter6++"/> + <mdl:RadioButton groupName="g1" text="Ripple 3" ripple="true" change="counter6++"/> + + <js:Label text="RadioButtons throw 'change' event {counter6} times"/> + + <!--<mdl:RadioButton groupName="g2" text="Black" click="counter7++"/> + <mdl:RadioButton groupName="g2" text="White" click="counter7++"/> + <mdl:RadioButton groupName="g2" text="Red" click="counter7++"/> + + <js:Label text="RadioButtons throw 'click' event {counter7} times"/>--> + </mdl:Grid> </mdl:TabBarPanel> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as index ff92a15..1ac1423 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as @@ -62,7 +62,7 @@ package org.apache.flex.mdl } /** - * data provider + * @copy org.apache.flex.core.IDataProviderModel#dataProvider * * @langversion 3.0 * @playerversion Flash 10.2 @@ -82,7 +82,7 @@ package org.apache.flex.mdl } /** - * label field + * @copy org.apache.flex.core.IDataProviderModel#labelField * * @langversion 3.0 * @playerversion Flash 10.2 http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as index f193886..98d82d1 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as @@ -18,9 +18,16 @@ //////////////////////////////////////////////////////////////////////////////// package org.apache.flex.mdl { + import org.apache.flex.events.Event; + COMPILE::SWF { - import org.apache.flex.html.RadioButton; + import flash.utils.Dictionary; + import org.apache.flex.core.UIButtonBase; + import org.apache.flex.core.IStrand; + import org.apache.flex.core.IValueToggleButtonModel; + import org.apache.flex.events.MouseEvent; + import org.apache.flex.html.RadioButton; } COMPILE::JS { @@ -29,9 +36,39 @@ package org.apache.flex.mdl import org.apache.flex.html.supportClasses.RadioButtonIcon; } + //-------------------------------------- + // Events + //-------------------------------------- + + /** + * Dispatched when the user clicks on RadioButton. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + [Event(name="click", type="org.apache.flex.events.MouseEvent")] + /** - * The RadioButton class provides a MDL UI-like appearance for - * a RadioButton. + * Dispatched when RadioButton is being selected/unselected. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + [Event(name="change", type="org.apache.flex.events.Event")] + + /** + * The Material Design Lite (MDL) radio component is an enhanced version of the + * standard HTML <input type="radio">, or "radio button" element. A radio button + * consists of a small circle and, typically, text that clearly communicates a + * condition that will be set when the user clicks or touches it. Radio buttons + * always appear in groups of two or more and, while they can be individually + * selected, can only be deselected by selecting a different radio button in the + * same group (which deselects all other radio buttons in the group). The MDL + * radio component allows you to add display and click effects. * * @langversion 3.0 * @playerversion Flash 10.2 @@ -39,19 +76,167 @@ package org.apache.flex.mdl * @productversion FlexJS 0.8 */ COMPILE::SWF - public class RadioButton extends org.apache.flex.html.RadioButton + public class RadioButton extends UIButtonBase implements IStrand { /** - * Constructor. - * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.8 - */ + * constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function RadioButton() { super(); + + addEventListener(org.apache.flex.events.MouseEvent.CLICK, internalMouseHandler); + } + + protected static var dict:Dictionary = new Dictionary(true); + + private var _groupName:String; + + /** + * The name of the group. Only one RadioButton in a group is selected. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + public function get groupName() : String + { + return IValueToggleButtonModel(model).groupName; + } + public function set groupName(value:String) : void + { + IValueToggleButtonModel(model).groupName = value; + } + + /** + * The string used as a label for the RadioButton. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + public function get text():String + { + return IValueToggleButtonModel(model).text; + } + public function set text(value:String):void + { + IValueToggleButtonModel(model).text = value; + } + + /** + * Whether or not the RadioButton instance is selected. Setting this property + * causes the currently selected RadioButton in the same group to lose the + * selection. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + public function get selected():Boolean + { + return IValueToggleButtonModel(model).selected; + } + public function set selected(selValue:Boolean):void + { + IValueToggleButtonModel(model).selected = selValue; + + // if this button is being selected, its value should become + // its group's selectedValue + if( selValue ) { + for each(var rb:org.apache.flex.mdl.RadioButton in dict) + { + if( rb.groupName == groupName ) + { + rb.selectedValue = value; + } + } + } + } + + /** + * The value associated with the RadioButton. For example, RadioButtons with labels, + * "Red", "Green", and "Blue" might have the values 0, 1, and 2 respectively. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + public function get value():Object + { + return IValueToggleButtonModel(model).value; + } + public function set value(newValue:Object):void + { + IValueToggleButtonModel(model).value = newValue; + } + + /** + * The group's currently selected value. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + public function get selectedValue():Object + { + return IValueToggleButtonModel(model).selectedValue; + } + public function set selectedValue(newValue:Object):void + { + // a radio button is really selected when its value matches that of the group's value + IValueToggleButtonModel(model).selected = (newValue == value); + IValueToggleButtonModel(model).selectedValue = newValue; + } + + /** + * @private + */ + override public function addedToParent():void + { + super.addedToParent(); + + // if this instance is selected, set the local selectedValue to + // this instance's value + if( selected ) selectedValue = value; + + else { + + // make sure this button's selectedValue is set from its group's selectedValue + // to keep it in sync with the rest of the buttons in its group. + for each(var rb:org.apache.flex.mdl.RadioButton in dict) + { + if( rb.groupName == groupName ) + { + selectedValue = rb.selectedValue; + break; + } + } + } + + dict[this] = this; + } + + /** + * @private + */ + private function internalMouseHandler(event:org.apache.flex.events.MouseEvent) : void + { + // prevent radiobutton from being turned off by a click + if( !selected ) { + selected = !selected; + dispatchEvent(new Event("change")); + } } protected var _ripple:Boolean = false; @@ -94,7 +279,7 @@ package org.apache.flex.mdl /** * Provides unique name */ - public static var radioCounter:int = 0; + protected static var radioCounter:int = 0; private var radio:HTMLSpanElement; private var icon:RadioButtonIcon; @@ -120,8 +305,8 @@ package org.apache.flex.mdl radio = document.createElement('span') as HTMLSpanElement; radio.className = 'mdl-radio__label'; - radio.addEventListener('mouseover', mouseOverHandler, false); - radio.addEventListener('mouseout', mouseOutHandler, false); + //radio.addEventListener('mouseover', mouseOverHandler, false); + //radio.addEventListener('mouseout', mouseOutHandler, false); label = document.createElement('label') as HTMLLabelElement; label.appendChild(icon.element); @@ -135,10 +320,21 @@ package org.apache.flex.mdl (textNode as WrappedHTMLElement).flexjs_wrapper = this; (icon.element as WrappedHTMLElement).flexjs_wrapper = this; (radio as WrappedHTMLElement).flexjs_wrapper = this; + + //element.addEventListener("click", clickHandler, false); return element; }; - + + /*COMPILE::JS + public function clickHandler(event:Event):void + { + event.preventDefault(); + selected = !selected; + (icon.element as HTMLInputElement).checked = selected; + label.classList.toggle("is-checked", selected); + }*/ + protected var _ripple:Boolean = false; /** * A boolean flag to activate "mdl-js-ripple-effect" effect selector. @@ -167,27 +363,6 @@ package org.apache.flex.mdl /** * @param e The event object. */ - private function mouseOverHandler(e:Event):void - { - //radio.className = 'radio-icon-hover'; - } - - - /** - * @param e The event object. - */ - private function mouseOutHandler(e:Event):void - { - /*if (input.checked) - radio.className = 'radio-icon-checked'; - else - radio.className = 'radio-icon';*/ - } - - - /** - * @param e The event object. - */ private function selectionChangeHandler(e:Event):void { // this should reset the icons in the non-selected radio @@ -229,6 +404,7 @@ package org.apache.flex.mdl public function set selected(value:Boolean):void { (icon.element as HTMLInputElement).checked = value; + dispatchEvent(new Event(Event.CHANGE)) } public function get value():Object @@ -260,7 +436,7 @@ package org.apache.flex.mdl } /** - * @flexjsignorecoercion Array + * @flexjsignorecoercion HTMLInputElement */ public function set selectedValue(value:Object):void { @@ -279,6 +455,27 @@ package org.apache.flex.mdl } } } + + /** + * @param e The event object. + */ + /*private function mouseOverHandler(e:Event):void + { + //radio.className = 'radio-icon-hover'; + }*/ + + + /** + * @param e The event object. + */ + /*private function mouseOutHandler(e:Event):void + { + if (input.checked) + radio.className = 'radio-icon-checked'; + else + radio.className = 'radio-icon'; + }*/ + } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spacer.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spacer.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spacer.as index f244167..c63a398 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spacer.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spacer.as @@ -31,7 +31,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class Spacer extends UIBase { @@ -41,7 +41,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function Spacer() { http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spinner.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spinner.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spinner.as index abe6200..32dc1b6 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spinner.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spinner.as @@ -25,13 +25,21 @@ package org.apache.flex.mdl import org.apache.flex.core.WrappedHTMLElement; } /** - * The Spinner class provides a MDL UI-like appearance for - * a Spinner. + * The Material Design Lite (MDL) spinner component is an enhanced replacement for + * the classic "wait cursor" (which varies significantly among hardware and software + * versions) and indicates that there is an ongoing process, the results of which are + * not yet available. A spinner consists of an open circle that changes colors as it + * animates in a clockwise direction, and clearly communicates that a process has been + * started but not completed. + * + * A spinner performs no action itself, either by its display nor when the user clicks + * or touches it, and does not indicate a process's specific progress or degree of completion. + * The MDL spinner component provides various types of spinners, and allows you to add display effects. * * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class Spinner extends UIBase { @@ -49,13 +57,15 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get isActive():Boolean { return _isActive; } - + /** + * @private + */ public function set isActive(value:Boolean):void { _isActive = value; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as index 3570866..577cf0a 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as @@ -18,29 +18,70 @@ //////////////////////////////////////////////////////////////////////////////// package org.apache.flex.mdl { - - COMPILE::SWF - { - import org.apache.flex.html.ToggleTextButton; - } + import org.apache.flex.core.IToggleButtonModel; + import org.apache.flex.core.UIBase; + import org.apache.flex.events.Event; + import org.apache.flex.events.MouseEvent; + import org.apache.flex.core.IStrand; + import org.apache.flex.html.TextButton; + import org.apache.flex.events.IEventDispatcher; + import org.apache.flex.core.IUIBase; COMPILE::JS - { + { import org.apache.flex.core.WrappedHTMLElement; - import org.apache.flex.core.UIBase; } + //-------------------------------------- + // Events + //-------------------------------------- + + /** + * Dispatched when the text label is changed. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + [Event(name="textChange", type="org.apache.flex.events.Event")] + + /** + * Dispatched when the user clicks on Switch. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + [Event(name="click", type="org.apache.flex.events.MouseEvent")] + + /** + * Dispatched when Switch is being selected/unselected. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + [Event(name="change", type="org.apache.flex.events.Event")] + /** - * The Switch class provides a MDL UI-like appearance for - * a Switch. + * The Material Design Lite (MDL) switch component is an enhanced version of the + * standard HTML <input type="checkbox"> element. A switch consists of a short horizontal + * "track" with a prominent circular state indicator and, typically, text that clearly + * communicates a binary condition that will be set or unset when the user clicks or touches + * it. Like checkboxes, switches may appear individually or in groups, and can be selected + * and deselected individually. However, switches provide a more intuitive visual representation + * of their state: left/gray for off, right/colored for on. The MDL switch component allows you + * to add both display and click effects. * * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ - COMPILE::SWF - public class Switch extends org.apache.flex.html.ToggleTextButton + public class Switch extends TextButton implements IStrand, IEventDispatcher, IUIBase { /** * Constructor. @@ -48,55 +89,107 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function Switch() { super(); + + COMPILE::SWF + { + addEventListener(MouseEvent.CLICK, internalMouseHandler); + } + + className = ""; } - private var _ripple:Boolean = false; - /** - * A boolean flag to activate "mdl-js-ripple-effect" effect selector. - * Applies ripple click effect. May be used in combination with any other classes + * @copy org.apache.flex.html.Label#text * * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ - public function get ripple():Boolean + override public function get text():String { - return _ripple; + return IToggleButtonModel(model).text; } + /** + * @private + */ + override public function set text(value:String):void + { + IToggleButtonModel(model).text = value; - public function set ripple(value:Boolean):void + COMPILE::JS + { + span.textContent = value; + dispatchEvent('textChange'); + } + } + + [Bindable("change")] + /** + * <code>true</code> if the Switch is selected. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + public function get selected():Boolean { - _ripple = value; + return IToggleButtonModel(model).selected; } - } - COMPILE::JS - public class Switch extends UIBase - { + public function set selected(value:Boolean):void + { + if (IToggleButtonModel(model).selected != value) + { + IToggleButtonModel(model).selected = value; + dispatchEvent(new Event(Event.CHANGE)) + } + + COMPILE::JS + { + input.checked = value; + } + } + + private var _ripple:Boolean = false; /** - * Constructor. + * A boolean flag to activate "mdl-js-ripple-effect" effect selector. + * Applies ripple click effect. May be used in combination with any other classes * * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ - public function Switch() + public function get ripple():Boolean { - super(); + return _ripple; + } - className = ""; + public function set ripple(value:Boolean):void + { + _ripple = value; + + COMPILE::JS + { + element.classList.toggle("mdl-js-ripple-effect", _ripple); + typeNames = element.className; + } } - private var label:HTMLLabelElement; - private var input:HTMLInputElement; + COMPILE::JS + protected var label:HTMLLabelElement; + + COMPILE::JS + protected var input:HTMLInputElement; + + COMPILE::JS private var span:HTMLSpanElement; /** @@ -105,6 +198,7 @@ package org.apache.flex.mdl * @flexjsignorecoercion HTMLInputElement * @flexjsignorecoercion HTMLSpanElement */ + COMPILE::JS override protected function createElement():WrappedHTMLElement { typeNames = "mdl-switch mdl-js-switch"; @@ -129,42 +223,24 @@ package org.apache.flex.mdl (span as WrappedHTMLElement).flexjs_wrapper = this; element.flexjs_wrapper = this; - return element; - } - - private var _ripple:Boolean = false; - - public function get ripple():Boolean - { - return _ripple; - } - - public function set ripple(value:Boolean):void - { - _ripple = value; - - element.classList.toggle("mdl-js-ripple-effect", _ripple); - typeNames = element.className; - } + element.addEventListener("click", clickHandler, false); - public function get text():String - { - return span.textContent; - } - - public function set text(value:String):void - { - span.textContent = value; + return element; } - public function get selected():Boolean + COMPILE::JS + public function clickHandler(event:Event):void { - return input.checked; + event.preventDefault(); + selected = !selected; + input.checked = selected; + label.classList.toggle("is-checked", selected); } - public function set selected(value:Boolean):void + COMPILE::SWF + private function internalMouseHandler(event:MouseEvent) : void { - input.checked = value; + //selected = !selected; } } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as index 0ee47f0..a2080c1 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as @@ -34,13 +34,24 @@ package org.apache.flex.mdl } /** - * The TabBar class is a Container component capable of parenting other - * components + * The Material Design Lite (MDL) tab bar component is a user interface element that allows + * different content blocks to share the same screen space in a mutually exclusive manner. + * TabBars are always presented in sets of two or more, and they make it easy to explore and + * switch among different views or functional aspects of an app, or to browse categorized + * data sets individually. TabBars serve as "headings" for their respective content; the active + * tab bar panel â the one whose content is currently displayed â is always visually distinguished from + * the others so the user knows which heading the current content belongs to. + * + * Notice that tab bars are not designed in MDL to be nested (and not recommended), and doing so + * will be cause mal function. + * + * In FlexJS Tabs consume a dataprovider and uses item renderers to create each item (defaults + * to TabBarButtonTabsItemRenderer) * * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class TabBar extends ContainerBase implements IItemRendererParent, ILayoutParent, ILayoutHost, IChrome { @@ -50,7 +61,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function TabBar() { @@ -65,7 +76,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get dataProvider():Object { @@ -82,7 +93,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get labelField():String { @@ -99,7 +110,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get tabIdField():String { @@ -169,7 +180,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ COMPILE::JS override public function addedToParent():void @@ -199,7 +210,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get ripple():Boolean { http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarButton.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarButton.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarButton.as index f207177..534d63d 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarButton.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarButton.as @@ -26,13 +26,12 @@ package org.apache.flex.mdl } /** - * The TabBarButton class is a Container component capable of parenting other - * components + * The TabBarButton class is a link button component used in Tabs * * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class TabBarButton extends A { @@ -42,7 +41,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function TabBarButton() { @@ -59,7 +58,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get isActive():Boolean { @@ -101,7 +100,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ COMPILE::JS override public function addedToParent():void http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarPanel.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarPanel.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarPanel.as index bb8e275..1632c46 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarPanel.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarPanel.as @@ -27,15 +27,13 @@ package org.apache.flex.mdl /** * The TabBarPanel class is a Container component capable of parenting other - * four components + * four components. This class is used along with Tabs to separate content and + * present and organize data for the user. * - * @see PanelWithControlBar - * @see ControlBar - * @see TitleBar * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class TabBarPanel extends ContainerBase { @@ -45,7 +43,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function TabBarPanel() { @@ -74,7 +72,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ COMPILE::JS override public function addedToParent():void @@ -99,7 +97,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get isActive():Boolean { http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as index fa8cdec..e08465b 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as @@ -27,20 +27,21 @@ package org.apache.flex.mdl } /** - * The Table class is a Container component capable of parenting other - * four components (CardTitle, CardMedia, CardSupportingText and CardActions. - * The Panel uses the following bead types: - * - * org.apache.flex.core.IBeadModel: the data model for the Card. - * org.apache.flex.core.IBeadView: creates the parts of the Card. + * The Material Design Lite (MDL) data-table component is an enhanced version of + * the standard HTML <table>. A data-table consists of rows and columns of well-formatted + * data, presented with appropriate user interaction capabilities. + * + * The available row/column/cell types in a data-table are mostly self-formatting; that is, + * once the data-table is defined, the individual cells require very little specific attention. + * For example, the rows exhibit shading behavior on mouseover and selection, numeric values are + * automatically formatted by default, and the addition of a single class makes the table rows + * individually or collectively selectable. This makes the data-table component convenient and easy + * to code for the developer, as well as attractive and intuitive for the user. * - * @see PanelWithControlBar - * @see ControlBar - * @see TitleBar * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class Table extends List { @@ -50,7 +51,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function Table() { @@ -66,7 +67,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get columns():Array { @@ -87,20 +88,30 @@ package org.apache.flex.mdl } } + /** + * @copy org.apache.flex.core.IParent#addElement() + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + * @flexjsignorecoercion org.apache.flex.core.IUIBase + */ override public function addElement(c:IChild, dispatchEvent:Boolean = true):void { - /*COMPILE::SWF + COMPILE::SWF { - if(_elements == null) + // this part is not done for Table + /*if(_elements == null) _elements = []; _elements[_elements.length] = c; $displayObjectContainer.addChild(c.$displayObject); if (c is IUIBase) { IUIBase(c).addedToParent(); - } - - }*/ + }*/ + } + COMPILE::JS { if(c is THead) { @@ -152,7 +163,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get shadow():Number { @@ -183,7 +194,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get selectable():Boolean { http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableCell.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableCell.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableCell.as index f68bd05..a699748 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableCell.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableCell.as @@ -26,12 +26,12 @@ package org.apache.flex.mdl } /** - * The TableCell class is a Cell for MDL Table used normaly in a TableItemRenderer + * The TableCell class is a Cell for MDL Table used normaly in a TableRowItemRenderer * * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class TableCell extends ContainerBase { @@ -41,7 +41,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function TableCell() { @@ -56,7 +56,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get text():String { @@ -97,14 +97,14 @@ package org.apache.flex.mdl private var _nonNumeric:Boolean; /** - * Activate "mdl-data-table__cell--non-numeric" class selector, for use in table td item. - * Applies text formatting to data cell. Numeric is the default - * Optional; goes on both table header and table data cells + * Activate "mdl-data-table__cell--non-numeric" class selector, for use in table td item. + * Applies text formatting to data cell. Numeric is the default + * Optional; goes on both table header and table data cells * - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 */ public function get nonNumeric():Boolean { http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableColumn.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableColumn.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableColumn.as index 022c90d..f0273bc 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableColumn.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TableColumn.as @@ -28,12 +28,13 @@ package org.apache.flex.mdl /** * The TableColumn class represents an HTML <th> element that * be inside a <thead> in a MLD Table + * Use instances of this class in columns Array property MDL Table * * @toplevel * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class TableColumn extends ContainerBase { @@ -43,7 +44,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function TableColumn() { @@ -53,12 +54,12 @@ package org.apache.flex.mdl private var _headerText:String = ""; /** - * The text of the td + * The text of the th * * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get headerText():String { @@ -99,14 +100,14 @@ package org.apache.flex.mdl private var _nonNumeric:Boolean; /** - * Activate "mdl-data-table__cell--non-numeric" class selector, for use in table td item. - * Applies text formatting to data cell - * Optional; goes on both table header and table data cells + * Activate "mdl-data-table__cell--non-numeric" class selector, for use in table td item. + * Applies text formatting to data cell + * Optional; goes on both table header and table data cells * * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get nonNumeric():Boolean { @@ -132,7 +133,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get ascending():Boolean { @@ -158,7 +159,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get descending():Boolean { http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as index dcb851a..a3a16fd 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as @@ -33,8 +33,16 @@ package org.apache.flex.mdl } /** - * The Tabs class is a Container component capable of parenting other - * components + * The Material Design Lite (MDL) tab component is a user interface element that allows + * different content blocks to share the same screen space in a mutually exclusive manner. + * Tabs are always presented in sets of two or more, and they make it easy to explore and + * switch among different views or functional aspects of an app, or to browse categorized + * data sets individually. Tabs serve as "headings" for their respective content; the active + * tab â the one whose content is currently displayed â is always visually distinguished from + * the others so the user knows which heading the current content belongs to. + * + * In FlexJS Tabs consume a dataprovider and uses item renderers to create each item (defaults + * to TabBarPanelItemRenderer) * * @langversion 3.0 * @playerversion Flash 10.2 @@ -84,7 +92,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get tabIdField():String { @@ -104,7 +112,7 @@ package org.apache.flex.mdl * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function get labelField():String { @@ -118,27 +126,67 @@ package org.apache.flex.mdl ITabModel(model).labelField = value; } + /** + * selected index + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function set selectedIndex(value:int):void { ITabModel(model).selectedIndex = value; } + /** + * get layout host + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function getLayoutHost():ILayoutHost { return this; } + /** + * get content view + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function get contentView():IParentIUIBase { return this; } + /** + * get item renderer for index + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function getItemRendererForIndex(index:int):IItemRenderer { var child:IItemRenderer = getElementAt(index) as IItemRenderer; return child; } + /** + * remove all elements + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function removeAllElements():void { while (numElements > 0) { @@ -147,6 +195,14 @@ package org.apache.flex.mdl } } + /** + * update all item renderers + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function updateAllItemRenderers():void { //todo: IItemRenderer does not define update function but DataItemRenderer does http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconType.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconType.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconType.as index d11a790..e7ece54 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconType.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconType.as @@ -393,6 +393,72 @@ package org.apache.flex.mdl.materialIcons public static const message:String = 'message'; public static const no_sim:String = 'no_sim'; + public static const PHONE:String = 'phone'; + public static const PHONELINK_ERASE:String = 'phonelink_erase'; + public static const PHONELINK_LOCK:String = 'phonelink_lock'; + public static const PHONELINK_RING:String = 'phonelink_ring'; + public static const PHONELINK_SETUP:String = 'phonelink_setup'; + public static const PORTABLE_WIFI_OFF:String = 'portable_wifi_off'; + public static const PRESENT_TO_ALL:String = 'present_to_all'; + public static const RING_VOLUME:String = 'ring_volume'; + public static const RSS_FEED:String = 'rss_feed'; + public static const SCREEN_SHARE:String = 'screen_share'; + + public static const SPEAKER_PHONE:String = 'speaker_phone'; + public static const STAY_CURRENT_LANDSCAPE:String = 'stay_current_landscape'; + public static const STAY_CURRENT_PORTRAIT:String = 'stay_current_portrait'; + public static const STAY_PRIMARY_LANDSCAPE:String = 'stay_primary_landscape'; + public static const STAY_PRIMARY_PORTRAIT:String = 'stay_primary_portrait'; + public static const STOP_SCREEN_SHARE:String = 'stop_screen_share'; + public static const SWAP_CALLS:String = 'swap_calls'; + public static const TEXTSMS:String = 'textsms'; + public static const VOICEMAIL:String = 'voicemail'; + public static const VPN_KEY:String = 'vpn_key'; + + public static const ADD:String = 'add'; + public static const ADD_BOX:String = 'add_box'; + public static const ADD_CIRCLE:String = 'add_circle'; + public static const ADD_CIRCLE_OUTLINE:String = 'add_circle_outline'; + public static const ARCHIVE:String = 'archive'; + public static const BACKSPACE:String = 'backspace'; + public static const BLOCK:String = 'block'; + public static const CLEAR:String = 'clear'; + public static const CONTENT_COPY:String = 'content_copy'; + public static const CONTENT_CUT:String = 'content_cut'; + + public static const CONTENT_PASTE:String = 'content_paste'; + public static const CREATE:String = 'create'; + public static const DELETE_SWEEP:String = 'delete_sweep'; + public static const DRAFTS:String = 'drafts'; + public static const FILTER_LIST:String = 'filter_list'; + public static const FLAG:String = 'flag'; + public static const FONT_DOWNLOAD:String = 'font_download'; + public static const FORWARD:String = 'forward'; + public static const GESTURE:String = 'gesture'; + public static const INBOX:String = 'inbox'; + + public static const LINK:String = 'link'; + public static const LOW_PRIORITY:String = 'low_priority'; + public static const MAIL:String = 'mail'; + public static const MARKUNREAD:String = 'markunread'; + public static const MOVE_TO_INBOX:String = 'move_to_inbox'; + public static const NEXT_WEEK:String = 'next_week'; + public static const REDO:String = 'redo'; + public static const REMOVE:String = 'remove'; + public static const REMOVE_CIRCLE:String = 'remove_circle'; + public static const REMOVE_CIRCLE_OUTLINE:String = 'remove_circle_outline'; + + public static const REPLY:String = 'reply'; + public static const REPLY_ALL:String = 'reply_all'; + public static const REPORT:String = 'report'; + public static const SAVE:String = 'save'; + public static const SELECT_ALL:String = 'select_all'; + public static const SEND:String = 'send'; + public static const SORT:String = 'sort'; + public static const TEXT_FORMAT:String = 'text_format'; + public static const UNARCHIVE:String = 'unarchive'; + public static const UNDO:String = 'undo'; + /* public static const ACCESSIBLE:String = 'XXX'; public static const ACCESSIBLE:String = 'XXX'; @@ -405,66 +471,6 @@ package org.apache.flex.mdl.materialIcons public static const ACCESSIBLE:String = 'XXX'; public static const ACCESSIBLE:String = 'XXX'; - 'phone', - 'phonelink_erase', - 'phonelink_lock', - 'phonelink_ring', - 'phonelink_setup', - 'portable_wifi_off', - 'present_to_all', - 'ring_volume', - 'rss_feed', - 'screen_share', - 'speaker_phone', - 'stay_current_landscape', - 'stay_current_portrait', - 'stay_primary_landscape', - 'stay_primary_portrait', - 'stop_screen_share', - 'swap_calls', - 'textsms', - 'voicemail', - 'vpn_key', - 'add', - 'add_box', - 'add_circle', - 'add_circle_outline', - 'archive', - 'backspace', - 'block', - 'clear', - 'content_copy', - 'content_cut', - 'content_paste', - 'create', - 'delete_sweep', - 'drafts', - 'filter_list', - 'flag', - 'font_download', - 'forward', - 'gesture', - 'inbox', - 'link', - 'low_priority', - 'mail', - 'markunread', - 'move_to_inbox', - 'next_week', - 'redo', - 'remove', - 'remove_circle', - 'remove_circle_outline', - 'reply', - 'reply_all', - 'report', - 'save', - 'select_all', - 'send', - 'sort', - 'text_format', - 'unarchive', - 'undo', 'weekend', 'access_alarm', 'access_alarms', @@ -1010,7 +1016,6 @@ package org.apache.flex.mdl.materialIcons */ public static const CANCEL:String = "cancel"; - public static const ADD:String = "add"; public static const PERSON:String = "person"; public static const STAR:String = "star"; public static const SHARE:String = "share"; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8da63daf/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css index cc469d7..7373313 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css +++ b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css @@ -58,6 +58,11 @@ IconToggle IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel"); } +Switch +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel"); +} + Slider { IBeadModel: ClassReference("org.apache.flex.html.beads.models.RangeModel"); @@ -147,4 +152,10 @@ FooterLinkList iThumbView: ClassReference("org.apache.flex.mdl.beads.SliderThumbView"); iTrackView: ClassReference("org.apache.flex.mdl.beads.SliderTrackView"); } + + RadioButton + { + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ValueToggleButtonModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.RadioButtonView"); + } } \ No newline at end of file
