thyWindow

This class implements the infamous Window widget.  As it is derivate from thyBorderPanel, it has borders and all the CSS classes that widget has.

CSS classes

  • .thyWindow_title
  • .thyWindow_contents
  • .thyWindow_btnClose
  • .thyWindow_btnStick
  • .thyWindow_ondrag
  • .<object name>_title
  • .<object name>_contents
  • .<object name>_btnClose
  • .<object name>_btnStick
  • .<object name>_ondrag

Author

Raphael Derosso Pereira raphael.nosp@m.pereira@users.sour.nosp@m.ceforge.net

Summary
This class implements the infamous Window widget.
Initialization method
Sets the title of the widow
Sets the Title of the window
Returns the actual title set
UnHide the window
Hides the window
Overwritten method that sets the name of main, title, contents and drag border and refreshes CSS Classes
Overwritten method that calls parent setCSSClass and also sets CSS of title, content, buttons and drag border
Overwritten AddChild method that insert childs in contents
Overwritten RemoveChild method that removes childs from contents
Overwritten getInnerHTML that inserts Title
Makes window unmovable
Release window for movement
Change from one sticked state to another
STATIC method that returns the next position to be used by a window when opened
STATIC method that removes the position from the list
Overloaded method that removes winBorderPanel from memory
Overwritten method that adds the base class to main, title, contents, drag border and buttons
Removes the specified CSS Class from main, title, contents, drag border and buttons
OnDragEnd Event.
OnDragMove Event.
OnMouseDown Event.

initThyWindow

p.initThyWindow = function ()

Initialization method

populate

p.populate = function (data)

Sets the title of the widow

setTitle

p.setTitle = function(title)

Sets the Title of the window

getTitle

p.getTitle = function ()

Returns the actual title set

open

p.open = function()

UnHide the window

close

p.close = function()

Hides the window

setName

p.setName = function (name)

Overwritten method that sets the name of main, title, contents and drag border and refreshes CSS Classes

Parameter

nameThe new widget name

setCSSClass

p.setCSSClass = function (type)

Overwritten method that calls parent setCSSClass and also sets CSS of title, content, buttons and drag border

Parameter

typeThe class type

addChild

p.addChild = function (c,
alias,
inlineID)

Overwritten AddChild method that insert childs in contents

removeChild

p.removeChild = function (c)

Overwritten RemoveChild method that removes childs from contents

getInnerHTML

p.getInnerHTML = function()

Overwritten getInnerHTML that inserts Title

@public

stick

p.stick = function ()

Makes window unmovable

unstick

p.unstick = function ()

Release window for movement

switchStick

p.switchStick = function ()

Change from one sticked state to another

_getWindowPosition

thyWindow._getWindowPosition = function (thyWin)

STATIC method that returns the next position to be used by a window when opened

Parameter

thyWinThe thyWindow object that will be opened

_unsetWindowPosition

thyWindow._unsetWindowPosition = function (thyWin)

STATIC method that removes the position from the list

_destroy

p._destroy = function ()

Overloaded method that removes winBorderPanel from memory

_addCSSClass

p._addCSSClass = function (cssClass)

Overwritten method that adds the base class to main, title, contents, drag border and buttons

Paramenter

cssClassThe base class string

_removeCSSClass

p._removeCSSClass = function (cssClass)

Removes the specified CSS Class from main, title, contents, drag border and buttons

Parameter

cssClassThe CSS Class to be removes

ondragend

p.ondragend = function(e)

OnDragEnd Event.  It switches the drag DynLayer to the Window Layer

ondragmove

p.ondragmove = function(e)

OnDragMove Event.  It updates the drag layer position

onmousedown

p.onmousedown = function(e)

OnMouseDown Event.  Change z-index of drag layer and window.

p.initThyWindow = function ()
Initialization method
p.populate = function (data)
Sets the title of the widow
p.setTitle = function(title)
Sets the Title of the window
p.getTitle = function ()
Returns the actual title set
p.open = function()
UnHide the window
p.close = function()
Hides the window
p.setName = function (name)
Overwritten method that sets the name of main, title, contents and drag border and refreshes CSS Classes
p.setCSSClass = function (type)
Overwritten method that calls parent setCSSClass and also sets CSS of title, content, buttons and drag border
p.addChild = function (c,
alias,
inlineID)
Overwritten AddChild method that insert childs in contents
p.removeChild = function (c)
Overwritten RemoveChild method that removes childs from contents
p.getInnerHTML = function()
Overwritten getInnerHTML that inserts Title
p.stick = function ()
Makes window unmovable
p.unstick = function ()
Release window for movement
p.switchStick = function ()
Change from one sticked state to another
thyWindow._getWindowPosition = function (thyWin)
STATIC method that returns the next position to be used by a window when opened
thyWindow._unsetWindowPosition = function (thyWin)
STATIC method that removes the position from the list
p._destroy = function ()
Overloaded method that removes winBorderPanel from memory
p._addCSSClass = function (cssClass)
Overwritten method that adds the base class to main, title, contents, drag border and buttons
p._removeCSSClass = function (cssClass)
Removes the specified CSS Class from main, title, contents, drag border and buttons
p.ondragend = function(e)
OnDragEnd Event.
p.ondragmove = function(e)
OnDragMove Event.
p.onmousedown = function(e)
OnMouseDown Event.