nJDSK.Window
Class constructor, the most used function, this one creates a window and returns it as an object.
nJDSK.Window(width, height, title, toolbar, content, id, dialog, modal, fullGlass, createCallback)
Parameters
- int width the initial width of the window
- int height the initial height of the window
- string title window title
- string toolbar predefined toolbar (HTML)
- string content window contents
- string id window id, can be generated with nJDSK.uniqid()
- bool dialog speecifies the type of the window (dialogs cannot be resized, have no toolbar nor footer)
- bool modal specifies whether the window will be displayed with an overlay
- bool fullGlass shows the window with semitransparent content area
- function createCallback the function to be executed after the window has been created
Example
var newWindow = new nJDSK.Window(640,480,'A window with text','',msg, nJDSK.uniqid(),false,false,false,function(id) { alert(id); });
Functions and objects
- Events
Event support- Create event
Event executed right after the window has been created and shown on the screen - onResize event
Event execuded during resizing the window - onBeforeClose event
Event executed before closing the window - onAfterClose event
Event executed before destroying the window - onMinimize event
Event executed after minimizing the window - onMaximize event
Event executed after maximizing the window - onRestore event
Event executed after restoring the window from the taskbar
- Create event
- nJDSK.Window.removeFullGlass()
Restores normal window backgrounds - nJDSK.Window.setFullGlass()
Makes window semitransparent - nJDSK.Window.setTitle
(ititle)
Sets window title - nJDSK.Window.noClose()
Removes X button from header - nJDSK.Window.setFooter
(content)
Adds/changes footer content - nJDSK.Window.minimize
This method minimizes the window it’s called on. - nJDSK.Window.maximize
This method minimizes the window it’s called on. If called on a maximized window, it will be restored to its original size. - nJDSK.Window.restore
This method restores the window it’s called on. If called on a visible window, it will be minimized. - nJDSK.Window.toolbarHelper
Built-in object, handles the window toolbar- nJDSK.Window.toolbarHelper.addItem
(row, id, title, image, callback)
Adds a toolbar button in given row - nJDSK.Window.toolbarHelper.removeItem
(id)
Removes a toolbar item and cleans up - nJDSK.Window.toolbarHelper.setToolbar
(s)
Sets arbitrary toolbar content - nJDSK.Window.toolbarHelper.clearToolbar()
Clears toolbar
- nJDSK.Window.toolbarHelper.addItem