Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HealthInfoProvider<E>

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

  • Parameters

    • entity: E

    Returns HealthInfoProvider

Properties

Protected Optional component

component: Component

Protected Optional context

Protected Readonly entity

entity: E

Readonly event

event: IEventEmitter<this, IInfoProviderEvents> = new EventEmitter<this, E>(this)

Methods

get

getClass

  • getClass(): string[]
  • Returns string[]

getDefaultDisplayLevel

getDisplayLevel

getIcon

  • getIcon(): IIcon | undefined

Protected getName

  • Returns Translation

hasContent

  • hasContent(): boolean
  • Returns boolean

init

  • init(): void
  • Returns void

Protected initChildTextComponent

initComponent

  • initComponent(context: InfoProviderContext, component?: Component<HTMLElement>, partial?: boolean, data?: { lastInfoSleep: number }): { component: Component<HTMLElement>; fullInit: any }
  • Parameters

    • context: InfoProviderContext
    • Default value component: Component<HTMLElement> = new (this.componentClass ?? Component)()
    • Default value partial: boolean = false
    • Default value data: { lastInfoSleep: number } = { lastInfoSleep: Date.now() }
      • lastInfoSleep: number

    Returns { component: Component<HTMLElement>; fullInit: any }

    • component: Component<HTMLElement>
    • fullInit: function
      • fullInit(): void
      • Returns void

Protected onStatChange

  • onStatChange(_: any, stat: IStat): void
  • Parameters

    Returns void

recheckHasContent

  • recheckHasContent(): this
  • Call when this info provider should recheck whether it has contents.

    Returns this

refresh

  • refresh(): this
  • Call when this info provider should be refreshed.

    Returns this

refreshDisplayLevel

  • refreshDisplayLevel(): this
  • Call when this info provider should refresh its display level.

    Returns this

remove

  • remove(): this
  • Call when this info provider should be removed.

    Returns this

setComponent

setDisplayLevel

setIcon

  • setIcon(icon?: IIcon): this
  • Parameters

    Returns this

setSynchronous

  • setSynchronous(): this

subscribeRefreshOn

  • subscribeRefreshOn<E, K>(emitterOrBus: E, ...args: []): this
  • subscribeRefreshOn<E, K>(emitterOrBus: E, ...events: K[]): this
  • Marks this info provider as to subscribe refresh events to the given host. Note: Any existing initialized components will not be retroactively subscribed.

    Type parameters

    Parameters

    • emitterOrBus: E
    • Rest ...args: []

    Returns this

  • Marks this info provider as to subscribe refresh events to the given host. Note: Any existing initialized components will not be retroactively subscribed.

    Type parameters

    Parameters

    • emitterOrBus: E
    • Rest ...events: K[]

    Returns this

Static create

Static description

Static list

Static of

Static title

Generated using TypeDoc