ButtonBar/DataGrid clean up. Removed DataGridButtonBarButtonItemRenderer and 
ButtonBarButtonItemRenderer classes and replaced them with 
TextButtonItemRenderer which is a TextButton that implements IItemRenderer. 
HTML ButtonBars now are much cleaner.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/8a23e1e9
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8a23e1e9
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8a23e1e9

Branch: refs/heads/dual
Commit: 8a23e1e9f80a46a64256437d54e2032abbb3c699
Parents: 975b478
Author: Peter Ent <[email protected]>
Authored: Mon Apr 17 17:11:10 2017 -0400
Committer: Peter Ent <[email protected]>
Committed: Mon Apr 17 17:11:10 2017 -0400

----------------------------------------------------------------------
 .../projects/HTML/src/main/flex/HTMLClasses.as  |   2 +-
 .../flex/html/beads/layouts/ButtonBarLayout.as  |  66 ++---
 .../ButtonBarButtonItemRenderer.as              | 197 ---------------
 .../DataGridButtonBarButtonItemRenderer.as      |  91 -------
 .../supportClasses/TextButtonItemRenderer.as    | 244 +++++++++++++++++++
 .../HTML/src/main/resources/basic-manifest.xml  |   2 +-
 .../HTML/src/main/resources/defaults.css        |  12 +-
 7 files changed, 267 insertions(+), 347 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a23e1e9/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as 
b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
index 0e7e052..1b7441d 100644
--- a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
+++ b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
@@ -161,7 +161,7 @@ internal class HTMLClasses
        import org.apache.flex.html.supportClasses.DataGroup; DataGroup;
        import org.apache.flex.html.supportClasses.Viewport; Viewport;
        import org.apache.flex.html.supportClasses.ScrollingViewport; 
ScrollingViewport;
-       import 
org.apache.flex.html.supportClasses.DataGridButtonBarButtonItemRenderer; 
DataGridButtonBarButtonItemRenderer;
+       import org.apache.flex.html.supportClasses.TextButtonItemRenderer; 
TextButtonItemRenderer;
 
        import org.apache.flex.html.DataGridButtonBarTextButton; 
DataGridButtonBarTextButton;
        import org.apache.flex.html.DataGridButtonBar; DataGridButtonBar;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a23e1e9/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
