public class Popup extends SimpleContainer
Modifier and Type | Field and Description |
---|---|
protected Element |
alignElem |
protected int |
alignOffsetX |
protected int |
alignOffsetY |
protected Point |
alignPoint |
protected Style.AnchorAlignment |
alignPos |
protected boolean |
animate |
protected boolean |
autoFocus |
protected boolean |
autoHide |
protected boolean |
constrainViewport |
protected Style.AnchorAlignment |
defaultAlign |
protected BaseEventPreview |
preview |
protected int |
xOffset |
protected int |
yOffset |
logger, resize, widget
forceLayoutCommand, forceLayoutOnResize, hadLayoutRunning, layoutCommand, layoutRequiredThisEventLoop, layoutRunning
children, widgetMap
adjustSize, allowTextSelection, cacheSizes, contextMenu, contextMenuGestureRecognizer, dataMap, deferHeight, disableContextMenu, disabled, disabledStyle, disableEvents, ensureVisibilityOnSizing, focusManagerSupport, gestureRecognizers, height, hidden, hideMode, itemId, lastSize, layer, left, mask, maskMessage, monitorWindowResize, overElements, pageX, pageY, resizeHandler, shadow, shadowPosition, shim, stateful, stateId, tabIndex, toolTip, toolTipConfig, top, width, windowResizeDelay, windowResizeTask
Constructor and Description |
---|
Popup()
Creates a new popup panel.
|
Modifier and Type | Method and Description |
---|---|
protected void |
afterHide() |
protected void |
afterShow() |
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.
|
protected void |
onAfterFirstAttach()
Called immediately after the first time the widget becomes attached to the browser's document only the first time.
|
protected boolean |
onAutoHide(Event event)
Subclasses may override to cancel the hide from an auto hide.
|
protected void |
onDetach() |
protected Popup |
onShowPopup() |
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(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, add, doLayout, getWidget, isResize, onRemove, setElement, setResize, setWidget, setWidget
applyLayout, applyLayout, forceLayout, forceLayoutOnChildren, forceLayoutOnChildren, getLeftRightMargins, getParentLayoutWidget, getSideMargins, getTopBottomMargins, isLayoutRunning, isOrWasLayoutRunning, isParentLayoutRunning, isWidgetVisible, onBeforeDoLayout, onLoad, onResize, onResize, parentIsOrWasLayoutRunning
addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, adjustIndex, adopt, checkIndexBoundsForInsertion, clear, disable, doAttachChildren, doDetachChildren, doPhysicalAttach, doPhysicalDetach, enable, ensureGroupingHandlerRegistration, findWidget, getAttachException, getChildren, getContainerTarget, getDetachException, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, onInsert, onWidgetHide, onWidgetShow, orphan, remove, remove, remove
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addGestureRecognizer, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disableContextMenu, disableEvents, enableEvents, fireCancellableEvent, fireEvent, focus, getData, getElement, getFocusEl, getFocusSupport, getGestureRecognizer, getGestureRecognizerCount, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hideShadow, hideToolTip, isAdjustSize, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, makeVisible, mask, mask, notifyHide, notifyShow, onAttach, onBlur, onBrowserEvent, onDisable, onEnable, onFocus, onHide, onHideContextMenu, onPosition, onRightClick, onShow, onShowContextMenu, onTouch, onUnload, onWindowResize, removeStyleDependentName, removeStyleOnOver, removeToolTip, restoreVisible, setAdjustSize, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setMonitorWindowResize, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setStyleDependentName, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, sync, syncSize, unmask
protected int yOffset
protected int xOffset
protected boolean animate
protected boolean autoFocus
protected boolean autoHide
protected boolean constrainViewport
protected Style.AnchorAlignment defaultAlign
protected Element alignElem
protected Style.AnchorAlignment alignPos
protected int alignOffsetX
protected int alignOffsetY
protected Point alignPoint
protected BaseEventPreview preview
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(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 coordinateprotected void afterHide()
protected void afterShow()
protected void onAfterFirstAttach()
Component
onAfterFirstAttach
in class Component
protected boolean onAutoHide(Event event)
event
- the current eventprotected Popup onShowPopup()
Copyright © 2018. All rights reserved.