com.vaadin.client.ui
Class VWindow

java.lang.Object
  extended by PopupPanel
      extended by com.vaadin.client.ui.VOverlay
          extended by com.vaadin.client.ui.VWindow
All Implemented Interfaces:
com.google.gwt.event.logical.shared.CloseHandler<PopupPanel>, com.google.gwt.event.shared.EventHandler, Focusable, ShortcutActionHandler.ShortcutActionHandlerOwner

public class VWindow
extends VOverlay
implements ShortcutActionHandler.ShortcutActionHandlerOwner, Focusable

"Sub window" component.

Author:
Vaadin Ltd

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.client.ui.VOverlay
VOverlay.PositionAndSize, VOverlay.ResizeAnimation
 
Field Summary
 int bringToFrontSequence
          For internal use only.
 boolean centered
          If centered (via UIDL), the window should stay in the centered -mode until a position is received from the server, or the user moves or resizes the window.
static java.lang.String CLASSNAME
           
 ApplicationConnection client
          For internal use only.
 Element closeBox
          For internal use only.
 FocusableScrollPanel contentPanel
          For internal use only.
 Element contents
          For internal use only.
 Element footer
          For internal use only.
 Element header
          For internal use only.
 java.lang.String id
          For internal use only.
 boolean immediate
          For internal use only.
 Element maximizeRestoreBox
          For internal use only.
 boolean resizable
          For internal use only.
 boolean resizeLazy
          For internal use only.
 ShortcutActionHandler shortcutHandler
          For internal use only.
 boolean vaadinModality
          For internal use only.
 boolean visibilityChangesDisabled
          For internal use only.
static int Z_INDEX
           
 
Fields inherited from class com.vaadin.client.ui.VOverlay
ac, ADDITIONAL_CLASSNAME_ANIMATE_IN, ADDITIONAL_CLASSNAME_ANIMATE_OUT, CLASSNAME_CONTAINER, CLASSNAME_SHADOW, current
 
Constructor Summary
VWindow()
           
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addMoveHandler(WindowMoveHandler handler)
          Adds a Handler for when user moves the window.
 void addStyleDependentName(java.lang.String styleSuffix)
           
 void bringToFront()
           
protected  void constructDOM()
           
static void deferOrdering()
          Calling this method will defer ordering algorithm, to order windows based on servers bringToFront and modality instructions.
 void focus()
          Sets focus to this widget.
 java.util.List<com.vaadin.shared.Connector> getAssistiveDescription()
          Gets the connectors that are used as assistive description.
 java.lang.String getAssistivePostfix()
          Getter for the text for assistive devices the window caption is postfixed with.
 java.lang.String getAssistivePrefix()
          Getter for the text for assistive devices the window caption is prefixed with.
protected  com.google.gwt.user.client.Element getContainerElement()
           
protected  com.google.gwt.user.client.Element getModalityCurtain()
           
 ShortcutActionHandler getShortcutActionHandler()
          Returns the ShortCutActionHandler currently used or null if there is currently no shortcutactionhandler
 java.lang.String getTabStopBottomAssistiveText()
          Gets the message that is provided to users of assistive devices when the user reaches the bottom of the window when leaving a window with the tab key is prevented.
 java.lang.String getTabStopTopAssistiveText()
          Gets the message that is provided to users of assistive devices when the user reaches the top of the window when leaving a window with the tab key is prevented.
 void hide()
           
protected  boolean isClosable()
          Returns the closable state of the sub window.
protected  void onAttach()
           
 void onBlur(BlurEvent event)
           
 void onBrowserEvent(Event event)
           
protected  void onDetach()
           
 boolean onEventPreview(Event event)
           
 void onFocus(FocusEvent event)
           
 void onKeyDown(KeyDownEvent event)
           
 void onKeyUp(KeyUpEvent event)
           
 void onScroll(ScrollEvent event)
           
 void setAssistiveDescription(com.vaadin.shared.Connector[] connectors)
          Allows to specify which connectors contain the description for the window.
 void setAssistivePostfix(java.lang.String assistivePostfix)
          Setter for the text for assistive devices the window caption is postfixed with.
 void setAssistivePrefix(java.lang.String assistivePrefix)
          Setter for the text for assistive devices the window caption is prefixed with.
 void setCaption(java.lang.String c)
           
 void setCaption(java.lang.String c, java.lang.String iconURL)
           
 void setClosable(boolean closable)
          Sets the closable state of the window.
 void setDraggable(boolean draggable)
          For internal use only.
 void setHeight(java.lang.String height)
           
 void setPopupPosition(int left, int top)
           
 void setPopupPositionNoUpdate(int left, int top)
           
 void setResizable(boolean resizability)
          For internal use only.
 void setTabStopBottomAssistiveText(java.lang.String bottomMessage)
          Sets the message that is provided to users of assistive devices when the user reaches the bottom of the window when leaving a window with the tab key is prevented.
 void setTabStopEnabled(boolean doTabStop)
          Registers the handlers that prevent to leave the window using the Tab-key.
 void setTabStopTopAssistiveText(java.lang.String topMessage)
          Sets the message that is provided to users of assistive devices when the user reaches the top of the window when leaving a window with the tab key is prevented.
 void setVaadinModality(boolean modality)
          For internal use only.
 void setVisible(boolean visible)
           
 void setWaiAriaRole(com.vaadin.shared.ui.window.WindowRole role)
          Sets the WAI-ARIA role the window.
 void setWidth(java.lang.String width)
           
 void setWindowOrderAndPosition()
          For internal use only.