index f4b0e81..51d0c4c 100644
--- 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
@@ -19,31 +19,15 @@
 package org.apache.flex.html.beads.layouts
 {
        import org.apache.flex.core.IBeadLayout;
-       import org.apache.flex.core.ILayoutHost;
-       import org.apache.flex.core.ILayoutParent;
+       import org.apache.flex.core.ILayoutChild;
        import org.apache.flex.core.ILayoutView;
-       import org.apache.flex.core.IParentIUIBase;
-       import org.apache.flex.core.ISelectableItemRenderer;
-       import org.apache.flex.core.ISelectionModel;
+       import org.apache.flex.core.IStyleableObject;
        import org.apache.flex.core.IStrand;
-       import org.apache.flex.core.IUIBase;
-       import org.apache.flex.core.IViewportModel;
-       import org.apache.flex.core.LayoutBase;
-       import org.apache.flex.core.SimpleCSSStyles;
-       import org.apache.flex.core.UIBase;
-       import org.apache.flex.core.ValuesManager;
-       import org.apache.flex.events.Event;
-       import org.apache.flex.events.IEventDispatcher;
-       import org.apache.flex.html.List;
-       import org.apache.flex.html.beads.ButtonBarView;
        import org.apache.flex.html.beads.models.ButtonBarModel;
        import org.apache.flex.html.supportClasses.UIItemRendererBase;
-       import org.apache.flex.geom.Rectangle;
-       import org.apache.flex.utils.CSSUtils;
-       import org.apache.flex.utils.CSSContainerUtils;
 
        /**
-        *  The ButtonBarLayout class bead sizes and positions the 
org.apache.flex.html.Button
+        *  The ButtonBarLayout class bead sizes and positions the button
         *  elements that make up a org.apache.flex.html.ButtonBar. This bead 
arranges the Buttons
         *  horizontally and makes them all the same width unless the 
buttonWidths property has been set in which case
         *  the values stored in that array are used.
@@ -103,43 +87,33 @@ package org.apache.flex.html.beads.layouts
                        }
 
                        var n:int = contentView.numElements;
+                       if (n <= 0) return false;
 
                        for (var i:int=0; i < n; i++)
-                       {
-                               var ir:ISelectableItemRenderer = 
contentView.getElementAt(i) as ISelectableItemRenderer;
-                               if (ir == null || !UIBase(ir).visible) continue;
+                       {       
+                               var ilc:ILayoutChild = 
contentView.getElementAt(i) as ILayoutChild;
+                               if (ilc == null || !ilc.visible) continue;
+                               if (!(ilc is IStyleableObject)) continue;
                                
                                COMPILE::SWF {
                                        if (buttonWidths) {
                                                var widthValue:* = 
buttonWidths[i];
 
                                                if (_widthType == 
ButtonBarModel.PIXEL_WIDTHS) {
-                                                       if (widthValue != null) 
UIBase(ir).width = Number(widthValue);
-                                                       if (UIBase(ir).style == 
null) {
-                                                               
UIBase(ir).style = new SimpleCSSStyles();
-                                                       }
-                                                       
UIBase(ir).style.flexGrow = 0;
+                                                       if (widthValue != null) 
ilc.width = Number(widthValue);
+                                                       
IStyleableObject(ilc).style.flexGrow = 0;
                                                }
                                                else if (_widthType == 
ButtonBarModel.PROPORTIONAL_WIDTHS) {
                                                        if (widthValue != null) 
{
-                                                               if 
(UIBase(ir).style == null) {
-                                                                       
UIBase(ir).style = new SimpleCSSStyles();
-                                                               }
-                                                               
UIBase(ir).style.flexGrow = Number(widthValue);
+                                                               
IStyleableObject(ilc).style.flexGrow = Number(widthValue);
                                                        }
                                                }
                                                else if (_widthType == 
ButtonBarModel.PERCENT_WIDTHS) {
-                                                       if (widthValue != null) 
UIBase(ir).percentWidth = Number(widthValue);
-                                                       if (UIBase(ir).style == 
null) {
-                                                               
UIBase(ir).style = new SimpleCSSStyles();
-                                                       }
-                                                       
UIBase(ir).style.flexGrow = 0;
+                                                       if (widthValue != null) 
ilc.percentWidth = Number(widthValue);
+                                                       
IStyleableObject(ilc).style.flexGrow = 0;
                                                }
                                        } else {
-                                               if (UIBase(ir).style == null) {
-                                                       UIBase(ir).style = new 
SimpleCSSStyles();
-                                               }
-                                               UIBase(ir).style.flexGrow = 1;
+                                               
IStyleableObject(ilc).style.flexGrow = 1;
                                        }
                                }
 
@@ -149,22 +123,20 @@ package org.apache.flex.html.beads.layouts
                                                var widthValue:* = 
buttonWidths[i];
 
                                                if (_widthType == 
ButtonBarModel.PIXEL_WIDTHS) {
-                                                       if (widthValue != null) 
UIBase(ir).width = Number(widthValue);
+                                                       if (widthValue != null) 
ilc.width = Number(widthValue);
                                                }
                                                else if (_widthType == 
ButtonBarModel.PROPORTIONAL_WIDTHS) {
-                                                       if (widthValue != null) 
UIBase(ir).element.style["flex-grow"] = String(widthValue);
+                                                       if (widthValue != null) 
ilc.element.style["flex-grow"] = String(widthValue);
                                                }
                                                else if (_widthType == 
ButtonBarModel.PERCENT_WIDTHS) {
-                                                       if (widthValue != null) 
UIBase(ir).percentWidth = Number(widthValue);
+                                                       if (widthValue != null) 
ilc.percentWidth = Number(widthValue);
                                                }
                                        } else {
-                                               
UIBase(ir).element.style["flex-grow"] = "1";
+                                               ilc.element.style["flex-grow"] 
= "1";
                                        }
                                        
-                                       UIBase(ir).height = contentView.height;
+                                       ilc.height = contentView.height;
                                }
-                               
-                               UIItemRendererBase(ir).adjustSize();
                        }
 
                        // now let the horizontal layout take care of things.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a23e1e9/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ButtonBarButtonItemRenderer.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ButtonBarButtonItemRenderer.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ButtonBarButtonItemRenderer.as
deleted file mode 100644
index d9301f6..0000000
--- 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ButtonBarButtonItemRenderer.as
+++ /dev/null
@@ -1,197 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.supportClasses
-{
-       import org.apache.flex.core.IItemRenderer;
-       import org.apache.flex.core.IItemRendererParent;
-       import org.apache.flex.core.UIBase;
-       import org.apache.flex.events.Event;
-       import org.apache.flex.events.MouseEvent;
-       import org.apache.flex.html.TextButton;
-       import org.apache.flex.html.beads.ITextItemRenderer;
-       import org.apache.flex.events.ItemClickedEvent;
-       
-       COMPILE::JS
-       {
-               import org.apache.flex.core.WrappedHTMLElement;            
-       }
-
-       /**
-        *  The ButtonBarButtonItemRenderer class handles the display of each 
item for the 
-        *  org.apache.flex.html.ButtonBar component. This class uses a 
-        *  org.apache.flex.html.Button to represent the data.
-        *
-        *  @langversion 3.0
-        *  @playerversion Flash 10.2
-        *  @playerversion AIR 2.6
-        *  @productversion FlexJS 0.0
-        */
-       public class ButtonBarButtonItemRenderer extends UIItemRendererBase 
implements ITextItemRenderer
-       {
-               /**
-                *  constructor.
-                *
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion FlexJS 0.0
-                */
-               public function ButtonBarButtonItemRenderer()
-               {
-                       super();
-               }
-               
-               /**
-                * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-                * @flexjsignorecoercion HTMLElement
-                */
-               COMPILE::JS
-               override protected function createElement():WrappedHTMLElement
-               {
-                       var result:WrappedHTMLElement = super.createElement();
-                       trace("Element "+element+"; positioner "+positioner);
-                       return result;
-               }
-               
-               protected var textButton:TextButton;
-               
-               /**
-                * @private
-                */
-               override public function addedToParent():void
-               {
-                       super.addedToParent();
-               }
-               
-               /**
-                * @private
-                */
-               protected function handleClickEvent(event:MouseEvent):void
-               {
-                       var newEvent:ItemClickedEvent = new 
ItemClickedEvent("itemClicked");
-                       newEvent.multipleSelection = event.shiftKey;
-                       newEvent.index = index;
-                       newEvent.data = data;
-                       dispatchEvent(newEvent);
-               }
-               
-               /**
-                *  The string version of the data associated with the instance 
of the itemRenderer.
-                *
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion FlexJS 0.0
-                */
-               public function get text():String
-               {
-                       return data as String;
-               }
-               public function set text(value:String):void
-               {
-                       data = value;
-               }
-               
-               /**
-                * @private
-                */
-               override public function setWidth(value:Number, noEvent:Boolean 
= false):void
-               {
-                       super.setWidth(value, true);
-                       textButton.width = value;
-                       COMPILE::SWF {
-                               textButton.height = height;
-                       }
-                       COMPILE::JS {
-                               textButton.percentHeight = 100;
-                       }
-               }
-               
-               /**
-                * @private
-                */
-               override public function setHeight(value:Number, 
noEvent:Boolean = false):void
-               {
-                       super.setHeight(value, true);
-                       textButton.height = value;
-                       COMPILE::SWF {
-                               textButton.width = width;
-                       }
-                       COMPILE::JS {
-                               textButton.percentWidth = 100;
-                       }
-               }
-               
-               /**
-                *  The data to be displayed by the itemRenderer instance. For 
ButtonBarItemRenderer, the
-                *  data's string version is used as the label for the Button.
-                *
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion FlexJS 0.0
-                */
-               override public function set data(value:Object):void
-               {
-                       super.data = value;
-                       
-                       var added:Boolean = false;
-                       if (textButton == null) {
-                               textButton = new TextButton();
-                               
-                               // listen for clicks on the button and 
translate them into
-                               // an itemClicked event.
-                               
textButton.addEventListener('click',handleClickEvent);
-                               added = true;
-                       }
-                       
-                       var valueAsString:String;
-                       
-                       if (value is String) {
-                               valueAsString = value as String;
-                       }
-                       else if (value.hasOwnProperty("label")) {
-                               valueAsString = String(value["label"]);
-                       }
-                       else if (value.hasOwnProperty("title")) {
-                               valueAsString = String(value["title"]);
-                       }
-                       
-                       if (valueAsString) textButton.text = valueAsString;
-                       
-                       if (added) addElement(textButton);
-               }
-               
-               /**
-                * @private
-                */
-               override public function adjustSize():void
-               {
-                       COMPILE::SWF {
-                               textButton.width = this.width;
-                               textButton.height = this.height;
-                       }
-                       COMPILE::JS {
-                               textButton.percentWidth = 100;
-                       }
-                       
-                       updateRenderer();
-               }
-       }
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a23e1e9/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGridButtonBarButtonItemRenderer.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGridButtonBarButtonItemRenderer.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGridButtonBarButtonItemRenderer.as
deleted file mode 100644
index d05036f..0000000
--- 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGridButtonBarButtonItemRenderer.as
+++ /dev/null
@@ -1,91 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.supportClasses
-{
-       import org.apache.flex.core.IItemRenderer;
-       import org.apache.flex.core.IItemRendererParent;
-       import org.apache.flex.core.UIBase;
-       import org.apache.flex.events.Event;
-       import org.apache.flex.events.MouseEvent;
-       import org.apache.flex.html.DataGridButtonBarTextButton;
-       import org.apache.flex.html.beads.ITextItemRenderer;
-       import org.apache.flex.events.ItemClickedEvent;
-
-       /**
-        *  The ButtonBarButtonItemRenderer class handles the display of each 
item for the 
-        *  org.apache.flex.html.ButtonBar component. This class uses a 
-        *  org.apache.flex.html.Button to represent the data.
-        *
-        *  @langversion 3.0
-        *  @playerversion Flash 10.2
-        *  @playerversion AIR 2.6
-        *  @productversion FlexJS 0.0
-        */
-       public class DataGridButtonBarButtonItemRenderer extends 
ButtonBarButtonItemRenderer
-       {
-               /**
-                *  constructor.
-                *
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion FlexJS 0.0
-                */
-               public function DataGridButtonBarButtonItemRenderer()
-               {
-                       super();
-               }
-               
-               /**
-                *  The data to be displayed by the itemRenderer instance. For 
ButtonBarItemRenderer, the
-                *  data's string version is used as the label for the Button.
-                *
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion FlexJS 0.0
-                */
-               override public function set data(value:Object):void
-               {
-                       var added:Boolean = false;
-                       if (textButton == null) {
-                               textButton = new DataGridButtonBarTextButton();
-                               textButton.percentWidth = 100;
-                               
-                               // listen for clicks on the button and 
translate them into
-                               // an itemClicked event.
-                               
textButton.addEventListener('click',handleClickEvent);
-                               added = true;
-                       }
-                       
-                       super.data = value;
-                       
-                       if (added) addElement(textButton);
-               }
-               
-               /**
-                * @private
-                */
-               COMPILE::JS
-               override public function adjustSize():void
-               {
-                       // not neeed for JS platform
-               }
-       }
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a23e1e9/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TextButtonItemRenderer.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TextButtonItemRenderer.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TextButtonItemRenderer.as
new file mode 100644
index 0000000..049fe9b
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TextButtonItemRenderer.as
@@ -0,0 +1,244 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.html.supportClasses
+{
+       import org.apache.flex.core.IItemRenderer;
+       import org.apache.flex.core.IItemRendererParent;
+       import org.apache.flex.core.UIBase;
+       import org.apache.flex.core.SimpleCSSStyles;
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.MouseEvent;
+       import org.apache.flex.html.TextButton;
+       import org.apache.flex.html.beads.ITextItemRenderer;
+       import org.apache.flex.events.ItemClickedEvent;
+       
+       COMPILE::JS
+       {
+               import org.apache.flex.core.WrappedHTMLElement;            
+       }
+       
+       /**
+        * The TextButtonItemRenderer class extends TextButton and turns it 
into an itemRenderer
+        * suitable for use in most DataContainer/List/DataGrid applications.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.8
+        */
+       public class TextButtonItemRenderer extends TextButton implements 
ITextItemRenderer
+       {
+               public function TextButtonItemRenderer()
+               {
+                       super();
+                       
+                       style = new SimpleCSSStyles();
+                       
+                       addEventListener('click',handleClickEvent);
+               }
+               
+               private var _data:Object;
+               
+               /**
+                *  The data to be displayed as the text value. Use this in 
conjunction with
+                *  the labelField property to select an item from the 
dataProvider record to use
+                *  as the text value of the button.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.8
+                */
+               public function get data():Object
+               {
+                       return _data;
+               }
+               public function set data(value:Object):void
+               {
+                       _data = value;
+                       
+                       var valueAsString:String;
+                       
+                       if (value is String) {
+                               valueAsString = value as String;
+                       }
+                       else if (value.hasOwnProperty("label")) {
+                               valueAsString = String(value["label"]);
+                       }
+                       else if (value.hasOwnProperty("title")) {
+                               valueAsString = String(value["title"]);
+                       }
+                       
+                       if (valueAsString) text = valueAsString;
+               }
+               
+               /**
+                * @private
+                */
+               protected function handleClickEvent(event:MouseEvent):void
+               {
+                       var newEvent:ItemClickedEvent = new 
ItemClickedEvent("itemClicked");
+                       newEvent.multipleSelection = event.shiftKey;
+                       newEvent.index = index;
+                       newEvent.data = data;
+                       dispatchEvent(newEvent);
+               }
+               
+               /*
+                * IItemRenderer, ISelectableItemRenderer
+                */
+               
+               private var _itemRendererParent:Object;
+               
+               /**
+                * The parent container for the itemRenderer instance.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.8
+                */
+               public function get itemRendererParent():Object
+               {
+                       return _itemRendererParent;
+               }
+               public function set itemRendererParent(value:Object):void
+               {
+                       _itemRendererParent = value;
+               }
+               
+               private var _labelField:String = "label";
+               
+               /**
+                * The name of the field within the data to use as a label. 
Some itemRenderers use this field to
+                * identify the value they should show while other 
itemRenderers ignore this if they are showing
+                * complex information.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.8
+                */
+               public function get labelField():String
+               {
+                       return _labelField;
+               }
+               public function set labelField(value:String):void
+               {
+                       _labelField = value;
+               }
+               
+               private var _listData:Object;
+               
+               [Bindable("__NoChangeEvent__")]
+               /**
+                *  Additional data about the list structure the itemRenderer 
may
+                *  find useful.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.8
+                */
+               public function get listData():Object
+               {
+                       return _listData;
+               }
+               public function set listData(value:Object):void
+               {
+                       _listData = value;
+               }
+               
+               private var _index:int;
+               
+               /**
+                *  The position with the dataProvider being shown by the 
itemRenderer instance.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.8
+                */
+               public function get index():int
+               {
+                       return _index;
+               }
+               public function set index(value:int):void
+               {
+                       _index = value;
+               }
+               
+               private var _hovered:Boolean;
+               
+               /**
+                *  Whether or not the itemRenderer is in a hovered state.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.8
+                */
+               public function get hovered():Boolean
+               {
+                       return _hovered;
+               }
+               public function set hovered(value:Boolean):void
+               {
+                       _hovered = value;
+               }
+               
+               private var _selected:Boolean;
+               
+               /**
+                *  Whether or not the itemRenderer is in a selected state.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.8
+                */
+               public function get selected():Boolean
+               {
+                       return _selected;
+               }
+               public function set selected(value:Boolean):void
+               {
+                       _selected = value;
+               }
+               
+               private var _down:Boolean;
+               
+               /**
+                *  Whether or not the itemRenderer is in a down (or 
pre-selected) state.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.8
+                */
+               public function get down():Boolean
+               {
+                       return _down;
+               }
+               public function set down(value:Boolean):void
+               {
+                       _down = value;
+               }
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a23e1e9/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml 
b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
index 65f21d7..4778ae8 100644
--- a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
@@ -89,9 +89,9 @@
     <component id="TreeItemRenderer" 
class="org.apache.flex.html.supportClasses.TreeItemRenderer"/>
     <component id="DataItemRenderer" 
class="org.apache.flex.html.supportClasses.DataItemRenderer"/>
     <component id="MXMLItemRenderer" 
class="org.apache.flex.html.supportClasses.MXMLItemRenderer"/>
-    <component id="ButtonBarButtonItemRenderer" 
class="org.apache.flex.html.supportClasses.ButtonBarButtonItemRenderer"/>
     <component id="DateItemRenderer" 
class="org.apache.flex.html.supportClasses.DateItemRenderer"/>
     <component id="DayNameItemRenderer" 
class="org.apache.flex.html.supportClasses.DayNameItemRenderer"/>
+    <component id="TextButtonItemRenderer" 
class="org.apache.flex.html.supportClasses.TextButtonItemRenderer"/>
     <!--
      <component id="TextFieldItemRenderer" 
class="org.apache.flex.html.supportClasses.TextFieldItemRenderer"/>
     <component id="HScrollBar" 
class="org.apache.flex.html.supportClasses.HScrollBar"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a23e1e9/frameworks/projects/HTML/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/defaults.css 
b/frameworks/projects/HTML/src/main/resources/defaults.css
index bd1211b..ffd48e2 100644
--- a/frameworks/projects/HTML/src/main/resources/defaults.css
+++ b/frameworks/projects/HTML/src/main/resources/defaults.css
@@ -91,19 +91,11 @@ ButtonBar
        IBeadLayout: 
ClassReference("org.apache.flex.html.beads.layouts.ButtonBarLayout");
        IDataProviderItemRendererMapper: 
ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
        IItemRendererClassFactory: 
ClassReference("org.apache.flex.core.ItemRendererClassFactory");
-       IItemRenderer: 
ClassReference("org.apache.flex.html.supportClasses.ButtonBarButtonItemRenderer");
+       IItemRenderer: 
ClassReference("org.apache.flex.html.supportClasses.TextButtonItemRenderer");
        
        border-style: none;
 }
 
-ButtonBarButtonItemRenderer
-{
-       width: 80;
-       height: 30;
-       flex-shrink: 0;
-       flex-grow: 1;
-}
-
 ComboBox
 {
        IBeadModel: 
ClassReference("org.apache.flex.html.beads.models.ComboBoxModel");
@@ -190,7 +182,7 @@ DataGridButtonBar
        IBeadLayout: 
ClassReference("org.apache.flex.html.beads.layouts.ButtonBarLayout");
        IDataProviderItemRendererMapper: 
ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
        IItemRendererClassFactory: 
ClassReference("org.apache.flex.core.ItemRendererClassFactory");
-       IItemRenderer: 
ClassReference("org.apache.flex.html.supportClasses.DataGridButtonBarButtonItemRenderer");
+       IItemRenderer: 
ClassReference("org.apache.flex.html.supportClasses.TextButtonItemRenderer");
        
        border-style: none;
 }

Reply via email to