Zebra API Doc

zebra.ui.Tabs.TabView Class

Tab view class that defines the tab page title and icon

Constructor

zebra.ui.Tabs.TabView

(
  • [icon]
  • [caption]
)

Parameters:

  • [icon] String | Image optional

    an path to an image or image object

  • [caption] String optional

    a tab caption

Methods

getCaption

(
  • b
)
String

Get the tab caption for the specified tab state

Parameters:

  • b Boolean

    the tab state. true means selected state.


Return: String

the tab caption

selected

(
  • tabs
  • i
  • b
)

The method is invoked every time the tab selection state has been updated

Parameters:

  • tabs zebra.ui.Tabs

    the tabs component the tab belongs

  • i Integer

    an index of the tab

  • b Boolean

    a new state of the tab

setCaption

(
  • s
)

Set the given tab caption. The caption is set for both tab states: selected and not selected

Parameters:

  • s String

    the tab caption

setCaption

(
  • b
  • s
)

Set the given tab caption for the specified tab state.

Parameters:

  • b Boolean

    the tab state. true means selected state.

  • s String

    the tab caption

setColor

(
  • c
)

Set the caption text color for both selected and not selected states.

Parameters:

  • c String

    the tab caption

setColor

(
  • b
  • c
)

Set the given tab caption text color for the specified tab state.

Parameters:

  • b Boolean

    the tab state. true means selected state.

  • c String

    the tab caption

setFont

(
  • f
)

Set the given tab caption text font for both selected and not selected states

Parameters:

setFont

(
  • b
  • f
)

Set the given tab caption text font for the specified state.

Parameters:

  • b Boolean

    the tab state. true means selected state.

  • f zebra.ui.Font

    the tab text font

setIcon

(
  • c
)

Set the tab icon.

Parameters:

  • c String | Image

    an icon path or image object