public class DialogViewContainer extends SingleViewContainer
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_STYLE_NAME |
activeViewlogger, views| Constructor and Description |
|---|
DialogViewContainer()
Default Constructor.
|
DialogViewContainer(boolean closeable,
boolean modal)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
center()
Open the dialog container and center it on the screen.
|
void |
closeDialog()
Close the container dialog.
|
boolean |
closeDialog(boolean unloadView)
Close the container dialog.
|
static DialogViewContainer |
createDialog(String viewName)
Create a new DialogViewContainer and load the given view into the container
|
static DialogViewContainer |
createDialog(String viewName,
String viewId,
boolean closeable)
Create a new DialogViewContainer and load the given view into the container.
|
static DialogViewContainer |
createDialog(String viewName,
String viewId,
boolean closeable,
boolean modal,
String width,
String height,
int left,
int top)
Create a new DialogViewContainer and load the given view into the container.
|
static DialogViewContainer |
createDialog(String viewName,
String viewId,
boolean closeable,
boolean modal,
String width,
String height,
int left,
int top,
Object parameter)
Create a new DialogViewContainer and load the given view into the container.
|
protected boolean |
doAdd(View view,
boolean lazy,
Object parameter) |
protected boolean |
doRemove(View view,
boolean skipEvents) |
protected com.google.gwt.user.client.ui.Panel |
getContainerPanel() |
protected com.google.gwt.user.client.ui.Panel |
getContainerPanel(View view) |
View |
getView()
Read the current view loaded into this container.
|
protected void |
handleViewTitle(String title,
com.google.gwt.user.client.ui.Panel containerPanel,
String viewId) |
boolean |
isModal()
Read the modal property value.
|
boolean |
isUnloadViewOnClose()
Read the unloadViewOnClose property value.
|
void |
openDialog()
Open the container dialog box.
|
static void |
openDialog(String viewName)
Create a dialog container, load the given view into the container and open the dialog box.
|
static void |
openDialog(String viewName,
String viewId,
boolean closeable)
Create a dialog container, load the given view into the container and open the dialog box.
|
void |
setHeight(String height)
Set the dialog height
|
void |
setModal(boolean modal)
Write the modal property value.
|
void |
setPosition(int left,
int top)
Set the dialog position
|
void |
setSize(String width,
String height)
Set the dialog dimensions.
|
void |
setStyleDependentName(String styleSuffix,
boolean add) |
void |
setStyleName(String style) |
void |
setStyleName(String style,
boolean add) |
void |
setStylePrimaryName(String style) |
void |
setUnloadViewOnClose(boolean unloadViewOnClose)
Write the unloadViewOnClose property value.
|
void |
setWidth(String width)
Set the dialog width
|
activate, deactivate, getActiveView, hasHistoryHandlers, hasOrientationChangeHandlers, hasResizeHandlers, hasWindowCloseHandlers, hasWindowClosingHandlers, notifyViewsAboutHistoryChange, notifyViewsAboutOrientationChange, notifyViewsAboutWindowClose, notifyViewsAboutWindowClosing, notifyViewsAboutWindowResizeadd, loadView, showViewadd, addLazy, addView, adoptView, bindToDOM, clear, createView, createView, getMainWidget, getView, getViewFactory, loadAndRenderView, loadView, loadView, remove, remove, renderView, showView, showView, unbindToDOMclaimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toStringpublic static final String DEFAULT_STYLE_NAME
public DialogViewContainer()
public DialogViewContainer(boolean closeable,
boolean modal)
closeable - if true, a close button will be present at to top of dialog boxmodal - if true, a modal dialog will be createdpublic static void openDialog(String viewName)
viewName - name of the view to be openedpublic static void openDialog(String viewName, String viewId, boolean closeable)
viewName - name of the view to be openedviewId - ID to be used to identify the opened viewcloseable - if true, a close button will be present at to top of dialog boxpublic static DialogViewContainer createDialog(String viewName)
viewName - name of the view to be loadedpublic static DialogViewContainer createDialog(String viewName, String viewId, boolean closeable)
viewName - name of the view to be loadedviewId - ID to be used to identify the opened viewcloseable - if true, a close button will be present at to top of dialog boxpublic static DialogViewContainer createDialog(String viewName, String viewId, boolean closeable, boolean modal, String width, String height, int left, int top)
viewName - name of the view to be loadedviewId - ID to be used to identify the opened viewcloseable - if true, a close button will be present at to top of dialog boxmodal - if true, a modal dialog will be createdwidth - dialog box widthheight - dialog box heightleft - left position of the dialog boxtop - top position of the dialog boxpublic static DialogViewContainer createDialog(String viewName, String viewId, boolean closeable, boolean modal, String width, String height, int left, int top, Object parameter)
viewName - name of the view to be loadedviewId - ID to be used to identify the opened viewcloseable - if true, a close button will be present at to top of dialog boxmodal - if true, a modal dialog will be createdwidth - dialog box widthheight - dialog box heightleft - left position of the dialog boxtop - top position of the dialog boxparameter - any object you want to pass as parameter to the view's activate and load eventpublic boolean isUnloadViewOnClose()
public void setUnloadViewOnClose(boolean unloadViewOnClose)
unloadViewOnClose - unloadViewOnClose property valuepublic void setModal(boolean modal)
modal - modal property valuepublic boolean isModal()
public void setSize(String width, String height)
setSize in class com.google.gwt.user.client.ui.UIObjectwidth - dialog widthheight - dialog heightpublic void setWidth(String width)
setWidth in class com.google.gwt.user.client.ui.UIObjectwidth - dialog widthpublic void setHeight(String height)
setHeight in class com.google.gwt.user.client.ui.UIObjectwidth - dialog heightpublic void setPosition(int left,
int top)
left - dialog left positiontop - dialog top positionpublic void setStyleName(String style)
setStyleName in class com.google.gwt.user.client.ui.UIObjectpublic void setStyleDependentName(String styleSuffix, boolean add)
setStyleDependentName in class com.google.gwt.user.client.ui.UIObjectpublic void setStyleName(String style, boolean add)
setStyleName in class com.google.gwt.user.client.ui.UIObjectpublic void setStylePrimaryName(String style)
setStylePrimaryName in class com.google.gwt.user.client.ui.UIObjectpublic void center()
public View getView()
public void openDialog()
public void closeDialog()
public boolean closeDialog(boolean unloadView)
If this view can not be unloaded (its unload event handler cancel the event), this method does not close the container and returns false.
unloadView - if true, unload the current view before close the container.protected boolean doAdd(View view, boolean lazy, Object parameter)
doAdd in class ViewContainerprotected boolean doRemove(View view, boolean skipEvents)
doRemove in class ViewContainerprotected com.google.gwt.user.client.ui.Panel getContainerPanel(View view)
getContainerPanel in class ViewContainerprotected com.google.gwt.user.client.ui.Panel getContainerPanel()
protected void handleViewTitle(String title, com.google.gwt.user.client.ui.Panel containerPanel, String viewId)
handleViewTitle in class ViewContainerCopyright © 2014. All rights reserved.