패키지 | mx.states |
클래스 | public class SetEventHandler |
상속 | SetEventHandler OverrideBase OnDemandEventDispatcher Object |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
You use this class in the overrides
property of the State class.
The <mx:SetEventHanlder>
tag
has the following attributes:
<mx:SetEventHandler Properties name="null" handlerFunction="null" target="null" Events handler=No default />
관련 API 요소
속성 | 정의 주체 | ||
---|---|---|---|
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
handlerFunction : Function
The handler function for the event. | SetEventHandler | ||
name : String
The name of the event whose handler is being set. | SetEventHandler | ||
originalHandlerFunction : Function
The handler function to remove prior to applying our override. | SetEventHandler | ||
target : Object
The component that dispatches the event. | SetEventHandler |
메서드 | 정의 주체 | ||
---|---|---|---|
Constructor. | SetEventHandler | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | OnDemandEventDispatcher | ||
[재정의]
Applies the override. | SetEventHandler | ||
Dispatches an event into the event flow. | OnDemandEventDispatcher | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | OnDemandEventDispatcher | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
IOverride interface method; this class implements it as an empty method. | OverrideBase | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
[재정의]
Removes the override. | SetEventHandler | ||
Removes a listener from the EventDispatcher object. | OnDemandEventDispatcher | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | OnDemandEventDispatcher |
이벤트 | 요약 | 정의 주체 | ||
---|---|---|---|---|
The event handler function to execute in response to the event that is specified by the name property. | SetEventHandler |
handlerFunction | 속성 |
public var handlerFunction:Function
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The handler function for the event.
This property is intended for developers who use ActionScript to
create and access view states.
In MXML, you can use the equivalent handler
event attribute; do not use both in a single MXML tag.
기본값: null.
name | 속성 |
public var name:String
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The name of the event whose handler is being set. You must set this property, either in the SetEventHandler constructor or by setting the property value directly.
originalHandlerFunction | 속성 |
public var originalHandlerFunction:Function
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The handler function to remove prior to applying our override.
기본값: null.
target | 속성 |
public var target:Object
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The component that dispatches the event.
If the property value is null
, Flex uses the
immediate parent of the <mx:states>
tag.
기본값: null.
SetEventHandler | () | 생성자 |
public function SetEventHandler(target:EventDispatcher = null, name:String = null)
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Constructor.
매개 변수target:EventDispatcher (default = null ) — The object that dispatches the event to be handled.
By default, Flex uses the immediate parent of the State object.
| |
name:String (default = null ) — The event type for which to set the handler.
|
apply | () | 메서드 |
override public function apply(parent:UIComponent):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Applies the override. Flex retains the original value, so that it can
restore the value later in the remove()
method.
This method is called automatically when the state is entered. It should not be called directly.
매개 변수
parent:UIComponent — The parent of the state object containing this override.
The override should use this as its target if an explicit target was
not specified.
|
remove | () | 메서드 |
override public function remove(parent:UIComponent):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Removes the override. The value remembered in the apply()
method is restored.
This method is called automatically when the state is entered. It should not be called directly.
매개 변수
parent:UIComponent — The parent of the state object containing this override.
The override should use this as its target if an explicit target was
not specified.
|
handler | 이벤트 |
Object
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The event handler function to execute in response to the event that is
specified by the name
property.
Do not specify the handler
property and the handlerFunction
property in a single <mx:SetEventHandler>
tag.
Flex does not dispatch a handler
event.
You use the handler
key word only as an MXML attribte.
When you use the handler
handler attribute, you can specify a
method that takes multiple parameters, not just the Event object;
also, you can specify the handler code in-line in the MXML tag.
Tue Jun 12 2018, 03:17 PM Z