blob: cef4b2de860c41a2f5a48c34cfff2f26d39baa18 [file] [log] [blame]
////////////////////////////////////////////////////////////////////////////////
//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
package spark.events
{
import flash.events.Event;
import flash.display.LoaderInfo;
/**
* The LoaderInvalidationEvent class represents events that are dispatched
* to notify ContentRequest instances that their original request
* has been invalidated.
*
* @langversion 3.0
* @playerversion Flash 10
* @playerversion AIR 1.5
* @productversion Flex 4
*/
public class LoaderInvalidationEvent extends Event
{
//--------------------------------------------------------------------------
//
// Class constants
//
//--------------------------------------------------------------------------
/**
* The <code>LoaderInvalidationEvent.INVALIDATE_LOADER</code> constant defines
* the value of the <code>type</code> property of the event object for a
* <code>invalidateLoader</code> event.
*
* <p>The properties of the event object have the following values:</p>
* <table class="innertable">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>bubbles</code></td><td>false</td></tr>
* <tr><td><code>cancelable</code></td><td>false</td></tr>
* <tr><td><code>content</code></td><td>The content for which to
* invalidate the content request.</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>myDataGrid.addEventListener()</code> to register an event listener,
* myDataGrid is the value of the <code>currentTarget</code>. </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>LoaderInvalidationEvent.INVALIDATE_LOADER</td></tr>
* </table>
*
* @eventType invalidateLoader
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 4
*/
public static const INVALIDATE_LOADER:String = "invalidateLoader";
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* Constructor.
*
* @param type The event type; indicates the action that caused the event.
*
* @param content content for which we are invalidating.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 4
*/
public function LoaderInvalidationEvent(type:String, content:*)
{
super(type);
this.content = content;
}
//--------------------------------------------------------------------------
//
// Properties
//
//--------------------------------------------------------------------------
//----------------------------------
// content
//----------------------------------
/**
* The content for which to invalidate the content request.
*
* @langversion 3.0
* @playerversion Flash 10
* @playerversion AIR 1.5
* @productversion Flex 4.5
*/
public var content:*;
//--------------------------------------------------------------------------
//
// Overridden methods: Event
//
//--------------------------------------------------------------------------
/**
* @private
*/
override public function clone():Event
{
return new LoaderInvalidationEvent(type, content);
}
}
}