Gladiator Components >> Window Component >> API Reference
Window Component
The window component is a full-featured user interface container with the familiar functionality of windows found in thick-client applications.
CSS Dependencies
gladiatorMain.cssgladiatorWindows.css
Javascript Dependencies
gladiatorCore.jsgladiatorWindows.js
Sample Usage
//
// One easy way is to let the UserInterfaceManager (UIM)
// convert XML tags in your XHMTL document to
// Gladiator window objects:
//
UIM.convertWindowTagsToWindows();
//
// However, the other more flexible way is to define window objects
// yourself in Javascript:
//
// Where to insert the object:
//
var node = document.getElementById("content");
//
// Window content can be EITHER a string of XHTML
// tags-plus-content OR another DOM node. Creating
// window content by using the DOM directly or indirectly
// by creating objects through Gladiator's API is the
// most flexible solution. However, passing a string of
// content as shown below is sufficient for present
// illustration purposes:
//
var sampleContent="<img src=\"photos/sunny.png\" alt=\"sunny\"/><h1>南京天气 Today in Nanjing</h1>";
//
// Parameters are: window_title, window_id,
// left, top, width, height,
// contents (node or string),
// show (true or false -- true by default)
// parentNode ("body" by default)
//
var myWin = new gWindow("Nanjing Weather","myWin_id",90,390,400,280,sampleChineseContent,true,node);