add multiline textfield view

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

Branch: refs/heads/develop
Commit: f4eb38ee29ccc45fdb56789e08bc2293b5715584
Parents: 46f7af5
Author: Alex Harui <[email protected]>
Authored: Wed Oct 29 17:51:13 2014 -0700
Committer: Alex Harui <[email protected]>
Committed: Wed Oct 29 17:51:13 2014 -0700

----------------------------------------------------------------------
 .../as/projects/FlexJSUI/basic-manifest.xml     |  1 +
 .../flex/html/beads/MultilineTextFieldView.as   | 56 ++++++++++++++++++++
 2 files changed, 57 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f4eb38ee/frameworks/as/projects/FlexJSUI/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/basic-manifest.xml 
b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
index 07afdff..f22dcdb 100644
--- a/frameworks/as/projects/FlexJSUI/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
@@ -68,6 +68,7 @@
     <component id="TileLayout" 
class="org.apache.flex.html.beads.layouts.TileLayout"/>
     <component id="ListView" class="org.apache.flex.html.beads.ListView"/>
     <component id="ListViewNoSelectionState" 
class="org.apache.flex.html.beads.ListViewNoSelectionState"/>
+    <component id="MultilineTextFieldView" 
class="org.apache.flex.html.beads.MultilineTextFieldView"/>
     
     <component id="SimpleAlert" class="org.apache.flex.html.SimpleAlert"/>
     <component id="Alert" class="org.apache.flex.html.Alert"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f4eb38ee/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/MultilineTextFieldView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/MultilineTextFieldView.as
 
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/MultilineTextFieldView.as
new file mode 100644
index 0000000..72dc588
--- /dev/null
+++ 
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/MultilineTextFieldView.as
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+       import flash.text.TextFieldType;
+       
+    /**
+     *  The TextFieldView class is the default view for
+     *  the org.apache.flex.html.Label class.
+     *  It displays text using a TextField, so there is no
+     *  right-to-left text support in this view.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+       public class MultilineTextFieldView extends TextFieldViewBase
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function MultilineTextFieldView()
+               {
+                       super();
+                       
+                       textField.selectable = false;
+                       textField.type = TextFieldType.DYNAMIC;
+                       textField.mouseEnabled = false;
+                       textField.autoSize = "left";
+            textField.multiline = true;
+            textField.wordWrap = true;
+               }
+       }
+}

Reply via email to