Module flower.widget.UIComponent
The base class for all components.
Provide the basic operation of the component.
Extends:
Info:
- Release: V3.0.0
- Author: Makoto
Functions
Fields
STYLE_NORMAL_COLOR | Style: normalColor |
STYLE_DISABLED_COLOR | Style: disabledColor |
STYLE_MIN_SIZE | Style: minSize |
Functions
- UIComponent:init (params)
-
Constructor.
Please do not inherit this constructor.
Please have some template functions are inherited.
Parameters:
- params Parameter table
- UIComponent:_initInternal ()
- Initialization is the process of internal variables. Please to inherit this function if the definition of the variable.
- UIComponent:_initEventListeners ()
- Performing the initialization processing of the event listener. Please to inherit this function if you want to initialize the event listener.
- UIComponent:_createChildren ()
- Performing the initialization processing of the component. Please to inherit this function if you want to change the behavior of the component.
- UIComponent:invalidate ()
- Invalidate the all state.
- UIComponent:invalidateDisplay ()
- Invalidate the display. Schedule the validate the display.
- UIComponent:invalidateLayout ()
- Invalidate the layout. Schedule the validate the layout.
- UIComponent:validate ()
- Validate the all state. For slow, it should not call this process as much as possible.
- UIComponent:validateDisplay ()
- Validate the display. If you need to update the display, call the updateDisplay.
- UIComponent:validateLayout ()
- Validate the layout. If you need to update the layout, call the updateLayout.
- UIComponent:updateDisplay ()
- Update the display. Do not call this function directly. Instead, please consider invalidateDisplay whether available.
- UIComponent:updateLayout ()
- Update the layout. Do not call this function directly. Instead, please consider invalidateLayout whether available.
- UIComponent:updatePriority (priority)
-
Update the order of rendering.
It is called by LayoutMgr.
Parameters:
- priority priority.
Returns:
-
last priority
- UIComponent:drawFocus (focus)
-
Draw focus object.
Called at a timing that is configured with focus.
Parameters:
- focus focus
- UIComponent:getChildren ()
-
Returns the children object.
If you want to use this function with caution.
Returns:
-
children
- UIComponent:addChild (child)
-
Adds the specified child.
Parameters:
- child DisplayObject
- UIComponent:removeChild (child)
-
Removes a child.
Parameters:
- child DisplayObject
Returns:
-
True if removed.
- UIComponent:getNestLevel ()
-
Returns the nest level.
Returns:
-
nest level
- UIComponent:setProperties (properties)
-
Sets the properties
Parameters:
- properties properties
- UIComponent:setName (name)
-
Sets the name.
Parameters:
- name name
- UIComponent:setWidth (width)
-
Sets the width.
Parameters:
- width Width
- UIComponent:setHeight (height)
-
Sets the height.
Parameters:
- height Height
- UIComponent:setSize (width, height)
-
Sets the size.
Parameters:
- width Width
- height Height
- UIComponent:setMinSize (minWidth, minHeight)
-
Sets the min size.
Parameters:
- minWidth minWidth
- minHeight minHeight
- UIComponent:getMinSize ()
-
Returns the minWidth and minHeight.
Returns:
- minWidth
- minHeight
- UIComponent:setParent (parent)
-
Sets the object's parent, inheriting its color and transform.
If you set a parent, you want to add itself to the parent.
Parameters:
- parent parent
- UIComponent:setLayout (layout)
-
Set the layout.
Parameters:
- layout layout
- UIComponent:getLayout ()
-
Return the layout.
Returns:
-
layout
- UIComponent:setExcludeLayout (excludeLayout)
-
Set the excludeLayout.
Parameters:
- excludeLayout excludeLayout
- UIComponent:setEnabled (enabled)
-
Set the enabled state.
Parameters:
- enabled enabled
- UIComponent:isEnabled ()
-
Returns the enabled.
Returns:
-
enabled
- UIComponent:isComponentEnabled ()
-
Returns the parent enabled.
Returns:
-
enabled
- UIComponent:setFocus (focus)
-
Set the focus.
Parameters:
- focus focus
- UIComponent:isFocus ()
-
Returns the focus.
Returns:
-
focus
- UIComponent:setFocusEnabled (focusEnabled)
-
Sets the focus enabled.
Parameters:
- focusEnabled focusEnabled
- UIComponent:isFocusEnabled ()
-
Returns the focus.
Returns:
-
focus
- UIComponent:setTheme (theme)
-
Sets the theme.
Parameters:
- theme theme
- UIComponent:getTheme ()
-
Returns the theme.
Returns:
-
theme
- UIComponent:getThemeMgr ()
-
Returns the ThemeMgr.
Returns:
-
ThemeMgr
- UIComponent:setThemeName (themeName)
-
Set the themeName.
Parameters:
- themeName themeName
- UIComponent:getThemeName ()
-
Return the themeName.
Returns:
-
themeName
- UIComponent:setStyle (name, value)
-
Sets the style of the component.
Parameters:
- name style name
- value style value
- UIComponent:getStyle (name, default)
-
Returns the style.
Parameters:
- name style name
- default default value.
Returns:
-
style value
- UIComponent:getFocusMgr ()
-
Returns the focusMgr.
Returns:
-
focusMgr
- UIComponent:getLayoutMgr ()
-
Returns the layoutMgr.
Returns:
-
layoutMgr
- UIComponent:onEnabledChanged (e)
-
This event handler is called enabled changed.
Parameters:
- e Touch Event
- UIComponent:onResize (e)
-
This event handler is called when resize.
Parameters:
- e Resize Event
- UIComponent:onThemeChanged (e)
-
This event handler is called when theme changed.
Parameters:
- e Event
- UIComponent:onTouchCommon (e)
-
This event handler is called when touch.
Parameters:
- e Touch Event
- UIComponent:onFocusIn (e)
-
This event handler is called when focus.
Parameters:
- e focus Event
- UIComponent:onFocusOut (e)
-
This event handler is called when focus.
Parameters:
- e focus Event