Zebra API Doc

zebra.ui.CompRender Class

Extends zebra.ui.Render

UI component render class. Renders the given target UI component on the given surface using the specified 2D context

Constructor

zebra.ui.CompRender

(
  • [target]
)

Parameters:

Methods

getBottom

() Integer

Inherited from zebra.ui.View:

Get bottom gap. The method informs UI component that uses the view as a border view how much space bottom side of the border occupies


Return: Integer

a bottom gap

getLeft

() Integer

Inherited from zebra.ui.View:

Get left gap. The method informs UI component that uses the view as a border view how much space left side of the border occupies


Return: Integer

a left gap

getPreferredSize

() Object

Inherited from zebra.ui.View

Get preferred size of the render. The method doesn't calculates preferred size it simply calls the target component "getPreferredSize" method.


Return: Object

a preferred size

 {width:<Integer>, height: <Integer>}

getRight

() Integer

Inherited from zebra.ui.View:

Get right gap. The method informs UI component that uses the view as a border view how much space right side of the border occupies


Return: Integer

a right gap

getTop

() Integer

Inherited from zebra.ui.View:

Get top gap. The method informs UI component that uses the view as a border view how much space top side of the border occupies


Return: Integer

a top gap

paint

(
  • g
  • x
  • y
  • w
  • h
  • c
)

Inherited from zebra.ui.View:

The method is called to render the decorative element on the given surface of the specified UI component

Parameters:

  • g Canvas 2D context

    graphical context

  • x Integer

    x coordinate

  • y Integer

    y coordinate

  • w Integer

    required width

  • h Integer

    required height

  • c zebra.ui.Panel

    an UI component on which the view element has to be drawn

setTarget

(
  • o
)

Inherited from zebra.ui.Render:

Set the given target object. The method triggers "targetWasChanged(oldTarget, newTarget)" execution if the method is declared. Implement the method if you need to track a target object updating.

Parameters:

  • o Object

    a target object to be visualized

Attributes

target

Object readonly

Inherited from zebra.ui.Render:

Target object to be visualized

Default: null