first commit

This commit is contained in:
2020-10-20 00:58:15 +02:00
commit 7f1b9bfca5
222 changed files with 56918 additions and 0 deletions

View File

@ -0,0 +1,90 @@
/*
Copyright (c) 2009 Yahoo! Inc. All rights reserved.
The copyrights embodied in the content of this file are licensed under the BSD (revised) open source license
*/
package com.yahoo.astra.fl.events
{
import flash.events.Event
/**
* The DropdownEvent class represents the event object passed to
* the event listener for the <code>open</code> and <code>close</code> events.
* @author Alaric Cole
*/
public class DropdownEvent extends Event
{
//--------------------------------------------------------------------------
//
// Class constants
//
//--------------------------------------------------------------------------
/**
* The <code>DropdownEvent.CLOSE</code> constant defines the value of the
* <code>type</code> property of the event object for a <code>close</code> event.
*
*
* @eventType close
*/
public static const CLOSE:String = "close";
/**
* The <code>DropdownEvent.OPEN</code> constant defines the value of the
* <code>type</code> property of the event object for a <code>open</code> event.
*
* @eventType open
*/
public static const OPEN:String = "open";
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* Constructor.
*
* @param type The event type; indicates the action that caused the event.
*
* @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 triggerEvent A value indicating the
* type of input action that triggered the event
*/
public function DropdownEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false,
triggerEvent:Event = null)
{
super(type, bubbles, cancelable);
this.triggerEvent = triggerEvent;
}
//--------------------------------------------------------------------------
//
// Properties
//
//--------------------------------------------------------------------------
/**
* If the control is opened or closed in response to a user action,
* this property contains a value indicating the type of input action.
*/
public var triggerEvent:Event;
//--------------------------------------------------------------------------
//
// Overridden methods: Event
//
//--------------------------------------------------------------------------
/**
* @private
*/
override public function clone():Event
{
return new DropdownEvent(type, bubbles, cancelable, triggerEvent);
}
}
}

View File

@ -0,0 +1,254 @@
/*
Copyright (c) 2009 Yahoo! Inc. All rights reserved.
The copyrights embodied in the content of this file are licensed under the BSD (revised) open source license
*/
package com.yahoo.astra.fl.events
{
import flash.events.Event;
/**
* The MediaEvent class defines events for the IMediaClip components.
*
* These events include the following:
* <ul>
* <li><code>MediaEvent.MEDIA_POSITION</code>: dispatched when the MediaComponent's _playing property is true.</li>
* <li><code>MediaEvent.MEDIA_PLAY_PAUSE</code>: dispatched when the _playing state of the MediaComponent changes</li>
* <li><code>MediaEvent.VOLUME_CHANGE</code>: dispatched when the volume changes on the MediaComponent.</li>
* <li><code>MediaEvent.INFO_CHANGE</code>: dispatched when the info for the media has changed</li>
* <li><code>MediaEvent.MEDIA_LOADED</code>: dispatched when media source has loaded</li>
* <li><code>MediaEvent.MEDIA_ENDED</code>: dispatched when a media completes playback</li>
* </ul>
*/
public class MediaEvent extends Event
{
//--------------------------------------
// Constants
//--------------------------------------
/**
* Defines the value of the <code>type</code> property of an <code>mediaPosition</code>
* event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>bubbles</code></td><td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>true</code></td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>position</code></td><td>The position of the playhead for the media
* clip</td></tr>
* <tr><td><code>duration</code></td><td>The length of the media clip</td></tr>
* <tr><td><code>volume</code></td><td>The volume of the media clip</tr></tr>
* <tr><td><code>mute</code></td><td>The volume of the media clip</tr></tr>
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </td></tr>
* </table>
*
* @eventType mediaPosition
*/
public static const MEDIA_POSITION:String = "mediaPosition";
/**
* Defines the value of the <code>type</code> property of an <code>mediaPlayPause</code>
* event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>bubbles</code></td><td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>true</code></td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>position</code></td><td>The position of the playhead for the media
* clip</td></tr>
* <tr><td><code>duration</code></td><td>The length of the media clip</td></tr>
* <tr><td><code>volume</code></td><td>The volume of the media clip</tr></tr>
* <tr><td><code>mute</code></td><td>The volume of the media clip</tr></tr>
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </td></tr>
* </table>
*
* @eventType mediaPlayPause
*/
public static const MEDIA_PLAY_PAUSE:String = "mediaPlayPause";
/**
* Defines the value of the <code>type</code> property of an <code>volumeChange</code>
* event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>bubbles</code></td><td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>true</code></td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>position</code></td><td>The position of the playhead for the media
* clip</td></tr>
* <tr><td><code>duration</code></td><td>The length of the media clip</td></tr>
* <tr><td><code>volume</code></td><td>The volume of the media clip</tr></tr>
* <tr><td><code>mute</code></td><td>The volume of the media clip</tr></tr>
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </td></tr>
* </table>
*
* @eventType volumeChange
*/
public static const VOLUME_CHANGE:String = "volumeChange";
/**
* Defines the value of the <code>type</code> property of an <code>infoChange</code>
* event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>bubbles</code></td><td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>true</code></td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>position</code></td><td>The position of the playhead for the media
* clip</td></tr>
* <tr><td><code>duration</code></td><td>The length of the media clip</td></tr>
* <tr><td><code>volume</code></td><td>The volume of the media clip</tr></tr>
* <tr><td><code>mute</code></td><td>The volume of the media clip</tr></tr>
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </td></tr>
* </table>
*
* @eventType infoChange
*/
public static const INFO_CHANGE:String = "infoChange";
/**
* Defines the value of the <code>type</code> property of an <code>mediaLoaded</code>
* event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>bubbles</code></td><td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>true</code></td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>position</code></td><td>The position of the playhead for the media
* clip</td></tr>
* <tr><td><code>duration</code></td><td>The length of the media clip</td></tr>
* <tr><td><code>volume</code></td><td>The volume of the media clip</tr></tr>
* <tr><td><code>mute</code></td><td>The volume of the media clip</tr></tr>
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </td></tr>
* </table>
*
* @eventType mediaLoaded
*/
public static const MEDIA_LOADED:String = "mediaLoaded";
/**
* Defines the value of the <code>type</code> property of an <code>mediaEnded</code>
* event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>bubbles</code></td><td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>true</code></td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>position</code></td><td>The position of the playhead for the media
* clip</td></tr>
* <tr><td><code>duration</code></td><td>The length of the media clip</td></tr>
* <tr><td><code>volume</code></td><td>The volume of the media clip</tr></tr>
* <tr><td><code>mute</code></td><td>The volume of the media clip</tr></tr>
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </td></tr>
* </table>
*
* @eventType mediaEnded
*/
public static const MEDIA_ENDED:String = "mediaEnded";
//--------------------------------------
// Constructor
//--------------------------------------
/**
* Constructor. Creates a new MediaEvent object with the specified parameters.
*
* @param type The event type; this value identifies the action that caused the event.
*
* @param bubbles Indicates whether the event can bubble up the display list hierarchy.
*
* @param cancelable Indicates whether the behavior associated with the event can be
* prevented.
*
* @param position Indicates the position of the playhead
*
* @param duration Indicates the duration of the clip
*
* @param volume Indicates the volume of the clip
*
* @param mute Indicates whether the clip is muted
*/
public function MediaEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, position:Number = 0, duration:Number = 0, volume:Number = 1, mute:Boolean = false)
{
super(type, bubbles, cancelable);
this.duration = duration;
this.position = position;
this.volume = volume;
this.mute = mute;
}
//--------------------------------------
// Properties
//--------------------------------------
/**
* The position of the playhead
*/
public var position:Number = 0;
/**
* The length of the media object
*/
public var duration:Number = 0;
/**
* The volume level of the media object
*/
public var volume:Number = 0;
/**
* Boolean indicating whether or not the media object has been muted
*/
public var mute:Boolean = false;
/**
* Creates a copy of the MediaEvent object and sets the value of each parameter to match
* the original.
*
* @return A new MediaEvent object with parameter values that match those of the original.
*/
override public function clone():Event
{
return new MediaEvent(this.type, this.bubbles, this.cancelable, this.position, this.duration, this.volume, this.mute);
}
}
}

View File

