Class zwt.ui.Window
Extends
zwt.ui.container.Container.
The Window Widget is the root component of a page. It actually represents the page that is displayed. Parts are added to the window and placed in slots (simple DIV) defined in the HTML.
Defined in: Window.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Construct a Window object.
|
Method Attributes | Method Name and Description |
---|---|
acquireFocus(zwt_ui_Widget_widget)
Acquire the focus for the specified widget on the Window.
|
|
addPopup(zwt_ui_popup_Popup_popup, string_id)
Add a popup to the window.
|
|
clearFocus(zwt_ui_Widget_widget)
Clear the focus if the specified widget is null or different from the current focused widget.
|
|
draw()
Redraw all the parts attached to the window.
|
|
Return the click event manager attached to the window.
|
|
Return the inner height of the window.
|
|
Return the inner width of the window.
|
|
Return the mouse event manager attached to the window.
|
|
getPart(string_containerID)
Return the part in the specified container.
|
|
getPopup(string_id)
Return the specified popup.
|
|
Return the scroll height of the window.
|
|
Return the scroll left of the window.
|
|
Return the scroll top of the window.
|
|
Return the scroll width of the window.
|
|
getTheme()
Return the theme currently in use.
|
|
Return the wheel event manager attached to the window.
|
|
<static> |
zwt.ui.Window.getWindow()
Return the window singleton.
|
Return the window event manager attached to the window.
|
|
A window is always visible.
|
|
processClickEvent(zwt_event_ClickEvent_event)
Process the specified click event.
|
|
processEvent(zwt_event_Event_event)
Process the specified event.
|
|
processKeyboardEvent(zwt_event_KeyboardEvent_event)
Process the specified keyboard event.
|
|
processMouseEvent(zwt_event_MouseEvent_event)
Process the specified mouse event.
|
|
processWheelEvent(zwt_event_WheelEvent_event)
Process the specified wheel event.
|
|
processWindowEvent(zwt_event_WindowEvent_event)
Process the specified window event.
|
|
redraw()
The Window is the top component and therefore the redraw operation systematically triggers the draw operation.
|
|
removePart(string_containerID)
Remove the part at the specified container.
|
|
removePopup(zwt_ui_popup_Popup_popup, string_id)
Remove a popup from the window.
|
|
setPart(zwt_ui_Part_part, string_containerID)
Add a part to the window.
|
|
setTextSelection(boolean_flag)
Disable or enable text selection.
|
|
setTheme(string_theme)
Set the current theme to the specified theme.
|
|
setTitle(string_text)
Set the window title.
|
|
setVisible(boolean_flag)
A window is always visible, so this method does nothing.
|
|
shade(int_offset)
Put a shade on top of the elements of the page.
|
|
unshade()
Remove the shade from the page.
|
- Methods borrowed from class zwt.ui.container.Container:
- getContentEventManager, isFocusContainer, processContentEvent, setFocusContainer
- Methods borrowed from class zwt.ui.Widget:
- addStyle, getContextFill, getDimension, getElement, getElementDimension, getFill, getFocusEventManager, getId, getKeyboardEventManager, getParent, getRelativeLeft, getRelativeTop, getStyle, hasFocus, hasStyle, isFocusable, onEvent, processFocusEvent, removeStyle, replaceStyle, setFill, setFocusable, setId, setStyle
Method Detail
acquireFocus(zwt_ui_Widget_widget)
Acquire the focus for the specified widget on the Window.
This method should typically called when handling a focus event
- Parameters:
- {zwt.ui.Widget} zwt_ui_Widget_widget
- The widget to focus
addPopup(zwt_ui_popup_Popup_popup, string_id)
Add a popup to the window. A popup must be added to a window in order to be diplayed.
- Parameters:
- {zwt.ui.popup.Popup} zwt_ui_popup_Popup_popup
- The popup to add.
- {String} string_id
- An id to identify the popup in the window. By default the popup internal id is used.
clearFocus(zwt_ui_Widget_widget)
Clear the focus if the specified widget is null or different from the current focused widget.
- Parameters:
- {zwt.ui.Widget} zwt_ui_Widget_widget
- The widget to test
draw()
Redraw all the parts attached to the window.
{zwt.event.ClickEventManager}
getClickEventManager()
Return the click event manager attached to the window.
- Returns:
- The click event manager
{Integer}
getInnerHeight()
Return the inner height of the window.
- Returns:
- The inner height
{Integer}
getInnerWidth()
Return the inner width of the window.
- Returns:
- The inner width
{zwt.event.MouseEventManager}
getMouseEventManager()
Return the mouse event manager attached to the window.
- Returns:
- The mouse event manager
{zwt.ui.Part}
getPart(string_containerID)
Return the part in the specified container.
- Parameters:
- {String} string_containerID
- The ID of the container in the HTML
- Returns:
- A zwt.ui.Part object
{zwt.ui.popup.PopupWindow}
getPopup(string_id)
Return the specified popup.
- Parameters:
- {String} string_id
- The popup id
- Returns:
- A popup window object
{Integer}
getScrollHeight()
Return the scroll height of the window.
- Returns:
- The scroll height
{Integer}
getScrollLeft()
Return the scroll left of the window.
- Returns:
- The scroll left
{Integer}
getScrollTop()
Return the scroll top of the window.
- Returns:
- The scroll top
{Integer}
getScrollWidth()
Return the scroll width of the window.
- Returns:
- The scroll width
{String}
getTheme()
Return the theme currently in use.
- Returns:
- The current theme
{zwt.event.WheelEventManager}
getWheelEventManager()
Return the wheel event manager attached to the window.
- Returns:
- The wheel event manager
<static>
{zwt.ui.Window}
zwt.ui.Window.getWindow()
Return the window singleton. This object is instantiated when the page is loaded.
- Returns:
- The window object
{zwt.event.WindowEventManager}
getWindowEventManager()
Return the window event manager attached to the window.
- Returns:
- The window event manager
{Boolean}
isVisible()
A window is always visible.
- Returns:
- true
processClickEvent(zwt_event_ClickEvent_event)
Process the specified click event.
- Parameters:
- {zwt.event.ClickEvent} zwt_event_ClickEvent_event
- The click event to process
processEvent(zwt_event_Event_event)
Process the specified event.
- Parameters:
- {zwt.event.Event} zwt_event_Event_event
- The event to process
processKeyboardEvent(zwt_event_KeyboardEvent_event)
Process the specified keyboard event. This method also dispatches the keyboard event to the current focus widget.
- Parameters:
- {zwt.event.KeyboardEvent} zwt_event_KeyboardEvent_event
- The keyboard event to process
processMouseEvent(zwt_event_MouseEvent_event)
Process the specified mouse event.
- Parameters:
- {zwt.event.MouseEvent} zwt_event_MouseEvent_event
- The mouse event to process
processWheelEvent(zwt_event_WheelEvent_event)
Process the specified wheel event. This method also dispatches the wheel event to the current focus widget.
- Parameters:
- {zwt.event.WheelEvent} zwt_event_WheelEvent_event
- The wheel event to process
processWindowEvent(zwt_event_WindowEvent_event)
Process the specified window event.
- Parameters:
- {zwt.event.WindowEvent} zwt_event_WindowEvent_event
- The window event to process
redraw()
The Window is the top component and therefore the redraw operation systematically triggers the draw operation.
removePart(string_containerID)
Remove the part at the specified container.
- Parameters:
- {String} string_containerID
- The ID of the container in the HTML
removePopup(zwt_ui_popup_Popup_popup, string_id)
Remove a popup from the window. This will completely remove the popup from the window, you will have to recall addWindow method to be able to reuse the popup.
- Parameters:
- {zwt.ui.popup.Popup} zwt_ui_popup_Popup_popup
- The popup to remove.
- {String} string_id
- An id to identify the popup in the window. By default the popup internal id is used.
setPart(zwt_ui_Part_part, string_containerID)
Add a part to the window.
- Parameters:
- {zwt.ui.Part} zwt_ui_Part_part
- The part to add
- {String} string_containerID
- The ID of the container in the HTML
setTextSelection(boolean_flag)
Disable or enable text selection.
- Parameters:
- {Boolean} boolean_flag
- true to enable text selection, false otherwise
setTheme(string_theme)
Set the current theme to the specified theme. This will trigger a full window redraw to take the new theme into account.
- Parameters:
- {String} string_theme
- The new theme to use
setTitle(string_text)
Set the window title.
- Parameters:
- {String} string_text
- The title to set
setVisible(boolean_flag)
A window is always visible, so this method does nothing.
- Parameters:
- {Boolean} boolean_flag
- n/a
shade(int_offset)
Put a shade on top of the elements of the page.
- Parameters:
- {Integer} int_offset
- Z-Index offset to place the shadow
unshade()
Remove the shade from the page.