Class zebkit.draw.Border
extends <zebkit.draw.View>

Border view. Can be used to render CSS-like border. Border can be applied to any zebkit UI component by calling setBorder method:

       // create label component
       var lab = new zebkit.ui.Label("Test label");

       // set red border to the label component
       lab.setBorder(new zebkit.draw.Border("red"));
zebkit.draw.Border ([c], [w], [r])

  • [c] <String>

    border color

  • [w] <Integer>

    border width

  • [r] <Integer>

    border corners radius

public <Boolean> outline (g, x, y, w, h, d)

Defines border outline for the given 2D Canvas context

  • g <CanvasRenderingContext2D>
  • x <Integer>

    x coordinate

  • y <Integer>

    y coordinate

  • w <Integer>

    required width

  • h <Integer>

    required height

  • d <Integer>

    target UI component

Returns: <Boolean>

true if the outline has to be applied as an UI component shape

public chainable setSides (side)

Control border sides visibility.

  • side <String> (*..n)

    list of visible sides. You can pass number of arguments to say which sides of the border are visible. The arguments can equal one of the following value: "top", "bottom", "left", "right"

public <String> color

Border color

public <Integer> radius

Border radius

public <Integer> width

Border line width