Class WPopupWidget
- Direct Known Subclasses:
WDialog,WSuggestionPopup
A popup widget anchors to another widget, for which it usually provides additional information or assists in editing, etc...
The popup widget will position itself relative to the anchor widget by taking into account available space, and switching sides if necessary to fit the widget into the current window. For example, a vertically anchored widget will by default be a "drop-down", positioning itself under the anchor widget, but it may also choose to position itself above the anchor widget if space is lacking below.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns in which orientations this popup widget can adjust it's coordinates on popup.intReturns the auto-hide delay.Returns the orientation.hidden()Signal emitted when the popup is hidden.booleanReturns whether the popup is transient.protected voidvoidremove()Destructor.protected voidrender(EnumSet<RenderFlag> flags) Renders the widget.final voidsetAdjust(Orientation adjustOrientation, Orientation... adjustOrientations) Sets in which direction this popup widget can adjust its coordinates on popup.voidsetAdjust(EnumSet<Orientation> adjustOrientations) Sets in which direction this popup widget can adjust its coordinates on popup.final voidsetAnchorWidget(WWidget anchorWidget) Sets an anchor widget.voidsetAnchorWidget(WWidget anchorWidget, Orientation orientation) Sets an anchor widget.voidsetHidden(boolean hidden, WAnimation animation) Hides or shows the widget.final voidsetTransient(boolean isTransient) Sets transient property.voidsetTransient(boolean isTransient, int autoHideDelay) Sets transient property.shown()Signal emitted when the popup is shown.Methods inherited from class eu.webtoolkit.jwt.WCompositeWidget
addStyleClass, boxBorder, boxPadding, callJavaScriptMember, doJavaScript, enableAjax, find, findById, getAttributeValue, getBaseZIndex, getChildren, getClearSides, getDecorationStyle, getFloatSide, getHeight, getId, getImplementation, getJavaScriptMember, getLineHeight, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getObjectName, getOffset, getPositionScheme, getScrollVisibilityMargin, getStyleClass, getTabIndex, getTakeImplementation, getToolTip, getVerticalAlignment, getVerticalAlignmentLength, getWidth, hasFocus, hasStyleClass, isCanReceiveFocus, isDisabled, isEnabled, isHidden, isHiddenKeepsGeometry, isInline, isLoaded, isPopup, isScrollVisibilityEnabled, isScrollVisible, isSetFirstFocus, isThemeStyleEnabled, isVisible, load, propagateSetEnabled, propagateSetVisible, refresh, removeStyleClass, removeWidget, resize, scrollVisibilityChanged, setAttributeValue, setCanReceiveFocus, setClearSides, setDecorationStyle, setDeferredToolTip, setDisabled, setFloatSide, setFocus, setHiddenKeepsGeometry, setId, setImplementation, setInline, setJavaScriptMember, setLineHeight, setMargin, setMaximumSize, setMinimumSize, setObjectName, setOffsets, setParentWidget, setPopup, setPositionScheme, setScrollVisibilityEnabled, setScrollVisibilityMargin, setSelectable, setStyleClass, setTabIndex, setThemeStyleEnabled, setToolTip, setVerticalAlignmentMethods inherited from class eu.webtoolkit.jwt.WWidget
acceptDrops, acceptDrops, addCssRule, addCssRule, addJSignal, addStyleClass, animateHide, animateShow, applyThemeStyles, createJavaScript, disable, dropEvent, enable, getDropTouch, getJsRef, getParent, hide, htmlText, isExposed, isGlobalWidget, isLayoutSizeAware, isRendered, layoutSizeChanged, needsRerender, positionAt, positionAt, positionAt, positionAt, removeFromParent, removeStyleClass, render, resize, scheduleRender, scheduleRender, scheduleRender, scheduleThemeStyleApply, setClearSides, setDeferredToolTip, setFocus, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, trMethods inherited from class eu.webtoolkit.jwt.WObject
setFormData
-
Constructor Details
-
WPopupWidget
Constructor.You need to pass in a widget that provides the main contents of the widget (e.g. a
WTemplateorWContainerWidget).Unlike other widgets, a popup widget is a top-level widget that should not be added to another container.
-
-
Method Details
-
remove
public void remove()Destructor.- Overrides:
removein classWCompositeWidget- See Also:
-
setAnchorWidget
Sets an anchor widget.A vertical popup will show below (or above) the widget, while a horizontal popup will show right (or left) of the widget.
-
setAnchorWidget
Sets an anchor widget. -
getAnchorWidget
-
getOrientation
Returns the orientation. -
setTransient
public void setTransient(boolean isTransient, int autoHideDelay) Sets transient property.A transient popup will automatically hide when the user clicks outside of the popup. When
autoHideDelayis not 0, then it will also automatically hide when the user moves the mouse outside the widget for longer than this delay (in ms). -
setTransient
public final void setTransient(boolean isTransient) Sets transient property. -
isTransient
public boolean isTransient()Returns whether the popup is transient. -
getAutoHideDelay
public int getAutoHideDelay()Returns the auto-hide delay. -
setHidden
Description copied from class:WWidgetHides or shows the widget.Hides or show the widget (including all its descendant widgets). When setting
hidden=false, this widget and all descendant widgets that are not hidden will be shown. A widget is only visible if it and all its ancestors in the widget tree are visible, which may be checked usingisVisible().- Overrides:
setHiddenin classWCompositeWidget
-
setAdjust
Sets in which direction this popup widget can adjust its coordinates on popup.This sets in which orientations the popup widget can adjust its position in order to be fully visible in the window, potentially hiding the widget (or point) from which it popped up. @see WWidget#positionAt(WWidget widget, Orientation orientation, EnumSet adjustOrientations)
By default, it ca adjust in both orientations.
-
setAdjust
Sets in which direction this popup widget can adjust its coordinates on popup.Calls
setAdjust(EnumSet.of(adjustOrientation, adjustOrientations)) -
getAdjust
Returns in which orientations this popup widget can adjust it's coordinates on popup.- See Also:
-
shown
Signal emitted when the popup is shown.This signal is emitted when the popup is being shown because of a client-side event (not when
setHidden()orWWidget.show()is called). -
render
Description copied from class:WWidgetRenders the widget.This function renders the widget (or an update for the widget), after this has been scheduled using
scheduleRender().The default implementation will render the widget by serializing changes to JavaScript and HTML. You may want to reimplement this widget if you have been postponing some of the layout / rendering implementation until the latest moment possible. In that case you should make sure you call the base implementation however.
- Overrides:
renderin classWCompositeWidget
-
onPathChange
protected void onPathChange()
-