[[ style ]]
h3
.indent blockquote
[[ /style ]]
In general, GridEvents have a one to one correspondence with MouseEvents. They are * dispatched in response to mouse events that have "bubbled" from some Grid descendant * to the Grid itself. One significant difference is that listeners are guaranteed to * see an entire down-drag-up mouse gesture, even if the drag and up parts of the * gesture do not occur over the grid. The gridMouseDrag event corresponds to a * mouse move event with the button held down.
* * @see spark.components.Grid */ public class GridEvent extends MouseEvent { /** * The value of the type property for a gridMouseDown GridEvent. * * @eventType gridMouseDown */ public static const GRID_MOUSE_DOWN:String = "gridMouseDown"; /** * The value of the type property for a gridMouseDrag GridEvent. This event is * only dispatched when a listener has handled a mouseDown event, and then only while the * mouse moves with the button held down. * * @eventType gridMouseDrag */ public static const GRID_MOUSE_DRAG:String = "gridMouseDrag"; /** * The value of the type property for a gridMouseUp GridEvent. * * @eventType gridMouseUp */ public static const GRID_MOUSE_UP:String = "gridMouseUp"; /** * The value of the type property for a gridClick GridEvent. * * @eventType gridClick */ public static const GRID_CLICK:String = "gridClick"; /** * The value of the type property for a gridDoubleClick GridEvent. * * @eventType gridDoubleClick */ public static const GRID_DOUBLE_CLICK:String = "gridDoubleClick"; /** * The value of the type property for a gridRollOver GridEvent. * * @eventType gridRollOver */ public static const GRID_ROLL_OVER:String = "gridRollOver"; /** * The value of the type property for a gridRollOut GridEvent. * * @eventType gridRollOut */ public static const GRID_ROLL_OUT:String = "gridRollOut"; /** * The value of thetype
property for a separatorMouseDrag GridEvent.
*
* @eventType separatorMouseDrag
*/
public static const SEPARATOR_MOUSE_DRAG:String = "separatorMouseDrag";
/**
* The value of the type
property for a separatorClick GridEvent.
*
* @eventType separatorClick
*/
public static const SEPARATOR_CLICK:String = "separatorClick";
/**
* The value of the type
property for a separatorDoubleClick GridEvent.
*
* @eventType separatorDoubleClick
*/
public static const SEPARATOR_DOUBLE_CLICK:String = "separatorDoubleClick";
/**
* The value of the type
property for a separatorMouseDown GridEvent.
*
* @eventType separatorMouseDown
*/
public static const SEPARATOR_MOUSE_DOWN:String = "separatorMouseDown";
/**
* The value of the type
property for a separatorMouseUp GridEvent.
*
* @eventType separatorMouseUp
*/
public static const SEPARATOR_MOUSE_UP:String = "separatorMouseUp";
/**
* The value of the type
property for a separatorRollOut GridEvent.
*
* @eventType separatorRollOut
*/
public static const SEPARATOR_ROLL_OUT:String = "separatorRollOut";
/**
* The value of the type
property for a separatorRollOver GridEvent.
*
* @eventType separatorRollOver
*/
public static const SEPARATOR_ROLL_OVER:String = "separatorRollOver";
/**
* GridEvents dispatched by the Grid class in response to MouseEvents are constructed with
* the incoming mouse event's properties. The grid event's x,y location, i.e. the value of
* its localX and localY properties, is defined relative to the entire grid, not just the
* part of the grid that has been scrolled into view. Similarly, the event's row and column
* indices may correspond to a cell that has not been scrolled into view.
*
* @param type Distinguishes the mouse gesture that caused this event to be dispatched.
* @param bubbles Specifies whether the event can bubble up the display list hierarchy.
* @param cancelable Specifies whether the behavior associated with the event can be prevented.
* @param localX The event's x coordinate relative to grid.
* @param localY The event's y coordinate relative to grid.
* @param relatedObject The relatedObject property of the MouseEvent that triggered this GridEvent.
* @param itemRenderer The visible item renderer where the event occurred or null.
* @param ctrlKey Whether the Control key is down.
* @param altKey Whether the Alt key is down.
* @param shiftKey Whether the Shift key is down.
* @param buttonDown Whether the Control key is down.
* @param delta Not used.
* @param rowIndex The index of the row where the event occurred, or -1.
* @param columnIndex The index of the column where the event occurred, or -1.
* @param column The column where the event occurred or null.
* @param item The dataProvider item at rowIndex.
*/
public function GridEvent(
type:String,
bubbles:Boolean = false,
cancelable:Boolean = false,
localX:Number = NaN,
localY:Number = NaN,
relatedObject:InteractiveObject = null,
ctrlKey:Boolean = false,
altKey:Boolean = false,
shiftKey:Boolean = false,
buttonDown:Boolean = false,
delta:int = 0,
rowIndex:int = -1,
columnIndex:int = -1,
column:GridColumn = null,
item:Object = null,
itemRenderer:IGridItemRenderer = null,)
/**
* The index of the row where the event occurred, or -1 if the event
* did not occur over a grid row.
*/
public var rowIndex:int;
/**
* The index of the column where the event occurred, or -1 if the event did not occur
* over a grid column.
*/
public var columnIndex:int;
/**
* The column where the event occurred, or null if the event did not occur
* over a column.
*/
public var column:GridColumn;
/**
* The Grid associated with this event.
*/
public function get grid():Grid;
/**
* The dataProvider item for this row, or null if the event did not occur over
* a grid row.
*/
public var item:Object;
/**
* The itemRenderer that displayed this cell, or null if the event did not occur over
* a visible cell.
*/
public var itemRenderer:IGridItemRenderer;
}
}