Zebra API Doc

zebra.ui.Link Class

Extends zebra.ui.Button

UI link component class.

Constructor

Methods

catchInput

(
  • c
)
Boolean

Inherited from zebra.ui.Composite:

The method is called to ask if the given children UI component has to be input events transparent

Parameters:


Return: Boolean

true if the given children component has to be input events transparent

run

() protected

Inherited from zebra.ui.Button:

The method is executed for a button that is configured to repeat fire events.

setCanHaveFocus

(
  • b
)

Says if the component can hold focus or not

Parameters:

  • b Boolean

    true if the component can gain focus

setColor

(
  • state
  • c
)

Set the link text color for the specified link state

Parameters:

  • state Integer

    a link state

  • c String

    a link text color

setFireParams

(
  • b
  • time
)

Inherited from zebra.ui.Button:

Set the mode the button has to fire events. Button can fire event after it has been unpressed or immediately when it has been pressed. Also button can start firing events periodically when it has been pressed and held in the pressed state.

Parameters:

  • b Boolean

    true if the button has to fire event by pressed event

  • time Integer

    the period of time the button has to repeat firing events if it has been pressed and held in pressed state. -1 means event doesn't have repeated

setFocusAnchorComponent

(
  • c
)

Set the specified children component to be used as focus marker view anchor component. Anchor component is a component over that the focus marker view is painted.

Parameters:

setFocusMarkerView

(
  • c
)

Set the view that has to be rendered as focus marker when the component gains focus.

Parameters:

  • c String | zebra.ui.View | Function

    a view. The view can be a color or border string code or view or an implementation of zebra.ui.View "paint(g,x,y,w,h,t)" method.

setFont

(
  • f
)

Set link font

Parameters:

Attributes

canHaveFocus

Boolean readonly

Indicates if the component can have focus

firePeriod

Integer readonly

Inherited from zebra.ui.Button:

Fire button event repeating period. -1 means the button event repeating is disabled.

Default: -1

focusMarkerView

zebra.ui.Panel readonly

Reference to an anchor focus marker component

isFireByPress

Boolean readonly

Inherited from zebra.ui.Button:

Indicate if the button should fire event by pressed event

Default: false

Events

buttonPressed

Inherited from zebra.ui.Button:

Fired when a button has been pressed

   var b = new zebra.ui.Button("Test");
   b.bind(function (src) {
       ...
   });

Button can be adjusted in respect how it generates the pressed event. Event can be triggered by pressed or clicked even. Also event can be generated periodically if the button is kept in pressed state.

Event Parameters: