public class Popup extends SimpleContainer
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
HasWidgets.ForIsWidget
IndexedPanel.ForIsWidget
DEBUG_ID_PREFIX
Constructor and Description |
---|
Popup()
Creates a new popup panel.
|
Modifier and Type | Method and Description |
---|---|
void |
center()
Centers the panel within the viewport.
|
Style.AnchorAlignment |
getDefaultAlign()
Returns the default alignment.
|
CompositeElement |
getIgnoreList()
Any elements added to this list will be ignored when auto close is enabled.
|
int |
getXOffset()
Returns the x offset.
|
int |
getYOffset()
Returns the y offsets.
|
void |
hide()
Hides the popup.
|
boolean |
isAnimate()
Returns true if animations are enabled.
|
boolean |
isAutoFocus()
Returns true if auto focus is enabled.
|
boolean |
isAutoHide()
Returns true if auto hide is enabled.
|
boolean |
isConstrainViewport()
Returns true if constrain to viewport is enabled.
|
void |
setAnimate(boolean animate)
True to enable animations when showing and hiding (defaults to false).
|
void |
setAutoFocus(boolean autoFocus)
True to move focus to the popup when being opened (defaults to true).
|
void |
setAutoHide(boolean autoHide)
True to close the popup when the user clicks outside of the menu (default to true).
|
void |
setConstrainViewport(boolean constrainViewport)
True to ensure popup is displayed within the browser's viewport.
|
void |
setDefaultAlign(Style.AnchorAlignment defaultAlign)
The default
XElement.alignTo(com.google.gwt.dom.client.Element, com.sencha.gxt.core.client.Style.AnchorAlignment, int, int) anchor position value for this menu relative to its element of origin
(defaults to "tl-bl?"). |
void |
setXOffset(int xOffset)
Sets the xOffset when constrainViewport == true (defaults to 10).
|
void |
setYOffset(int yOffset)
Sets the yOffset when constrainViewport == true (defaults to 15).
|
void |
show()
Displays the popup.
|
void |
show(Component widget)
Displays the popup aligned to the bottom left of the widget.
|
void |
show(Element elem,
Style.AnchorAlignment pos)
Displays the popup.
|
void |
show(Element elem,
Style.AnchorAlignment pos,
int offsetX,
int offsetY)
Displays the popup.
|
void |
showAt(int x,
int y)
Shows the popup at the specified location.
|
add, add, getWidget, isResize, setResize, setWidget, setWidget
forceLayout, isLayoutRunning, isOrWasLayoutRunning, onResize
add, addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, clear, disable, enable, findWidget, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, remove, remove, remove
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disableEvents, enableEvents, fireEvent, focus, getData, getElement, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, onBrowserEvent, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, sync, syncSize, unmask
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString
public void center()
public Style.AnchorAlignment getDefaultAlign()
public CompositeElement getIgnoreList()
public int getXOffset()
public int getYOffset()
public boolean isAnimate()
public boolean isAutoFocus()
public boolean isAutoHide()
public boolean isConstrainViewport()
public void setAnimate(boolean animate)
animate
- true to enable animationspublic void setAutoFocus(boolean autoFocus)
autoFocus
- true for auto focuspublic void setAutoHide(boolean autoHide)
autoHide
- true for auto hidepublic void setConstrainViewport(boolean constrainViewport)
constrainViewport
- true to constrainpublic void setDefaultAlign(Style.AnchorAlignment defaultAlign)
XElement.alignTo(com.google.gwt.dom.client.Element, com.sencha.gxt.core.client.Style.AnchorAlignment, int, int)
anchor position value for this menu relative to its element of origin
(defaults to "tl-bl?").defaultAlign
- the default alignmentpublic void setXOffset(int xOffset)
xOffset
- the x offsetpublic void setYOffset(int yOffset)
yOffset
- the offsetpublic void show(Component widget)
show(com.google.gwt.dom.client.Element, com.sencha.gxt.core.client.Style.AnchorAlignment, int, int)
.widget
- the widget to use for alignmentpublic void show(Element elem, Style.AnchorAlignment pos)
elem
- the element to align topos
- the positionpublic void show(Element elem, Style.AnchorAlignment pos, int offsetX, int offsetY)
elem
- the element to align topos
- the positionoffsetX
- X offsetoffsetY
- Y offsetpublic void showAt(int x, int y)
x
- the x coordinatey
- the y coordinateCopyright © 2015. All rights reserved.