Zebra API Doc

zebra.ui.Pattern Class

Extends zebra.ui.Render

Pattern render.

Constructor

zebra.ui.Pattern

(
  • [img]
)

Parameters:

  • [img] Image optional

    an image to be used as the pattern

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:

Return preferred size the view desires to have


Return: Object

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

pattern

Pattern protected readonly

Buffered pattern

target

Object readonly

Inherited from zebra.ui.Render:

Target object to be visualized

Default: null