1////////////////////////////////////////////////////////////////////////////////
2//
3//  ADOBE SYSTEMS INCORPORATED
4//  Copyright 2009 Adobe Systems Incorporated
5//  All Rights Reserved.
6//
7//  NOTICE: Adobe permits you to use, modify, and distribute this file
8//  in accordance with the terms of the license agreement accompanying it.
9//
10////////////////////////////////////////////////////////////////////////////////
11package mx.automation.events
12{
13
14	import flash.events.Event;
15	import mx.controls.listClasses.IListItemRenderer;
16
17	/**
18	 *  The ListItemSelectEvent class represents event objects that are dispatched
19	 *  when an item in a list-based control such as a Menu,
20	 *  DataGrid, or Tree control is selected or deselected.
21	 *
22	 *  @langversion 3.0
23	 *  @playerversion Flash 9
24	 *  @playerversion AIR 1.1
25	 *  @productversion Flex 3
26	 */
27	public class ChartSelectionChangeEvent extends Event
28	{
29		include "../../core/Version.as";
30
31		//--------------------------------------------------------------------------
32		//
33		//  Class constants
34		//
35		//--------------------------------------------------------------------------
36
37
38		/**
39		 *  The AdvancedDataGridEvent.HEADER_RELEASE constant defines the value of the
40		 *  <code>type</code> property of the event object for a
41		 *  <code>headerRelease</code> event, which indicates that the
42		 *  user pressed and released the mouse on a column header.
43		 *
44		 *  <p>The properties of the event object have the following values:</p>
45		 *  <table class="innertable">
46		 *     <tr><th>Property</th><th>Value</th></tr>
47		 *     <tr><td><code>bubbles</code></td><td>false</td></tr>
48		 *     <tr><td><code>cancelable</code></td><td>true</td></tr>
49		 *     <tr><td><code>columnIndex</code></td><td> The zero-based index of the
50		 *       item's column in the AdvancedDataGrid object's <code>columns</code> array.</td></tr>
51		 *     <tr><td><code>currentTarget</code></td><td>The Object that defines the
52		 *       event listener that handles the event. For example, if you use
53		 *       <code>myButton.addEventListener()</code> to register an event listener,
54		 *       myButton is the value of the <code>currentTarget</code>. </td></tr>
55		 *     <tr><td><code>dataField</code></td><td>The name of the field or property in the
56		 *       data associated with the column.</td></tr>
57		 *     <tr><td><code>itemRenderer</code></td><td>The header renderer that is
58		 *       being released.</td></tr>
59		 *     <tr><td><code>localX</code></td><td>NaN</td></tr>
60		 *     <tr><td><code>reason</code></td><td>null</td></tr>
61		 *     <tr><td><code>rowIndex</code></td><td>null</td></tr>
62		 *     <tr><td><code>target</code></td><td>The Object that dispatched the event;
63		 *       it is not always the Object listening for the event.
64		 *       Use the <code>currentTarget</code> property to always access the
65		 *       Object listening for the event.</td></tr>
66		 *     <tr><td><code>type</code></td><td>AdvancedDataGridEvent.HEADER_RELEASE</td></tr>
67		 *  </table>
68		 *
69		 *  @eventType headerRelease
70		 *
71		 *  @langversion 3.0
72		 *  @playerversion Flash 9
73		 *  @playerversion AIR 1.1
74		 *  @productversion Flex 3
75		 */
76		public static const CHANGE:String = "change";
77		//--------------------------------------------------------------------------
78		//
79		//  Constructor
80		//
81		//--------------------------------------------------------------------------
82
83		/**
84		 *  Constructor.
85		 *  Normally called by the Flex control and not used in application code.
86		 *
87		 *  @param type The event type; indicates the action that caused the event.
88		 *
89		 *  @param bubbles Specifies whether the event can bubble
90		 *  up the display list hierarchy.
91		 *
92		 *  @param cancelable Specifies whether the behavior
93		 *  associated with the event can be prevented.
94		 *
95		 *  @param itemRenderer The item renderer object for the item.
96		 *
97		 *  @param triggerEvent The event, such as a mouse or keyboard event, that
98		 *              triggered the selection action.
99		 *
100		 *  @param altKey Whether the Alt key was pressed at the time of the event.
101		 *
102		 *  @param ctrlKey Whether the Ctrl key was pressed at the time of the event.
103		 *
104		 *  @param shiftKey Whether the Shift key was pressed at the time of the event.
105		 *
106		 *
107		 *  @langversion 3.0
108		 *  @playerversion Flash 9
109		 *  @playerversion AIR 1.1
110		 *  @productversion Flex 3
111		 */
112		public function ChartSelectionChangeEvent(type:String,
113												  selectionInfo:Array=null ,bubbles:Boolean = false,
114												  cancelable:Boolean = false,
115												  triggerEvent:Event = null,
116												  ctrlKey:Boolean = false,
117												  altKey:Boolean = false,
118												  shiftKey:Boolean = false)
119		{
120			super(type, bubbles, cancelable);
121
122			this.selectionInfo = selectionInfo;
123			//this.chartItemIndex = chartItemIndex;
124			this.triggerEvent = triggerEvent;
125			this.ctrlKey = ctrlKey;
126			this.altKey = altKey;
127			this.shiftKey = shiftKey;
128		}
129
130		//--------------------------------------------------------------------------
131		//
132		//  Properties
133		//
134		//--------------------------------------------------------------------------
135
136		//----------------------------------
137		//  altKey
138		//----------------------------------
139
140		/**
141		 *  Indicates whether the Alt key was pressed at the time of the event, <code>true</code>,
142		 *  or not, <code>false</code>.
143		 *
144		 *  @default false
145		 *
146		 *  @langversion 3.0
147		 *  @playerversion Flash 9
148		 *  @playerversion AIR 1.1
149		 *  @productversion Flex 3
150		 */
151		public var altKey:Boolean;
152
153		//----------------------------------
154		//  ctrlKey
155		//----------------------------------
156
157		/**
158		 *  Indicates whether the Ctrl key was pressed at the time of the event, <code>true</code>,
159		 *  or not, <code>false</code>.
160		 *
161		 *  @default false
162		 *
163		 *  @langversion 3.0
164		 *  @playerversion Flash 9
165		 *  @playerversion AIR 1.1
166		 *  @productversion Flex 3
167		 */
168		public var ctrlKey:Boolean;
169
170		//----------------------------------
171		//  triggerEvent
172		//----------------------------------
173
174		/**
175		 *  Event that triggered the item selection event,
176		 *  such as a keyboard or mouse event.
177		 *
178		 *  @default null
179		 *
180		 *  @langversion 3.0
181		 *  @playerversion Flash 9
182		 *  @playerversion AIR 1.1
183		 *  @productversion Flex 3
184		 */
185		public var triggerEvent:Event;
186
187		//----------------------------------
188		//  seriesIndex
189		//----------------------------------
190
191		//----------------------------------
192		//  shiftKey
193		//----------------------------------
194
195
196		public var selectionInfo:Array;
197		/**
198		 *  Indicates whether the Shift key was pressed at the time of the event, <code>true</code>,
199		 *  or not, <code>false</code>.
200		 *
201		 *  @default false
202		 *
203		 *  @langversion 3.0
204		 *  @playerversion Flash 9
205		 *  @playerversion AIR 1.1
206		 *  @productversion Flex 3
207		 */
208		public var shiftKey:Boolean;
209
210
211		/**
212		 *  The automationValue string of the item to be selected.
213		 *  This is used when the item to be selected is not visible in the control.
214		 *
215		 *  @langversion 3.0
216		 *  @playerversion Flash 9
217		 *  @playerversion AIR 1.1
218		 *  @productversion Flex 3
219		 */
220		public var itemAutomationValue:String;
221
222
223		/**
224		 *  The data provider index of the item to be selected.
225		 *
226		 *  @langversion 3.0
227		 *  @playerversion Flash 9
228		 *  @playerversion AIR 1.1
229		 *  @productversion Flex 3
230		 */
231
232
233		//--------------------------------------------------------------------------
234		//
235		//  Overridden methods: Event
236		//
237		//--------------------------------------------------------------------------
238
239		/**
240		 *  @private
241		 */
242		override public function clone():Event
243		{
244			return new ChartSelectionChangeEvent(type, selectionInfo, bubbles, cancelable,
245				triggerEvent,
246				ctrlKey, altKey, shiftKey);
247		}
248	}
249
250}
251