public class MaterialModal extends MaterialWidget implements HasType<ModalType>, HasInOutDurationTransition, HasDismissible, com.google.gwt.event.logical.shared.HasCloseHandlers<MaterialModal>, com.google.gwt.event.logical.shared.HasOpenHandlers<MaterialModal>, HasFullscreen
<m:MaterialModal ui:field="modal" type="FIXED_FOOTER" dismissible="true" inDuration="500" outDuration="800">
<m:MaterialModalContent>
<m:MaterialTitle title="Title" description="Description" />
</m:MaterialModalContent>
<m:MaterialModalFooter>
<m:MaterialButton text="Close Modal" type="FLAT"/>
</m:MaterialModalFooter>
</m:MaterialModal>
*
{
@code
@UiField
MaterialModal modal;
modal.open();
}
MaterialWidget.Featurecom.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled$this| Constructor and Description |
|---|
MaterialModal() |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<MaterialModal> handler) |
com.google.gwt.event.shared.HandlerRegistration |
addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<MaterialModal> handler) |
void |
close()
Close the modal programmatically.
|
void |
close(boolean autoClosed)
Close the modal programmatically.
|
void |
close(boolean autoClosed,
boolean fireEvent)
Close the modal programmatically.
|
protected void |
close(com.google.gwt.dom.client.Element e,
boolean autoClosed,
boolean fireEvent) |
protected FullscreenMixin |
getFullscreenMixin() |
int |
getInDuration()
Get the in / enter animation duration in milliseconds.
|
double |
getOpacity() |
int |
getOutDuration()
Get the out / exit animation duration in milliseconds.
|
ModalType |
getType()
Gets the type of the widget.
|
protected CssTypeMixin<ModalType,MaterialModal> |
getTypeMixin() |
boolean |
isDismissible() |
boolean |
isFullscreen() |
protected void |
onNativeClose(boolean autoClosed,
boolean fireEvent) |
protected void |
onNativeOpen(boolean fireEvent) |
void |
open()
Open the modal programmatically
|
void |
open(boolean fireEvent)
Open the modal programmatically
|
protected void |
open(com.google.gwt.dom.client.Element e,
boolean fireEvent)
Open modal with additional properties
|
void |
setDismissible(boolean dismissible)
Set dismissible when swiping left / right.
|
void |
setEnabled(boolean enabled) |
void |
setFullscreen(boolean value) |
void |
setInDuration(int inDuration)
Set the in / enter animation duration in milliseconds.
|
void |
setOpacity(double opacity) |
void |
setOutDuration(int outDuration)
Set the out / exit animation duration in milliseconds.
|
void |
setType(ModalType type)
Sets the type on the widget
|
$this, add, add, addAttachHandler, addBlurHandler, addClickHandler, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragLeaveHandler, addDragMoveHandler, addDragOverHandler, addDragStartHandler, addDropActivateHandler, addDropDeactivateHandler, addDropHandler, addFocusHandler, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addOrientationChangeHandler, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, body, clearActiveClass, enableFeature, getBackfaceVisibility, getBackgroundColor, getBorder, getBorderBottom, getBorderLeft, getBorderMixin, getBorderRadius, getBorderRight, getBorderTop, getCenterOn, getCenterOnMixin, getChildren, getChildrenList, getCircleMixin, getColorsMixin, getDataAttribute, getDepth, getDimensionMixin, getEnabledMixin, getFlexboxMixin, getFloat, getFloatMixin, getFocusableMixin, getFontSize, getFontSizeMixin, getFontWeight, getFontWeightMixin, getGridMixin, getHandlerRegistry, getHideOn, getHideOnMixin, getHoverableMixin, getId, getIdMixin, getInitialClasses, getLayoutPosition, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOrientation, getOrientationMixin, getPerspective, getPerspectiveOrigin, getScrollspy, getScrollspyMixin, getSeparatorMixin, getShadow, getShadowMixin, getShowOn, getShowOnMixin, getTabIndex, getTextAlign, getTextAlignMixin, getTextColor, getTooltip, getTooltipDelayMs, getTooltipHTML, getTooltipMixin, getTooltipPosition, getTransform, getTransformMixin, getTransformOrigin, getTransformStyle, getTruncateMixin, getVerticalAlign, getVerticalAlignMixin, getWaves, getWavesMixin, getWidth, insert, insert, isCircle, isDetectOrientation, isEnabled, isFeatureEnabled, isHoverable, isSeparator, isTruncate, onLoad, onUnload, registerHandler, removeHandler, setAccessKey, setBackfaceVisibility, setBackgroundColor, setBorder, setBorderBottom, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBottom, setCenterOn, setCircle, setClass, setDataAttribute, setDepth, setDetectOrientation, setDisplay, setFlex, setFlexAlignContent, setFlexAlignItems, setFlexAlignSelf, setFlexBasis, setFlexDirection, setFlexGrow, setFlexJustifyContent, setFlexOrder, setFlexShrink, setFlexWrap, setFloat, setFocus, setFontSize, setFontSize, setFontWeight, setGrid, setGwtDisplay, setHideOn, setHoverable, setId, setInitialClasses, setLayoutPosition, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOffset, setOrientation, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPerspective, setPerspectiveOrigin, setRight, setScrollspy, setSeparator, setShadow, setShowOn, setStyle, setTabIndex, setTextAlign, setTextColor, setTooltip, setTooltipDelayMs, setTooltipHTML, setTooltipPosition, setTop, setTransform, setTransformOrigin, setTransformStyle, setTransition, setTruncate, setVerticalAlign, setVisibility, setWaves, stopTouchStartEvent, validate, windowadd, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, remove, removeadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetVisibleforEach, spliteratorpublic MaterialModal()
public void setType(ModalType type)
HasTypepublic ModalType getType()
HasTypepublic void setInDuration(int inDuration)
HasInOutDurationTransitionsetInDuration in interface HasInOutDurationTransitionpublic int getInDuration()
HasInOutDurationTransitiongetInDuration in interface HasInOutDurationTransitionpublic void setOutDuration(int outDuration)
HasInOutDurationTransitionsetOutDuration in interface HasInOutDurationTransitionpublic int getOutDuration()
HasInOutDurationTransitiongetOutDuration in interface HasInOutDurationTransitionpublic void setDismissible(boolean dismissible)
HasDismissiblesetDismissible in interface HasDismissiblepublic boolean isDismissible()
isDismissible in interface HasDismissiblepublic void setOpacity(double opacity)
setOpacity in interface HasOpacitysetOpacity in class MaterialWidgetpublic double getOpacity()
getOpacity in interface HasOpacitygetOpacity in class MaterialWidgetpublic void setEnabled(boolean enabled)
setEnabled in interface com.google.gwt.user.client.ui.HasEnabledsetEnabled in class MaterialWidgetpublic void setFullscreen(boolean value)
setFullscreen in interface HasFullscreenpublic boolean isFullscreen()
isFullscreen in interface HasFullscreenpublic void open()
Note: the MaterialModal component must be added to the document before calling this method. When declaring this modal on a UiBinder file, the MaterialModal is already added, but if you call it using pure Java, you must add it to a container before opening the modal. You can do it by calling, for example:
MaterialModal modal = new MaterialModal(); RootPanel.get().add(modal);
IllegalStateException - If the MaterialModal is not added to the documentpublic void open(boolean fireEvent)
Note: the MaterialModal component must be added to the document before calling this method. When declaring this modal on a UiBinder file, the MaterialModal is already added, but if you call it using pure Java, you must add it to a container before opening the modal. You can do it by calling, for example:
MaterialModal modal = new MaterialModal(); RootPanel.get().add(modal);
fireEvent - - Flag whether this component fires Open EventIllegalStateException - If the MaterialModal is not added to the documentprotected void open(com.google.gwt.dom.client.Element e, boolean fireEvent)
e - - Modal ComponentfireEvent - - Flag whether this component fires Open Eventprotected void onNativeOpen(boolean fireEvent)
protected void onNativeClose(boolean autoClosed, boolean fireEvent)
public void close()
close(boolean) with false as parameter.
Note: you may need to remove it MaterialModal from the document if you
are not using UiBinder. See open().
public void close(boolean autoClosed)
Note: you may need to remove it MaterialModal from the document if you
are not using UiBinder. See open().
autoClosed - Flag indicating if the modal was automatically dismissedCloseEventpublic void close(boolean autoClosed, boolean fireEvent)
Note: you may need to remove it MaterialModal from the document if you
are not using UiBinder. See open().
autoClosed - Flag indicating if the modal was automatically dismissedfireEvent - Flag whether this component fires Close EventCloseEventprotected void close(com.google.gwt.dom.client.Element e, boolean autoClosed, boolean fireEvent)
public com.google.gwt.event.shared.HandlerRegistration addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<MaterialModal> handler)
addCloseHandler in interface com.google.gwt.event.logical.shared.HasCloseHandlers<MaterialModal>public com.google.gwt.event.shared.HandlerRegistration addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<MaterialModal> handler)
addOpenHandler in interface com.google.gwt.event.logical.shared.HasOpenHandlers<MaterialModal>protected CssTypeMixin<ModalType,MaterialModal> getTypeMixin()
protected FullscreenMixin getFullscreenMixin()
Copyright © 2018. All rights reserved.