class UIButton
A view class that represents a button control.
class UIButton extends UIComponent
Description
A button component is rendered on-screen as a button control.
Constructor
- constructor(label?)Creates a new button view object with the specified label.
Type Members
- type UIButton.StyleType staticThe type definition for styles applicable to UIButton.style.
Instance Members
- applyViewPreset(preset)Applies the provided preset properties to this object.
- labelThe button label to be displayed.
- iconThe button icon to be displayed.
- iconSizeIcon size (in pixels or string with unit).
- iconMarginSpace between icon and label text (in pixels or string with unit).
- iconColorIcon color.
- chevronDirection of chevron icon to be placed at the far end of the button, if any.
- chevronSizeChevron icon size (in pixels or string with unit).
- chevronColorChevron icon color.
- navigateToNavigation target to navigate to when this button is clicked.
- pressedThe current visual selection state.
- valueAn option value that this button represents, if any.
- disableKeyboardFocusTrue to disable keyboard focus (e.g. Tab key) for this button.
- disabledTrue if user input should be disabled on this control.
- widthTarget width of this button, in pixels or CSS length with unit.
- primaryTrue if the primary button style should be applied to this label.
- styleThe style to be applied to this button.
- getNavigationTarget()Returns the navigation target for this button.
Inherited Members
- hiddenTrue if the component should be hidden from view.
- positionOptions related to the position of this component.
- accessibleRoleWAI-ARIA role for this component, if applicable.
- accessibleLabelWAI-ARIA label text for this component (not tooltip), if applicable.
- requestFocus()Requests input focus on this component.
- requestFocusNext()Requests input focus for the next sibling component.
- requestFocusPrevious()Requests input focus for the previous sibling component.
- render(callback)Triggers asynchronous rendering for this component, and all contained components, if any.
- findViewContent(type)Implementation of View.findViewContent(), returns an empty array unless overridden.
- lastRenderOutputLast rendered output, if any; set by the UI component renderer.
- emit(event)Emits an event, immediately calling all event handlers.
- emitChange(name?, data?)Emits a change event, an instance of ManagedChangeEvent.
- listen(handler)Adds a handler for all events emitted by this object.
- isUnlinked()Returns true if the object has been unlinked.
- unlink()Unlinks this managed object.
- beforeUnlink() protectedA method that’s called immediately before unlinking an object, can be overridden.
- attach(target, observer?) protectedAttaches the provided managed object to this object.
- autoAttach(propertyName, observer?) protectedObserves a property, so that any object assigned to it is attached immediately.