Zebra API Doc

zebra.ui.StringRender Class

Extends zebra.ui.Render

Lightweight implementation of single line string render. The render requires a simple string as a target object.

Constructor

zebra.ui.StringRender

(
  • str
  • [font]
  • [color]
)

Parameters:

  • str String

    a string to be rendered

  • [font] zebra.ui.Font optional

    a text font

  • [color] String optional

    a text color

Item Index

Attributes

Methods

getValue

() String

Return a string that is rendered by this class


Return: String

a string

setColor

(
  • c
)
Boolean

Set rendered text color

Parameters:

  • c String

    a text color


Return: Boolean

return true if a text color has been updated

setFont

(
  • f
)
Boolean

Set the rendered text font.

Parameters:

  • f String | zebra.ui.Font

    a font as CSS string or zebra.ui.Font class instance


Return: Boolean

return true if a text font has been updated

setValue

(
  • s
)

Set the string to be rendered

Parameters:

  • s String

    a string

Attributes

color

String readonly

Color to be used to render the target string

font

zebra.ui.Font readonly

Font to be used to render the target string