You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ha...@apache.org on 2017/03/28 17:37:22 UTC
[1/4] git commit: [flex-asjs] [refs/heads/tlf] - Removed what appears
to be a typo, causing warning in GCC
Repository: flex-asjs
Updated Branches:
refs/heads/tlf c6db8144c -> 577c8594c
Removed what appears to be a typo, causing warning in GCC
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/6714cff2
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6714cff2
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6714cff2
Branch: refs/heads/tlf
Commit: 6714cff23da1a4be108a7093013f052691df70be
Parents: bea3e94
Author: greg-dove <gr...@gmail.com>
Authored: Mon Mar 27 08:45:40 2017 +1300
Committer: greg-dove <gr...@gmail.com>
Committed: Mon Mar 27 08:45:40 2017 +1300
----------------------------------------------------------------------
.../projects/HTML/src/main/flex/org/apache/flex/html/Form.as | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6714cff2/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Form.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Form.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Form.as
index 2093e40..f50fdf9 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Form.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Form.as
@@ -56,7 +56,7 @@ package org.apache.flex.html
*/
COMPILE::JS
override protected function createElement():WrappedHTMLElement
- {HTMLFormElement
+ {
element = document.createElement('form') as WrappedHTMLElement;
positioner = element;
[2/4] git commit: [flex-asjs] [refs/heads/tlf] - Added CSSCheckBox
Posted by ha...@apache.org.
Added CSSCheckBox
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ce25c472
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ce25c472
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ce25c472
Branch: refs/heads/tlf
Commit: ce25c4722f67a7f9bbba316490c8b6c9a3d6c234
Parents: 6714cff
Author: Harbs <ha...@in-tools.com>
Authored: Mon Mar 27 16:42:34 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Mon Mar 27 16:42:34 2017 +0300
----------------------------------------------------------------------
.../flex/org/apache/flex/html/CSSCheckBox.as | 219 +++++++++++++++++++
.../HTML/src/main/resources/basic-manifest.xml | 1 +
.../HTML/src/main/resources/defaults.css | 6 +
3 files changed, 226 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce25c472/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CSSCheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CSSCheckBox.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CSSCheckBox.as
new file mode 100644
index 0000000..40c0b7a
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CSSCheckBox.as
@@ -0,0 +1,219 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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
+{
+ COMPILE::SWF
+ {
+ import flash.events.MouseEvent;
+ }
+
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IToggleButtonModel;
+ import org.apache.flex.core.IUIBase;
+ COMPILE::SWF
+ {
+ import org.apache.flex.core.UIButtonBase;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.core.WrappedHTMLElement;
+ import org.apache.flex.html.supportClasses.CheckBoxIcon;
+ }
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.MouseEvent;
+
+ //--------------------------------------
+ // Events
+ //--------------------------------------
+
+ /**
+ * Dispatched when the user checks or un-checks the CSSCheckBox.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="change", type="org.apache.flex.events.Event")]
+
+ /**
+ * The CSSCheckBox class implements the common user interface
+ * control. The CSSCheckBox includes its text label and is styleable using CSS.
+ * To style the checkbox control, a `checkClassName` should be specified which corresponds to a CSS class name.
+ *
+ * @toplevel
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::SWF
+ public class CSSCheckBox extends UIButtonBase implements IStrand
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CSSCheckBox()
+ {
+ super();
+
+ addEventListener(org.apache.flex.events.MouseEvent.CLICK, internalMouseHandler);
+ }
+
+ /**
+ * The text label for the CSSCheckBox.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get text():String
+ {
+ return IToggleButtonModel(model).text;
+ }
+
+ /**
+ * @private
+ */
+ public function set text(value:String):void
+ {
+ IToggleButtonModel(model).text = value;
+ }
+
+ [Bindable("change")]
+ /**
+ * <code>true</code> if the check mark is displayed.
+ *
+ * @default false
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get selected():Boolean
+ {
+ return IToggleButtonModel(model).selected;
+ }
+
+ /**
+ * @private
+ */
+ public function set selected(value:Boolean):void
+ {
+ IToggleButtonModel(model).selected = value;
+ }
+
+ private function internalMouseHandler(event:org.apache.flex.events.MouseEvent) : void
+ {
+ selected = !selected;
+ dispatchEvent(new Event("change"));
+ }
+ private var _checkClassName:String;
+ public function get checkClassName():String
+ {
+ return _checkClassName;
+ }
+ public function set checkClassName(value:String):void
+ {
+ _checkClassName = value;
+ }
+
+ }
+
+ COMPILE::JS
+ public class CSSCheckBox extends UIBase
+ {
+
+ private var _label:WrappedHTMLElement;
+ private var _icon:CheckBoxIcon;
+ private var _styleDiv:WrappedHTMLElement;
+ private var _textNode:WrappedHTMLElement
+
+ private static var _checkNumber:Number = 0;
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ override protected function createElement():WrappedHTMLElement
+ {
+ element = document.createElement('label') as WrappedHTMLElement;
+ _label = element;
+ _icon = new CheckBoxIcon();
+ element.appendChild(_icon.element);
+ // Add a span to allow checkbox styling
+ _styleDiv = document.createElement('div') as WrappedHTMLElement;
+ if(_checkClassName)
+ _styleDiv.setAttribute("class",_checkClassName)
+ element.appendChild(_styleDiv);
+ _textNode = document.createTextNode('') as WrappedHTMLElement;
+ element.appendChild(_textNode);
+
+ positioner = element;
+ //positioner.style.position = 'relative';
+ element.flexjs_wrapper = this;
+ _icon.element.flexjs_wrapper = this;
+ _styleDiv.flexjs_wrapper = this;
+
+ className = 'CSSCheckBox';
+ typeNames = 'CSSCheckBox';
+
+ return element;
+ }
+
+ private var _checkClassName:String;
+ public function get checkClassName():String
+ {
+ return _checkClassName;
+ }
+ public function set checkClassName(value:String):void
+ {
+ _checkClassName = value;
+ if(_styleDiv)
+ _styleDiv.setAttribute("class",_checkClassName);
+ }
+
+ public function get text():String
+ {
+ return _textNode.nodeValue;
+ }
+
+ public function set text(value:String):void
+ {
+ _textNode.nodeValue = value;
+ }
+
+ public function get selected():Boolean
+ {
+ return (_icon.element as HTMLInputElement).checked;
+ }
+
+ public function set selected(value:Boolean):void
+ {
+ (_icon.element as HTMLInputElement).checked = value;
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce25c472/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 8f132a6..53e4a63 100644
--- a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
@@ -42,6 +42,7 @@
<component id="List" class="org.apache.flex.html.List"/>
<component id="SimpleList" class="org.apache.flex.html.SimpleList"/>
<component id="CheckBox" class="org.apache.flex.html.CheckBox"/>
+ <component id="CSSCheckBox" class="org.apache.flex.html.CSSCheckBox"/>
<component id="RadioButton" class="org.apache.flex.html.RadioButton"/>
<component id="ComboBox" class="org.apache.flex.html.ComboBox"/>
<component id="ComboBoxList" class="org.apache.flex.html.supportClasses.ComboBoxList"/>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce25c472/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 e7f211d..8158d02 100644
--- a/frameworks/projects/HTML/src/main/resources/defaults.css
+++ b/frameworks/projects/HTML/src/main/resources/defaults.css
@@ -598,6 +598,12 @@ global
IBeadView: ClassReference("org.apache.flex.html.beads.CheckBoxView");
}
+ CSSCheckBox
+ {
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.CheckBoxView");
+ }
+
CloseButton
{
IBeadView: ClassReference("org.apache.flex.html.beads.CloseButtonView");
[4/4] git commit: [flex-asjs] [refs/heads/tlf] - Merge branch
'develop' into tlf
Posted by ha...@apache.org.
Merge branch 'develop' into tlf
* develop:
When x or y is set, change the style position to "absolute".
Added CSSCheckBox
Removed what appears to be a typo, causing warning in GCC
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/577c8594
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/577c8594
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/577c8594
Branch: refs/heads/tlf
Commit: 577c8594cd32aa2e058fdcca2214b49902368e3d
Parents: c6db814 6c71106
Author: Harbs <ha...@in-tools.com>
Authored: Tue Mar 28 20:37:15 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Tue Mar 28 20:37:15 2017 +0300
----------------------------------------------------------------------
.../main/flex/org/apache/flex/core/UIBase.as | 8 +-
.../flex/org/apache/flex/html/CSSCheckBox.as | 219 +++++++++++++++++++
.../src/main/flex/org/apache/flex/html/Form.as | 2 +-
.../HTML/src/main/resources/basic-manifest.xml | 1 +
.../HTML/src/main/resources/defaults.css | 6 +
5 files changed, 231 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
[3/4] git commit: [flex-asjs] [refs/heads/tlf] - When x or y is set,
change the style position to "absolute".
Posted by ha...@apache.org.
When x or y is set, change the style position to "absolute".
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/6c71106e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6c71106e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6c71106e
Branch: refs/heads/tlf
Commit: 6c71106e120b5b2f366b314e904dbcaadcf2ff2c
Parents: ce25c47
Author: Peter Ent <pe...@apache.org>
Authored: Mon Mar 27 16:06:46 2017 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Mon Mar 27 16:06:46 2017 -0400
----------------------------------------------------------------------
.../HTML/src/main/flex/org/apache/flex/core/UIBase.as | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6c71106e/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
index af9e255..dfe94bf 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
@@ -637,7 +637,7 @@ package org.apache.flex.core
COMPILE::JS
public function set x(value:Number):void
{
-// positioner.style.position = 'absolute';
+ positioner.style.position = 'absolute';
positioner.style.left = value + 'px';
}
@@ -670,7 +670,7 @@ package org.apache.flex.core
}
COMPILE::JS
{
-// positioner.style.position = 'absolute';
+ positioner.style.position = 'absolute';
positioner.style.left = value + 'px';
}
}
@@ -693,7 +693,7 @@ package org.apache.flex.core
COMPILE::JS
public function set y(value:Number):void
{
-// positioner.style.position = 'absolute';
+ positioner.style.position = 'absolute';
positioner.style.top = value + 'px';
}
@@ -726,7 +726,7 @@ package org.apache.flex.core
}
COMPILE::JS
{
-// positioner.style.position = 'absolute';
+ positioner.style.position = 'absolute';
positioner.style.top = value + 'px';
}
}