패키지 | mx.managers |
클래스 | public class ToolTipManager |
상속 | ToolTipManager EventDispatcher Object |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
기타 예제
ToolTip objects in multi-versioned applications
Using the ToolTip Manager
Creating custom ToolTips
관련 API 요소
속성 | 정의 주체 | ||
---|---|---|---|
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
currentTarget : DisplayObject [정적]
The UIComponent that is currently displaying a ToolTip,
or null if none is. | ToolTipManager | ||
currentToolTip : mx.core:IToolTip [정적]
The ToolTip object that is currently visible,
or null if none is shown. | ToolTipManager | ||
enabled : Boolean [정적]
If true, the ToolTipManager will automatically show
ToolTips when the user moves the mouse pointer over components. | ToolTipManager | ||
hideDelay : Number [정적]
The amount of time, in milliseconds, that Flex waits
to hide the ToolTip after it appears. | ToolTipManager | ||
hideEffect : IAbstractEffect [정적]
The effect that plays when a ToolTip is hidden,
or null if the ToolTip should disappear with no effect. | ToolTipManager | ||
scrubDelay : Number [정적]
The amount of time, in milliseconds, that a user can take
when moving the mouse between controls before Flex again waits
for the duration of showDelay to display a ToolTip. | ToolTipManager | ||
showDelay : Number [정적]
The amount of time, in milliseconds, that Flex waits
before displaying the ToolTip box once a user
moves the mouse over a component that has a ToolTip. | ToolTipManager | ||
showEffect : IAbstractEffect [정적]
The effect that plays when a ToolTip is shown,
or null if the ToolTip should appear with no effect. | ToolTipManager | ||
toolTipClass : Class [정적]
The class to use for creating ToolTips. | ToolTipManager |
메서드 | 정의 주체 | ||
---|---|---|---|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | EventDispatcher | ||
createToolTip(text:String, x:Number, y:Number, errorTipBorderStyle:String = null, context:IUIComponent = null):mx.core:IToolTip [정적]
Creates an instance of the ToolTip class with the specified text
and displays it at the specified location in stage coordinates. | ToolTipManager | ||
[정적]
Destroys a specified ToolTip that was created by the createToolTip() method. | ToolTipManager | ||
이벤트를 이벤트 흐름으로 전달합니다. | EventDispatcher | ||
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
EventDispatcher 객체에서 리스너를 제거합니다. | EventDispatcher | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object | ||
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher |
currentTarget | 속성 |
currentTarget:DisplayObject
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The UIComponent that is currently displaying a ToolTip,
or null
if none is.
구현
public static function get currentTarget():DisplayObject
public static function set currentTarget(value:DisplayObject):void
currentToolTip | 속성 |
currentToolTip:mx.core:IToolTip
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The ToolTip object that is currently visible,
or null
if none is shown.
구현
public static function get currentToolTip():mx.core:IToolTip
public static function set currentToolTip(value:mx.core:IToolTip):void
enabled | 속성 |
enabled:Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
If true
, the ToolTipManager will automatically show
ToolTips when the user moves the mouse pointer over components.
If false
, no ToolTips will be shown.
기본값: true.
구현
public static function get enabled():Boolean
public static function set enabled(value:Boolean):void
hideDelay | 속성 |
hideDelay:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The amount of time, in milliseconds, that Flex waits
to hide the ToolTip after it appears.
Once Flex hides a ToolTip, the user must move the mouse
off the component and then back onto it to see the ToolTip again.
If you set hideDelay
to Infinity
,
Flex does not hide the ToolTip until the user triggers an event,
such as moving the mouse off of the component.
기본값: 10000.
구현
public static function get hideDelay():Number
public static function set hideDelay(value:Number):void
hideEffect | 속성 |
hideEffect:IAbstractEffect
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The effect that plays when a ToolTip is hidden,
or null
if the ToolTip should disappear with no effect.
기본값: null.
구현
public static function get hideEffect():IAbstractEffect
public static function set hideEffect(value:IAbstractEffect):void
scrubDelay | 속성 |
scrubDelay:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The amount of time, in milliseconds, that a user can take
when moving the mouse between controls before Flex again waits
for the duration of showDelay
to display a ToolTip.
This setting is useful if the user moves quickly from one control
to another; after displaying the first ToolTip, Flex will display
the others immediately rather than waiting.
The shorter the setting for scrubDelay
, the more
likely that the user must wait for an amount of time specified
by showDelay
in order to see the next ToolTip.
A good use of this property is if you have several buttons on a
toolbar, and the user will quickly scan across them to see brief
descriptions of their functionality.
기본값: 100.
구현
public static function get scrubDelay():Number
public static function set scrubDelay(value:Number):void
showDelay | 속성 |
showDelay:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The amount of time, in milliseconds, that Flex waits
before displaying the ToolTip box once a user
moves the mouse over a component that has a ToolTip.
To make the ToolTip appear instantly, set showDelay
to 0.
기본값: 500.
구현
public static function get showDelay():Number
public static function set showDelay(value:Number):void
showEffect | 속성 |
showEffect:IAbstractEffect
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The effect that plays when a ToolTip is shown,
or null
if the ToolTip should appear with no effect.
기본값: null.
구현
public static function get showEffect():IAbstractEffect
public static function set showEffect(value:IAbstractEffect):void
toolTipClass | 속성 |
createToolTip | () | 메서드 |
public static function createToolTip(text:String, x:Number, y:Number, errorTipBorderStyle:String = null, context:IUIComponent = null):mx.core:IToolTip
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Creates an instance of the ToolTip class with the specified text and displays it at the specified location in stage coordinates.
ToolTips appear in their own layer, on top of everything except cursors.
The standard way of using ToolTips is to let the ToolTipManager
automatically show and hide them as the user moves the mouse over
the objects that have the toolTip
property set.
You can turn off this automatic ToolTip management by setting
the ToolTipManager's enabled
property to
false
.
By contrast, this method—along with destroyToolTip()
—gives
you programmatic control over ToolTips.
You can show them when and where you choose,
and you can even show more than one at once if you need to.
(The ToolTipManager never does this, because it is generally
confusing to the user).
This method first creates a new instance of ToolTip and calls the
addChild()
method to put it into the SystemManager's
toolTips layer.
If you are showing an error tip, it sets the appropriate styles.
Then it sets the text for the ToolTip, sizes the ToolTip based on
its text, and positions it where you specified.
You must save the reference to the ToolTip that this method
returns so that you can pass it to the destroyToolTip()
method.
매개 변수
text:String — The text to display in the ToolTip instance.
| |
x:Number — The horizontal coordinate of the ToolTip in stage coordinates.
In case of multiple stages, the relevant stage is determined
from the context argument.
| |
y:Number — The vertical coordinate of the ToolTip in stage coordinates.
In case of multiple stages, the relevant stage is determined
from the context argument.
| |
errorTipBorderStyle:String (default = null ) — The border style of an error tip. This method
argument can be null, "errorTipRight", "errorTipAbove", or "errorTipBelow".
If it is null, then the createToolTip() method creates a normal ToolTip. If it is
"errorTipRight", "errorTipAbove", or "errorTipBelow", then the createToolTip()
method creates an error tip, and this parameter determines where the arrow
of the error tip points to (the error's target). For example, if you pass "errorTipRight", Flex
positions the error tip (via the x and y arguments) to the
right of the error target; the arrow is on the left edge of the error tip.
| |
context:IUIComponent (default = null ) — Determines which StyleManager is used. Typically, you pass the object on
which the ToolTip appears, so that the ToolTip's StyleManager is the same one that is used by that object.
|
mx.core:IToolTip — The newly created ToolTip.
|
destroyToolTip | () | 메서드 |
public static function destroyToolTip(toolTip:mx.core:IToolTip):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Destroys a specified ToolTip that was created by the createToolTip()
method.
This method calls the removeChild()
method to remove the specified
ToolTip from the SystemManager's ToolTips layer.
It will then be garbage-collected unless you keep a
reference to it.
You should not call this method on the ToolTipManager's
currentToolTip
.
매개 변수
toolTip:mx.core:IToolTip — The ToolTip instance to destroy.
|
Tue Jun 12 2018, 03:17 PM Z