public abstract class PopupViewImpl extends ViewImpl implements PopupView
PopupView
that can be used when the widget
returned by ViewImpl.asWidget()
inherits from PopupPanel
.
Also, this implementation simply disregards every call to
ViewImpl.setInSlot(Object, com.google.gwt.user.client.ui.IsWidget)
, ViewImpl.addToSlot(Object,
com.google.gwt.user.client.ui.IsWidget)
, and
ViewImpl.removeFromSlot(Object, com.google.gwt.user.client.ui.IsWidget)
.Modifier | Constructor and Description |
---|---|
protected |
PopupViewImpl(EventBus eventBus)
The
PopupViewImpl class uses the EventBus to listen to
NavigationEvent in order to automatically close when this event is
fired, if desired. |
Modifier and Type | Method and Description |
---|---|
protected PopupPanel |
asPopupPanel()
Retrieves this view as a
PopupPanel . |
void |
center()
Make sure the
PopupView is centered in the browser's client area. |
protected void |
doCenter()
This method centers the popup panel, temporarily making it visible if
needed.
|
void |
hide()
Make sure the
PopupView is hidden. |
void |
setAutoHideOnNavigationEventEnabled(boolean autoHide)
Indicates that the view should automatically hide when a GWTP
NavigationEvent is fired. |
void |
setCloseHandler(PopupViewCloseHandler popupViewCloseHandler)
Identifies which
PopupViewCloseHandler should be called when this
view closed (either automatically or through a call to PopupView.hide() . |
void |
setPosition(int left,
int top)
Reposition the
PopupView within the browser's client area. |
void |
show()
Important!
|
addToSlot, asWidget, initWidget, removeFromSlot, setInSlot
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addToSlot, removeFromSlot, setInSlot
protected PopupViewImpl(EventBus eventBus)
PopupViewImpl
class uses the EventBus
to listen to
NavigationEvent
in order to automatically close when this event is
fired, if desired. See
setAutoHideOnNavigationEventEnabled(boolean)
for details.eventBus
- The EventBus
.public void center()
PopupView
PopupView
is centered in the browser's client area.
This method should not change the view visibility: if it was hidden (resp.
visible) it remains hidden (resp. visible).public void hide()
PopupView
PopupView
is hidden. You can call this method
directly.public void setAutoHideOnNavigationEventEnabled(boolean autoHide)
PopupView
NavigationEvent
is fired. This is
better than using GWT's
PopupPanel.setAutoHideOnHistoryEventsEnabled(boolean)
since the latter will automatically hide the dialog even if navigation is
refused through
PlaceManager.setOnLeaveConfirmation(String)
.setAutoHideOnNavigationEventEnabled
in interface PopupView
public void setCloseHandler(PopupViewCloseHandler popupViewCloseHandler)
PopupView
PopupViewCloseHandler
should be called when this
view closed (either automatically or through a call to PopupView.hide()
.setCloseHandler
in interface PopupView
popupViewCloseHandler
- The PopupViewCloseHandler
or
null
to unregister any handlers.public void setPosition(int left, int top)
PopupView
PopupView
within the browser's client area. This
method should not change the view visibility: if it was hidden (resp.
visible) it remains hidden (resp. visible).setPosition
in interface PopupView
left
- The left position of the top-left corner (in pixels).top
- The top position of the top-left corner (in pixels).public void show()
PopupView
PresenterWidget.addToPopupSlot(PresenterWidget)
passing this
view's PresenterWidget
.
Make sure the PopupView
is visible.protected PopupPanel asPopupPanel()
PopupPanel
. See ViewImpl.asWidget()
.PopupPanel
object.protected void doCenter()
Copyright © 2010–2014 Arcbees. All rights reserved.