protected  void setZIndex(int zIndex)
          Set the z-index (visual stack position) for this overlay.
 void show()
           
 void updateContentsSize()
           
 void updateMaximizeRestoreClassName(boolean visible, com.vaadin.shared.ui.window.WindowMode windowMode)
           
 
Methods inherited from class com.vaadin.client.ui.VOverlay
center, getApplicationConnection, getOverlayContainer, getOverlayContainer, getOwner, hide, hide, isShadowEnabled, isShimElementEnabled, isSinkShadowEvents, needsShimElement, onClose, positionOrSizeUpdated, setOverlayContainerLabel, setOwner, setShadowEnabled, setShadowStyle, setSinkShadowEvents, sinkEvents, updateShadowSizeAndPosition, useShadowDiv
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.logical.shared.CloseHandler
onClose
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
See Also:
Constant Field Values

Z_INDEX

public static final int Z_INDEX
See Also:
Constant Field Values

contents

public Element contents
For internal use only. May be removed or replaced in the future.


header

public Element header
For internal use only. May be removed or replaced in the future.


footer

public Element footer
For internal use only. May be removed or replaced in the future.


contentPanel

public final FocusableScrollPanel contentPanel
For internal use only. May be removed or replaced in the future.


closeBox

public Element closeBox
For internal use only. May be removed or replaced in the future.


maximizeRestoreBox

public Element maximizeRestoreBox
For internal use only. May be removed or replaced in the future.


client

public ApplicationConnection client
For internal use only. May be removed or replaced in the future.


id

public java.lang.String id
For internal use only. May be removed or replaced in the future.


shortcutHandler

public ShortcutActionHandler shortcutHandler
For internal use only. May be removed or replaced in the future.


vaadinModality

public boolean vaadinModality
For internal use only. May be removed or replaced in the future.


resizable

public boolean resizable
For internal use only. May be removed or replaced in the future.


resizeLazy

public boolean resizeLazy
For internal use only. May be removed or replaced in the future.


centered

public boolean centered
If centered (via UIDL), the window should stay in the centered -mode until a position is received from the server, or the user moves or resizes the window.

For internal use only. May be removed or replaced in the future.


immediate

public boolean immediate
For internal use only. May be removed or replaced in the future.


visibilityChangesDisabled

public boolean visibilityChangesDisabled
For internal use only. May be removed or replaced in the future.


bringToFrontSequence

public int bringToFrontSequence
For internal use only. May be removed or replaced in the future.

Constructor Detail

VWindow

public VWindow()
Method Detail

onAttach

protected void onAttach()

onDetach

protected void onDetach()
Overrides:
onDetach in class VOverlay

bringToFront

public void bringToFront()

setWindowOrderAndPosition

public void setWindowOrderAndPosition()
For internal use only. May be removed or replaced in the future.


setZIndex

protected void setZIndex(int zIndex)
Description copied from class: VOverlay
Set the z-index (visual stack position) for this overlay.

Overrides:
setZIndex in class VOverlay
Parameters:
zIndex - The new z-index

getModalityCurtain

protected com.google.gwt.user.client.Element getModalityCurtain()

constructDOM

protected void constructDOM()

setTabStopTopAssistiveText

public void setTabStopTopAssistiveText(java.lang.String topMessage)
Sets the message that is provided to users of assistive devices when the user reaches the top of the window when leaving a window with the tab key is prevented.

This message is not visible on the screen.

Parameters:
topMessage - String provided when the user navigates with Shift-Tab keys to the top of the window

setTabStopBottomAssistiveText

public void setTabStopBottomAssistiveText(java.lang.String bottomMessage)
Sets the message that is provided to users of assistive devices when the user reaches the bottom of the window when leaving a window with the tab key is prevented.

This message is not visible on the screen.

Parameters:
bottomMessage - String provided when the user navigates with the Tab key to the bottom of the window

getTabStopTopAssistiveText

public java.lang.String getTabStopTopAssistiveText()
Gets the message that is provided to users of assistive devices when the user reaches the top of the window when leaving a window with the tab key is prevented.

Returns:
the top message

getTabStopBottomAssistiveText

public java.lang.String getTabStopBottomAssistiveText()
Gets the message that is provided to users of assistive devices when the user reaches the bottom of the window when leaving a window with the tab key is prevented.

Returns:
the bottom message

deferOrdering

public static void deferOrdering()
Calling this method will defer ordering algorithm, to order windows based on servers bringToFront and modality instructions. Non changed windows will be left intact.

For internal use only. May be removed or replaced in the future.


setVisible

