com.vaadin.client.ui
Class VUI

java.lang.Object
  extended by SimplePanel
      extended by com.vaadin.client.ui.VUI
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasResizeHandlers, com.google.gwt.event.logical.shared.ResizeHandler, com.google.gwt.event.shared.EventHandler, com.google.gwt.event.shared.HasHandlers, Focusable, ShortcutActionHandler.ShortcutActionHandlerOwner

public class VUI
extends SimplePanel
implements com.google.gwt.event.logical.shared.ResizeHandler, ShortcutActionHandler.ShortcutActionHandlerOwner, Focusable, com.google.gwt.event.logical.shared.HasResizeHandlers


Field Summary
 ShortcutActionHandler actionHandler
          For internal use only.
 ApplicationConnection connection
          For internal use only.
 java.lang.String currentFragment
          The current URI fragment, used to avoid sending updates if nothing has changed.
 java.lang.String id
          For internal use only.
 boolean immediate
          For internal use only.
 boolean resizeLazy
          For internal use only.
 
Constructor Summary
VUI()
           
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler resizeHandler)
           
 com.google.gwt.event.shared.HandlerRegistration addScrollHandler(ScrollHandler scrollHandler)
           
 void focus()
          Sets focus to this widget.
 void focusStoredElement()
          Restores the previously stored focus Element.
 ShortcutActionHandler getShortcutActionHandler()
          Returns the ShortCutActionHandler currently used or null if there is currently no shortcutactionhandler
 int getTabIndex()
           
 java.lang.String getTheme()
          Deprecated. as of 7.3. Use UIConnector.getActiveTheme() instead.
static void goTo(java.lang.String url)
           
 boolean isEmbedded()
          Returns true if the body is NOT generated, i.e if someone else has made the page that we're running in.
protected  boolean isMonitoringParentSize()
          Returns true if the size of the parent should be checked periodically and the application should react to its changes.
 void makeScrollable()
          Ensures the widget is scrollable eg.
protected  void onAttach()
           
protected  void onDetach()
           
protected  void onLoad()
          Start to periodically monitor for parent element resizes if embedded application (e.g.
 void onResize(com.google.gwt.event.logical.shared.ResizeEvent event)
           
protected  void onUnload()
          Stop monitoring for parent element resizes.
 void onWindowClosing(Window.ClosingEvent event)
           
protected  void performSizeCheck()
          Called when the window or parent div might have been resized.
 void sendClientResized()
          Send new dimensions to the server.
 void setAccessKey(char key)
           
 void setFocus(boolean focused)
           
 void setTabIndex(int index)
           
 void storeFocus()
          Allows to store the currently focused Element.
protected  void windowSizeMaybeChanged(int newWindowWidth, int newWindowHeight)
          Deprecated. use performSizeCheck()
 
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.shared.HasHandlers
fireEvent
 

Field Detail

id

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


actionHandler

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


connection

public ApplicationConnection connection
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.


resizeLazy

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


currentFragment

public java.lang.String currentFragment
The current URI fragment, used to avoid sending updates if nothing has changed.

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

Constructor Detail

VUI

public VUI()
Method Detail

onLoad

protected void onLoad()
Start to periodically monitor for parent element resizes if embedded application (e.g. portlet).


onAttach

protected void onAttach()

onDetach

protected void onDetach()

onUnload

protected void onUnload()
Stop monitoring for parent element resizes.


performSizeCheck

protected void performSizeCheck()
Called when the window or parent div might have been resized. This immediately checks the sizes of the window and the parent div (if monitoring it) and triggers layout recalculation if they have changed.


windowSizeMaybeChanged

@Deprecated
protected void windowSizeMaybeChanged(int newWindowWidth,
                                                 int newWindowHeight)
Deprecated. use performSizeCheck()

Called when the window or parent div might have been resized. This immediately checks the sizes of the window and the parent div (if monitoring it) and triggers layout recalculation if they have changed.

Parameters:
newWindowWidth - The new width of the window
newWindowHeight - The new height of the window

getTheme

@Deprecated
public java.lang.String getTheme()
Deprecated. as of 7.3. Use UIConnector.getActiveTheme() instead.

Returns:
the name of the theme in use by this UI.

isEmbedded

public boolean isEmbedded()
Returns true if the body is NOT generated, i.e if someone else has made the page that we're running in. Otherwise we're in charge of the whole page.

Returns:
true if we're running embedded

isMonitoringParentSize

protected boolean isMonitoringParentSize()
Returns true if the size of the parent should be checked periodically and the application should react to its changes.

Returns:
true if size of parent should be tracked

onResize

public void onResize(com.google.gwt.event.logical.shared.ResizeEvent event)
Specified by:
onResize in interface com.google.gwt.event.logical.shared.ResizeHandler

sendClientResized

public void sendClientResized()
Send new dimensions to the server.

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


goTo

public static void goTo(java.lang.String url)

onWindowClosing

public void onWindowClosing(Window.ClosingEvent event)

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

focus

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

Specified by:
focus in interface Focusable

makeScrollable

public void makeScrollable()
Ensures the widget is scrollable eg. after style name changes.

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


addResizeHandler

public com.google.gwt.event.shared.HandlerRegistration addResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler resizeHandler)
Specified by:
addResizeHandler in interface com.google.gwt.event.logical.shared.HasResizeHandlers

addScrollHandler

public com.google.gwt.event.shared.HandlerRegistration addScrollHandler(ScrollHandler scrollHandler)

getTabIndex

public int getTabIndex()

setAccessKey

public void setAccessKey(char key)

setFocus

public void setFocus(boolean focused)

setTabIndex

public void setTabIndex(int index)

storeFocus

public void storeFocus()
Allows to store the currently focused Element. Current use case is to store the focus when a Window is opened. Does currently handle only a single value. Needs to be extended for #12158

Parameters:
focusedElement -

focusStoredElement

public void focusStoredElement()
Restores the previously stored focus Element. Current use case is to restore the focus when a Window is closed. Does currently handle only a single value. Needs to be extended for #12158



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