PageRenderTime 110ms CodeModel.GetById 1ms RepoModel.GetById 2ms app.codeStats 1ms

/FD3/FlashDevelop/Bin/Debug/Library/AS3/frameworks/FlashIDE/fl/core/UIComponent.as

https://bitbucket.org/kkszysiu/flashdevelop
ActionScript | 448 lines | 135 code | 4 blank | 309 comment | 0 complexity | 2841e864954f3429e303f59eec3f8ca7 MD5 | raw file
  1. package fl.core
  2. {
  3. import flash.display.DisplayObject;
  4. import flash.display.DisplayObjectContainer;
  5. import flash.display.InteractiveObject;
  6. import flash.display.Sprite;
  7. import flash.display.Stage;
  8. import flash.events.Event;
  9. import flash.events.EventPhase;
  10. import flash.events.FocusEvent;
  11. import flash.events.KeyboardEvent;
  12. import flash.events.MouseEvent;
  13. import flash.geom.Rectangle;
  14. import flash.text.TextField;
  15. import flash.text.TextFormat;
  16. import flash.text.TextFormatAlign;
  17. import flash.utils.Dictionary;
  18. import flash.utils.getDefinitionByName;
  19. import flash.utils.getQualifiedClassName;
  20. import flash.system.Capabilities;
  21. import flash.system.IME;
  22. import flash.system.IMEConversionMode;
  23. import flash.utils.getQualifiedClassName;
  24. import fl.core.InvalidationType;
  25. import fl.events.ComponentEvent;
  26. import fl.managers.FocusManager;
  27. import fl.managers.IFocusManager;
  28. import fl.managers.IFocusManagerComponent;
  29. import fl.managers.StyleManager;
  30. /**
  31. * Dispatched after the component is moved. * * @eventType fl.events.ComponentEvent.MOVE * * @includeExample examples/UIComponent.MOVE.1.as -noswf * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  32. */
  33. [Event(name="move", type="fl.events.ComponentEvent")]
  34. /**
  35. * Dispatched after the component is resized. * * @eventType fl.events.ComponentEvent.RESIZE * * @includeExample examples/UIComponent.RESIZE.1.as -noswf * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  36. */
  37. [Event(name="resize", type="fl.events.ComponentEvent")]
  38. /**
  39. * Dispatched after the component visibility changes from invisible to visible. * * @eventType fl.events.ComponentEvent.SHOW * * @includeExample examples/UIComponent.HIDE.1.as -noswf * * @see #event:hide * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  40. */
  41. [Event(name="show", type="fl.events.ComponentEvent")]
  42. /**
  43. * Dispatched after the component visibility changes from visible to invisible. * * @eventType fl.events.ComponentEvent.HIDE * * @includeExample examples/UIComponent.HIDE.1.as -noswf * * @see #event:show * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  44. */
  45. [Event(name="hide", type="fl.events.ComponentEvent")]
  46. /**
  47. * The skin to be used to display focus indicators. * * @default focusRectSkin * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  48. */
  49. [Style(name="focusRectSkin", type="Class")]
  50. /**
  51. * The padding that separates the outside boundaries of the component from the * outside edges of the focus indicator, in pixels. * * @default 2 * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  52. */
  53. [Style(name="focusRectPadding", type="Number", format="Length")]
  54. /**
  55. * The TextFormat object to use to render the component label. * * @default TextFormat("_sans", 11, 0x000000, false, false, false, '', '', TextFormatAlign.LEFT, 0, 0, 0, 0) * * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  56. */
  57. [Style(name="textFormat", type="flash.text.TextFormat")]
  58. /**
  59. * The TextFormat object to use to render the component label when the button is disabled. * * @default TextFormat("_sans", 11, 0x999999, false, false, false, '', '', TextFormatAlign.LEFT, 0, 0, 0, 0) * * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  60. */
  61. [Style(name="disabledTextFormat", type="flash.text.TextFormat")]
  62. /**
  63. * The UIComponent class is the base class for all visual components, * both interactive and noninteractive. Interactive components are defined * as components that receive user input such as keyboard or mouse activity. * Noninteractive components are used to display data; they do not respond * to user interaction. The ProgressBar and UILoader components are examples * of noninteractive components. * * <p>The Tab and arrow keys can be used to move focus to and over an interactive component; * an interactive component can accept low-level events such as input from mouse and keyboard * devices. An interactive component can also be disabled so that it cannot receive * mouse and keyboard input.</p> * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  64. */
  65. public class UIComponent extends Sprite
  66. {
  67. /**
  68. * The version number of the components. * * @includeExample examples/UIComponent.version.1.as -noswf * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  69. */
  70. public var version : String;
  71. /**
  72. * @private (internal) * Indicates whether the current execution stack is within a call later phase. * * @default false * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  73. */
  74. public static var inCallLaterPhase : Boolean;
  75. /**
  76. * @private * Used when components are nested, and we want the parent component to * handle draw focus, not the child. * * @default null * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  77. */
  78. public var focusTarget : IFocusManagerComponent;
  79. /**
  80. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  81. */
  82. protected var isLivePreview : Boolean;
  83. /**
  84. * @private (testing) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  85. */
  86. private var tempText : TextField;
  87. /**
  88. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  89. */
  90. protected var instanceStyles : Object;
  91. /**
  92. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  93. */
  94. protected var sharedStyles : Object;
  95. /**
  96. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  97. */
  98. protected var callLaterMethods : Dictionary;
  99. /**
  100. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  101. */
  102. protected var invalidateFlag : Boolean;
  103. /**
  104. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  105. */
  106. protected var _enabled : Boolean;
  107. /**
  108. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  109. */
  110. protected var invalidHash : Object;
  111. /**
  112. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  113. */
  114. protected var uiFocusRect : DisplayObject;
  115. /**
  116. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  117. */
  118. protected var isFocused : Boolean;
  119. /**
  120. * @private * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  121. */
  122. private var _focusEnabled : Boolean;
  123. /**
  124. * @private * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  125. */
  126. private var _mouseFocusEnabled : Boolean;
  127. /**
  128. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  129. */
  130. protected var _width : Number;
  131. /**
  132. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  133. */
  134. protected var _height : Number;
  135. /**
  136. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  137. */
  138. protected var _x : Number;
  139. /**
  140. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  141. */
  142. protected var _y : Number;
  143. /**
  144. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  145. */
  146. protected var startWidth : Number;
  147. /**
  148. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  149. */
  150. protected var startHeight : Number;
  151. /**
  152. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  153. */
  154. protected var _imeMode : String;
  155. /**
  156. * @private (protected)
  157. */
  158. protected var _oldIMEMode : String;
  159. /**
  160. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  161. */
  162. protected var errorCaught : Boolean;
  163. /**
  164. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  165. */
  166. protected var _inspector : Boolean;
  167. /**
  168. * @private * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  169. */
  170. private static var defaultStyles : Object;
  171. /**
  172. * @private * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  173. */
  174. private static var focusManagers : Dictionary;
  175. /**
  176. * @private * @internal (Placeholder for mixin by UIComponentAccImpl) * * Creates the Accessibility class to be associated with the current component. * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  177. */
  178. public static var createAccessibilityImplementation : Function;
  179. /**
  180. * @private (internal) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  181. */
  182. public function get componentInspectorSetting () : Boolean;
  183. /**
  184. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  185. */
  186. public function set componentInspectorSetting (value:Boolean) : void;
  187. /**
  188. * Gets or sets a value that indicates whether the component can accept user interaction. * A value of <code>true</code> indicates that the component can accept user interaction; a * value of <code>false</code> indicates that it cannot. * * <p>If you set the <code>enabled</code> property to <code>false</code>, the color of the * container is dimmed and user input is blocked (with the exception of the Label and ProgressBar components).</p> * * @default true * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  189. */
  190. public function get enabled () : Boolean;
  191. /**
  192. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  193. */
  194. public function set enabled (value:Boolean) : void;
  195. /**
  196. * Gets or sets the width of the component, in pixels. * * <p>Setting this property causes a <code>resize</code> event to be * dispatched. See the <code>resize</code> event for detailed information * about when it is dispatched.</p> * * <p>If the <code>scaleX</code> property of the component is not 1.0, * the width of the component that is obtained from its internal coordinates * will not match the width value from the parent coordinates. For example, * a component that is 100 pixels in width and has a <code>scaleX</code> of 2 * has a value of 100 pixels in the parent, but internally stores a value * indicating that it is 50 pixels wide.</p> * * @see #height * @see #event:resize * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  197. */
  198. public function get width () : Number;
  199. /**
  200. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  201. */
  202. public function set width (value:Number) : void;
  203. /**
  204. * Gets or sets the height of the component, in pixels. * * <p>Setting this property causes a <code>resize</code> event to be * dispatched. See the <code>resize</code> event for detailed information * about when it is dispatched.</p> * * <p>If the <code>scaleY</code> property of the component is not 1.0, * the height of the component that is obtained from its internal coordinates * will not match the height value from the parent coordinates. For example, * a component that is 100 pixels in height and has a <code>scaleY</code> of 2 * has a value of 100 pixels in the parent, but internally stores a value * indicating that it is 50 pixels in height.</p> * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  205. */
  206. public function get height () : Number;
  207. /**
  208. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  209. */
  210. public function set height (value:Number) : void;
  211. /**
  212. * Gets or sets the x coordinate that represents the position of the component along * the x axis within its parent container. This value is described in pixels and is * calculated from the left. * * <p>Setting this property causes the <code>ComponentEvent.MOVE</code> event to be dispatched.</p> * * @default 0 * * @see #move() * @see #y * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  213. */
  214. public function get x () : Number;
  215. /**
  216. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  217. */
  218. public function set x (value:Number) : void;
  219. /**
  220. * Gets or sets the y coordinate that represents the position of the component along * the y axis within its parent container. This value is described in pixels and is * calculated from the top. * * <p>Setting this property causes the <code>move</code> event to be dispatched.</p> * * @see #move() * @see #x * * @langversion 3.0 * @playerversion Flash 9.0.28.0 * @internal [kenos] Should this have a default value of 0, like the x property?
  221. */
  222. public function get y () : Number;
  223. /**
  224. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  225. */
  226. public function set y (value:Number) : void;
  227. /**
  228. * Multiplies the current width of the component by a scale factor. * * @see #scaleY * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  229. */
  230. public function get scaleX () : Number;
  231. /**
  232. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  233. */
  234. public function set scaleX (value:Number) : void;
  235. /**
  236. * Multiplies the current height of the component by a scale factor. * * @see #scaleX * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  237. */
  238. public function get scaleY () : Number;
  239. /**
  240. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  241. */
  242. public function set scaleY (value:Number) : void;
  243. /**
  244. * Gets or sets a value that indicates whether the current component instance is visible. * A value of <code>true</code> indicates that the current component is visible; a value of * <code>false</code> indicates that it is not. * * <p>When this property is set to <code>true</code>, the object dispatches a * <code>show</code> event. When this property is set to <code>false</code>, * the object dispatches a <code>hide</code> event. In either case, * the children of the object do not generate a <code>show</code> or * <code>hide</code> event unless the object specifically writes an * implementation to do so.</p> * * @default true * * @see #event:hide * @see #event:show * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  245. */
  246. public function get visible () : Boolean;
  247. /**
  248. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  249. */
  250. public function set visible (value:Boolean) : void;
  251. /**
  252. * Gets or sets a Boolean value that indicates whether the component can receive focus * after the user clicks it. A value of <code>true</code> indicates that it can * receive focus; a value of <code>false</code> indicates that it cannot. * * <p>If this property is <code>false</code>, focus is transferred to the first * parent whose <code>mouseFocusEnabled</code> property is set to <code>true</code>.</p> * * @default true * * @see #mouseFocusEnabled * * @langversion 3.0 * @playerversion Flash 9.0.28.0 * @internal [kenos] This is described as being the same thing as the property * below. Is this correct?
  253. */
  254. public function get focusEnabled () : Boolean;
  255. /**
  256. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  257. */
  258. public function set focusEnabled (b:Boolean) : void;
  259. /**
  260. * Gets or sets a value that indicates whether the component can receive focus after * the user clicks it. A value of <code>true</code> indicates that it can receive * focus; a value of <code>false</code> indicates that it cannot. * * <p>If this property is <code>false</code>, focus is transferred to the first * parent whose <code>mouseFocusEnabled</code> property is set to <code>true</code>.</p> * * @default true * * @see #focusEnabled * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  261. */
  262. public function get mouseFocusEnabled () : Boolean;
  263. /**
  264. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  265. */
  266. public function set mouseFocusEnabled (b:Boolean) : void;
  267. /**
  268. * Gets or sets the FocusManager that controls focus for this component and its * peers. Each pop-up component maintains its own focus loop and FocusManager instance. * Use this property to access the correct FocusManager for this component. * * @return The FocusManager that is associated with the current component; otherwise * this property returns <code>null</code>. * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  269. */
  270. public function get focusManager () : IFocusManager;
  271. /**
  272. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  273. */
  274. public function set focusManager (f:IFocusManager) : void;
  275. /**
  276. * Retrieves the default style map for the current component. The style map contains * the type that is appropriate for the component, depending on the style that * the component uses. For example, the <code>disabledTextFormat</code> style * contains a value of <code>null</code> or a TextFormat object. * You can use these styles and call <code>setStyle()</code> on the current * component. The following code overrides the default <code>disabledTextFormat</code> * style on the specified component: * <listing>componentInstance.setStyle("disabledTextFormat", new TextFormat());</listing> * * @return Default styles object. * * @includeExample examples/UIComponent.getStyleDefinition.1.as -noswf * * @see #getStyle() * @see #setStyle() * @see fl.managers.StyleManager StyleManager * @internal [kenos] This is vague. What are "these styles" that you can use "and call setStyle * on the current component"? * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  277. */
  278. public static function getStyleDefinition () : Object;
  279. /**
  280. * Merges the styles from multiple classes into one object. * If a style is defined in multiple objects, the first occurrence * that is found is used. * * @param list A comma-delimited list of objects that contain the default styles to be merged. * * @return A default style object that contains the merged styles. * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  281. */
  282. public static function mergeStyles (...list:Array) : Object;
  283. /**
  284. * Creates a new UIComponent component instance. * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  285. */
  286. public function UIComponent ();
  287. /**
  288. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  289. */
  290. protected function beforeComponentParameters () : void;
  291. /**
  292. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  293. */
  294. protected function afterComponentParameters () : void;
  295. /**
  296. * Sets the component to the specified width and height. * * @param width The width of the component, in pixels. * * @param height The height of the component, in pixels. * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  297. */
  298. public function setSize (width:Number, height:Number) : void;
  299. /**
  300. * Sets a style property on this component instance. This style may * override a style that was set globally. * * <p>Calling this method can result in decreased performance. * Use it only when necessary.</p> * * @param style The name of the style property. * * @param value The value of the style. * * @includeExample examples/UIComponent.setStyle.1.as -noswf * @includeExample examples/UIComponent.setStyle.2.as -noswf * * @see #getStyle() * @see #clearStyle() * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  301. */
  302. public function setStyle (style:String, value:Object) : void;
  303. /**
  304. * Deletes a style property from this component instance. * <p>This does not necessarily cause the <code>getStyle()</code> method * to return a value of <code>undefined</code>.</p> * * @param style The name of the style property. * * @see #getStyle() * @see #setStyle() * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  305. */
  306. public function clearStyle (style:String) : void;
  307. /**
  308. * Retrieves a style property that is set in the style lookup * chain of the component. * * <p>The type that this method returns varies depending on the style * property that the method retrieves. The range of possible types includes * Boolean; String; Number; int; a uint for an RGB color; a Class for a skin; * or any kind of object.</p> * * <p>If you call this method to retrieve a particular style property, * it will be of a known type that you can store in a variable of the * same type. Type casting is not necessary. Instead, a simple assignment * statement like the following will work:</p> * * <listing>var backgroundColor:uint = getStyle("backgroundColor");</listing> * * <p>If the style property is not set in the style lookup chain, this method * returns a value of <code>undefined</code>. Note that <code>undefined</code> * is a special value that is not the same as <code>false</code>, "", <code>NaN</code>, * 0, or <code>null</code>. No valid style value is ever <code>undefined</code>. * You can use the static method <code>StyleManager.isValidStyleValue()</code> to * test whether a value was set.</p> * * @param style The name of the style property. * * @return Style value. * * @includeExample examples/UIComponent.getStyle.1.as -noswf * * @see #clearStyle() * @see #setStyle() * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  309. */
  310. public function getStyle (style:String) : Object;
  311. /**
  312. * Moves the component to the specified position within its parent. This has * the same effect as changing the component location by setting its * <code>x</code> and <code>y</code> properties. Calling this method triggers * the <code>ComponentEvent.MOVE</code> event to be dispatched. * * <p>To override the <code>updateDisplayList()</code> method in a * custom component, use the <code>move()</code> method instead * of setting the <code>x</code> and <code>y</code> properties. This is because * a call to the <code>move()</code> method causes a <code>move</code> event object * to be dispatched immediately after the move operation is complete. In contrast, * when you change the component location by setting the <code>x</code> and <code>y</code> * properties, the event object is dispatched on the next screen refresh.</p> * * @param x The x coordinate value that specifies the position of the component within its * parent, in pixels. This value is calculated from the left. * * @param y The y coordinate value that specifies the position of the component within its * parent, in pixels. This value is calculated from the top. * * @see #x * @see #y * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  313. */
  314. public function move (x:Number, y:Number) : void;
  315. /**
  316. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  317. */
  318. protected function getScaleY () : Number;
  319. /**
  320. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  321. */
  322. protected function setScaleY (value:Number) : void;
  323. /**
  324. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  325. */
  326. protected function getScaleX () : Number;
  327. /**
  328. * @private (setter) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  329. */
  330. protected function setScaleX (value:Number) : void;
  331. /**
  332. * Validates and updates the properties and layout of this object, redrawing it * if necessary. * * <p>Properties that require substantial computation are normally not processed * until the script finishes executing. This is because setting one property could * require the processing of other properties. For example, setting the <code>width</code> * property may require that the widths of the children or parent of the object also * be recalculated. And if the script recalculates the width of the object more than * once, these interdependent properties may also require recalculating. Use this * method to manually override this behavior.</p> * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  333. */
  334. public function validateNow () : void;
  335. /**
  336. * Marks a property as invalid and redraws the component on the * next frame unless otherwise specified. * * @param property The property to be invalidated. * * @param callLater A Boolean value that indicates whether the * component should be redrawn on the next frame. The default * value is <code>true</code>. * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  337. */
  338. public function invalidate (property:String = InvalidationType.ALL, callLater:Boolean = true) : void;
  339. /**
  340. * @private (internal) * * Sets the inherited style value to the specified style name and * invalidates the styles of the component. * * @param name Style name. * * @param style Style value. * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  341. */
  342. public function setSharedStyle (name:String, style:Object) : void;
  343. /**
  344. * Shows or hides the focus indicator on this component. * * <p>The UIComponent class implements this method by creating and positioning * an instance of the class that is specified by the <code>focusSkin</code> style.</p> * * @param focused Indicates whether to show or hide the focus indicator. * If this value is <code>true</code>, the focus indicator is shown; if this value * is <code>false</code>, the focus indicator is hidden. * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  345. */
  346. public function drawFocus (focused:Boolean) : void;
  347. /**
  348. * Sets the focus to this component. The component may in turn give the focus * to a subcomponent. * * <p><strong>Note:</strong> Only the TextInput and TextArea components show * a focus indicator when this method sets the focus. All components show a focus * indicator when the user tabs to the component.</p> * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  349. */
  350. public function setFocus () : void;
  351. /**
  352. * Retrieves the object that currently has focus. * * <p>Note that this method does not necessarily return the component that * has focus. It may return the internal subcomponent of the component * that has focus. To get the component that has focus, use the * <code>focusManager.focus</code> property.</p> * * @return The object that has focus; otherwise, this method returns <code>null</code>. * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  353. */
  354. public function getFocus () : InteractiveObject;
  355. /**
  356. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  357. */
  358. protected function setIMEMode (enabled:Boolean);
  359. /**
  360. * Initiates an immediate draw operation, without invalidating everything as <code>invalidateNow</code> does. * * @internal what is "invalidateNow"? i cannot find it in the API. * @internal [kenos] Additionally, is the immediate draw operation on this component and does invalidating * "everything" mean invalidating the entire component? * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  361. */
  362. public function drawNow () : void;
  363. /**
  364. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  365. */
  366. protected function configUI () : void;
  367. /**
  368. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  369. */
  370. protected function checkLivePreview () : Boolean;
  371. /**
  372. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  373. */
  374. protected function isInvalid (property:String, ...properties:Array) : Boolean;
  375. /**
  376. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  377. */
  378. protected function validate () : void;
  379. /**
  380. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  381. */
  382. protected function draw () : void;
  383. /**
  384. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  385. */
  386. protected function getDisplayObjectInstance (skin:Object) : DisplayObject;
  387. /**
  388. * Returns the specified style for a component, considering all styles set on the global level, component level and instance level. * * <p>For example, if a component has a style set at the global level to <code>myStyle</code> and you call * <code>getStyle("myStyle")</code> on an instance that does not have an instance setting, it returns null. If you call * <code>getStyleValue("myStyle")</code>, it returns "myStyle", because it is active at the global level.</p> * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  389. */
  390. protected function getStyleValue (name:String) : Object;
  391. /**
  392. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  393. */
  394. protected function copyStylesToChild (child:UIComponent, styleMap:Object) : void;
  395. /**
  396. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  397. */
  398. protected function callLater (fn:Function) : void;
  399. /**
  400. * @private * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  401. */
  402. private function callLaterDispatcher (event:Event) : void;
  403. /**
  404. * @private * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  405. */
  406. private function initializeFocusManager () : void;
  407. /**
  408. * @private * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  409. */
  410. private function addedHandler (evt:Event) : void;
  411. /**
  412. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  413. */
  414. protected function createFocusManager () : void;
  415. /**
  416. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  417. */
  418. protected function isOurFocus (target:DisplayObject) : Boolean;
  419. /**
  420. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  421. */
  422. protected function focusInHandler (event:FocusEvent) : void;
  423. /**
  424. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  425. */
  426. protected function focusOutHandler (event:FocusEvent) : void;
  427. /**
  428. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  429. */
  430. protected function keyDownHandler (event:KeyboardEvent) : void;
  431. /**
  432. * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  433. */
  434. protected function keyUpHandler (event:KeyboardEvent) : void;
  435. /**
  436. * @private (protected) * Triggers initialization of this component's accessibility code. * * <p>This method is called from the constructor via ENTER_FRAME event * to initialize accessibility support for this component</p> * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  437. */
  438. protected function hookAccessibility (event:Event) : void;
  439. /**
  440. * @private (protected) * Initializes this component's accessibility code. * * <p>This method is called from the constructor to hook in the * component's accessibility code, which resides in a separate class * in the fl.accessibility package. * Each subclass that supports accessibility must override this method * because the hook-in process uses a different static variable * in each subclass.</p> * * @langversion 3.0 * @playerversion Flash 9.0.28.0
  441. */
  442. protected function initializeAccessibility () : void;
  443. }
  444. }