public void setVisible(boolean visible)
Overrides:
setVisible in class VOverlay

setDraggable

public void setDraggable(boolean draggable)
For internal use only. May be removed or replaced in the future.


setClosable

public void setClosable(boolean closable)
Sets the closable state of the window. Additionally hides/shows the close button according to the new state.

Parameters:
closable - true if the window can be closed by the user

isClosable

protected boolean isClosable()
Returns the closable state of the sub window. If the sub window is closable a decoration (typically an X) is shown to the user. By clicking on the X the user can close the window.

Returns:
true if the sub window is closable

show

public void show()
Overrides:
show in class VOverlay

hide

public void hide()
Overrides:
hide in class VOverlay

setVaadinModality

public void setVaadinModality(boolean modality)
For internal use only. May be removed or replaced in the future.


setResizable

public void setResizable(boolean resizability)
For internal use only. May be removed or replaced in the future.


updateMaximizeRestoreClassName

public void updateMaximizeRestoreClassName(boolean visible,
                                           com.vaadin.shared.ui.window.WindowMode windowMode)

setPopupPositionNoUpdate

public void setPopupPositionNoUpdate(int left,
                                     int top)

setPopupPosition

public void setPopupPosition(int left,
                             int top)
Overrides:
setPopupPosition in class VOverlay

setCaption

public void setCaption(java.lang.String c)

setCaption

public void setCaption(java.lang.String c,
                       java.lang.String iconURL)

setAssistivePrefix

public void setAssistivePrefix(java.lang.String assistivePrefix)
Setter for the text for assistive devices the window caption is prefixed with.

Parameters:
assistivePrefix - the assistivePrefix to set

getAssistivePrefix

public java.lang.String getAssistivePrefix()
Getter for the text for assistive devices the window caption is prefixed with.

Returns:
the assistivePrefix

setAssistivePostfix

public void setAssistivePostfix(java.lang.String assistivePostfix)
Setter for the text for assistive devices the window caption is postfixed with.

Parameters:
assistivePostfix - the assistivePostfix to set

getAssistivePostfix

public java.lang.String getAssistivePostfix()
Getter for the text for assistive devices the window caption is postfixed with.

Returns:
the assistivePostfix

getContainerElement

protected com.google.gwt.user.client.Element getContainerElement()

onBrowserEvent

public void onBrowserEvent(Event event)

updateContentsSize

public void updateContentsSize()

setWidth

public void setWidth(java.lang.String width)
Overrides:
setWidth in class VOverlay

setHeight

public void setHeight(java.lang.String height)
Overrides:
setHeight in class VOverlay

onEventPreview

public boolean onEventPreview(Event event)

addStyleDependentName

public void addStyleDependentName(java.lang.String styleSuffix)

getShortcutActionHandler

public ShortcutActionHandler getShortcutActionHandler()
Description copied from interface: ShortcutActionHandler.ShortcutActionHandlerOwner
Returns the ShortCutActionHandler currently used or null if there is currently no shortcutactionhandler

Specified by:
getShortcutActionHandler in interface ShortcutActionHandler.ShortcutActionHandlerOwner

onScroll

public void onScroll(ScrollEvent event)

onKeyDown

public void onKeyDown(KeyDownEvent event)

onKeyUp

public void onKeyUp(KeyUpEvent event)

onBlur

public void onBlur(BlurEvent event)

onFocus

public void onFocus(FocusEvent event)

focus

public void focus()
Description copied from interface: Focusable
Sets focus to this widget.

Specified by:
focus in interface Focusable

setAssistiveDescription

public void setAssistiveDescription(com.vaadin.shared.Connector[] connectors)
Allows to specify which connectors contain the description for the window. Text contained in the widgets of the connectors will be read by assistive devices when it is opened.

When the provided array is empty, an existing description is removed.

Parameters:
connectors - with the connectors of the widgets to use as description

getAssistiveDescription

public java.util.List<com.vaadin.shared.Connector> getAssistiveDescription()
Gets the connectors that are used as assistive description. Text contained in these connectors will be read by assistive devices when the window is opened.

Returns:
list of previously set connectors

setWaiAriaRole

public void setWaiAriaRole(com.vaadin.shared.ui.window.WindowRole role)
Sets the WAI-ARIA role the window. This role defines how an assistive device handles a window. Available roles are alertdialog and dialog (@see Roles Model). The default role is dialog.

Parameters:
role - WAI-ARIA role to set for the window

setTabStopEnabled

public void setTabStopEnabled(boolean doTabStop)
Registers the handlers that prevent to leave the window using the Tab-key.

The value of the parameter doTabStop is stored and used for non-modal windows. For modal windows, the handlers are always registered, while preserving the stored value.

Parameters:
doTabStop - true to prevent leaving the window, false to allow leaving the window for non modal windows

addMoveHandler

public com.google.gwt.event.shared.HandlerRegistration addMoveHandler(WindowMoveHandler handler)
Adds a Handler for when user moves the window.

Returns:
HandlerRegistration used to remove the handler
Since:
7.1.9


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.