com.vaadin.terminal.gwt.client.ui.
Class VView
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.terminal.gwt.client.ui.VView
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, 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.HasOneWidget, 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, Container, Focusable, Paintable, ShortcutActionHandler.ShortcutActionHandlerOwner, Iterable<com.google.gwt.user.client.ui.Widget>
- extends com.google.gwt.user.client.ui.SimplePanel
- implements Container, com.google.gwt.event.logical.shared.ResizeHandler, com.google.gwt.user.client.Window.ClosingHandler, ShortcutActionHandler.ShortcutActionHandlerOwner, Focusable
public class VView
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
---|
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget |
Field Summary | |
---|---|
static String |
BROWSER_HEIGHT_VAR
|
static String |
BROWSER_WIDTH_VAR
|
static String |
NOTIFICATION_HTML_CONTENT_NOT_ALLOWED
|
static String |
RESIZE_LAZY
|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
VView()
|
Method Summary | |
---|---|
void |
focus()
Sets focus to this widget. |
RenderSpace |
getAllocatedSpace(com.google.gwt.user.client.ui.Widget child)
Returns the size currently allocated for the child component. |
ShortcutActionHandler |
getShortcutActionHandler()
Returns the ShortCutActionHandler currently used or null if there is currently no shortcutactionhandler |
ArrayList<VWindow> |
getSubWindowList()
Return an iterator for current subwindows. |
String |
getTheme()
|
static void |
goTo(String url)
|
boolean |
hasChildComponent(com.google.gwt.user.client.ui.Widget component)
Is a given component child of this layout. |
void |
init(String rootPanelId,
ApplicationConnection applicationConnection)
|
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 |
onBrowserEvent(com.google.gwt.user.client.Event event)
|
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 |
replaceChildComponent(com.google.gwt.user.client.ui.Widget oldComponent,
com.google.gwt.user.client.ui.Widget newComponent)
Replace child of this layout with another component. |
boolean |
requestLayout(Set<Paintable> child)
Called when a child components size has been updated in the rendering phase. |
void |
updateCaption(Paintable component,
UIDL uidl)
Update child components caption, description and error message. |
void |
updateFromUIDL(UIDL uidl,
ApplicationConnection client)
|
protected void |
windowSizeMaybeChanged(int newWindowWidth,
int newWindowHeight)
Deprecated. use performSizeCheck() |
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, adopt, clear, disown, 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, onDetach, removeFromParent, setLayoutData, sinkEvents |
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, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
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 |
Field Detail |
---|
BROWSER_HEIGHT_VAR
public static final String BROWSER_HEIGHT_VAR
See Also:
BROWSER_WIDTH_VAR
public static final String BROWSER_WIDTH_VAR
See Also:
NOTIFICATION_HTML_CONTENT_NOT_ALLOWED
public static final String NOTIFICATION_HTML_CONTENT_NOT_ALLOWED
See Also:
RESIZE_LAZY
public static final String RESIZE_LAZY
See Also:
Constructor Detail |
---|
VView
public VView()
Method Detail |
---|
onLoad
protected void onLoad()
- Overrides:
onLoad
in classcom.google.gwt.user.client.ui.Widget
Start to periodically monitor for parent element resizes if embedded application (e.g. portlet).
onUnload
protected void onUnload()
- Overrides:
onUnload
in classcom.google.gwt.user.client.ui.Widget
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)
- Parameters:
newWindowWidth
- The new width of the windownewWindowHeight
- The new height of the window
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.
getTheme
public String getTheme()
isEmbedded
public boolean isEmbedded()
- Returns:
- true if we're running embedded
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.
isMonitoringParentSize
protected boolean isMonitoringParentSize()
- Returns:
- true if size of parent should be tracked
Returns true if the size of the parent should be checked periodically and the application should react to its changes.
updateFromUIDL
public void updateFromUIDL(UIDL uidl,
ApplicationConnection client)
- Specified by:
updateFromUIDL
in interfacePaintable
onBrowserEvent
public void onBrowserEvent(com.google.gwt.user.client.Event event)
- Specified by:
onBrowserEvent
in interfacecom.google.gwt.user.client.EventListener
- Overrides:
onBrowserEvent
in classcom.google.gwt.user.client.ui.Widget
onResize
public void onResize(com.google.gwt.event.logical.shared.ResizeEvent event)
- Specified by:
onResize
in interfacecom.google.gwt.event.logical.shared.ResizeHandler
goTo
public static void goTo(String url)
onWindowClosing
public void onWindowClosing(com.google.gwt.user.client.Window.ClosingEvent event)
- Specified by:
onWindowClosing
in interfacecom.google.gwt.user.client.Window.ClosingHandler
getAllocatedSpace
public RenderSpace getAllocatedSpace(com.google.gwt.user.client.ui.Widget child)
- Specified by:
getAllocatedSpace
in interfaceContainer
- Returns:
Description copied from interface: Container
Returns the size currently allocated for the child component.
hasChildComponent
public boolean hasChildComponent(com.google.gwt.user.client.ui.Widget component)
- Specified by:
hasChildComponent
in interfaceContainer
- Parameters:
component
- Component to test.- Returns:
- true iff component is a child of this layout.
Description copied from interface: Container
Is a given component child of this layout.
replaceChildComponent
public void replaceChildComponent(com.google.gwt.user.client.ui.Widget oldComponent,
com.google.gwt.user.client.ui.Widget newComponent)
- Specified by:
replaceChildComponent
in interfaceContainer
- Parameters:
oldComponent
- Child to be replacednewComponent
- Child that replaces the oldComponent
Description copied from interface: Container
Replace child of this layout with another component. Each layout must be able to switch children. To to this, one must just give references to a current and new child.
requestLayout
public boolean requestLayout(Set<Paintable> child)
- Specified by:
requestLayout
in interfaceContainer
- Parameters:
child
- Set of child widgets whose size have changed- Returns:
- true if the size of the Container remains the same, false if the event need to be propagated to the Containers parent
Description copied from interface: Container
Called when a child components size has been updated in the rendering phase.
updateCaption
public void updateCaption(Paintable component,
UIDL uidl)
- Specified by:
updateCaption
in interfaceContainer
- Parameters:
component
- Child component for which service is requested.uidl
- UIDL of the child component.
Description copied from interface: Container
Update child components caption, description and error message.
Each component is responsible for maintaining its caption, description and error message. In most cases components doesn't want to do that and those elements reside outside of the component. Because of this layouts must provide service for it's childen to show those elements for them.
getSubWindowList
public ArrayList<VWindow> getSubWindowList()
- Returns:
Return an iterator for current subwindows. This method is meant for testing purposes only.
init
public void init(String rootPanelId,
ApplicationConnection applicationConnection)
getShortcutActionHandler
public ShortcutActionHandler getShortcutActionHandler()
- Specified by:
getShortcutActionHandler
in interfaceShortcutActionHandler.ShortcutActionHandlerOwner
Description copied from interface: ShortcutActionHandler.ShortcutActionHandlerOwner
Returns the ShortCutActionHandler currently used or null if there is currently no shortcutactionhandler
focus
public void focus()
Description copied from interface: Focusable
Sets focus to this widget.