Package com.vaadin.client.ui
Class VUI
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.SimplePanel
-
- com.vaadin.client.ui.VUI
-
- All Implemented Interfaces:
com.google.gwt.event.dom.client.HasScrollHandlers,com.google.gwt.event.logical.shared.HasAttachHandlers,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,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.ui.AcceptsOneWidget,com.google.gwt.user.client.ui.Focusable,com.google.gwt.user.client.ui.HasOneWidget,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.HasWidgets,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget,com.google.gwt.user.client.ui.IsWidget,com.google.gwt.user.client.Window.ClosingHandler,Focusable,ShortcutActionHandler.ShortcutActionHandlerOwner,Iterable<com.google.gwt.user.client.ui.Widget>
public class VUI extends com.google.gwt.user.client.ui.SimplePanel implements com.google.gwt.event.logical.shared.ResizeHandler, com.google.gwt.user.client.Window.ClosingHandler, ShortcutActionHandler.ShortcutActionHandlerOwner, Focusable, com.google.gwt.user.client.ui.Focusable, com.google.gwt.event.logical.shared.HasResizeHandlers, com.google.gwt.event.dom.client.HasScrollHandlers
Widget class for the UI.- Author:
- Vaadin Ltd
-
-
Field Summary
Fields Modifier and Type Field Description ShortcutActionHandleractionHandlerFor internal use only.ApplicationConnectionconnectionFor internal use only.StringidFor internal use only.booleanresizeLazyFor internal use only.
-
Constructor Summary
Constructors Constructor Description VUI()Constructs a widget for an UI.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description com.google.gwt.event.shared.HandlerRegistrationaddResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler resizeHandler)com.google.gwt.event.shared.HandlerRegistrationaddScrollHandler(com.google.gwt.event.dom.client.ScrollHandler scrollHandler)voidfocus()Sets focus to this widget.voidfocusStoredElement()Restores the previously stored focus Element.ShortcutActionHandlergetShortcutActionHandler()Returns the ShortCutActionHandler currently used or null if there is currently no shortcutactionhandler.intgetTabIndex()StringgetTheme()Deprecated.as of 7.3.static voidgoTo(String url)Opens the given URL in the current browser window.booleanisEmbedded()Returns true if the body is NOT generated, i.e if someone else has made the page that we're running in.protected booleanisMonitoringParentSize()Returns true if the size of the parent should be checked periodically and the application should react to its changes.voidmakeScrollable()Ensures the widget is scrollable e.g. after style name changes.protected voidonLoad()Start to periodically monitor for parent element resizes if embedded application (e.g. portlet).voidonResize(com.google.gwt.event.logical.shared.ResizeEvent event)protected voidonUnload()Stop monitoring for parent element resizes.voidonWindowClosing(com.google.gwt.user.client.Window.ClosingEvent event)protected voidperformSizeCheck()Called when the window or parent div might have been resized.voidsendClientResized()Send new dimensions to the server.voidsetAccessKey(char key)voidsetFocus(boolean focused)voidsetTabIndex(int index)voidstoreFocus()Allows to store the currently focused Element.protected voidwindowSizeMaybeChanged(int newWindowWidth, int newWindowHeight)Deprecated.-
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.gwt.user.client.ui.HasWidgets
add, clear, iterator, remove
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
id
public 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.
-
resizeLazy
public boolean resizeLazy
For internal use only. May be removed or replaced in the future.
-
-
Method Detail
-
onLoad
protected void onLoad()
Start to periodically monitor for parent element resizes if embedded application (e.g. portlet).- Overrides:
onLoadin classcom.google.gwt.user.client.ui.Widget
-
onUnload
protected void onUnload()
Stop monitoring for parent element resizes.- Overrides:
onUnloadin classcom.google.gwt.user.client.ui.Widget
-
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.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 windownewWindowHeight- The new height of the window
-
getTheme
@Deprecated public String getTheme()
Deprecated.as of 7.3. UseUIConnector.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:
onResizein interfacecom.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(String url)
Opens the given URL in the current browser window. If this UI needs to be closed as a result it should be handled separately.- Parameters:
url- the URL to navigate to
-
onWindowClosing
public void onWindowClosing(com.google.gwt.user.client.Window.ClosingEvent event)
- Specified by:
onWindowClosingin interfacecom.google.gwt.user.client.Window.ClosingHandler
-
getShortcutActionHandler
public ShortcutActionHandler getShortcutActionHandler()
Description copied from interface:ShortcutActionHandler.ShortcutActionHandlerOwnerReturns the ShortCutActionHandler currently used or null if there is currently no shortcutactionhandler.- Specified by:
getShortcutActionHandlerin interfaceShortcutActionHandler.ShortcutActionHandlerOwner
-
focus
public void focus()
Description copied from interface:FocusableSets focus to this widget.
-
makeScrollable
public void makeScrollable()
Ensures the widget is scrollable e.g. 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:
addResizeHandlerin interfacecom.google.gwt.event.logical.shared.HasResizeHandlers
-
addScrollHandler
public com.google.gwt.event.shared.HandlerRegistration addScrollHandler(com.google.gwt.event.dom.client.ScrollHandler scrollHandler)
- Specified by:
addScrollHandlerin interfacecom.google.gwt.event.dom.client.HasScrollHandlers
-
getTabIndex
public int getTabIndex()
- Specified by:
getTabIndexin interfacecom.google.gwt.user.client.ui.Focusable
-
setAccessKey
public void setAccessKey(char key)
- Specified by:
setAccessKeyin interfacecom.google.gwt.user.client.ui.Focusable
-
setFocus
public void setFocus(boolean focused)
- Specified by:
setFocusin interfacecom.google.gwt.user.client.ui.Focusable
-
setTabIndex
public void setTabIndex(int index)
- Specified by:
setTabIndexin interfacecom.google.gwt.user.client.ui.Focusable
-
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
-
-