flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Renamed KeyboardController to EditableTextController.
Date Fri, 23 Aug 2013 18:57:41 GMT
Updated Branches:
  refs/heads/develop 6b5bdd2ed -> 2cb1c1e57


Renamed KeyboardController to EditableTextController.


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

Branch: refs/heads/develop
Commit: 2cb1c1e5792d75a4ee05b7978bdf05c6b72e0856
Parents: 6b5bdd2
Author: Peter Ent <pent@apache.org>
Authored: Fri Aug 23 14:57:31 2013 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Fri Aug 23 14:57:31 2013 -0400

----------------------------------------------------------------------
 frameworks/as/defaults.css                      |  4 +-
 frameworks/as/src/FlexJSUIClasses.as            |  2 +-
 .../EditableTextKeyboardController.as           | 55 ++++++++++++++++++++
 .../beads/controllers/KeyboardController.as     | 55 --------------------
 .../flex/createjs/staticControls/TextButton.js  |  1 +
 5 files changed, 59 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2cb1c1e5/frameworks/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/defaults.css b/frameworks/as/defaults.css
index 5d509b8..06645c3 100644
--- a/frameworks/as/defaults.css
+++ b/frameworks/as/defaults.css
@@ -213,7 +213,7 @@ TextArea
 {
     IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.TextModel");
     IBeadView: ClassReference("org.apache.flex.html.staticControls.beads.TextAreaView");
-    IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.KeyboardController");
+    IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.EditableTextKeyboardController");
     width: 135;
     height: 20;
 }
@@ -235,7 +235,7 @@ TextInput
 {
     IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.TextModel");
     IBeadView: ClassReference("org.apache.flex.html.staticControls.beads.TextInputWithBorderView");
-    IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.KeyboardController");
+    IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.EditableTextKeyboardController");
 	width: 135;
 	height: 20;
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2cb1c1e5/frameworks/as/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/FlexJSUIClasses.as b/frameworks/as/src/FlexJSUIClasses.as
index 0f710bf..a34d8ff 100644
--- a/frameworks/as/src/FlexJSUIClasses.as
+++ b/frameworks/as/src/FlexJSUIClasses.as
@@ -65,8 +65,8 @@ internal class FlexJSUIClasses
     import org.apache.flex.html.staticControls.beads.controllers.AlertController; AlertController;
 	import org.apache.flex.html.staticControls.beads.controllers.ComboBoxController; ComboBoxController;
     import org.apache.flex.html.staticControls.beads.controllers.DropDownListController;
DropDownListController;
+	import org.apache.flex.html.staticControls.beads.controllers.EditableTextKeyboardController;
EditableTextKeyboardController;
     import org.apache.flex.html.staticControls.beads.controllers.ItemRendererMouseController;
ItemRendererMouseController;
-	import org.apache.flex.html.staticControls.beads.controllers.KeyboardController; KeyboardController;
     import org.apache.flex.html.staticControls.beads.controllers.ListSingleSelectionMouseController;
ListSingleSelectionMouseController;
 	import org.apache.flex.html.staticControls.beads.controllers.SliderMouseController; SliderMouseController;
 	import org.apache.flex.html.staticControls.beads.controllers.SpinnerMouseController; SpinnerMouseController;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2cb1c1e5/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/EditableTextKeyboardController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/EditableTextKeyboardController.as
b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/EditableTextKeyboardController.as
new file mode 100644
index 0000000..e505217
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/EditableTextKeyboardController.as
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.staticControls.beads.controllers
+{
+	import org.apache.flex.core.CSSTextField;
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IBeadController;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.ITextModel;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.html.staticControls.beads.ITextFieldView;
+	
+	public class EditableTextKeyboardController implements IBead, IBeadController
+	{
+		public function EditableTextKeyboardController()
+		{
+		}
+		
+		private var model:ITextModel;
+		private var textField:CSSTextField;
+		
+		private var _strand:IStrand;
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			model = UIBase(_strand).model as ITextModel;
+			
+			var viewBead:ITextFieldView = _strand.getBeadByType(ITextFieldView) as ITextFieldView;
+			textField = viewBead.textField;
+			textField.addEventListener("change", inputChangeHandler);
+		}
+		
+		private function inputChangeHandler( event:Object ) : void
+		{
+			model.text = textField.text;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2cb1c1e5/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/KeyboardController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/KeyboardController.as
b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/KeyboardController.as
deleted file mode 100644
index 7276115..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/KeyboardController.as
+++ /dev/null
@@ -1,55 +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.staticControls.beads.controllers
-{
-	import org.apache.flex.core.CSSTextField;
-	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IBeadController;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.ITextModel;
-	import org.apache.flex.core.UIBase;
-	import org.apache.flex.html.staticControls.beads.ITextFieldView;
-	
-	public class KeyboardController implements IBead, IBeadController
-	{
-		public function KeyboardController()
-		{
-		}
-		
-		private var model:ITextModel;
-		private var textField:CSSTextField;
-		
-		private var _strand:IStrand;
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-			
-			model = UIBase(_strand).model as ITextModel;
-			
-			var viewBead:ITextFieldView = _strand.getBeadByType(ITextFieldView) as ITextFieldView;
-			textField = viewBead.textField;
-			textField.addEventListener("change", inputChangeHandler);
-		}
-		
-		private function inputChangeHandler( event:Object ) : void
-		{
-			model.text = textField.text;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2cb1c1e5/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/TextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/TextButton.js
b/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/TextButton.js
index eab46d0..da2d7f5 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/TextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/TextButton.js
@@ -67,6 +67,7 @@ org.apache.flex.createjs.staticControls.TextButton.prototype.createElement
=
     p.addChild(this.element);
 
     this.positioner = this.element;
+    this.element.flexjs_wrapper = this;
 };
 
 /**


Mime
View raw message