Class zebkit.ui.WinLayer
extends <zebkit.ui.HtmlCanvas>
<zebkit.ui>

Window layer class. Window layer is supposed to be used for showing modal and none modal internal window. There are special ready to use "zebkit.ui.Window" UI component that can be shown as internal window, but zebkit allows developers to show any UI component as modal or none modal window. Add an UI component to window layer to show it as modal o none modal window:

  // create canvas
  var canvas   = new zebkit.ui.zCanvas();

  // get windows layer
  var winLayer = canvas.getLayer(zebkit.ui.WinLayerMix.id);

  // create standard UI window component
  var win = new zebkit.ui.Window();
  win.setBounds(10,10,200,200);

  // show the created window as modal window
  winLayer.addWin("modal", win);

Also shortcut method can be used

  // create canvas
  var canvas   = new zebkit.ui.zCanvas();

  // create standard UI window component
  var win = new zebkit.ui.Window();
  win.setBounds(10,10,200,200);

  // show the created window as modal window
  zebkit.ui.showModalWindow(canvas, win);

Window layer supports three types of windows:

  • "modal" a modal window catches all input till it will be closed
  • "mdi" a MDI window can get focus, but it doesn't block switching focus to other UI elements
  • "info" an INFO window cannot get focus. It is supposed to show some information like tooltip.
Constructor:
zebkit.ui.WinLayer ( )



public void activate (c)

Activate the given win layer children component window.


Parameters:
public void addWin ([type], win)

Add the given window with the given type and the listener to the layer.


Parameters:
  • [type] <String>

    a type of the window: "modal", "mdi" or "info"

  • win <zebkit.ui.Panel>

    an UI component to be shown as window

public void childFocusGained (e)

Define children components input events handler.


Parameters:

protected <zebkit.ui.Panel> activeWin

Currently activated as a window children component