⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rectangleskin.as

📁 拓扑图基于SNMP数据采集模块的设计和实现
💻 AS
字号:
package com.yahoo.astra.fl.charts.skins{	import fl.core.UIComponent;	/**	 * A skin shaped like a rectangle with a single color.	 * 	 * @author Josh Tynjala	 */	public class RectangleSkin extends UIComponent implements IProgrammaticSkin	{			//--------------------------------------	//  Constructor	//--------------------------------------			/**		 * Constructor.		 */		public function RectangleSkin()		{			super();		}			//--------------------------------------	//  Properties	//--------------------------------------				/**		 * @private		 * Storage for the fillColor property.		 */		private var _fillColor:uint = 0x000000;				/**		 * @copy com.yahoo.astra.fl.charts.skins.IProgrammaticSkin#fillColor		 */		public function get fillColor():uint		{			return this._fillColor;		}				/**		 * @private		 */		public function set fillColor(value:uint):void		{			if(this._fillColor != value)			{				this._fillColor = value;				this.invalidate();			}		}			//--------------------------------------	//  Protected Methods	//--------------------------------------			/**		 * @private		 */		override protected function draw():void		{			super.draw();						//since the Blaze component architecture rounds the position,			//we need to account for that to make sure the mark displays correctly.			var xDiff:Number = this._x - Math.round(this._x);			var yDiff:Number = this._y - Math.round(this._y);						this.graphics.clear();			if(this.width == 0 || this.height == 0 || isNaN(this.width) || isNaN(this.height))			{				return;			}						this.graphics.lineStyle(0, 0, 0);			this.graphics.beginFill(this._fillColor, 1);			this.graphics.drawRect(xDiff, yDiff, this.width, this.height);			this.graphics.endFill();		}			}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -