Class zebkit.draw.View <zebkit.draw>

View class that is designed as a basis for various reusable decorative UI elements implementations

Constructor:
zebkit.draw.View ( )



public <Integer> getBottom ( )
public <Integer> getLeft ( )
public <Object> getPreferredSize ( )
public <Integer> getRight ( )
public <Integer> getTop ( )
public void paint (g, x, y, w, h, c)

public <Integer> getBottom ( )

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


Returns: <Integer>

a bottom gap

public <Integer> getLeft ( )

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


Returns: <Integer>

a left gap

public <Object> getPreferredSize ( )

Return preferred size the view desires to have


Returns: <Object>
public <Integer> getRight ( )

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


Returns: <Integer>

a right gap

public <Integer> getTop ( )

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


Returns: <Integer>

a top gap

public void paint (g, x, y, w, h, c)

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


Parameters:
  • g <CanvasRenderingContext2D>

    graphical context

  • x <Integer>

    x coordinate

  • y <Integer>

    y coordinate

  • w <Integer>

    required width

  • h <Integer>

    required height

  • c <zebkit.layout.Layoutable>

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