Zebra API Doc

zebra.ui.MLabel Class

Extends zebra.ui.Label

Shortcut class to render multi lines text without necessity to create multi line model

Constructor

zebra.ui.MLabel

(
  • [t]
)

Parameters:

  • [t] String optional

    a text string

Methods

calcPreferredSize

(
  • t
)
Object

Inherited from zebra.ui.ViewPan:

Override the parent method to calculate preferred size basing on a target view.

Parameters:


Return: Object

return a target view preferred size if it is defined. The returned structure is the following: { width: {Integer}, height:{Integer} }

getColor

() String

Inherited from zebra.ui.Label:

Get the label text color


Return: String

a zebra label color

getFont

() zebra.ui.Font

Inherited from zebra.ui.Label:

Get the label text font


Return: zebra.ui.Font

a zebra label font

getValue

() String

Inherited from zebra.ui.Label:

Get the label text


Return: String

a zebra label text

setColor

(
  • c
)
chainable

Inherited from zebra.ui.Label:

Set the label text color

Parameters:

  • c String

    a text color

setFont

(
  • f
)
chainable

Inherited from zebra.ui.Label:

Set the label text font

Parameters:

setValue

(
  • s
)
chainable

Inherited from zebra.ui.Label:

Set the label text value

Parameters:

  • s String

    a new label text

setView

(
  • v
)
chainable

Inherited from zebra.ui.ViewPan:

Set the target view to be wrapped with the UI component

Parameters:

  • v zebra.ui.View | Function

    a view or a rendering view "paint(g,x,y,w,h,c)" function

Attributes

view

zebra.ui.View readonly

Inherited from zebra.ui.ViewPan:

Reference to a view that the component visualize

Default: null