You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/10/30 21:16:49 UTC
[06/13] git commit: [flex-asjs] [refs/heads/core_js_to_as] - move
asjs to as
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab34be3/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
deleted file mode 100644
index 309ef3b..0000000
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
+++ /dev/null
@@ -1,332 +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.beads.layouts
-{
- import org.apache.flex.core.IBeadLayout;
- import org.apache.flex.core.IDocument;
- import org.apache.flex.core.ILayoutChild;
- import org.apache.flex.core.ILayoutHost;
- import org.apache.flex.core.IParentIUIBase;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IUIBase;
- 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.geom.Rectangle;
- import org.apache.flex.utils.CSSUtils;
- import org.apache.flex.utils.CSSContainerUtils;
-
- /**
- * The OneFlexibleChildHorizontalLayout class is a simple layout
- * bead. It takes the set of children and lays them out
- * horizontally in one row, separating them according to
- * CSS layout rules for margin and padding styles. But it
- * will size the one child to take up as much or little
- * room as possible.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class OneFlexibleChildHorizontalLayout implements IBeadLayout, IDocument
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function OneFlexibleChildHorizontalLayout()
- {
- }
-
-
- /**
- * The id of the flexible child
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var flexibleChild:String;
-
- private var actualChild:ILayoutChild;
-
- // the strand/host container is also an ILayoutChild because
- // can have its size dictated by the host's parent which is
- // important to know for layout optimization
- private var host:ILayoutChild;
-
- /**
- * @private
- * The document.
- */
- private var document:Object;
-
- /**
- * @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
- {
- host = value as ILayoutChild;
- }
-
- private var _maxWidth:Number;
-
- /**
- * @copy org.apache.flex.core.IBead#maxWidth
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get maxWidth():Number
- {
- return _maxWidth;
- }
-
- /**
- * @private
- */
- public function set maxWidth(value:Number):void
- {
- _maxWidth = value;
- }
-
- private var _maxHeight:Number;
-
- /**
- * @copy org.apache.flex.core.IBead#maxHeight
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get maxHeight():Number
- {
- return _maxHeight;
- }
-
- /**
- * @private
- */
- public function set maxHeight(value:Number):void
- {
- _maxHeight = value;
- }
-
- /**
- * @copy org.apache.flex.core.IBeadLayout#layout
- */
- public function layout():Boolean
- {
- var layoutParent:ILayoutHost = host.getBeadByType(ILayoutHost) as ILayoutHost;
- var contentView:IParentIUIBase = layoutParent ? layoutParent.contentView : IParentIUIBase(host);
- var padding:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
- actualChild = document[flexibleChild];
-
- var ilc:ILayoutChild;
- var n:int = contentView.numElements;
- var marginLeft:Object;
- var marginRight:Object;
- var marginTop:Object;
- var marginBottom:Object;
- var margin:Object;
- maxHeight = 0;
- var verticalMargins:Array = new Array(n);
-
- var ww:Number = contentView.width - padding.right;
- var hh:Number = contentView.height;
- var xx:int = padding.left;
- var flexChildIndex:int;
- var ml:Number;
- var mr:Number;
- var mt:Number;
- var mb:Number;
- var lastmr:Number;
- var lastml:Number;
- var valign:Object;
- var hostSizedToContent:Boolean = host.isHeightSizedToContent();
-
- for (var i:int = 0; i < n; i++)
- {
- var child:IUIBase = contentView.getElementAt(i) as IUIBase;
- if (child == actualChild)
- {
- flexChildIndex = i;
- break;
- }
- margin = ValuesManager.valuesImpl.getValue(child, "margin");
- marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
- marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
- marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
- marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
- mt = CSSUtils.getTopValue(marginTop, margin, hh);
- mb = CSSUtils.getBottomValue(marginBottom, margin, hh);
- mr = CSSUtils.getRightValue(marginRight, margin, ww);
- ml = CSSUtils.getLeftValue(marginLeft, margin, ww);
- child.y = mt + padding.top;
- if (child is ILayoutChild)
- {
- ilc = child as ILayoutChild;
- if (!isNaN(ilc.percentHeight))
- ilc.setHeight(contentView.height * ilc.percentHeight / 100, true);
- }
- maxHeight = Math.max(maxHeight, mt + child.height + mb);
- child.x = xx + ml;
- xx += child.width + ml + mr;
- lastmr = mr;
- valign = ValuesManager.valuesImpl.getValue(child, "vertical-align");
- verticalMargins[i] = { marginTop: mt, marginBottom: mb, valign: valign };
- }
-
- if (n > 0 && n > flexChildIndex)
- {
- for (i = n - 1; i > flexChildIndex; i--)
- {
- child = contentView.getElementAt(i) as IUIBase;
- margin = ValuesManager.valuesImpl.getValue(child, "margin");
- marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
- marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
- marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
- marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
- mt = CSSUtils.getTopValue(marginTop, margin, hh);
- mb = CSSUtils.getTopValue(marginBottom, margin, hh);
- mr = CSSUtils.getRightValue(marginRight, margin, ww);
- ml = CSSUtils.getLeftValue(marginLeft, margin, ww);
- child.y = mt + padding.top;
- if (child is ILayoutChild)
- {
- ilc = child as ILayoutChild;
- if (!isNaN(ilc.percentHeight))
- ilc.setHeight(contentView.height * ilc.percentHeight / 100, true);
- }
- maxHeight = Math.max(maxHeight, mt + child.height + mb);
- child.x = ww - child.width - mr;
- ww -= child.width + ml + mr;
- lastml = ml;
- valign = ValuesManager.valuesImpl.getValue(child, "vertical-align");
- verticalMargins[i] = { marginTop: mt, marginBottom: mb, valign: valign };
- }
-
- child = contentView.getElementAt(flexChildIndex) as IUIBase;
- margin = ValuesManager.valuesImpl.getValue(child, "margin");
- marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
- marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
- marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
- marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
- mt = CSSUtils.getTopValue(marginTop, margin, hh);
- mb = CSSUtils.getTopValue(marginBottom, margin, hh);
- mr = CSSUtils.getRightValue(marginRight, margin, ww);
- ml = CSSUtils.getLeftValue(marginLeft, margin, ww);
- if (child is ILayoutChild)
- {
- ilc = child as ILayoutChild;
- if (!isNaN(ilc.percentHeight))
- ilc.setHeight(contentView.height * ilc.percentHeight / 100, true);
- }
- child.x = xx + ml;
- child.width = ww - child.x;
- maxHeight = Math.max(maxHeight, mt + child.height + mb);
- valign = ValuesManager.valuesImpl.getValue(child, "vertical-align");
- verticalMargins[flexChildIndex] = { marginTop: mt, marginBottom: mb, valign: valign };
- }
- if (hostSizedToContent)
- ILayoutChild(contentView).setHeight(maxHeight + padding.top + padding.bottom, true);
-
- for (i = 0; i < n; i++)
- {
- var obj:Object = verticalMargins[i]
- child = contentView.getElementAt(i) as IUIBase;
- setPositionAndHeight(child, obj.top, obj.marginTop, padding.top,
- obj.bottom, obj.marginBottom, padding.bottom, maxHeight, obj.valign);
- }
- return true;
- }
-
- private function setPositionAndHeight(child:IUIBase, top:Number, mt:Number, pt:Number,
- bottom:Number, mb:Number, pb:Number, h:Number, valign:String):void
- {
- var heightSet:Boolean = false; // if we've set the height in a way that gens a change event
- var ySet:Boolean = false; // if we've set the y yet.
-
- var hh:Number = h;
- var ilc:ILayoutChild = child as ILayoutChild;
- if (!isNaN(top))
- {
- child.y = top + mt;
- ySet = true;
- hh -= top + mt;
- }
- else
- {
- hh -= mt;
- }
- if (!isNaN(bottom))
- {
- if (!isNaN(top))
- {
- if (ilc)
- ilc.setHeight(hh - bottom - mb, true);
- else
- {
- child.height = hh - bottom - mb;
- heightSet = true;
- }
- }
- else
- {
- child.y = h - bottom - mb - child.height - 1; // some browsers don't like going to the edge
- ySet = true;
- }
- }
- if (ilc)
- {
- if (!isNaN(ilc.percentHeight))
- ilc.setHeight(h * ilc.percentHeight / 100, true);
- }
- if (valign == "center")
- child.y = (h - child.height) / 2;
- else if (valign == "bottom")
- child.y = h - child.height - mb;
- else
- child.y = mt + pt;
- if (!heightSet)
- child.dispatchEvent(new Event("sizeChanged"));
- }
-
- public function setDocument(document:Object, id:String = null):void
- {
- this.document = document;
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab34be3/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
deleted file mode 100644
index 77af305..0000000
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
+++ /dev/null
@@ -1,459 +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.beads.layouts
-{
- import org.apache.flex.core.IBeadLayout;
- import org.apache.flex.core.IDocument;
- import org.apache.flex.core.ILayoutChild;
- import org.apache.flex.core.ILayoutHost;
- import org.apache.flex.core.IParentIUIBase;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IUIBase;
- 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.geom.Rectangle;
- import org.apache.flex.utils.CSSContainerUtils;
-
- /**
- * The OneFlexibleChildVerticalLayout class is a simple layout
- * bead. It takes the set of children and lays them out
- * vertically in one column, separating them according to
- * CSS layout rules for margin and padding styles. But it
- * will size the one child to take up as much or little
- * room as possible.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class OneFlexibleChildVerticalLayout implements IBeadLayout, IDocument
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function OneFlexibleChildVerticalLayout()
- {
- }
-
-
- /**
- * The id of the flexible child
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var flexibleChild:String;
-
- private var actualChild:ILayoutChild;
-
- // the strand/host container is also an ILayoutChild because
- // can have its size dictated by the host's parent which is
- // important to know for layout optimization
- private var host:ILayoutChild;
-
- /**
- * @private
- * The document.
- */
- private var document:Object;
-
- /**
- * @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
- {
- host = value as ILayoutChild;
- }
-
- private var _maxWidth:Number;
-
- /**
- * @copy org.apache.flex.core.IBead#maxWidth
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get maxWidth():Number
- {
- return _maxWidth;
- }
-
- /**
- * @private
- */
- public function set maxWidth(value:Number):void
- {
- _maxWidth = value;
- }
-
- private var _maxHeight:Number;
-
- /**
- * @copy org.apache.flex.core.IBead#maxHeight
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get maxHeight():Number
- {
- return _maxHeight;
- }
-
- /**
- * @private
- */
- public function set maxHeight(value:Number):void
- {
- _maxHeight = value;
- }
-
- /**
- * @copy org.apache.flex.core.IBeadLayout#layout
- */
- public function layout():Boolean
- {
- var layoutParent:ILayoutHost = host.getBeadByType(ILayoutHost) as ILayoutHost;
- var contentView:IParentIUIBase = layoutParent ? layoutParent.contentView : IParentIUIBase(host);
- var padding:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
- actualChild = document[flexibleChild];
-
- var ilc:ILayoutChild;
- var n:int = contentView.numElements;
- var marginLeft:Object;
- var marginRight:Object;
- var marginTop:Object;
- var marginBottom:Object;
- var margin:Object;
- maxWidth = 0;
-
- var w:Number = contentView.width;
- var hh:Number = contentView.height - padding.bottom;
- var yy:int = padding.top;
- var flexChildIndex:int;
- var ml:Number;
- var mr:Number;
- var mt:Number;
- var mb:Number;
- var lastmb:Number;
- var lastmt:Number;
- var halign:Object;
- var left:Number;
- var right:Number;
-
- for (var i:int = 0; i < n; i++)
- {
- var child:IUIBase = contentView.getElementAt(i) as IUIBase;
- ilc = child as ILayoutChild;
- left = ValuesManager.valuesImpl.getValue(child, "left");
- right = ValuesManager.valuesImpl.getValue(child, "right");
- if (child == actualChild)
- {
- flexChildIndex = i;
- break;
- }
- margin = ValuesManager.valuesImpl.getValue(child, "margin");
- if (margin is Array)
- {
- if (margin.length == 1)
- marginLeft = marginTop = marginRight = marginBottom = margin[0];
- else if (margin.length <= 3)
- {
- marginLeft = marginRight = margin[1];
- marginTop = marginBottom = margin[0];
- }
- else if (margin.length == 4)
- {
- marginLeft = margin[3];
- marginBottom = margin[2];
- marginRight = margin[1];
- marginTop = margin[0];
- }
- }
- else if (margin == null)
- {
- marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
- marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
- marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
- marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
- }
- else
- {
- marginLeft = marginTop = marginBottom = marginRight = margin;
- }
- mt = Number(marginTop);
- if (isNaN(mt))
- mt = 0;
- mb = Number(marginBottom);
- if (isNaN(mb))
- mb = 0;
- if (ilc)
- {
- if (!isNaN(ilc.percentHeight))
- ilc.setHeight(contentView.height * ilc.percentHeight / 100, !isNaN(ilc.percentWidth));
- }
- if (marginLeft == "auto")
- ml = 0;
- else
- {
- ml = Number(marginLeft);
- if (isNaN(ml))
- ml = 0;
- }
- if (marginRight == "auto")
- mr = 0;
- else
- {
- mr = Number(marginRight);
- if (isNaN(mr))
- mr = 0;
- }
- if (child is ILayoutChild)
- {
- ilc = child as ILayoutChild;
- if (!isNaN(ilc.percentWidth))
- ilc.setWidth(contentView.width * ilc.percentWidth / 100, !isNaN(ilc.percentHeight));
- }
- maxWidth = Math.max(maxWidth, ml + child.width + mr);
- setPositionAndWidth(child, left, ml, padding.left, right, mr, padding.right, w);
- child.y = yy + mt;
- yy += child.height + mt + mb;
- lastmb = mb;
- }
-
- if (n > 0 && n > flexChildIndex)
- {
- for (i = n - 1; i > flexChildIndex; i--)
- {
- child = contentView.getElementAt(i) as IUIBase;
- ilc = child as ILayoutChild;
- left = ValuesManager.valuesImpl.getValue(child, "left");
- right = ValuesManager.valuesImpl.getValue(child, "right");
- margin = ValuesManager.valuesImpl.getValue(child, "margin");
- if (margin is Array)
- {
- if (margin.length == 1)
- marginLeft = marginTop = marginRight = marginBottom = margin[0];
- else if (margin.length <= 3)
- {
- marginLeft = marginRight = margin[1];
- marginTop = marginBottom = margin[0];
- }
- else if (margin.length == 4)
- {
- marginLeft = margin[3];
- marginBottom = margin[2];
- marginRight = margin[1];
- marginTop = margin[0];
- }
- }
- else if (margin == null)
- {
- marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
- marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
- marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
- marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
- }
- else
- {
- marginLeft = marginTop = marginBottom = marginRight = margin;
- }
- mt = Number(marginTop);
- if (isNaN(mt))
- mt = 0;
- mb = Number(marginBottom);
- if (isNaN(mb))
- mb = 0;
- if (ilc)
- {
- if (!isNaN(ilc.percentHeight))
- ilc.setHeight(contentView.height * ilc.percentHeight / 100, !isNaN(ilc.percentWidth));
- }
- if (marginLeft == "auto")
- ml = 0;
- else
- {
- ml = Number(marginLeft);
- if (isNaN(ml))
- ml = 0;
- }
- if (marginRight == "auto")
- mr = 0;
- else
- {
- mr = Number(marginRight);
- if (isNaN(mr))
- mr = 0;
- }
- if (child is ILayoutChild)
- {
- ilc = child as ILayoutChild;
- if (!isNaN(ilc.percentWidth))
- ilc.setWidth(contentView.width * ilc.percentWidth / 100, !isNaN(ilc.percentHeight));
- }
- setPositionAndWidth(child, left, ml, padding.left, right, mr, padding.right, w);
- maxWidth = Math.max(maxWidth, ml + child.width + mr);
- child.y = hh - child.height - mb;
- hh -= child.height + mt + mb;
- lastmt = mt;
- }
- }
-
- child = contentView.getElementAt(flexChildIndex) as IUIBase;
- ilc = child as ILayoutChild;
- left = ValuesManager.valuesImpl.getValue(child, "left");
- right = ValuesManager.valuesImpl.getValue(child, "right");
- margin = ValuesManager.valuesImpl.getValue(child, "margin");
- if (margin is Array)
- {
- if (margin.length == 1)
- marginLeft = marginTop = marginRight = marginBottom = margin[0];
- else if (margin.length <= 3)
- {
- marginLeft = marginRight = margin[1];
- marginTop = marginBottom = margin[0];
- }
- else if (margin.length == 4)
- {
- marginLeft = margin[3];
- marginBottom = margin[2];
- marginRight = margin[1];
- marginTop = margin[0];
- }
- }
- else if (margin == null)
- {
- marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
- marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
- marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
- marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
- }
- else
- {
- marginLeft = marginTop = marginBottom = marginRight = margin;
- }
- mt = Number(marginTop);
- if (isNaN(mt))
- mt = 0;
- mb = Number(marginBottom);
- if (isNaN(mb))
- mb = 0;
- if (ilc)
- {
- if (!isNaN(ilc.percentHeight))
- ilc.setHeight(contentView.height * ilc.percentHeight / 100, !isNaN(ilc.percentWidth));
- }
- if (marginLeft == "auto")
- ml = 0;
- else
- {
- ml = Number(marginLeft);
- if (isNaN(ml))
- ml = 0;
- }
- if (marginRight == "auto")
- mr = 0;
- else
- {
- mr = Number(marginRight);
- if (isNaN(mr))
- mr = 0;
- }
- if (child is ILayoutChild)
- {
- ilc = child as ILayoutChild;
- if (!isNaN(ilc.percentWidth))
- ilc.setWidth(contentView.width * ilc.percentWidth / 100, !isNaN(ilc.percentHeight));
- }
- setPositionAndWidth(child, left, ml, padding.left, right, mr, padding.right, w);
- maxWidth = Math.max(maxWidth, ml + child.width + mr);
- child.y = yy + mt;
- child.height = hh - mb - child.y;
-
- return true;
- }
-
- private function setPositionAndWidth(child:IUIBase, left:Number, ml:Number, pl:Number,
- right:Number, mr:Number, pr:Number, w:Number):void
- {
- var widthSet:Boolean = false;
-
- var ww:Number = w;
- var ilc:ILayoutChild = child as ILayoutChild;
- if (!isNaN(left))
- {
- child.x = left + ml;
- ww -= left + ml;
- }
- else
- {
- if (isNaN(right))
- child.x = ml + pl;
- ww -= ml;
- }
- if (!isNaN(right))
- {
- if (!isNaN(left))
- {
- if (ilc)
- ilc.setWidth(ww - right - mr, true);
- else
- {
- child.width = ww - right - mr;
- widthSet = true;
- }
- }
- else
- child.x = w - right - mr - child.width - 1; // some browsers don't like going all the way to the edge
- }
- if (ilc)
- {
- if (!isNaN(ilc.percentWidth))
- ilc.setWidth(w * ilc.percentWidth / 100, true);
- }
- if (!widthSet)
- child.dispatchEvent(new Event("sizeChanged"));
- }
-
- public function setDocument(document:Object, id:String = null):void
- {
- this.document = document;
- }
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab34be3/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
deleted file mode 100644
index d32777d..0000000
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
+++ /dev/null
@@ -1,199 +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.beads.layouts
-{
- import org.apache.flex.core.IBeadLayout;
- import org.apache.flex.core.IContainer;
- import org.apache.flex.core.ILayoutHost;
- import org.apache.flex.core.IMeasurementBead;
- import org.apache.flex.core.IParent;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IUIBase;
- 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.geom.Rectangle;
- import org.apache.flex.utils.CSSUtils;
- import org.apache.flex.utils.CSSContainerUtils;
-
- /**
- * ColumnLayout is a class that organizes the positioning of children
- * of a container into a set of columns where each column's width is set to
- * the maximum size of all of the children in that column.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class VerticalColumnLayout implements IBeadLayout
- {
- /**
- * constructor
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function VerticalColumnLayout()
- {
- }
-
- private var _strand:IStrand;
-
- /**
- * @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;
- }
-
-
- private var _numColumns:int;
-
- /**
- * The number of columns.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get numColumns():int
- {
- return _numColumns;
- }
- public function set numColumns(value:int):void
- {
- _numColumns = value;
- }
-
- /**
- * @copy org.apache.flex.core.IBeadLayout#layout
- */
- public function layout():Boolean
- {
- var host:UIBase = UIBase(_strand);
- var layoutParent:ILayoutHost = host.getBeadByType(ILayoutHost) as ILayoutHost;
- var contentView:IParent = layoutParent.contentView;
- var padding:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
- var sw:Number = host.width;
- var sh:Number = host.height;
-
- var hasWidth:Boolean = !host.isWidthSizedToContent();
- var hasHeight:Boolean = !host.isHeightSizedToContent();
- var e:IUIBase;
- var i:int;
- var col:int = 0;
- var columns:Array = [];
- var rows:Array = [];
- var data:Array = [];
- for (i = 0; i < numColumns; i++)
- columns[i] = 0;
-
- var marginLeft:Object;
- var marginRight:Object;
- var marginTop:Object;
- var marginBottom:Object;
- var margin:Object;
- var ml:Number;
- var mr:Number;
- var mt:Number;
- var mb:Number;
- var n:int = contentView.numElements;
- var rowData:Object = { rowHeight: 0 };
-
- // determine max widths of columns
- for (i = 0; i < n; i++) {
- e = contentView.getElementAt(i) as IUIBase;
- margin = ValuesManager.valuesImpl.getValue(e, "margin");
- marginLeft = ValuesManager.valuesImpl.getValue(e, "margin-left");
- marginTop = ValuesManager.valuesImpl.getValue(e, "margin-top");
- marginRight = ValuesManager.valuesImpl.getValue(e, "margin-right");
- marginBottom = ValuesManager.valuesImpl.getValue(e, "margin-bottom");
- mt = CSSUtils.getTopValue(marginTop, margin, sh);
- mb = CSSUtils.getBottomValue(marginBottom, margin, sh);
- mr = CSSUtils.getRightValue(marginRight, margin, sw);
- ml = CSSUtils.getLeftValue(marginLeft, margin, sw);
- data.push({ mt: mt, mb: mb, mr: mr, ml: ml});
- var thisPrefWidth:int = 0;
- if (e is IStrand)
- {
- var measure:IMeasurementBead = e.getBeadByType(IMeasurementBead) as IMeasurementBead;
- if (measure)
- thisPrefWidth = measure.measuredWidth + ml + mr;
- else
- thisPrefWidth = e.width + ml + mr;
- }
- else
- thisPrefWidth = e.width + ml + mr;
-
- rowData.rowHeight = Math.max(rowData.rowHeight, e.height + mt + mb);
- columns[col] = Math.max(columns[col], thisPrefWidth);
- col = col + 1;
- if (col == numColumns)
- {
- rows.push(rowData);
- rowData = {rowHeight: 0};
- col = 0;
- }
- }
-
- var lastmb:Number = 0;
- var curx:int = padding.left;
- var cury:int = padding.top;
- var maxHeight:int = 0;
- var maxWidth:int = 0;
- col = 0;
- for (i = 0; i < n; i++)
- {
- e = contentView.getElementAt(i) as IUIBase;
- e.x = curx + ml;
- e.y = cury + data[i].mt;
- curx += columns[col++];
- maxHeight = Math.max(maxHeight, e.y + e.height + data[i].mb);
- maxWidth = Math.max(maxWidth, e.x + e.width + data[i].mr);
- if (col == numColumns)
- {
- cury += rows[0].rowHeight;
- rows.shift();
- col = 0;
- curx = padding.left;
- }
- }
- if (!hasWidth && n > 0 && !isNaN(maxWidth))
- {
- UIBase(contentView).setWidth(maxWidth, true);
- }
- if (!hasHeight && n > 0 && !isNaN(maxHeight))
- {
- UIBase(contentView).setHeight(maxHeight, true);
- }
- return true;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab34be3/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/models/DataGridModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/models/DataGridModel.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/models/DataGridModel.as
deleted file mode 100644
index f50b36a..0000000
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/models/DataGridModel.as
+++ /dev/null
@@ -1,72 +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.beads.models
-{
- import org.apache.flex.core.IDataGridModel;
- import org.apache.flex.events.Event;
-
- /**
- * The DataGridModel class bead extends org.apache.flex.html.beads.modelsArraySelectionModel
- * and adds the array of org.apache.flex.html.supportClasses.DataGridColumns used to define
- * each of the column in the DataGrid.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DataGridModel extends ArraySelectionModel implements IDataGridModel
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DataGridModel()
- {
- super();
- }
-
- private var _columns:Array;
-
- /**
- * The array of org.apache.flex.html.supportClasses.DataGridColumns used to
- * define each column of the org.apache.flex.html.DataGrid.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get columns():Array
- {
- return _columns;
- }
- public function set columns(value:Array):void
- {
- if (_columns != value) {
- _columns = value;
- dispatchEvent( new Event("columnsChanged"));
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab34be3/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/models/DataGridPresentationModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/models/DataGridPresentationModel.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/models/DataGridPresentationModel.as
deleted file mode 100644
index 2959aad..0000000
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/models/DataGridPresentationModel.as
+++ /dev/null
@@ -1,86 +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.beads.models
-{
- import org.apache.flex.core.IDataGridPresentationModel;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.Event;
-
- /**
- * The DataGridPresentationModel class contains the data to label the columns
- * of the org.apache.flex.html.DataGrid along with the height of the rows.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DataGridPresentationModel extends ListPresentationModel implements IDataGridPresentationModel
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DataGridPresentationModel()
- {
- super();
- }
-
- private var _columnLabels:Array;
-
- /**
- * The labels for each column.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get columnLabels():Array
- {
- return _columnLabels;
- }
- public function set columnLabels(value:Array):void
- {
- if (value != _columnLabels) {
- _columnLabels = value;
- dispatchEvent(new Event("columnsChanged"));
- }
- }
-
- private var _strand:IStrand;
-
- /**
- * @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
- {
- _strand = value;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab34be3/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/models/DateChooserModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/models/DateChooserModel.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/models/DateChooserModel.as
deleted file mode 100644
index 4b6fc18..0000000
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/models/DateChooserModel.as
+++ /dev/null
@@ -1,189 +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.beads.models
-{
- import org.apache.flex.core.IDateChooserModel;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
-
- /**
- * The DateChooserModel is a bead class that manages the data for a DataChooser.
- * This includes arrays of names for the months and days of the week as well the
- * currently selected date.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DateChooserModel extends EventDispatcher implements IDateChooserModel
- {
- public function DateChooserModel()
- {
- // default displayed year and month to "today"
- var today:Date = new Date();
- displayedYear = today.getFullYear();
- displayedMonth = today.getMonth();
- }
-
- private var _strand:IStrand;
-
- /**
- * @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;
- }
-
- private var _dayNames:Array = ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];
- private var _monthNames:Array = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
- private var _displayedYear:Number;
- private var _displayedMonth:Number;
- private var _firstDayOfWeek:Number = 0;
- private var _selectedDate:Date;
-
- /**
- * An array of strings used to name the days of the week with Sunday being the
- * first element of the array.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get dayNames():Array
- {
- return _dayNames;
- }
- public function set dayNames(value:Array):void
- {
- _dayNames = value;
- dispatchEvent( new Event("dayNamesChanged") );
- }
-
- /**
- * An array of strings used to name the months of the year with January being
- * the first element of the array.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get monthNames():Array
- {
- return _monthNames;
- }
- public function set monthNames(value:Array):void
- {
- _monthNames = value;
- dispatchEvent( new Event("monthNames") );
- }
-
- /**
- * The year currently displayed by the DateChooser.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get displayedYear():Number
- {
- return _displayedYear;
- }
- public function set displayedYear(value:Number):void
- {
- if (value != _displayedYear) {
- _displayedYear = value;
- dispatchEvent( new Event("displayedYearChanged") );
- }
- }
-
- /**
- * The month currently displayed by the DateChooser.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get displayedMonth():Number
- {
- return _displayedMonth;
- }
- public function set displayedMonth(value:Number):void
- {
- if (_displayedMonth != value) {
- _displayedMonth = value;
- dispatchEvent( new Event("displayedMonthChanged") );
- }
- }
-
- /**
- * The index of the first day of the week, Sunday = 0.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get firstDayOfWeek():Number
- {
- return _firstDayOfWeek;
- }
- public function set firstDayOfWeek(value:Number):void
- {
- if (value != _firstDayOfWeek) {
- _firstDayOfWeek = value;
- dispatchEvent( new Event("firstDayOfWeekChanged") );
- }
- }
-
- /**
- * The currently selected date or null if no date has been selected.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get selectedDate():Date
- {
- return _selectedDate;
- }
- public function set selectedDate(value:Date):void
- {
- if (value != _selectedDate) {
- _selectedDate = value;
- dispatchEvent( new Event("selectedDateChanged") );
-
- displayedMonth = value.getMonth();
- displayedYear = value.getFullYear();
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab34be3/frameworks/projects/HTML/asjs/src/org/apache/flex/html/supportClasses/DataGridColumn.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/supportClasses/DataGridColumn.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/supportClasses/DataGridColumn.as
deleted file mode 100644
index 24e16fd..0000000
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/supportClasses/DataGridColumn.as
+++ /dev/null
@@ -1,127 +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.IFactory;
-
- /**
- * The DataGridColumn class is the collection of properties that describe
- * a column of the org.apache.flex.html.DataGrid: which renderer
- * to use for each cell in the column, the width of the column, the label for the
- * column, and the name of the field in the data containing the value to display
- * in the column.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DataGridColumn
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DataGridColumn()
- {
- }
-
- private var _itemRenderer:IFactory;
-
- /**
- * The itemRenderer class or factory to use to make instances of itemRenderers for
- * display of data.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get itemRenderer():IFactory
- {
- return _itemRenderer;
- }
- public function set itemRenderer(value:IFactory):void
- {
- _itemRenderer = value;
- }
-
- private var _columnWidth:Number = Number.NaN;
-
- /**
- * The width of the column (default is 100 pixels).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get columnWidth():Number
- {
- return _columnWidth;
- }
- public function set columnWidth(value:Number):void
- {
- _columnWidth = value;
- }
-
- private var _label:String;
-
- /**
- * The label for the column (appears in the header area).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get label():String
- {
- return _label;
- }
- public function set label(value:String):void
- {
- _label = value;
- }
-
- private var _dataField:String;
-
- /**
- * The name of the field containing the data value presented by the column. This value is used
- * by the itemRenderer is select the property from the data.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get dataField():String
- {
- return _dataField;
- }
- public function set dataField(value:String):void
- {
- _dataField = value;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab34be3/frameworks/projects/HTML/asjs/src/org/apache/flex/html/supportClasses/DateChooserButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/supportClasses/DateChooserButton.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/supportClasses/DateChooserButton.as
deleted file mode 100644
index 2d80b2f..0000000
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/supportClasses/DateChooserButton.as
+++ /dev/null
@@ -1,67 +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.html.TextButton;
-
- /**
- * The DateChooserButton class is used for each button in the DateChooser. The
- * button holds the day of the month the button is representing.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DateChooserButton extends TextButton
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DateChooserButton()
- {
- super();
- className = "DateChooserButton";
- }
-
- private var _dayOfMonth:int;
-
- /**
- * The day of the month the button represents.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get dayOfMonth():int
- {
- return _dayOfMonth;
- }
- public function set dayOfMonth(value:int):void
- {
- _dayOfMonth = value;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab34be3/frameworks/projects/HTML/asjs/src/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as
deleted file mode 100644
index 4d90c03..0000000
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as
+++ /dev/null
@@ -1,295 +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.ISelectableItemRenderer;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.core.graphics.GraphicsContainer;
- import org.apache.flex.events.Event;
- import org.apache.flex.utils.MXMLDataInterpreter;
-
- /**
- * The GraphicsItemRenderer provides a base class for itemRenderers that use graphics rather than
- * components.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class GraphicsItemRenderer extends GraphicsContainer implements ISelectableItemRenderer
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function GraphicsItemRenderer()
- {
- super();
- }
-
- /**
- * @private
- */
- override public function addedToParent():void
- {
- super.addedToParent();
-
- // very common for item renderers to be resized by their containers,
- addEventListener("widthChanged", sizeChangeHandler);
- addEventListener("heightChanged", sizeChangeHandler);
-
- // each MXML file can also have styles in fx:Style block
- ValuesManager.valuesImpl.init(this);
-
- MXMLDataInterpreter.generateMXMLProperties(this, mxmlProperties);
- MXMLDataInterpreter.generateMXMLInstances(this, this, MXMLDescriptor);
-
- dispatchEvent(new Event("initBindings"));
- dispatchEvent(new Event("initComplete"));
-
- }
-
- 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.0
- */
- public function get labelField():String
- {
- return _labelField;
- }
- public function set labelField(value:String):void
- {
- _labelField = 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.0
- */
- public function get index():int
- {
- return _index;
- }
- public function set index(value:int):void
- {
- _index = 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.0
- */
- public function get selected():Boolean
- {
- return _selected;
- }
- public function set selected(value:Boolean):void
- {
- _selected = value;
- updateRenderer();
- }
-
- 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.0
- */
- public function get hovered():Boolean
- {
- return _hovered;
- }
- public function set hovered(value:Boolean):void
- {
- _hovered = value;
- updateRenderer();
- }
-
- 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.0
- */
- public function get down():Boolean
- {
- return _down;
- }
- public function set down(value:Boolean):void
- {
- _down = value;
- updateRenderer();
- }
-
- private var _data:Object;
-
- [Bindable("__NoChangeEvent__")]
- /**
- * The data being represented by this itemRenderer. This can be something simple like a String or
- * a Number or something very complex.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get data():Object
- {
- return _data;
- }
- public function set data(value:Object):void
- {
- _data = value;
- }
-
- private var _dataField:String;
-
- /**
- * The name of the field within the data the itemRenderer should use.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get dataField():String
- {
- return _dataField;
- }
- public function set dataField(value:String):void
- {
- _dataField = value;
- }
-
- 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.0
- */
- public function get itemRendererParent():Object
- {
- return _itemRendererParent;
- }
- public function set itemRendererParent(value:Object):void
- {
- _itemRendererParent = value;
- }
-
- /**
- * @private
- */
- public function updateRenderer():void
- {
-// if (down)
-// backgroundColor = downColor;
-// else if (hovered)
-// backgroundColor = highlightColor;
-// else if (selected)
-// backgroundColor = selectedColor;
- }
-
- /**
- * @copy org.apache.flex.core.ItemRendererClassFactory#mxmlContent
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var mxmlContent:Array;
-
- /**
- * @private
- */
- public function get MXMLDescriptor():Array
- {
- return null;
- }
-
- private var mxmlProperties:Array ;
-
- /**
- * @private
- */
- public function generateMXMLAttributes(data:Array):void
- {
- mxmlProperties = data;
- }
-
- /**
- * @private
- */
- private function sizeChangeHandler(event:Event):void
- {
- adjustSize();
- }
-
- /**
- * This function is called whenever the itemRenderer changes size. Sub-classes should override
- * this method an handle the size change.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function adjustSize():void
- {
- // handle in subclass
- }
- }
-}
\ No newline at end of file