http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSScrollBarView.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSScrollBarView.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSScrollBarView.as new file mode 100644 index 0000000..38583f6 --- /dev/null +++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSScrollBarView.as @@ -0,0 +1,241 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.flex.flat.beads +{ + import flash.display.DisplayObject; + + import org.apache.flex.core.IBead; + import org.apache.flex.core.IBeadLayout; + import org.apache.flex.core.IBeadView; + import org.apache.flex.core.IScrollBarModel; + import org.apache.flex.core.IStrand; + import org.apache.flex.core.IUIBase; + import org.apache.flex.core.Strand; + import org.apache.flex.core.UIBase; + import org.apache.flex.core.ValuesManager; + import org.apache.flex.events.IEventDispatcher; + import org.apache.flex.events.Event; + import org.apache.flex.html.Button; + import org.apache.flex.html.beads.controllers.ButtonAutoRepeatController; + import org.apache.flex.html.beads.IScrollBarView; + + /** + * The ScrollBarView class is the default view for + * the org.apache.flex.html.supportClasses.ScrollBar class. + * It implements the classic desktop-like ScrollBar. + * A different view would implement more modern scrollbars that hide themselves + * until hovered over with the mouse. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public class CSSScrollBarView extends Strand implements IBeadView, IStrand, IScrollBarView + { + /** + * Constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function CSSScrollBarView() + { + } + + private var sbModel:IScrollBarModel; + + private var _strand:IStrand; + + /** + * The layout. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + private var layout:IBeadLayout; + + /** + * The host component. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get host():IUIBase + { + return _strand as IUIBase; + } + + /** + * @copy org.apache.flex.core.IBead#strand + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function set strand(value:IStrand):void + { + _strand = value; + + for each (var bead:IBead in beads) + addBead(bead); + + sbModel = value.getBeadByType(IScrollBarModel) as IScrollBarModel; + sbModel = _strand.getBeadByType(IScrollBarModel) as IScrollBarModel; + sbModel.addEventListener("maximumChange", changeHandler); + sbModel.addEventListener("minimumChange", changeHandler); + sbModel.addEventListener("snapIntervalChange", changeHandler); + sbModel.addEventListener("stepSizeChange", changeHandler); + sbModel.addEventListener("pageSizeChange", changeHandler); + sbModel.addEventListener("valueChange", changeHandler); + + // TODO: (aharui) put in values impl + _increment = new Button(); + Button(_increment).className = "vscrollbar-downarrow-btn"; + var sbView:CSSScrollBarButtonView = new CSSScrollBarButtonView(); + sbView.upArrowShape.className = "vscrollbar-downarrow"; + sbView.downArrowShape.className = "vscrollbar-downarrow"; + sbView.overArrowShape.className = "vscrollbar-downarrow"; + Button(_increment).addBead(sbView); + Button(_increment).addBead(new ButtonAutoRepeatController()); + _decrement = new Button(); + Button(_decrement).className = "vscrollbar-uparrow-btn"; + sbView = new CSSScrollBarButtonView(); + sbView.upArrowShape.className = "vscrollbar-uparrow"; + sbView.downArrowShape.className = "vscrollbar-uparrow"; + sbView.overArrowShape.className = "vscrollbar-uparrow"; + Button(_decrement).addBead(sbView); + Button(_decrement).addBead(new ButtonAutoRepeatController()); + _track = new Button(); + Button(_track).className = "vscrollbar-track"; + _thumb = new Button(); + Button(_thumb).className = "vscrollbar-thumb"; + + UIBase(value).addElement(_decrement); + UIBase(value).addElement(_increment); + UIBase(value).addElement(_track); + UIBase(value).addElement(_thumb); + + IEventDispatcher(_strand).addEventListener("heightChanged", changeHandler); + + if( _strand.getBeadByType(IBeadLayout) == null ) { + layout = new (ValuesManager.valuesImpl.getValue(_strand, "iBeadLayout")) as IBeadLayout; + _strand.addBead(layout); + } + layout.layout(); + } + + private function changeHandler(event:Event):void + { + layout.layout(); + } + + private var _decrement:DisplayObject; + private var _increment:DisplayObject; + private var _track:DisplayObject; + private var _thumb:DisplayObject; + + /** + * @copy org.apache.flex.html.beads.IScrollBarView#decrement + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get decrement():DisplayObject + { + return _decrement; + } + + /** + * @copy org.apache.flex.html.beads.IScrollBarView#increment + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get increment():DisplayObject + { + return _increment; + } + + /** + * @copy org.apache.flex.html.beads.IScrollBarView#track + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get track():DisplayObject + { + return _track; + } + + /** + * @copy org.apache.flex.html.beads.IScrollBarView#thumb + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get thumb():DisplayObject + { + return _thumb; + } + + /** + * @copy org.apache.flex.core.IBeadView#viewHeight + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get viewHeight():Number + { + // don't want to put $height in an interface + return _strand["$height"]; + } + + /** + * @copy org.apache.flex.core.IBeadView#viewWidth + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get viewWidth():Number + { + // don't want to put $width in an interface + return _strand["$width"]; + } + } +}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CheckboxCSSContentAndTextToggleButtonView.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CheckboxCSSContentAndTextToggleButtonView.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CheckboxCSSContentAndTextToggleButtonView.as new file mode 100644 index 0000000..e52076f --- /dev/null +++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CheckboxCSSContentAndTextToggleButtonView.as @@ -0,0 +1,48 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.flex.flat.beads +{ + + /** + * The CheckboxCSSContentAndTextToggleButtonView class is the default view for + * the org.apache.flex.flat.Checkbox class. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public class CheckboxCSSContentAndTextToggleButtonView extends CSSContentAndTextToggleButtonView + { + /** + * Constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function CheckboxCSSContentAndTextToggleButtonView() + { + super(); + + className = "checkbox-icon"; + } + } +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/DropDownListView.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/DropDownListView.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/DropDownListView.as new file mode 100644 index 0000000..f7357b9 --- /dev/null +++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/DropDownListView.as @@ -0,0 +1,309 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.flex.flat.beads +{ + import flash.display.DisplayObject; + import flash.display.DisplayObjectContainer; + import flash.display.Graphics; + import flash.display.Shape; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.text.TextFieldType; + + import org.apache.flex.core.BeadViewBase; + import org.apache.flex.core.CSSShape; + import org.apache.flex.core.CSSSprite; + import org.apache.flex.core.CSSTextField; + import org.apache.flex.core.IBeadView; + import org.apache.flex.core.ILayoutChild; + import org.apache.flex.core.IPopUpHost; + import org.apache.flex.core.ISelectionModel; + import org.apache.flex.core.IStrand; + import org.apache.flex.core.IUIBase; + import org.apache.flex.core.ValuesManager; + import org.apache.flex.events.Event; + import org.apache.flex.events.IEventDispatcher; + import org.apache.flex.html.beads.IDropDownListView; + import org.apache.flex.utils.CSSUtils; + + /** + * The DropDownListView class is the default view for + * the org.apache.flex.flat.DropDownList class. + * It displays a simple text label with what appears to be a + * down arrow button on the right, but really, the entire + * view is the button that will display or dismiss the dropdown. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public class DropDownListView extends BeadViewBase implements IDropDownListView, IBeadView + { + /** + * Constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function DropDownListView() + { + upSprite = new CSSSprite(); + upSprite.className = 'dropdown-toggle-open-btn'; + downSprite = new CSSSprite(); + downSprite.className = 'dropdown-toggle-open-btn'; + overSprite = new CSSSprite(); + overSprite.className = 'dropdown-toggle-open-btn'; + overSprite.state = 'hover'; + upTextField = new CSSTextField(); + downTextField = new CSSTextField(); + overTextField = new CSSTextField(); + upSprite.addChild(upTextField); + overSprite.addChild(overTextField); + downSprite.addChild(downTextField); + upTextField.selectable = false; + upTextField.parentDrawsBackground = true; + upTextField.parentHandlesPadding = true; + upTextField.type = TextFieldType.DYNAMIC; + downTextField.selectable = false; + downTextField.parentDrawsBackground = true; + downTextField.parentHandlesPadding = true; + downTextField.type = TextFieldType.DYNAMIC; + overTextField.selectable = false; + overTextField.parentDrawsBackground = true; + overTextField.parentHandlesPadding = true; + overTextField.type = TextFieldType.DYNAMIC; + // auto-size collapses if no text + //upTextField.autoSize = "left"; + //downTextField.autoSize = "left"; + //overTextField.autoSize = "left"; + + upArrows = new CSSShape(); + upArrows.className = 'dropdown-caret'; + overArrows = new CSSShape(); + overArrows.className = 'dropdown-caret'; + downArrows = new CSSShape(); + downArrows.className = 'dropdown-caret'; + upSprite.addChild(upArrows); + overSprite.addChild(overArrows); + downSprite.addChild(downArrows); + + } + + + private var selectionModel:ISelectionModel; + + private var shape:Shape; + + /** + * @copy org.apache.flex.core.IBead#strand + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + override public function set strand(value:IStrand):void + { + super.strand = value;; + selectionModel = value.getBeadByType(ISelectionModel) as ISelectionModel; + selectionModel.addEventListener("selectedIndexChanged", selectionChangeHandler); + selectionModel.addEventListener("dataProviderChanged", selectionChangeHandler); + shape = new Shape(); + shape.graphics.beginFill(0xCCCCCC); + shape.graphics.drawRect(0, 0, 10, 10); + shape.graphics.endFill(); + SimpleButton(value).upState = upSprite; + SimpleButton(value).downState = downSprite; + SimpleButton(value).overState = overSprite; + SimpleButton(value).hitTestState = shape; + if (selectionModel.selectedIndex !== -1) + selectionChangeHandler(null); + else + text = "^W_"; + upTextField.height = upTextField.textHeight + 4; + downTextField.height = downTextField.textHeight + 4; + overTextField.height = overTextField.textHeight + 4; + if (selectionModel.selectedIndex == -1) + text = ""; + + IEventDispatcher(value).addEventListener("heightChanged", changeHandler); + IEventDispatcher(value).addEventListener("widthChanged", changeHandler); + changeHandler(null); + } + + private function selectionChangeHandler(event:Event):void + { + if (selectionModel.selectedItem == null) + text = ""; + else if (selectionModel.labelField != null) + text = selectionModel.selectedItem[selectionModel.labelField].toString(); + else + text = selectionModel.selectedItem.toString(); + } + + private function changeHandler(event:Event):void + { + var ww:Number = DisplayObject(_strand).width; + var hh:Number = DisplayObject(_strand).height; + var padding:Object = ValuesManager.valuesImpl.getValue(_strand, "padding"); + var paddingLeft:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-left"); + var paddingRight:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-right"); + var paddingTop:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-top"); + var paddingBottom:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-bottom"); + var pl:Number = CSSUtils.getLeftValue(paddingLeft, padding, ww); + var pr:Number = CSSUtils.getRightValue(paddingRight, padding, ww); + var pt:Number = CSSUtils.getLeftValue(paddingTop, padding, hh); + var pb:Number = CSSUtils.getRightValue(paddingBottom, padding, hh); + + upArrows.draw(0, 0); + overArrows.draw(0, 0); + downArrows.draw(0, 0); + if (ILayoutChild(_strand).isHeightSizedToContent() && text != "") + { + hh = upTextField.textHeight + pt + pb; + ILayoutChild(_strand).setHeight(hh, true); + } + upSprite.draw(ww, hh); + overSprite.draw(ww, hh); + downSprite.draw(ww, hh); + + upArrows.x = ww - upArrows.width - pr; + overArrows.x = ww - overArrows.width - pr; + downArrows.x = ww - downArrows.width - pr; + upArrows.y = (hh - upArrows.height) / 2; + overArrows.y = (hh - overArrows.height) / 2; + downArrows.y = (hh - downArrows.height) / 2; + + upTextField.width = upTextField.textWidth + 4; + downTextField.width = downTextField.textWidth + 4; + overTextField.width = overTextField.textWidth + 4; + upTextField.height = upTextField.textHeight + 5; + downTextField.height = downTextField.textHeight + 5; + overTextField.height = overTextField.textHeight + 5; + upTextField.y = (hh - upTextField.height) / 2; + downTextField.y = (hh - downTextField.height) / 2; + overTextField.y = (hh - overTextField.height) / 2; + upTextField.x = pl; + downTextField.x = pl; + overTextField.x = pl; + shape.graphics.clear(); + shape.graphics.beginFill(0xCCCCCC); + shape.graphics.drawRect(0, 0, ww, hh); + shape.graphics.endFill(); + } + + private var upTextField:CSSTextField; + private var downTextField:CSSTextField; + private var overTextField:CSSTextField; + private var upSprite:CSSSprite; + private var downSprite:CSSSprite; + private var overSprite:CSSSprite; + private var upArrows:CSSShape; + private var downArrows:CSSShape; + private var overArrows:CSSShape; + + /** + * The text that is displayed in the view. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get text():String + { + return upTextField.text; + } + + /** + * @private + */ + public function set text(value:String):void + { + upTextField.text = value; + downTextField.text = value; + overTextField.text = value; + changeHandler(null); + } + + private var _popUp:IStrand; + + /** + * The dropdown/popup that displays the set of choices. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get popUp():IStrand + { + if (!_popUp) + { + var popUpClass:Class = ValuesManager.valuesImpl.getValue(_strand, "iPopUp") as Class; + _popUp = new popUpClass() as IStrand; + } + return _popUp; + } + + private var _popUpVisible:Boolean; + + /** + * A flag that indicates whether the dropdown/popup is + * visible. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get popUpVisible():Boolean + { + return _popUpVisible; + } + + /** + * @private + */ + public function set popUpVisible(value:Boolean):void + { + if (value != _popUpVisible) + { + _popUpVisible = value; + if (value) + { + var root:Object = DisplayObject(_strand).root; + var host:DisplayObjectContainer = DisplayObject(_strand).parent; + while (host && !(host is IPopUpHost)) + host = host.parent; + if (host) + IPopUpHost(host).addElement(popUp); + } + else + { + DisplayObject(_popUp).parent.removeChild(_popUp as DisplayObject); + } + } + } + + } +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/RadioCSSContentAndTextToggleButtonView.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/RadioCSSContentAndTextToggleButtonView.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/RadioCSSContentAndTextToggleButtonView.as new file mode 100644 index 0000000..e6e3ba5 --- /dev/null +++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/RadioCSSContentAndTextToggleButtonView.as @@ -0,0 +1,47 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.flex.flat.beads +{ + /** + * The RadioCSSContentAndTextToggleButtonView class is the default view for + * the org.apache.flex.flat.RadioButton class. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public class RadioCSSContentAndTextToggleButtonView extends CSSContentAndTextToggleButtonView + { + /** + * Constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function RadioCSSContentAndTextToggleButtonView() + { + super(); + + className = "radio-icon"; + } + } +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListList.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListList.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListList.as new file mode 100644 index 0000000..f423d24 --- /dev/null +++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListList.as @@ -0,0 +1,64 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.flex.flat.supportClasses +{ + import org.apache.flex.core.IPopUp; + import org.apache.flex.html.SimpleList; + import org.apache.flex.html.beads.SolidBackgroundBead; + + //-------------------------------------- + // Events + //-------------------------------------- + + /** + * @copy org.apache.flex.core.ISelectionModel#change + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + [Event(name="change", type="org.apache.flex.events.Event")] + + /** + * The DropDownListList class is the List class used internally + * by DropDownList as the dropdown/popup. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public class DropDownListList extends SimpleList implements IPopUp + { + /** + * Constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function DropDownListList() + { + super(); + className = "dropdown-menu"; + } + } +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListStringItemRenderer.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListStringItemRenderer.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListStringItemRenderer.as new file mode 100644 index 0000000..3ab6a79 --- /dev/null +++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListStringItemRenderer.as @@ -0,0 +1,70 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.flex.flat.supportClasses +{ + import flash.text.TextFieldAutoSize; + import flash.text.TextFieldType; + + import org.apache.flex.core.CSSTextField; + import org.apache.flex.core.ValuesManager; + import org.apache.flex.events.Event; + import org.apache.flex.html.beads.ITextItemRenderer; + import org.apache.flex.html.supportClasses.StringItemRenderer; + + /** + * The DropDownListStringItemRenderer is a StringItemRenderer with a particular + * className for use in DropDownList. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public class DropDownListStringItemRenderer extends StringItemRenderer + { + /** + * constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function DropDownListStringItemRenderer() + { + super(); + + className = 'dropdown-menu-item-renderer'; + } + + /** + * @private + */ + override public function updateRenderer():void + { + className = selected ? 'dropdown-menu-item-renderer-selected' : 'dropdown-menu-item-renderer'; + if (selected) + selectedColor = ValuesManager.valuesImpl.getValue(this, 'background-color'); + if (hovered) + highlightColor = ValuesManager.valuesImpl.getValue(this, 'background-color', "hover"); + downColor = selectedColor; + super.updateRenderer(); + } + } +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml new file mode 100644 index 0000000..a755d5c --- /dev/null +++ b/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml @@ -0,0 +1,80 @@ +<!-- + + 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. + +--> +<flex-config> + + <compiler> + <accessible>false</accessible> + + <external-library-path> + </external-library-path> + + <mxml> + <children-as-data>true</children-as-data> + </mxml> + <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event> + <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind> + <binding-value-change-event-type>valueChange</binding-value-change-event-type> + + <keep-as3-metadata> + <name>Bindable</name> + <name>Managed</name> + <name>ChangeEvent</name> + <name>NonCommittingChangeEvent</name> + <name>Transient</name> + </keep-as3-metadata> + + <locale/> + + <library-path> + <!-- asjscompc won't 'link' these classes in, but will list their requires + if these swcs are on the external-library-path then their requires + will not be listed --> + <path-element>../../externs/Core.swc</path-element> + <path-element>../../externs/HTML.swc</path-element> + </library-path> + + <namespaces> + <namespace> + <uri>library://ns.apache.org/flexjs/flat</uri> + <manifest>flat-manifest.xml</manifest> + </namespace> + </namespaces> + + <source-path> + <path-element>as/src</path-element> + </source-path> + + <warn-no-constructor>false</warn-no-constructor> + </compiler> + + <include-file> + </include-file> + + <include-classes> + <class>FlatClasses</class> + </include-classes> + + <include-namespaces> + <uri>library://ns.apache.org/flexjs/flat</uri> + </include-namespaces> + + <target-player>${playerglobal.version}</target-player> + + +</flex-config> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/resources/compile-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/Flat/src/main/resources/compile-config.xml b/frameworks/projects/Flat/src/main/resources/compile-config.xml new file mode 100644 index 0000000..44c7c9f --- /dev/null +++ b/frameworks/projects/Flat/src/main/resources/compile-config.xml @@ -0,0 +1,91 @@ +<!-- + + 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. + +--> +<flex-config> + + <compiler> + <accessible>false</accessible> + + <external-library-path> + <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element> + <path-element>../../libs/Binding.swc</path-element> + <path-element>../../libs/Core.swc</path-element> + <path-element>../../libs/Graphics.swc</path-element> + <path-element>../../libs/HTML.swc</path-element> + </external-library-path> + + <mxml> + <children-as-data>true</children-as-data> + </mxml> + <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event> + <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind> + <binding-value-change-event-type>valueChange</binding-value-change-event-type> + + <keep-as3-metadata> + <name>Bindable</name> + <name>Managed</name> + <name>ChangeEvent</name> + <name>NonCommittingChangeEvent</name> + <name>Transient</name> + </keep-as3-metadata> + + <locale/> + + <library-path/> + + <namespaces> + <namespace> + <uri>library://ns.apache.org/flexjs/flat</uri> + <manifest>flat-manifest.xml</manifest> + </namespace> + <namespace> + <uri>library://ns.apache.org/flexjs/flat</uri> + <manifest>flat-as-manifest.xml</manifest> + </namespace> + </namespaces> + + <source-path> + <path-element>as/src</path-element> + <!--<path-element>asjs/src</path-element>--> + </source-path> + + <warn-no-constructor>false</warn-no-constructor> + </compiler> + + <include-file> + <name>defaults.css</name> + <path>as/defaults.css</path> + </include-file> + <include-file> + <name>js/out/*</name> + <path>js/out/*</path> + </include-file> + + <include-classes> + <class>FlatClasses</class> + <!--<class>FlatASJSClasses</class>--> + </include-classes> + + <include-namespaces> + <uri>library://ns.apache.org/flexjs/flat</uri> + </include-namespaces> + + <target-player>${playerglobal.version}</target-player> + + +</flex-config> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/resources/defaults.css ---------------------------------------------------------------------- diff --git a/frameworks/projects/Flat/src/main/resources/defaults.css b/frameworks/projects/Flat/src/main/resources/defaults.css new file mode 100644 index 0000000..53a91f1 --- /dev/null +++ b/frameworks/projects/Flat/src/main/resources/defaults.css @@ -0,0 +1,842 @@ +/* + * + * 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. + * + */ + +@namespace "library://ns.apache.org/flexjs/flat"; + +@font-face { + font-family: 'Flat-UI-Icons'; + + src: url('fonts/flat-ui-icons-regular.eot'); + src: url('fonts/flat-ui-icons-regular.eot?#iefix') format('embedded-opentype'), url('fonts/flat-ui-icons-regular.woff') format('woff'), url('fonts/flat-ui-icons-regular.ttf') format('truetype'), url('fonts/flat-ui-icons-regular.svg#flat-ui-icons-regular') format('svg'); +} + +/* Global style declaration */ +* +{ + font-family: "Arial"; + font-size: 12px; + color: #34495e; +} + +.flexjs *, . flexjs *:before, . flexjs *:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +Button +{ + color: #fff; + background-color: #1abc9c; + padding: 10px 15px; + font-size: 15px; + font-weight: normal; + line-height: 1.4; + border: none; + border-radius: 4px; + -webkit-transition: border .25s linear, color .25s linear, background-color .25s linear; + transition: border .25s linear, color .25s linear, background-color .25s linear; + + -webkit-font-smoothing: subpixel-antialiased; +} + +Button:hover +{ + border: none; + color: #fff; + background-color: #48c9b0; + border-color: #48c9b0; + padding: 10px 15px; +} + +Button:active +{ + border: none; + padding: 10px 15px; + outline: none; + box-shadow: none; +} + +ButtonBar +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.ButtonBarView"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController"); + IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.ButtonBarLayout"); + IDataGroup: ClassReference("org.apache.flex.html.supportClasses.DataGroup"); + IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData"); + IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory"); + IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.ButtonBarButtonItemRenderer"); + + border-style: none; +} + +ButtonBarButtonItemRenderer +{ + width: 80; + height: 30; +} + +.checkbox-icon, +.checkbox-icon-hover, +.checkbox-icon-checked +{ + position: absolute; + top: 0; + left: 0; + display: block; + width: 20px; + height: 20px; + font-size: 20px; + line-height: 20px; + color: #bdc3c7; + text-align: center; + cursor: pointer; + + /* .radio .icon-checked:before */ + /* .radio .icon-unchecked:before */ + font-family: 'Flat-UI-Icons'; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + font-size: 20px; + line-height: 20px; +} + +.checkbox-icon:before +{ + content: "\e60d"; +} + +.checkbox-icon-hover:before +{ + content: "\e60e"; +} + +.checkbox-icon-checked:before +{ + content: "\e60e"; +} + +.checkbox-icon-checked +{ + color: #1abc9c; +} + +.checkbox-input +{ + position: absolute; + top: 0; + left: 0; + width: 20px; + height: 20px; + padding: 0; + margin: 0; + outline: none !important; + opacity: 0; +} + +CheckBox +{ + /* .checkbox */ + position: relative; + padding-left: 32px; + margin-bottom: 12px; + font-size: 14px; + line-height: 1.5; + -webkit-transition: color .25s linear; + transition: color .25s linear; +} + +Container +{ + IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView"); + IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.BasicLayout"); +} + +ControlBar +{ + IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView"); + IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout"); + + background-color: #CECECE; + border-style: solid; + border-color: #000000; + border-width: 1px; +} + +/* ASJS */ +DataGrid +{ + IDataGridPresentationModel: ClassReference("org.apache.flex.html.beads.models.DataGridPresentationModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.DataGridView"); + IBeadModel: ClassReference("org.apache.flex.html.beads.models.DataGridModel"); + IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory"); + IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer"); + + background-color: #FFFFFF; + border-style: solid; + border-color: #222222; + border-width: 1px; +} + +DateChooser { + IBeadView: ClassReference("org.apache.flex.html.beads.DateChooserView"); + IBeadModel: ClassReference("org.apache.flex.html.beads.models.DateChooserModel"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.DateChooserMouseController"); + width: 280px; + height: 240px; +} + +DateField { + IBeadView: ClassReference("org.apache.flex.html.beads.DateFieldView"); + IBeadModel: ClassReference("org.apache.flex.html.beads.models.DateChooserModel"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.DateFieldMouseController"); + IFormatBead: ClassReference("org.apache.flex.html.accessories.DateFormatMMDDYYYYBead"); +} + +.dropdown-menu { + position: absolute; + z-index: 1000; + padding: 0; + margin-top: 9px; + font-size: 14px; + background-color: #f3f4f5; + border: none; + border-radius: 4px; + box-shadow: none; + list-style: none; + } +.dropdown-menu-divider { + height: 2px; + margin: 3px 0; + overflow: hidden; + background-color: rgba(202, 206, 209, .5); + } +.dropdown-menu-item-renderer { + padding: 3px 16px; + line-height: 1.429; + display: block; + width: 100%; + font-size: inherit; + color: #606d7a; + background-color: transparent; +} +.dropdown-menu-item-renderer-selected { + padding: 3px 16px; + line-height: 1.875; + font-size: inherit; + display: block; + width: 100%; + color: #fff; + background-color: #1abc9c; +} +.dropdown-menu-item-renderer:hover { + font-size: inherit; + color: #55606c; + background-color: rgba(202, 206, 209, .5); +} + +.dropdown-toggle-open-btn { + border-radius: 4px; + font-size: 14px; + color: #fff; + background-color: #1abc9c; + border-color: #1abc9c; + } + +.dropdown-toggle-open-btn:hover { + border-radius: 4px; + font-size: 14px; + color: #fff; + background-color: #48c9b0; + border-color: #48c9b0; + } + +.dropdown-caret { + display: inline-block; + color: inherit; + background-color: inherit; + width: 0; + height: 0; + margin-left: 5px; + vertical-align: middle; + border-top: 8px solid; + border-right: 6px solid transparent; + border-left: 6px solid transparent; + -webkit-transition: border-color .25s, color .25s; + transition: border-color .25s, color .25s; + } + +.dropdown-label { + color: inherit; + background-color: inherit; + font: inherit; + text-align: left; + display: inline-block; + } + +HContainer +{ + IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView"); + IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.HorizontalLayout"); +} + +ImageButton +{ + border-style: none; +} + +VContainer +{ + IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView"); + IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VerticalLayout"); +} + +List +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.ListView"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController"); + IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VerticalLayout"); + IDataGroup: ClassReference("org.apache.flex.html.supportClasses.DataGroup"); + IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.DataItemRendererFactoryForArrayData"); + IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory"); + IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer"); + IViewport: ClassReference("org.apache.flex.html.supportClasses.ScrollingViewport"); + border-style: solid; + border-color: #222222; +} + +Panel +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.PanelModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.PanelView"); + + background-color: #FFFFFF; + border-radius: 6px; + border-color: #1abc9c; + border-style: solid; + border-width: 2px; + padding: 2px; +} + +PanelWithControlBar +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.PanelModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.PanelWithControlBarView"); + + background-color: #FFFFFF; + border-radius: 6px; + border-color: #1abc9c; + border-style: solid; + border-width: 2px; + padding: 2px; +} + +.radio-icon, +.radio-icon-hover, +.radio-icon-checked +{ + position: absolute; + top: 0; + left: 0; + display: block; + width: 20px; + height: 20px; + font-size: 20px; + line-height: 20px; + color: #bdc3c7; + text-align: center; + cursor: pointer; + + /* .radio .icon-checked:before */ + /* .radio .icon-unchecked:before */ + font-family: 'Flat-UI-Icons'; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + font-size: 20px; + line-height: 20px; +} + +.radio-icon:before +{ + content: "\e60b"; +} + +.radio-icon-hover:before +{ + content: "\e60c"; +} + +.radio-icon-checked:before +{ + content: "\e60c"; +} + +.radio-icon-checked +{ + color: #1abc9c; +} + +.radio-input +{ + position: absolute; + top: 0; + left: 0; + width: 20px; + height: 20px; + padding: 0; + margin: 0; + outline: none !important; + opacity: 0; +} + +RadioButton +{ + /* .radio */ + position: relative; + padding-left: 32px; + margin-bottom: 12px; + font-size: 14px; + line-height: 1.5; + -webkit-transition: color .25s linear; + transition: color .25s linear; +} + +SimpleList +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.ListView"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController"); + IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VerticalLayout"); + IDataGroup: ClassReference("org.apache.flex.html.supportClasses.DataGroup"); + IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData"); + IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory"); + IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer"); + IViewport: ClassReference("org.apache.flex.html.supportClasses.ScrollingViewport"); +} + +StringItemRenderer +{ + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ItemRendererMouseController"); + height: 16; +} + +TextArea +{ + padding: 6px 10px; + font-size: 13px; + border-radius: 6px; + border-width: 2px; + border: 2px solid #1abc9c; +} + +TextInput +{ + background-color: #ffffff; + height: 35px; + padding: 6px 10px; + font-size: 13px; + line-height: 1.462; + border-radius: 6px; + border-width: 2px; + border: 2px solid #1abc9c; +} + +#titleLabel { + color: #fff; + font-size: 15px; +} + +TitleBar +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.TitleBarModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.TitleBarView"); + IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout"); + iMeasurementBead: ClassReference("org.apache.flex.html.beads.TitleBarMeasurementBead"); + color: #fff; + background-color: #1abc9c; + font-size: 15px; + border-style: none; + border-radius: 4px; +} + +ToolTip +{ + background-color: #FFFFCC; +} + +ViewBase +{ + IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView"); + IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.BasicLayout"); +} + + +/* Global Style Declaration */ +global +{ + IStatesImpl: ClassReference("org.apache.flex.core.SimpleStatesImpl"); + IEffectTimer: ClassReference("org.apache.flex.utils.EffectTimer"); + effectTimerInterval: 10; +} + +@media -flex-flash +{ + +Alert +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.AlertModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.AlertView"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.AlertController"); + iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead"); + iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead"); + + background-color: #FFFFFF; + border-style: solid; + border-color: #000000; + border-width: 1px; +} + +Border +{ + border-radius: inherit; + border: inherit; +} + +Button +{ + IBeadView: ClassReference("org.apache.flex.html.beads.CSSButtonView"); +} + +CheckBox +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel"); + IBeadView: ClassReference("org.apache.flex.flat.beads.CheckboxCSSContentAndTextToggleButtonView"); +} + +CloseButton +{ + IBeadView: ClassReference("org.apache.flex.html.beads.CloseButtonView"); +} + +ComboBox +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ComboBoxModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.ComboBoxView"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ComboBoxController"); + IPopUp: ClassReference("org.apache.flex.html.supportClasses.DropDownListList"); + IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData"); + IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory"); + IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer"); +} + +Container +{ + iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead"); + iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead"); +} + +ControlBar +{ + IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout"); + iMeasurementBead: ClassReference("org.apache.flex.html.beads.ControlBarMeasurementBead"); + iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead"); + iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead"); +} + +DropDownList +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel"); + IBeadView: ClassReference("org.apache.flex.flat.beads.DropDownListView"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.DropDownListController"); + IPopUp: ClassReference("org.apache.flex.flat.supportClasses.DropDownListList"); +} + +DropDownListList +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel"); + IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData"); + IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory"); + IItemRenderer: ClassReference("org.apache.flex.flat.supportClasses.DropDownListStringItemRenderer"); + iBackgroundBead: ClassReference('org.apache.flex.html.beads.SolidBackgroundBead'); + border-style: none; + border-radius: 4px; + border-color: #000000; + border-width: 1px; + background-color: #FFFFFF; +} + +Image +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ImageModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.ImageView"); +} + +ImageButton +{ + IBeadView: ClassReference("org.apache.flex.html.beads.ImageButtonView"); +} + +ImageAndTextButton +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ImageAndTextModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.ImageAndTextButtonView"); +} + +Label +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.TextFieldView"); + iMeasurementBead: ClassReference("org.apache.flex.html.beads.TextFieldLabelMeasurementBead"); +} + +List +{ + iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead'); + iBorderModel: ClassReference('org.apache.flex.html.beads.models.SingleLineBorderModel'); +} + +MultilineLabel +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.MultilineTextFieldView"); +} + +NumericStepper +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.RangeModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.NumericStepperView"); + + padding: 0px; + border-style: solid; + border-color: #000000; + border-width: 1px; + background-color: #FFFFFF; + iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead'); + iBackgroundBead: ClassReference('org.apache.flex.html.beads.SolidBackgroundBead'); +} + +Panel +{ + iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead"); + iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead"); +} + +PanelWithControlBar +{ + iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead"); + iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead"); +} + +RadioButton +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ValueToggleButtonModel"); + IBeadView: ClassReference("org.apache.flex.flat.beads.RadioCSSContentAndTextToggleButtonView"); +} + +.vscrollbar-uparrow { + padding: 0px; + display: inline-block; + border-color: #16a085; + border-radius: initial; + background-color: transparent; + width: 0; + height: 0; + margin-left: 5px; + vertical-align: middle; + border-bottom: 8px solid; + border-right: 6px solid transparent; + border-left: 6px solid transparent; + -webkit-transition: border-color .25s, color .25s; + transition: border-color .25s, color .25s; + } +.vscrollbar-downarrow-btn { + padding: 2px; + display: inline-block; + border-style: none; + border-radius: initial; + background-color: transparent; + width: 12; + height: 12; + margin-left: 5px; + vertical-align: middle; + } +.vscrollbar-uparrow-btn { + padding: 2px; + display: inline-block; + border-style: none; + border-radius: initial; + background-color: transparent; + width: 12; + height: 12; + margin-left: 5px; + vertical-align: middle; + } +.vscrollbar-downarrow { + padding: 0px; + display: inline-block; + border-color: #16a085; + border-radius: initial; + background-color: transparent; + width: 0; + height: 0; + margin-left: 5px; + vertical-align: middle; + border-top: 8px solid; + border-right: 6px solid transparent; + border-left: 6px solid transparent; + -webkit-transition: border-color .25s, color .25s; + transition: border-color .25s, color .25s; + } +.vscrollbar-track { + padding: 0px; + position: relative; + width: 8px; + height: 8px; + /*margin-bottom: 20px;*/ + cursor: pointer; + background-color: #ebedef; + border-radius: 4px; + /*border-radius: 32px;*/ + box-shadow: none; + } +.vscrollbar-thumb { + padding: 0px; + position: absolute; + z-index: 2; + width: 12px; + height: 12px; + cursor: pointer; + background-color: #16a085; + border-radius: 6px; + -webkit-transition: background .25s; + transition: background .25s; + } +.vscrollbar-thumb:hover { + background-color: #48c9b0; + outline: none; + } +.vscrollbar-thumb:active { + background-color: #16a085; + } + +VScrollBar +{ + IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VScrollBarLayout"); + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ScrollBarModel"); + IBeadView: ClassReference("org.apache.flex.flat.beads.CSSScrollBarView"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.VScrollBarMouseController"); +} + +SimpleAlert +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.AlertModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.SimpleAlertView"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.AlertController"); + iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead"); + iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead"); + + background-color: #FFFFFF; + border-style: solid; + border-color: #000000; + border-width: 1px; +} + +Slider +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.RangeModel"); + iBeadView: ClassReference("org.apache.flex.html.beads.SliderView"); + iBeadController: ClassReference("org.apache.flex.html.beads.controllers.SliderMouseController"); + iThumbView: ClassReference("org.apache.flex.html.beads.SliderThumbView"); + iTrackView: ClassReference("org.apache.flex.html.beads.SliderTrackView"); +} + +Spinner +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.RangeModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.SpinnerView"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.SpinnerMouseController"); +} + +TextArea +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.TextAreaView"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.EditableTextKeyboardController"); + iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead'); + iBorderModel: ClassReference('org.apache.flex.html.beads.models.SingleLineBorderModel'); +} + +TextButton +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.CSSTextButtonView"); + iMeasurementBead: ClassReference("org.apache.flex.html.beads.TextButtonMeasurementBead"); +} + +TextFieldItemRenderer +{ + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ItemRendererMouseController"); + height: 16; +} + +TextInput +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.TextInputWithBorderView"); + IBeadController: ClassReference("org.apache.flex.html.beads.controllers.EditableTextKeyboardController"); + iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead'); + iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead"); +} + +TitleBar +{ + iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead"); + iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead"); +} + +ToggleTextButton +{ + IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel"); + IBeadView: ClassReference("org.apache.flex.html.beads.CSSTextButtonView"); +} + +ViewBase +{ + iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead"); + iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead"); +} + + +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/resources/flat-as-manifest.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/Flat/src/main/resources/flat-as-manifest.xml b/frameworks/projects/Flat/src/main/resources/flat-as-manifest.xml new file mode 100644 index 0000000..6f12083 --- /dev/null +++ b/frameworks/projects/Flat/src/main/resources/flat-as-manifest.xml @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<!-- + + 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. + +--> + + +<componentPackage> + + <component id="DropDownListList" class="org.apache.flex.flat.supportClasses.DropDownListList" /> + +</componentPackage> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/resources/flat-manifest.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/Flat/src/main/resources/flat-manifest.xml b/frameworks/projects/Flat/src/main/resources/flat-manifest.xml new file mode 100644 index 0000000..77f5ffc --- /dev/null +++ b/frameworks/projects/Flat/src/main/resources/flat-manifest.xml @@ -0,0 +1,99 @@ +<?xml version="1.0"?> +<!-- + + 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. + +--> + + +<componentPackage> + + <component id="Button" class="org.apache.flex.html.Button" lookupOnly="true" /> + <component id="ButtonBar" class="org.apache.flex.html.ButtonBar" lookupOnly="true" /> + <component id="CloseButton" class="org.apache.flex.html.CloseButton" lookupOnly="true" /> + <component id="DropDownList" class="org.apache.flex.flat.DropDownList" /> + <component id="Image" class="org.apache.flex.html.Image" lookupOnly="true" /> + <component id="Label" class="org.apache.flex.html.Label" lookupOnly="true" /> + <component id="MultilineLabel" class="org.apache.flex.html.MultilineLabel" lookupOnly="true" /> + <component id="ImageAndTextButton" class="org.apache.flex.html.ImageAndTextButton" lookupOnly="true" /> + <component id="TextButton" class="org.apache.flex.html.TextButton" lookupOnly="true" /> + <component id="ToggleTextButton" class="org.apache.flex.html.ToggleTextButton" lookupOnly="true" /> + <component id="TextInput" class="org.apache.flex.html.TextInput" lookupOnly="true" /> + <component id="TextArea" class="org.apache.flex.html.TextArea" lookupOnly="true" /> + <component id="List" class="org.apache.flex.html.List" lookupOnly="true" /> + <component id="SimpleList" class="org.apache.flex.html.SimpleList" lookupOnly="true" /> + <component id="CheckBox" class="org.apache.flex.flat.CheckBox" /> + <component id="RadioButton" class="org.apache.flex.flat.RadioButton" /> + <component id="ComboBox" class="org.apache.flex.html.ComboBox" lookupOnly="true" /> + <component id="Container" class="org.apache.flex.html.Container" lookupOnly="true" /> + <component id="HContainer" class="org.apache.flex.html.HContainer" lookupOnly="true" /> + <component id="VContainer" class="org.apache.flex.html.VContainer" lookupOnly="true" /> + <component id="Panel" class="org.apache.flex.html.Panel" lookupOnly="true" /> + <component id="PanelView" class="org.apache.flex.html.beads.PanelView" lookupOnly="true" /> + <component id="PanelWithControlBar" class="org.apache.flex.html.PanelWithControlBar" lookupOnly="true" /> + <component id="ControlBar" class="org.apache.flex.html.ControlBar" lookupOnly="true" /> + <component id="TitleBar" class="org.apache.flex.html.TitleBar" lookupOnly="true" /> + <component id="TitleBarModel" class="org.apache.flex.html.beads.models.TitleBarModel" lookupOnly="true" /> + <component id="ToolTip" class="org.apache.flex.html.ToolTip" lookupOnly="true" /> + <component id="BasicLayout" class="org.apache.flex.html.beads.layouts.BasicLayout" lookupOnly="true" /> + <component id="VerticalLayout" class="org.apache.flex.html.beads.layouts.VerticalLayout" lookupOnly="true" /> + <component id="HorizontalLayout" class="org.apache.flex.html.beads.layouts.HorizontalLayout" lookupOnly="true" /> + <component id="TileLayout" class="org.apache.flex.html.beads.layouts.TileLayout" lookupOnly="true" /> + <component id="ListView" class="org.apache.flex.html.beads.ListView" lookupOnly="true" /> + <component id="MultilineTextFieldView" class="org.apache.flex.html.beads.MultilineTextFieldView" lookupOnly="true" /> + + <component id="SimpleAlert" class="org.apache.flex.html.SimpleAlert" lookupOnly="true" /> + <component id="Alert" class="org.apache.flex.html.Alert" lookupOnly="true" /> + <component id="Spinner" class="org.apache.flex.html.Spinner" lookupOnly="true" /> + <component id="Slider" class="org.apache.flex.html.Slider" lookupOnly="true" /> + <component id="SolidBackgroundBead" class="org.apache.flex.html.beads.SolidBackgroundBead" lookupOnly="true" /> + <component id="NumericStepper" class="org.apache.flex.html.NumericStepper" lookupOnly="true" /> + <component id="TextFieldItemRenderer" class="org.apache.flex.html.supportClasses.TextFieldItemRenderer" lookupOnly="true" /> + <component id="StringItemRenderer" class="org.apache.flex.html.supportClasses.StringItemRenderer" lookupOnly="true" /> + <component id="DataItemRenderer" class="org.apache.flex.html.supportClasses.DataItemRenderer" lookupOnly="true" /> + <component id="ButtonBarButtonItemRenderer" class="org.apache.flex.html.supportClasses.ButtonBarButtonItemRenderer" lookupOnly="true" /> + <component id="VScrollBar" class="org.apache.flex.html.supportClasses.VScrollBar" lookupOnly="true" /> + <component id="NumericOnlyTextInputBead" class="org.apache.flex.html.accessories.NumericOnlyTextInputBead" lookupOnly="true" /> + <component id="PasswordInputBead" class="org.apache.flex.html.accessories.PasswordInputBead" lookupOnly="true" /> + <component id="TextPromptBead" class="org.apache.flex.html.accessories.TextPromptBead" lookupOnly="true" /> + <component id="HRule" class="org.apache.flex.html.HRule" lookupOnly="true" /> + <component id="Spacer" class="org.apache.flex.html.Spacer" lookupOnly="true" /> + <component id="ImageAndTextButtonView" class="org.apache.flex.html.beads.ImageAndTextButtonView" lookupOnly="true" /> + <component id="ScrollingViewport" class="org.apache.flex.html.supportClasses.ScrollingViewport" lookupOnly="true" /> + + <component id="DataGrid" class="org.apache.flex.html.DataGrid" lookupOnly="true" /> + <component id="DataGridColumn" class="org.apache.flex.html.supportClasses.DataGridColumn" lookupOnly="true" /> + + <component id="DateChooser" class="org.apache.flex.html.DateChooser" lookupOnly="true" /> + <component id="DateField" class="org.apache.flex.html.DateField" lookupOnly="true" /> + <component id="VerticalColumnLayout" class="org.apache.flex.html.beads.layouts.VerticalColumnLayout" lookupOnly="true" /> + + <component id="ToolTipBead" class="org.apache.flex.html.accessories.ToolTipBead" lookupOnly="true" /> + + <component id="LayoutChangeNotifier" class="org.apache.flex.html.beads.layouts.LayoutChangeNotifier" lookupOnly="true" /> + <component id="ImageButton" class="org.apache.flex.html.ImageButton" lookupOnly="true" /> + <component id="FlexibleFirstChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout" lookupOnly="true" /> + <component id="OneFlexibleChildVerticalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayout" lookupOnly="true" /> + <component id="OneFlexibleChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayout" lookupOnly="true" /> + <component id="MXMLBeadViewBase" class="org.apache.flex.html.MXMLBeadViewBase" lookupOnly="true" /> + + <component id="Border" class="org.apache.flex.html.supportClasses.Border" lookupOnly="true" /> + + <component id="ViewBase" class="org.apache.flex.core.ViewBase" lookupOnly="true" /> + <component id="ViewBaseDataBinding" class="org.apache.flex.binding.ViewBaseDataBinding" lookupOnly="true" /> + <component id="State" class="org.apache.flex.states.State" lookupOnly="true" /> + +</componentPackage>