flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [13/15] git commit: [flex-asjs] [refs/heads/develop] - VRule
Date Wed, 12 Aug 2015 18:47:19 GMT
VRule


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

Branch: refs/heads/develop
Commit: 706bfd5480ed5191c83ee7092e5ee0f76862af53
Parents: 1ed3e20
Author: Alex Harui <aharui@apache.org>
Authored: Wed Aug 12 10:23:42 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Wed Aug 12 10:23:42 2015 -0700

----------------------------------------------------------------------
 frameworks/projects/HTML/as/defaults.css        |  5 ++
 .../HTML/as/src/org/apache/flex/html/VRule.as   | 49 +++++++++++
 .../src/org/apache/flex/html/beads/VRuleView.as | 87 ++++++++++++++++++++
 frameworks/projects/HTML/basic-manifest.xml     |  2 +
 .../HTML/js/src/org/apache/flex/html/VRule.js   | 49 +++++++++++
 5 files changed, 192 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/706bfd54/frameworks/projects/HTML/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/defaults.css b/frameworks/projects/HTML/as/defaults.css
index 4cbc5a5..b4fb292 100644
--- a/frameworks/projects/HTML/as/defaults.css
+++ b/frameworks/projects/HTML/as/defaults.css
@@ -544,6 +544,11 @@ ViewBase
     iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
 }
 
+VRule
+{
+    IBeadView:  ClassReference("org.apache.flex.html.beads.VRuleView");
+}
+
 /* SVG */
 
 svg|TextButton

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/706bfd54/frameworks/projects/HTML/as/src/org/apache/flex/html/VRule.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/VRule.as b/frameworks/projects/HTML/as/src/org/apache/flex/html/VRule.as
new file mode 100644
index 0000000..2418364
--- /dev/null
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/VRule.as
@@ -0,0 +1,49 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	
+	import org.apache.flex.core.UIBase;
+	
+    /**
+     *  The VRule class displays a vertical line
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */    
+	public class VRule extends UIBase
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function VRule()
+		{
+			super();
+        }
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/706bfd54/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/VRuleView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/VRuleView.as b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/VRuleView.as
new file mode 100644
index 0000000..5eb6c4c
--- /dev/null
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/VRuleView.as
@@ -0,0 +1,87 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.display.Bitmap;
+	import flash.display.Loader;
+	import flash.display.LoaderInfo;
+	import flash.net.URLRequest;
+	
+	import org.apache.flex.core.BeadViewBase;
+	import org.apache.flex.core.IBeadView;
+	import org.apache.flex.core.IImageModel;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	
+	/**
+	 *  The ImageView class creates the visual elements of the org.apache.flex.html.Image component.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class VRuleView extends BeadViewBase implements IBeadView
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function VRuleView()
+		{
+		}
+		
+		/**
+		 *  @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
+		{
+			super.strand = value;
+			
+			IEventDispatcher(_strand).addEventListener("widthChanged",handleSizeChange);
+			IEventDispatcher(_strand).addEventListener("heightChanged",handleSizeChange);
+            IEventDispatcher(_strand).addEventListener("sizeChanged",handleSizeChange);
+			
+			handleSizeChange(null);
+		}
+				
+		/**
+		 * @private
+		 */
+		private function handleSizeChange(event:Object):void
+		{
+			var ui:UIBase = _strand as UIBase;
+            ui.graphics.clear();
+            ui.graphics.beginFill(0);
+            ui.graphics.drawRect(0, 0, 1, ui.height);
+            ui.graphics.endFill();
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/706bfd54/frameworks/projects/HTML/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/basic-manifest.xml b/frameworks/projects/HTML/basic-manifest.xml
index fa2cb4b..acfdaa2 100644
--- a/frameworks/projects/HTML/basic-manifest.xml
+++ b/frameworks/projects/HTML/basic-manifest.xml
@@ -74,6 +74,8 @@
     <component id="TextPromptBead" class="org.apache.flex.html.accessories.TextPromptBead"
/>
     <component id="HRule" class="org.apache.flex.html.HRule" />
     <component id="HRuleView" class="org.apache.flex.html.beads.HRuleView" />
+    <component id="VRule" class="org.apache.flex.html.VRule" />
+    <component id="VRuleView" class="org.apache.flex.html.beads.VRuleView" />
     <component id="Spacer" class="org.apache.flex.html.Spacer" />
     <component id="ImageAndTextButtonView" class="org.apache.flex.html.beads.ImageAndTextButtonView"
/>
     <component id="ScrollingViewport" class="org.apache.flex.html.supportClasses.ScrollingViewport"
/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/706bfd54/frameworks/projects/HTML/js/src/org/apache/flex/html/VRule.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/VRule.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/VRule.js
new file mode 100644
index 0000000..ec1d9a2
--- /dev/null
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/VRule.js
@@ -0,0 +1,49 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.VRule');
+
+goog.require('org.apache.flex.core.UIBase');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.html.VRule = function() {
+  org.apache.flex.html.VRule.base(this, 'constructor');
+
+  this.element = document.createElement('div');
+  this.element.style.borderLeftStyle = 'solid';
+  this.element.style.borderLeftWidth = '1px';
+  this.element.style.borderTop = 'none';
+  this.element.style.borderBottom = 'none';
+  this.element.style.borderRight = 'none';
+  this.positioner = this.element;
+  this.element.flexjs_wrapper = this;
+};
+goog.inherits(org.apache.flex.html.VRule,
+    org.apache.flex.core.UIBase);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.VRule.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'VRule',
+                qName: 'org.apache.flex.html.VRule' }] };
+


Mime
View raw message