Class zebkit.layout.RasterLayout
mixed with <zebkit.layout.Layout>
<zebkit.layout>

Rester layout manager can be used to use absolute position of layoutable components. That means all components will be laid out according coordinates and size they have. Raster layout manager provides extra possibilities to control children components placing. It is possible to align components by specifying layout constraints, size component to its preferred size and so on. Constraints that can be set for components are the following

  • "top"
  • "topRight"
  • "topLeft"
  • "bottom"
  • "bottomLeft"
  • "bottomRight"
  • "right"
  • "center"
  • "left"
Constructor:
zebkit.layout.RasterLayout ([usePsSize])

Parameters:
  • [usePsSize] <Boolean>

    flag to add extra rule to set components size to its preferred sizes.


Example:
// instantiate component to be ordered
var topLeftLab = zebkit.ui.Label("topLeft");
var leftLab    = zebkit.ui.Label("left");
var centerLab  = zebkit.ui.Label("center");

// instantiate a container with raster layoyt manager set
// the manager is adjusted to size added child component to
// its preferred sizes
var container = new zebkit.ui.Panel(new zebkit.layout.RasterLayout(true));

// add child components with appropriate constraints
container.add("topLeft", topLeftLab);
container.add("left", leftLab);
container.add("center", centerLab);




Inherited methods:


public <Boolean> usePsSize

Define if managed with layout manager components have to be sized according to its preferred size