public class CmsPopup extends com.google.gwt.user.client.ui.PopupPanel implements I_CmsAutoHider
com.google.gwt.user.client.ui.PopupPanel.PositionCallback| 限定符和类型 | 字段和说明 |
|---|---|
protected com.google.gwt.user.client.Command |
m_closeCommand
The close command.
|
protected boolean |
m_notificationWidgetInstalled
Flag which indicates whether the notification widget has already been installed.
|
protected int |
m_windowWidth
The window width.
|
| 构造器和说明 |
|---|
CmsPopup()
Constructor.
|
CmsPopup(int width)
Constructor setting the width of the dialog.
|
CmsPopup(java.lang.String caption)
Constructor setting the dialog caption.
|
CmsPopup(java.lang.String caption,
int width)
Constructor setting caption and width.
|
CmsPopup(java.lang.String title,
com.google.gwt.user.client.ui.Widget content)
The constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(com.google.gwt.user.client.ui.Widget w)
Adds the given child widget.
|
protected void |
add(com.google.gwt.user.client.ui.Widget child,
com.google.gwt.dom.client.Element container)
Adds a new child widget to the panel, attaching its Element to the
specified container Element.
|
void |
addButton(com.google.gwt.user.client.ui.Widget button)
Adds a button widget to the button panel.
|
void |
addButton(com.google.gwt.user.client.ui.Widget button,
int position)
Adds a button widget to the button panel before the given position.
|
void |
addDialogClose(com.google.gwt.user.client.Command cmd)
Adds a close "button" to the top of the popup.
|
protected int |
adjustIndex(com.google.gwt.user.client.ui.Widget child,
int beforeIndex)
Adjusts beforeIndex to account for the possibility that the given widget is
already a child of this panel.
|
protected void |
beginDragging(com.google.gwt.event.dom.client.MouseDownEvent event)
Called on mouse down in the caption area, begins the dragging loop by
turning on event capture.
|
void |
catchNotifications()
Replaces current notification widget by an overlay.
|
void |
center() |
void |
centerHorizontally(int top)
Shows the dialog and centers it horizontally, but positions it at a fixed vertical position.
|
protected void |
checkIndexBoundsForAccess(int index)
Checks that
index is in the range [0, getWidgetCount()), which
is the valid range on accessible indexes. |
protected void |
checkIndexBoundsForInsertion(int index)
Checks that
index is in the range [0, getWidgetCount()], which
is the valid range for indexes on an insertion. |
void |
clear() |
protected void |
continueDragging(com.google.gwt.event.dom.client.MouseMoveEvent event)
Called on mouse move in the caption area, continues dragging if it was
started by
beginDragging(com.google.gwt.event.dom.client.MouseDownEvent). |
protected A_CmsNotificationWidget |
createDialogNotificationWidget()
Creates a new notification widget for this dialog.
|
protected void |
doAttachChildren() |
protected void |
doDetachChildren() |
protected void |
endDragging(com.google.gwt.event.dom.client.MouseUpEvent event)
Called on mouse up in the caption area, ends dragging by ending event
capture.
|
int |
getAvailableHeight(int fixedContentHeight)
Returns the maximum available height inside the popup.
|
java.lang.String |
getCaption()
Returns the dialog caption text.
|
protected com.google.gwt.user.client.ui.WidgetCollection |
getChildren()
Gets the list of children contained in this panel.
|
protected com.google.gwt.user.client.Element |
getContainerElement() |
com.google.gwt.user.client.ui.Widget |
getWidget(int index)
Returns the child widget with the given index.
|
int |
getWidgetCount()
Returns the number of child widgets.
|
int |
getWidgetIndex(com.google.gwt.user.client.ui.IsWidget child)
Returns the index of the given widget.
|
int |
getWidgetIndex(com.google.gwt.user.client.ui.Widget child)
Returns the index of the given child widget.
|
int |
getWidth()
Returns the dialog content width, -1 if not set.
|
boolean |
hasCaption()
Returns
true if a caption is set for this popup false otherwise. |
void |
hide()
Hides the widget.
|
protected void |
insert(com.google.gwt.user.client.ui.Widget child,
com.google.gwt.dom.client.Element container,
int beforeIndex,
boolean domInsert)
Insert a new child Widget into this Panel at a specified index, attaching
its Element to the specified container Element.
|
void |
insert(com.google.gwt.user.client.ui.Widget w,
int beforeIndex)
Inserts a child widget before the given index.
|
void |
insertFront(com.google.gwt.user.client.ui.Widget widget)
Inserts a widget as the first widget in the popup.
|
protected void |
installNotificationWidget()
Sets the notification widget.
|
java.util.Iterator<com.google.gwt.user.client.ui.Widget> |
iterator() |
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
protected void |
onDetach()
Override to work around the glass overlay still showing after dialog hide.
|
protected void |
onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent event) |
boolean |
remove(int index)
Removes a child widget.
|
boolean |
remove(com.google.gwt.user.client.ui.Widget w) |
void |
removeAllButtons()
Removes all buttons.
|
void |
removeButton(com.google.gwt.user.client.ui.Widget button)
Removes the given button widget from the button panel.
|
void |
removePadding()
Removes the padding from the popup's content.
|
void |
setBackgroundColor(java.lang.String color)
Sets the popup's content background.
|
void |
setCaption(java.lang.String caption)
Sets the captions text.
|
void |
setHeight(int height)
Sets the height for the popup content.
|
void |
setHeight(java.lang.String height)
已过时。
|
void |
setMainContent(com.google.gwt.user.client.ui.Widget w)
Replaces the content from the main widget.
|
void |
setPixelSize(int width,
int height)
已过时。
|
void |
setPositionFixed()
Sets the popup's dialog position to 'fixed'.
|
void |
setSize(java.lang.String width,
java.lang.String height)
已过时。
|
void |
setSpecialBackgroundClass(java.lang.String cssClassName)
Sets an additional CSS class to the main content element.
|
void |
setUseAnimation(boolean use)
Sets the use animation flag.
|
void |
setWidget(com.google.gwt.user.client.ui.Widget w)
已过时。
|
void |
setWidth(int width)
Sets the width for the popup content.
|
void |
setWidth(java.lang.String width)
已过时。
|
void |
show() |
protected void |
showArrow(com.google.gwt.dom.client.Element arrow)
Appends the arrow element to the popup's dialog.
|
static com.google.gwt.user.client.ui.Widget |
wrapWithBorderPadding(com.google.gwt.user.client.ui.Widget w)
Wraps the given Widget with a cornered border, padding and margin.
|
addAutoHidePartner, addCloseHandler, addPopupListener, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, hide, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, showRelativeToaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onLoad, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString, unsinkEventsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAutoHidePartner, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, removeAutoHidePartner, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabledprotected com.google.gwt.user.client.Command m_closeCommand
protected boolean m_notificationWidgetInstalled
protected int m_windowWidth
public CmsPopup()
public CmsPopup(int width)
width - the width to setpublic CmsPopup(java.lang.String caption)
caption - the caption to setpublic CmsPopup(java.lang.String caption,
int width)
caption - the caption to setwidth - the width to setpublic CmsPopup(java.lang.String title,
com.google.gwt.user.client.ui.Widget content)
title - the title and heading of the dialogcontent - the content widgetpublic static com.google.gwt.user.client.ui.Widget wrapWithBorderPadding(com.google.gwt.user.client.ui.Widget w)
w - the widget to wrappublic void add(com.google.gwt.user.client.ui.Widget w)
add 在接口中 com.google.gwt.user.client.ui.HasWidgetsadd 在类中 com.google.gwt.user.client.ui.SimplePanelw - the widgetpublic void addButton(com.google.gwt.user.client.ui.Widget button)
button - the button widgetpublic void addButton(com.google.gwt.user.client.ui.Widget button,
int position)
button - the button widgetposition - the position to insert the buttonpublic void addDialogClose(com.google.gwt.user.client.Command cmd)
cmd - the command that should be executed when the close button is clickedpublic void catchNotifications()
public void center()
center 在类中 com.google.gwt.user.client.ui.PopupPanelPopupPanel.center()public void centerHorizontally(int top)
top - the top positionpublic void clear()
clear 在接口中 com.google.gwt.user.client.ui.HasWidgetsclear 在类中 com.google.gwt.user.client.ui.PanelPanel.clear()public int getAvailableHeight(int fixedContentHeight)
fixedContentHeight - fixed content height to deduct from the available heightpublic java.lang.String getCaption()
public com.google.gwt.user.client.ui.Widget getWidget(int index)
index - the indexpublic int getWidgetCount()
public int getWidgetIndex(com.google.gwt.user.client.ui.IsWidget child)
child - the child widgetpublic int getWidgetIndex(com.google.gwt.user.client.ui.Widget child)
child - the child widgetpublic int getWidth()
public boolean hasCaption()
true if a caption is set for this popup false otherwise.true if a caption is set for this popup false otherwisepublic void hide()
I_CmsAutoHiderhide 在接口中 I_CmsAutoHiderhide 在类中 com.google.gwt.user.client.ui.PopupPanelPopupPanel.hide()public void insert(com.google.gwt.user.client.ui.Widget w,
int beforeIndex)
throws java.lang.IndexOutOfBoundsException
w - the child widgetbeforeIndex - the indexjava.lang.IndexOutOfBoundsException - if the index is out of boundspublic void insertFront(com.google.gwt.user.client.ui.Widget widget)
widget - the widget to insertpublic java.util.Iterator<com.google.gwt.user.client.ui.Widget> iterator()
iterator 在接口中 com.google.gwt.user.client.ui.HasWidgetsiterator 在接口中 java.lang.Iterable<com.google.gwt.user.client.ui.Widget>iterator 在类中 com.google.gwt.user.client.ui.SimplePanelSimplePanel.iterator()public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent 在接口中 com.google.gwt.user.client.EventListeneronBrowserEvent 在类中 com.google.gwt.user.client.ui.WidgetWidget.onBrowserEvent(com.google.gwt.user.client.Event)public boolean remove(int index)
index - the index of the widget to removetrue if the there was a widget at the given index to removepublic boolean remove(com.google.gwt.user.client.ui.Widget w)
remove 在接口中 com.google.gwt.user.client.ui.HasWidgetsremove 在类中 com.google.gwt.user.client.ui.SimplePanelSimplePanel.remove(com.google.gwt.user.client.ui.Widget)public void removeAllButtons()
public void removeButton(com.google.gwt.user.client.ui.Widget button)
button - the button widget to removepublic void removePadding()
public void setBackgroundColor(java.lang.String color)
color - the color to setpublic void setCaption(java.lang.String caption)
caption - the text to setpublic void setHeight(int height)
height - the height in pixels@Deprecated public void setHeight(java.lang.String height)
setHeight 在类中 com.google.gwt.user.client.ui.PopupPanelPopupPanel.setHeight(java.lang.String)public void setMainContent(com.google.gwt.user.client.ui.Widget w)
w - the widget that should replace the main content@Deprecated
public void setPixelSize(int width,
int height)
setPixelSize 在类中 com.google.gwt.user.client.ui.UIObjectUIObject.setSize(java.lang.String, java.lang.String)public void setPositionFixed()
@Deprecated
public void setSize(java.lang.String width,
java.lang.String height)
setSize 在类中 com.google.gwt.user.client.ui.UIObjectUIObject.setSize(java.lang.String, java.lang.String)public void setSpecialBackgroundClass(java.lang.String cssClassName)
cssClassName - the CSS class to setpublic void setUseAnimation(boolean use)
use - true if the animation should be used, default is true@Deprecated public void setWidget(com.google.gwt.user.client.ui.Widget w)
setWidget 在接口中 com.google.gwt.user.client.ui.HasOneWidgetsetWidget 在类中 com.google.gwt.user.client.ui.PopupPanelPopupPanel.setWidget(com.google.gwt.user.client.ui.Widget)public void setWidth(int width)
width - the width in pixels@Deprecated public void setWidth(java.lang.String width)
setWidth 在类中 com.google.gwt.user.client.ui.PopupPanelPopupPanel.setWidth(java.lang.String)public void show()
show 在类中 com.google.gwt.user.client.ui.PopupPanelPopupPanel.show()protected void add(com.google.gwt.user.client.ui.Widget child,
com.google.gwt.dom.client.Element container)
child - the child widget to be addedcontainer - the element within which the child will be containedprotected int adjustIndex(com.google.gwt.user.client.ui.Widget child,
int beforeIndex)
child - the widget that might be an existing childbeforeIndex - the index at which it will be added to this panelprotected void beginDragging(com.google.gwt.event.dom.client.MouseDownEvent event)
event - the mouse down event that triggered draggingDOM.setCapture(com.google.gwt.user.client.Element),
continueDragging(com.google.gwt.event.dom.client.MouseMoveEvent)protected void checkIndexBoundsForAccess(int index)
index is in the range [0, getWidgetCount()), which
is the valid range on accessible indexes.index - the index being accessedprotected void checkIndexBoundsForInsertion(int index)
index is in the range [0, getWidgetCount()], which
is the valid range for indexes on an insertion.index - the index where insertion will occurprotected void continueDragging(com.google.gwt.event.dom.client.MouseMoveEvent event)
beginDragging(com.google.gwt.event.dom.client.MouseDownEvent).event - the mouse move event that continues draggingbeginDragging(com.google.gwt.event.dom.client.MouseDownEvent),
endDragging(com.google.gwt.event.dom.client.MouseUpEvent)protected A_CmsNotificationWidget createDialogNotificationWidget()
protected void doAttachChildren()
doAttachChildren 在类中 com.google.gwt.user.client.ui.PanelPanel.doAttachChildren()protected void doDetachChildren()
doDetachChildren 在类中 com.google.gwt.user.client.ui.PanelPanel.doDetachChildren()protected void endDragging(com.google.gwt.event.dom.client.MouseUpEvent event)
event - the mouse up event that ended draggingDOM.releaseCapture(com.google.gwt.user.client.Element),
beginDragging(com.google.gwt.event.dom.client.MouseDownEvent),
endDragging(com.google.gwt.event.dom.client.MouseUpEvent)protected com.google.gwt.user.client.ui.WidgetCollection getChildren()
protected com.google.gwt.user.client.Element getContainerElement()
getContainerElement 在类中 com.google.gwt.user.client.ui.PopupPanelPopupPanel.getContainerElement()protected void insert(com.google.gwt.user.client.ui.Widget child,
com.google.gwt.dom.client.Element container,
int beforeIndex,
boolean domInsert)
domInsert.child - the child Widget to be addedcontainer - the Element within which child will be
containedbeforeIndex - the index before which child will be
inserteddomInsert - if true, insert child into
container at beforeIndex; otherwise
append child to the end of container.protected void installNotificationWidget()
protected void onDetach()
onDetach 在类中 com.google.gwt.user.client.ui.WidgetWidget.onDetach()protected void onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent event)
onPreviewNativeEvent 在类中 com.google.gwt.user.client.ui.PopupPanelPopupPanel.onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent)protected void showArrow(com.google.gwt.dom.client.Element arrow)
arrow - the arrow element to add