@ -0,0 +1,228 @@
/*
Copyright (c) 2009 Yahoo! Inc. All rights reserved.
The copyrights embodied in the content of this file are licensed under the BSD (revised) open source license
*/
package com.yahoo.astra.fl.events
{
import flash.events.Event;
/**
* The MenuButtonRowEvent class defines events for the MenuButtonRow component.
*
* These events include the following:
* <ul>
* <li><code>MenuButtonRowEvent.ITEM_DOWN</code>: dispatched after the user mouses down over an item in the component.</li>
* <li><code>MenuButtonRowEvent.ITEM_ROLL_OUT</code>: dispatched after the user rolls the mouse pointer out of an item in the component.</li>
* <li><code>MenuButtonRowEvent.ITEM_ROLL_OVER</code>: dispatched after the user rolls the mouse pointer over an item in the component.</li>
* <li><code>MenuButtonRowEvent.ITEM_UP</code>: dispatched after the user mouses up over an item in the component.</li>
* </ul>
*
* @see com.yahoo.astra.fl.controls.MenuButtonRow
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
* @author Dwight Bridges
*/
public class MenuButtonRowEvent extends Event
{
//--------------------------------------
// Constants
//--------------------------------------
/**
* Defines the value of the <code>type</code> property of an <code>itemClick</code>
* event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>bubbles</code></td><td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>true</code></td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>index</code></td><td>The zero-based index in the DataProvider
* that contains the renderer.</td></tr>
* <tr><td><code>item</code></td><td>A reference to the data that belongs to the renderer.
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </td></tr>
* </table>
*
* @eventType itemClick
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public static const ITEM_DOWN:String = "itemDown";
/**
* Defines the value of the <code>type</code> property of an <code>itemRollOver</code>
* event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>bubbles</code></td><td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>false</code>; there is
* no default behavior to cancel.</td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>index</code></td><td>The zero-based index in the DataProvider
* that contains the renderer.</td></tr>
* <tr><td><code>item</code></td><td>A reference to the data that belongs to the renderer.</td></tr>
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </table>
*
* @eventType itemRollOver
*
* @see #ITEM_ROLL_OUT
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public static const ITEM_ROLL_OVER:String = "itemRollOver";
/**
* Defines the value of the <code>type</code> property on an <code>itemUp</code>
* event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>bubbles</code></td><td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>false</code>; there is
* no default behavior to cancel.</td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>index</code></td><td>The zero-based index in the DataProvider
* that contains the renderer.</td></tr>
* <tr><td><code>item</code></td><td>A reference to the data that belongs to the renderer.</td></tr>
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </table>
*
* @eventType itemUp
*
* @see #ITEM_UP
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public static const ITEM_UP:String = "itemUp";
/**
* Defines the value of the <code>type</code> property of an
* <code>itemRollOut</code> event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr>
* <th>Property</th>
* <th>Value</th>
* </tr>
* <tr>
* <td><code>bubbles</code></td>
* <td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>false</code>; there is
* no default behavior to cancel.</td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>index</code></td><td>The zero-based index in the DataProvider
* that contains the renderer.</td></tr>
* <tr><td><code>item</code></td><td>A reference to the data that belongs to the renderer.</td></tr>
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </table>
*
* @eventType itemRollOut
*
* @see #ITEM_ROLL_OVER
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public static const ITEM_ROLL_OUT:String = "itemRollOut";
//--------------------------------------
// Constructor
//--------------------------------------
/**
* Constructor. Creates a new MenuButtonRowEvent object with the specified parameters.
*
* @param type The event type; this value identifies the action that caused the event.
*
* @param bubbles Indicates whether the event can bubble up the display list hierarchy.
*
* @param cancelable Indicates whether the behavior associated with the event can be
* prevented.
*
* @param index The zero-based index of the item in the DataProvider.
*
* @param item A reference to the data that belongs to the renderer.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public function MenuButtonRowEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, index:int = -1, item:Object = null, label:String = "")
{
super(type, bubbles, cancelable);
this.index = index;
this.item = item;
this.label = label;
}
//--------------------------------------
// Properties
//--------------------------------------
/**
* The zero-based index of the cell that contains the renderer.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public var index:int = -1;
/**
* The data that belongs to the current cell renderer.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public var item:Object = null;
/**
* The label of the current cell renderer.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public var label:String = "";
//--------------------------------------
// Public Methods
//--------------------------------------
/**
* Creates a copy of the MenuButtonRowEvent object and sets the value of each parameter to match
* the original.
*
* @return A new MenuButtonRowEvent object with parameter values that match those of the original.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
override public function clone():Event
{
return new MenuButtonRowEvent(this.type, this.bubbles, this.cancelable, this.index, this.item, this.label);
}
}
}

View File

@ -0,0 +1,173 @@
/*
Copyright (c) 2009 Yahoo! Inc. All rights reserved.
The copyrights embodied in the content of this file are licensed under the BSD (revised) open source license
*/
package com.yahoo.astra.fl.events
{
import com.yahoo.astra.fl.controls.Menu;
//import com.yahoo.astra.fl.controls.MenuBar;
import com.yahoo.astra.fl.*;
import flash.events.Event;
import fl.events.ListEvent;
import fl.controls.listClasses.*;
/**
* The MenuEvent class represents events that are associated with menu activities.
*
* @see com.yahoo.astra.fl.controls.Menu
*/
public class MenuEvent extends ListEvent
{
//--------------------------------------------------------------------------
//
// Class constants
//
//--------------------------------------------------------------------------
/**
* The MenuEvent.CHANGE event type constant indicates that selection
* changed as a result of user interaction.
*
* @eventType change
*/
public static const CHANGE:String = "change";
/**
* The MenuEvent.ITEM_CLICK event type constant indicates that the
* user selected a menu item.
*
* @eventType itemClick
*/
public static const ITEM_CLICK:String = "itemClick";
/**
* The MenuEvent.MENU_HIDE event type constant indicates that
* a menu or submenu closed.
*
* @eventType menuHide
*/
public static const MENU_HIDE:String = "menuHide";
/**
* The MenuEvent.ITEM_ROLL_OUT type constant indicates that
* the mouse pointer rolled out of a menu item.
*
* @eventType itemRollOut
*/
public static const ITEM_ROLL_OUT:String = "itemRollOut";
/**
* The MenuEvent.ITEM_ROLL_OVER type constant indicates that
* the mouse pointer rolled over a menu item.
* @eventType itemRollOver
*/
public static const ITEM_ROLL_OVER:String = "itemRollOver";
/**
* The MenuEvent.MENU_SHOW type constant indicates that
* the mouse pointer rolled a menu or submenu opened.
*
* @eventType menuShow
*/
public static const MENU_SHOW:String = "menuShow";
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* Constructor.
*
* Normally called by the Menu object.
*
* @param type The event type; indicates the action that caused the event.
*
* @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 menu The specific Menu instance associated with the event,
* such as the menu or submenu that was hidden or opened. This property
* is null if a MenuBar item dispatches the event.
*
* @param item The item in the dataProvider of the assicated menu item.
*
* @param itemRenderer The ListItemRenderer of the associated menu item.
*
* @param label The label text of the associated menu item.
*
* @param index The index in the menu of the associated menu item.
*/
public function MenuEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = true,
menuBar:Object = null, menu:Menu = null,
item:Object = null,
itemRenderer:CellRenderer = null,
label:String = null, index:int = -1)
{
super(type, bubbles, cancelable);
//this.menuBar = menuBar;
this.menu = menu;
this._item = item;
//this.itemRenderer = itemRenderer;
this.label = label;
this._index = index;
}
//--------------------------------------------------------------------------
//
// Properties
//
//--------------------------------------------------------------------------
//----------------------------------
// label
//----------------------------------
/**
* The label text of the associated menu item.
* This is null for the menuShow and menuHide events.
*/
public var label:String;
//----------------------------------
// menu
//----------------------------------
/**
* The specific Menu instance associated with the event,
* such as the menu or submenu that was hidden or opened.
*
* This property is null if a MenuBar item is dispatching
* the event.
*/
public var menu:Menu;
//----------------------------------
// menuBar
//----------------------------------
/**
* The MenuBar instance that is the parent of the selected Menu control,
* or null when the target Menu control is not parented by a
* MenuBar control.
*/
//public var menuBar:MenuBar;
//--------------------------------------------------------------------------
//
// Overridden methods: Event
//
//--------------------------------------------------------------------------
/**
* @private
*/
override public function clone():Event
{
return new MenuEvent(type, bubbles, cancelable,
null, menu, _item, null, label, index);
}
/**
* Returns a string that contains all the properties of the MenuEvent object.
* @return A string representation of the MenuEvent object.
*
*/
override public function toString():String {
return formatToString("MenuEvent", "type", "bubbles", "cancelable",
//"menuBar",
"menu", "item",
//"itemRenderer",
"label", "index");
}
}
}

View File

@ -0,0 +1,188 @@
/*
Copyright (c) 2009 Yahoo! Inc. All rights reserved.
The copyrights embodied in the content of this file are licensed under the BSD (revised) open source license
*/
package com.yahoo.astra.fl.events
{
import flash.events.Event;
/**
* The TabBarEvent class defines events for the TabBar component.
*
* These events include the following:
* <ul>
* <li><code>TabBarEvent.ITEM_CLICK</code>: dispatched after the user clicks the mouse over an item in the component.</li>
* <li><code>TabBarEvent.ITEM_ROLL_OUT</code>: dispatched after the user rolls the mouse pointer out of an item in the component.</li>
* <li><code>TabBarEvent.ITEM_ROLL_OVER</code>: dispatched after the user rolls the mouse pointer over an item in the component.</li>
* </ul>
*
* @see com.yahoo.astra.fl.controls.TabBar TabBar
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public class TabBarEvent extends Event
{
//--------------------------------------
// Constants
//--------------------------------------
/**
* Defines the value of the <code>type</code> property of an <code>itemClick</code>
* event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>bubbles</code></td><td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>true</code></td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>index</code></td><td>The zero-based index in the DataProvider
* that contains the renderer.</td></tr>
* <tr><td><code>item</code></td><td>A reference to the data that belongs to the renderer.
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </td></tr>
* </table>
*
* @eventType itemClick
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public static const ITEM_CLICK:String = "itemClick";
/**
* Defines the value of the <code>type</code> property of an <code>itemRollOver</code>
* event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>bubbles</code></td><td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>false</code>; there is
* no default behavior to cancel.</td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>index</code></td><td>The zero-based index in the DataProvider
* that contains the renderer.</td></tr>
* <tr><td><code>item</code></td><td>A reference to the data that belongs to the renderer.</td></tr>
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </table>
*
* @eventType itemRollOver
*
* @see #ITEM_ROLL_OUT
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public static const ITEM_ROLL_OVER:String = "itemRollOver";
/**
* Defines the value of the <code>type</code> property of an
* <code>itemRollOut</code> event object.
*
* <p>This event has the following properties:</p>
* <table class="innertable" width="100%">
* <tr>
* <th>Property</th>
* <th>Value</th>
* </tr>
* <tr>
* <td><code>bubbles</code></td>
* <td><code>false</code></td></tr>
* <tr><td><code>cancelable</code></td><td><code>false</code>; there is
* no default behavior to cancel.</td></tr>
* <tr><td><code>currentTarget</code></td><td>The object that is actively processing
* the event object with an event listener.</td></tr>
* <tr><td><code>index</code></td><td>The zero-based index in the DataProvider
* that contains the renderer.</td></tr>
* <tr><td><code>item</code></td><td>A reference to the data that belongs to the renderer.</td></tr>
* <tr><td><code>target</code></td><td>The object that dispatched the event. The target is
* not always the object listening for the event. Use the <code>currentTarget</code>
* property to access the object that is listening for the event.</td></tr>
* </table>
*
* @eventType itemRollOut
*
* @see #ITEM_ROLL_OVER
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public static const ITEM_ROLL_OUT:String = "itemRollOut";
//--------------------------------------
// Constructor
//--------------------------------------
/**
* Constructor. Creates a new TabBarEvent object with the specified parameters.
*
* @param type The event type; this value identifies the action that caused the event.
*
* @param bubbles Indicates whether the event can bubble up the display list hierarchy.
*
* @param cancelable Indicates whether the behavior associated with the event can be
* prevented.
*
* @param index The zero-based index of the item in the DataProvider.
*
* @param item A reference to the data that belongs to the renderer.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public function TabBarEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, index:int = -1, item:Object = null)
{
super(type, bubbles, cancelable);
this.index = index;
this.item = item;
}
//--------------------------------------
// Properties
//--------------------------------------
/**
* The zero-based index of the cell that contains the renderer.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public var index:int = -1;
/**
* The data that belongs to the current cell renderer.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public var item:Object = null;
//--------------------------------------
// Public Methods
//--------------------------------------
/**
* Creates a copy of the TabBarEvent object and sets the value of each parameter to match
* the original.
*
* @return A new TabBarEvent object with parameter values that match those of the original.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
override public function clone():Event
{
return new TabBarEvent(this.type, this.bubbles, this.cancelable, this.index, this.item);
}
}
}

View File

@ -0,0 +1,182 @@
/*
Copyright (c) 2009 Yahoo! Inc. All rights reserved.
The copyrights embodied in the content of this file are licensed under the BSD (revised) open source license
*/
package com.yahoo.astra.fl.events
{
import fl.controls.listClasses.ICellRenderer;
import flash.events.Event;
/**
* For events that are associated with activities
* in tree, such as when a tree branch opens or closes.
*
*/
public class TreeEvent extends Event
{
//--------------------------------------------------------------------------
//
// Class constants
//
//--------------------------------------------------------------------------
/**
* The TreeEvent.ITEM_CLOSE event type constant indicates that a tree
* branch closed or collapsed.
*
* <p>The properties of the event object for this event type have the
* following values.
* Not all properties are meaningful for all kinds of events.
* See the detailed property descriptions for more information.</p>
*
* <table class="innertable">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>itemRenderer</code></td>
* <td>The ListItemRenderer for the node that closed</td></tr>
* <tr><td><code>bubbles</code></td><td>false</td></tr>
* <tr><td><code>cancelable</code></td><td>false</td></tr>
* <tr><td><code>currentTarget</code></td><td>The Object that defines the
* event listener that handles the event. For example, if you use
* <code>myButton.addEventListener()</code> to register an event listener,
* myButton is the value of the <code>currentTarget</code>. </td></tr>
* <tr><td><code>triggerEvent</code></td>
* <td>If the node closed in response to a user action,
* identifies it as a keyboard action or a mouse action.</td></tr>
* <tr><td><code>item</code></td><td>the Tree item (node) that closed</td></tr>
* <tr><td><code>target</code></td><td>The Object that dispatched the event;
* it is not always the Object listening for the event.
* Use the <code>currentTarget</code> property to always access the
* Object listening for the event.</td></tr>
* <tr><td><code>type</code></td><td>TreeEvent.ITEM_CLOSE</td></tr>
* </table>
*
* @eventType itemClose
*/
public static const ITEM_CLOSE:String = "itemClose";
/**
* The TreeEvent.ITEM_OPEN event type constant indicates that a tree
* branch opened or expanded.
*
* <p>The properties of the event object for this event type have the
* following values.
* Not all properties are meaningful for all kinds of events.
* See the detailed property descriptions for more information.</p>
*
* <table class="innertable">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>itemRenderer</code></td>
* <td>The ListItemRenderer for the item (node) that opened</td></tr>
* <tr><td><code>bubbles</code></td><td>false</td></tr>
* <tr><td><code>cancelable</code></td><td>false</td></tr>
* <tr><td><code>currentTarget</code></td><td>The Object that defines the
* event listener that handles the event. For example, if you use
* <code>myButton.addEventListener()</code> to register an event listener,
* myButton is the value of the <code>currentTarget</code>. </td></tr>
* <tr><td><code>triggerEvent</code></td>
* <td>If the item (node) opened in response to a user action,
* identifies it as a keyboard action or a mouse action.</td></tr>
* <tr><td><code>item</code></td><td>the Tree node that opened.</td></tr>
* <tr><td><code>target</code></td><td>The Object that dispatched the event;
* it is not always the Object listening for the event.
* Use the <code>currentTarget</code> property to always access the
* Object listening for the event.</td></tr>
* <tr><td><code>type</code></td><td>TreeEvent.ITEM_OPEN</td></tr>
* </table>
*
* @eventType itemOpen
*/
public static const ITEM_OPEN:String = "itemOpen";
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* Constructor.
*
* @param type The event type; indicates the action that caused the event.
*
* @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 item The Tree node (item) to which this event applies.
*
* @param itemRenderer The item renderer object for the cell.
*
* @param triggerEvent If the node opened or closed in response to a
* user action, indicates the type of input action.
*/
public function TreeEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false,
item:Object = null,
itemRenderer:ICellRenderer = null,
triggerEvent:Event = null)
{
super(type, bubbles, cancelable);
this.item = item;
this.itemRenderer = itemRenderer;
this.triggerEvent = triggerEvent;
}
//--------------------------------------------------------------------------
//
// Properties
//
//--------------------------------------------------------------------------
//----------------------------------
// item
//----------------------------------
/**
* Storage for the item property.
*/
public var item:Object;
//----------------------------------
// itemRenderer
//----------------------------------
/**
* The CellRenderer for the node that closed or opened.
*/
public var itemRenderer:ICellRenderer;
//----------------------------------
// triggerEvent
//----------------------------------
/**
* The low level MouseEvent or KeyboardEvent that triggered this
* event or <code>null</code> if this event was triggered programatically.
*/
public var triggerEvent:Event;
//--------------------------------------------------------------------------
//
// Overridden methods: Event
//
//--------------------------------------------------------------------------
/**
* @private
*/
override public function clone():Event
{
return new TreeEvent(type, bubbles, cancelable,
item, itemRenderer, triggerEvent);
}
}
}