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 ShortcutActionHandler
actionHandler
For internal use only.
ApplicationConnection
connection
For internal use only.
String
id
For internal use only.
boolean
resizeLazy
For internal use only.
-
Constructor Summary
Constructors Constructor Description VUI()
Constructs a widget for an UI.
-
Method Summary
All Methods Modifier and Type Method Description com.google.gwt.event.shared.HandlerRegistration
addResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler resizeHandler)
com.google.gwt.event.shared.HandlerRegistration
addScrollHandler(com.google.gwt.event.dom.client.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()
String
getTheme()
Deprecated.
as of 7.3.static void
goTo(String url)
Opens the given URL in the current browser window.
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 e.g.
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(com.google.gwt.user.client.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.
-
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:
onLoad
in classcom.google.gwt.user.client.ui.Widget
-
onUnload
protected void onUnload()
Stop monitoring for parent element resizes.
Overrides:
onUnload
in 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:
onResize
in 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:
onWindowClosing
in interfacecom.google.gwt.user.client.Window.ClosingHandler
-
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 interfaceShortcutActionHandler.ShortcutActionHandlerOwner
-
focus
public void focus()
Description copied from interface:
Focusable
Sets 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:
addResizeHandler
in 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:
addScrollHandler
in interfacecom.google.gwt.event.dom.client.HasScrollHandlers
-
getTabIndex
public int getTabIndex()
Specified by:
getTabIndex
in interfacecom.google.gwt.user.client.ui.Focusable
-
setAccessKey
public void setAccessKey(char key)
Specified by:
setAccessKey
in interfacecom.google.gwt.user.client.ui.Focusable
-
setFocus
public void setFocus(boolean focused)
Specified by:
setFocus
in interfacecom.google.gwt.user.client.ui.Focusable
-
setTabIndex
public void setTabIndex(int index)
Specified by:
setTabIndex
in 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
-
-