Zebra API Doc

zebra.ui.WinLayer Class

Window layer class. Window layer is supposed to be used for showing modal and none modal internal window. There are special ready to use "zebra.ui.Window" UI component that can be shown as internal window, but zebra 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 zebra.ui.zCanvas();

   // get windows layer 
   var winLayer = canvas.getLayer(zebra.ui.WinLayer.ID);

   // create standard UI window component 
   var win = new zebra.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 zebra.ui.zCanvas();

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

   // show the created window as modal window
   zebra.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

zebra.ui.WinLayer

()

Item Index

Attributes

Methods

activate

(
  • c
)

Activate the given win layer children component window.

Parameters:

addWin

(
  • type
  • win
  • [listener]
)

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 zebra.ui.Panel

    an UI component to be shown as window

  • [listener] Object optional

    an optional the window listener

        {
            winActivated : function(layer, win, isActive) {
    
            },
    
            winOpened : function(layer, win, isOpened) {
    
            }
        }

childInputEvent

(
  • e
)

Define children components input events handler.

Parameters:

Attributes

activeWin

zebra.ui.Panel protected readonly

Currently activated as a window children component