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

📄 selectionevent.as

📁 用于flash/flex的 as3的 2D图形图像图表的动态生成
💻 AS
字号:
package flare.vis.events
{
	import flash.display.DisplayObject;
	import flash.events.Event;
	import flash.events.MouseEvent;

	/**
	 * Event fired in response to interactive selection events. 
	 */
	public class SelectionEvent extends DataEvent
	{
		/** A selection event. */
		public static const SELECT:String   = "select";
		/** A deselection event. */
		public static const DESELECT:String = "deselect";
		
		/** Indicates whether the Alt key is active (<code>true</code>)
		 *  or inactive (<code>false</code>). */
		public var altKey:Boolean;
		/** Indicates whether the Control key is active (<code>true</code>)
		 *  or inactive (<code>false</code>). On Macintosh computers, you must
		 *  use this property to represent the Command key. */
		public var ctrlKey:Boolean;
		/** Indicates whether the Shift key is active (<code>true</code>)
		 *  or inactive (<code>false</code>). */
		public var shiftKey:Boolean;
		
		/** The event that triggered this event, if any. */
		public function get cause():MouseEvent { return _cause; }
		private var _cause:MouseEvent;

		/**
		 * Creates a new SelectionEvent.
		 * @param type the event type (SELECT or DESELECT)
		 * @param item the display object(s) that were selected or deselected
		 * @param e (optional) the MouseEvent that triggered the selection
		 */
		public function SelectionEvent(type:String, items:*, e:MouseEvent=null)
		{
			super(type, items);
			if (e != null) {
				_cause = e;
				altKey = e.altKey;
				ctrlKey = e.ctrlKey;
				shiftKey = e.shiftKey;
			}
		}
		
		/** @inheritDoc */
		public override function clone():Event
		{
			var se:SelectionEvent = new SelectionEvent(type,
				_items?_items:_item, _cause);
			se.altKey = altKey;
			se.ctrlKey = ctrlKey;
			se.shiftKey = shiftKey;
			return se;
		}
		
	} // end of class SelectionEvent
}

⌨️ 快捷键说明

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