Class: Widget


Auto.js Pro 9 Docs / ui/view / Widget

Class: Widget

ui/view.Widget

  1. created
  2. render
  3. rootViewCreated: root view created but children are not inflated
  4. inflated: children inflated and internal and initial attributes are applied, but external attributes are not applied
  5. mounted: external attributes applied

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Widget()

Properties

attrs

attrs: WidgetAttributes = {}

Accessors

initialAttributes

get initialAttributes(): WidgetAttributes

Returns

WidgetAttributes


view

get view(): any

Returns

any

Methods

created

created(): void

Returns

void


getAttribute

getAttribute(name, def): AttributeValue

Parameters

NameType
namestring
def() => AttributeValue

Returns

AttributeValue


hasAttribute

hasAttribute(name): boolean

Parameters

NameType
namestring

Returns

boolean


inflated

inflated(): void

Returns

void


mounted

mounted(): void

Returns

void


render

Abstract render(context, parent): any

Parameters

NameType
contextContext
parentViewGroup

Returns

any


rootViewCreated

rootViewCreated(view): void

Parameters

NameType
viewany

Returns

void


setAttribute

setAttribute(name, value, def): void

Parameters

NameType
namestring
valueAttributeValue
def(value: AttributeValue) => void

Returns

void


create

Static create(name): undefined | Widget

Parameters

NameType
namestring

Returns

undefined | Widget


of

Static of<W>(view): undefined | W

Type parameters

NameType
Wextends Widget<W>

Parameters

NameType
viewView

Returns

undefined | W


register

Static register(name, widget): void

Parameters

NameType
namestring
widgetWidgetClass

Returns

void