public class PopupWindow extends com.google.gwt.user.client.ui.PopupPanel implements AttributeWriteResizable, AttributeWriteMovable, AttributeWriteClosable, AttributeWriteMaximized, AttributeWriteMaximizable, AttributeReadLengthProperty
Widget
that represents a popup. It extends
PopupPanel
with additional features such as being resizable. It is an alternative to
DialogBox
.com.google.gwt.user.client.ui.PopupPanel.AnimationType, com.google.gwt.user.client.ui.PopupPanel.PositionCallback
Modifier and Type | Field and Description |
---|---|
private com.google.gwt.user.client.ui.Widget |
borderEast
The right border of the window
|
private com.google.gwt.user.client.ui.Widget |
borderNorth
The top border of the window
|
private com.google.gwt.user.client.ui.Widget |
borderNorthEast
The top right corner of the window
|
private com.google.gwt.user.client.ui.Widget |
borderNorthWest
The top left corner of the window
|
private com.google.gwt.user.client.ui.Widget |
borderSouth
The bottom border of the window
|
private com.google.gwt.user.client.ui.Widget |
borderSouthEast
The bottom right corner of the window
|
private com.google.gwt.user.client.ui.Widget |
borderSouthWest
The bottom left corner of the window
|
private com.google.gwt.user.client.ui.Widget |
borderWest
The left border of the window
|
private ButtonPanel |
buttonPanel |
private boolean |
closable |
private com.google.gwt.user.client.ui.Button |
closeButton
The button to close the window.
|
private VerticalFlowPanel |
contentPanel
The content panel.
|
private com.google.gwt.dom.client.Element |
focusedElement
|
private com.google.gwt.dom.client.Element |
glassPanel |
private VerticalFlowPanel |
mainPanel
The main panel.
|
private boolean |
maximizable |
private SimpleToggleButton |
maximizeButton
The button to
(un)maximize the window. |
private boolean |
maximized |
private boolean |
movable |
private HandlerRegistrationCollector |
registrationCollector
|
private boolean |
resizable |
private int |
savedHeight
The saved
height to restore after e.g. |
private int |
savedWidth
The saved
width to restore after e.g. |
private int |
savedX
The saved X-
position to restore after e.g. |
private int |
savedY
The saved Y-
position to restore after e.g. |
private com.google.gwt.user.client.ui.InlineLabel |
title
The title label.
|
private HorizontalFlowPanel |
titleBar
The title panel.
|
Constructor and Description |
---|
PopupWindow()
The constructor.
|
PopupWindow(boolean autoHide)
The constructor.
|
PopupWindow(boolean autoHide,
boolean modal)
The constructor.
|
PopupWindow(boolean autoHide,
boolean modal,
HandlerRegistrationCollector registrationCollector)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(com.google.gwt.user.client.ui.IsWidget child) |
void |
add(com.google.gwt.user.client.ui.Widget w) |
private void |
addMouseHandler(com.google.gwt.user.client.ui.Widget widget,
Direction resizeDirection)
|
private void |
doSetResizable(boolean newResizable) |
ButtonPanel |
getButtonPanel() |
VerticalFlowPanel |
getContentPanel() |
private com.google.gwt.dom.client.Element |
getFirstFocusElement() |
protected com.google.gwt.dom.client.Element |
getGlassPanel() |
private com.google.gwt.dom.client.Element |
getLastFocusElement() |
Length |
getLength(LengthProperty property)
This method gets the
Length for the given LengthProperty of this object. |
(package private) VerticalFlowPanel |
getMainPanel() |
void |
hide() |
boolean |
isClosable()
This method determines if this object (e.g.
|
boolean |
isMaximizable()
This method determines if this object can be
(un)maximized by the end-user. |
boolean |
isMaximized()
This method determines if this object is maximized.
|
boolean |
isMovable()
This method determines if this object can be moved.
|
boolean |
isResizable()
This method determines if this object is resizable.
|
protected void |
onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent event) |
boolean |
remove(com.google.gwt.user.client.ui.IsWidget child) |
boolean |
remove(com.google.gwt.user.client.ui.Widget w) |
void |
setClosable(boolean closable)
This method sets the
closable attribute. |
void |
setMaximizable(boolean maximizable)
This method set the
maximizable state of this object. |
void |
setMaximized(boolean maximized)
This method (un)
maximizes the object. |
void |
setMovable(boolean movable)
This method sets the
movable attribute. |
void |
setResizable(boolean resizable)
This method sets the
resizable attribute. |
void |
setTitleText(String titleText) |
void |
show() |
addAutoHidePartner, addCloseHandler, addPopupListener, center, getAnimationType, getContainerElement, 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, setAnimationType, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setHeight, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, setWidget, setWidth, showRelativeTo
getWidget, iterator, setWidget
adopt, clear, doAttachChildren, doDetachChildren, orphan
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
private final HandlerRegistrationCollector registrationCollector
private final VerticalFlowPanel mainPanel
private final VerticalFlowPanel contentPanel
private final HorizontalFlowPanel titleBar
private final com.google.gwt.user.client.ui.InlineLabel title
private final com.google.gwt.user.client.ui.Button closeButton
private final SimpleToggleButton maximizeButton
(un)maximize
the window.private final ButtonPanel buttonPanel
getButtonPanel()
private final com.google.gwt.user.client.ui.Widget borderWest
private final com.google.gwt.user.client.ui.Widget borderEast
private final com.google.gwt.user.client.ui.Widget borderSouth
private final com.google.gwt.user.client.ui.Widget borderSouthWest
private final com.google.gwt.user.client.ui.Widget borderSouthEast
private final com.google.gwt.user.client.ui.Widget borderNorth
private final com.google.gwt.user.client.ui.Widget borderNorthWest
private final com.google.gwt.user.client.ui.Widget borderNorthEast
private boolean resizable
isResizable()
private boolean movable
isMovable()
private boolean closable
isClosable()
private boolean maximizable
isMaximizable()
private boolean maximized
isMaximized()
private int savedX
position
to restore after e.g.
setMaximized(boolean)
.private int savedY
position
to restore after e.g.
setMaximized(boolean)
.private int savedWidth
width
to restore after e.g. setMaximized(boolean)
.private int savedHeight
height
to restore after e.g. setMaximized(boolean)
.private com.google.gwt.dom.client.Element focusedElement
private com.google.gwt.dom.client.Element glassPanel
getGlassPanel()
public PopupWindow()
public PopupWindow(boolean autoHide)
autoHide
- - see PopupPanel.setAutoHideEnabled(boolean)
.public PopupWindow(boolean autoHide, boolean modal)
autoHide
- - see PopupPanel.setAutoHideEnabled(boolean)
.modal
- - see PopupPanel.setModal(boolean)
.public PopupWindow(boolean autoHide, boolean modal, HandlerRegistrationCollector registrationCollector)
autoHide
- - see PopupPanel.setAutoHideEnabled(boolean)
.modal
- - see PopupPanel.setModal(boolean)
.registrationCollector
- the HandlerRegistrationCollector
used to collect
HandlerRegistration
s.public boolean isResizable()
isResizable
in interface AttributeReadResizable
true
if the object can be
resized
(by the end-user), false
otherwise.public void setResizable(boolean resizable)
resizable
attribute.setResizable
in interface AttributeWriteResizable
resizable
- is the new value of AttributeReadResizable.isResizable()
.private void doSetResizable(boolean newResizable)
newResizable
- - see setResizable(boolean)
.public boolean isMovable()
isMovable
in interface AttributeReadMovable
true
if the object can be moved by the end-user (by dragging around),
false
otherwise.public void setMovable(boolean movable)
movable
attribute.setMovable
in interface AttributeWriteMovable
movable
- is the new value of AttributeReadMovable.isMovable()
.public boolean isClosable()
isClosable
in interface AttributeReadClosable
true
if the object can be closed by the end-user, false
otherwise.public void setClosable(boolean closable)
closable
attribute.setClosable
in interface AttributeWriteClosable
closable
- is the new value of AttributeReadClosable.isClosable()
.public boolean isMaximized()
isMaximized
in interface AttributeReadMaximized
true
if the object is maximized, false
otherwise.public void setMaximized(boolean maximized)
maximizes
the object. If it is un-maximized, its size and position
will be restored to the values before it was maximized.setMaximized
in interface AttributeWriteMaximized
maximized
- - true
to maximize, false
to un-maximize.AttributeReadMaximized.isMaximized()
public boolean isMaximizable()
(un)maximized
by the end-user.isMaximizable
in interface AttributeReadMaximizable
true
if the object is maximizable, false
otherwise.public void setMaximizable(boolean maximizable)
maximizable
state of this object.setMaximizable
in interface AttributeWriteMaximizable
maximizable
- - true
if a (icon) button shall be available to (un)maximize the object
(window), false
otherwise.AttributeReadMaximizable.isMaximizable()
public Length getLength(LengthProperty property)
Length
for the given LengthProperty
of this object. getLength
(LengthProperty.WIDTH
)
will return the same result as AttributeReadSize.getWidth()
. Unlike AttributeReadSize
this method provides access to additional properties such as e.g. LengthProperty.MIN_WIDTH
or
LengthProperty.MAX_HEIGHT
.getLength
in interface AttributeReadLengthProperty
property
- is the LengthProperty
identifying the actual property to get.Length
. Will be Length.ZERO
if undefined (NOT set).private void addMouseHandler(com.google.gwt.user.client.ui.Widget widget, Direction resizeDirection)
widget
- is the Widget
where to add the PopupMouseHandler
to.resizeDirection
- is the resize Direction
or null
for move.public void add(com.google.gwt.user.client.ui.Widget w)
add
in interface com.google.gwt.user.client.ui.HasWidgets
add
in class com.google.gwt.user.client.ui.SimplePanel
public void add(com.google.gwt.user.client.ui.IsWidget child)
add
in interface com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
add
in class com.google.gwt.user.client.ui.Panel
public boolean remove(com.google.gwt.user.client.ui.IsWidget child)
remove
in interface com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
remove
in class com.google.gwt.user.client.ui.Panel
public boolean remove(com.google.gwt.user.client.ui.Widget w)
remove
in interface com.google.gwt.user.client.ui.HasWidgets
remove
in class com.google.gwt.user.client.ui.SimplePanel
public void setTitleText(String titleText)
titleText
- is the text to be displayed in the title bar of the popup window.protected void onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent event)
onPreviewNativeEvent
in class com.google.gwt.user.client.ui.PopupPanel
private com.google.gwt.dom.client.Element getFirstFocusElement()
Element
of this popup that is tab-able to get the focus.private com.google.gwt.dom.client.Element getLastFocusElement()
Element
of this popup that is tab-able to get the focus.VerticalFlowPanel getMainPanel()
PopupWindow
. This panel contains the borders, the title-bar and
the content-panel
.public ButtonPanel getButtonPanel()
ButtonPanel
located at the bottom of the PopupWindow
where buttons shall be
added.public VerticalFlowPanel getContentPanel()
protected com.google.gwt.dom.client.Element getGlassPanel()
public void show()
show
in class com.google.gwt.user.client.ui.PopupPanel
public void hide()
hide
in class com.google.gwt.user.client.ui.PopupPanel
Copyright © 2001–2016 mmm-Team. All rights reserved.