public class MaterialCutOut extends gwt.material.design.client.base.MaterialWidget implements com.google.gwt.event.logical.shared.HasCloseHandlers<MaterialCutOut>, com.google.gwt.event.dom.client.HasClickHandlers, gwt.material.design.client.base.HasCircle
CloseHandlers to be notified when the cut out is closed.
xmlns:ma='urn:import:gwt.material.design.addins.client'
<ma:cutout.MaterialCutOut ui:field="cutOut">
<!-- add any widgets here -->
</ma:cutout.MaterialCutOut>
MaterialCutOut cutOut = ... //create using new or using UiBinder
cutOut.setTarget(myTargetWidget); //the widget or element you want to focus
cutOut.openCutOut(); //shows the modal over the page
material-cutout class, and material-cutout-focus
class for the focus box.
setCircle(boolean) is set to true. This is because of problems on Safari
with box-shadows over rounded borders. To avoid this issue you can disable the circle. Check the
issue 227 for details.gwt.material.design.client.base.MaterialWidget.Featurecom.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Constructor and Description |
|---|
MaterialCutOut() |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<MaterialCutOut> handler) |
void |
closeCutOut()
Closes the cut out.
|
void |
closeCutOut(boolean autoClosed)
Closes the cut out.
|
String |
getAnimationDuration() |
String |
getAnimationTimingFunction() |
String |
getBackgroundColor() |
String |
getBackgroundSize() |
int |
getCutOutPadding() |
double |
getOpacity() |
com.google.gwt.dom.client.Element |
getTargetElement() |
boolean |
isAnimated() |
boolean |
isCircle() |
void |
openCutOut()
Opens the modal cut out taking all the screen.
|
void |
setAnimated(boolean animated)
Enables or disables the open animation of the cut out.
|
void |
setAnimationDuration(String animationDuration)
Sets the animation duration of the opening cut out.
|
void |
setAnimationTimingFunction(String animationTimingFunction)
Sets the animation timing fucntion of the opening cut out.
|
void |
setBackgroundColor(String bgColor) |
void |
setBackgroundSize(String backgroundSize)
Sets the radius size of the Cut Out background.
|
void |
setCircle(boolean circle)
Sets if the cut out should be rendered as a circle or a simple rectangle.
|
void |
setCutOutPadding(int cutOutPadding)
Sets the padding in pixels of the cut out focus in relation to the target
element.
|
void |
setOpacity(double opacity) |
void |
setTarget(com.google.gwt.dom.client.Element targetElement)
Sets the target element to be focused by the cut out.
|
void |
setTarget(com.google.gwt.user.client.ui.Widget widget)
Sets the target widget to be focused by the cut out.
|
protected void |
setupComputedBackgroundColor()
Gets the computed background color, based on the backgroundColor CSS
class.
|
protected void |
setupCutOutPosition(com.google.gwt.dom.client.Element cutOut,
com.google.gwt.dom.client.Element relativeTo,
int padding,
boolean circle)
Setups the cut out position when the screen changes size or is scrolled.
|
protected void |
setupTransition() |
protected void |
setupWindowHandlers()
Configures a resize handler and a scroll handler on the window to
properly adjust the Cut Out.
|
add, add, clearActiveClass, enableFeature, getCenterOn, getCenterOnMixin, getCircleMixin, getColorsMixin, getDataAttribute, getDepth, getEnabledMixin, getFlexboxMixin, getFloat, getFloatMixin, getFocusableMixin, getFontSize, getFontSizeMixin, getFontWeight, getFontWeightMixin, getGridMixin, getHideOn, getHideOnMixin, getHoverableMixin, getId, getIdMixin, getInitialClasses, getScrollspy, getScrollspyMixin, getSeparatorMixin, getShadow, getShadowMixin, getShowOn, getShowOnMixin, getTabIndex, getTextAlign, getTextAlignMixin, getTextColor, getTooltip, getTooltipDelayMs, getTooltipMixin, getTooltipPosition, getTruncateMixin, getWaves, getWavesMixin, getWidth, getWidth, insert, insert, isEnabled, isFeatureEnabled, isHoverable, isSeparator, onLoad, setAccessKey, setBottom, setCenterOn, setDataAttribute, setDepth, setDisplay, setEnabled, setFlex, setFlexAlignContent, setFlexAlignItems, setFlexAlignSelf, setFlexBasis, setFlexDirection, setFlexGrow, setFlexJustifyContent, setFlexOrder, setFlexShrink, setFlexWrap, setFloat, setFocus, setFontSize, setFontSize, setFontWeight, setGrid, setGwtDisplay, setHideOn, setHoverable, setId, setInitialClasses, setLayoutPosition, setLeft, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setOffset, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setRight, setScrollspy, setSeparator, setShadow, setShowOn, setTabIndex, setTextAlign, setTextColor, setTooltip, setTooltipDelayMs, setTooltipPosition, setTop, setTruncate, setVisibility, setWaves, stopTouchStartEvent, stopTouchStartEventadd, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, 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, onUnload, 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, waitforEach, spliteratorpublic MaterialCutOut()
public void setBackgroundColor(String bgColor)
setBackgroundColor in interface gwt.material.design.client.base.HasColorssetBackgroundColor in class gwt.material.design.client.base.MaterialWidgetpublic String getBackgroundColor()
getBackgroundColor in interface gwt.material.design.client.base.HasColorsgetBackgroundColor in class gwt.material.design.client.base.MaterialWidgetpublic void setOpacity(double opacity)
setOpacity in interface gwt.material.design.client.base.HasOpacitysetOpacity in class gwt.material.design.client.base.MaterialWidgetpublic double getOpacity()
getOpacity in interface gwt.material.design.client.base.HasOpacitygetOpacity in class gwt.material.design.client.base.MaterialWidgetpublic String getAnimationDuration()
public void setAnimationDuration(String animationDuration)
animationDuration - The duration in CSS time unit, such as s and ms.public String getAnimationTimingFunction()
public void setAnimationTimingFunction(String animationTimingFunction)
animationTimingFunction - The speed curve of the animation, such as ease (the default), linear and
ease-in-outpublic void setCircle(boolean circle)
false (is a rectangle).setCircle in interface gwt.material.design.client.base.HasCirclesetCircle in class gwt.material.design.client.base.MaterialWidgetpublic boolean isCircle()
isCircle in interface gwt.material.design.client.base.HasCircleisCircle in class gwt.material.design.client.base.MaterialWidgetpublic void setCutOutPadding(int cutOutPadding)
public int getCutOutPadding()
public void setTarget(com.google.gwt.dom.client.Element targetElement)
public void setTarget(com.google.gwt.user.client.ui.Widget widget)
setTarget(Element)public com.google.gwt.dom.client.Element getTargetElement()
public void setAnimated(boolean animated)
true.public boolean isAnimated()
public void setBackgroundSize(String backgroundSize)
backgroundSize - The size of the background of the Cut Out. You can use any supported
CSS unit for box shadows, such as rem and px.public String getBackgroundSize()
public void openCutOut()
IllegalStateException - if the target element is null#setTargetElement(Element)public void closeCutOut()
closeCutOut(boolean) with false.public void closeCutOut(boolean autoClosed)
autoClosed - Notifies with the modal was auto closed or closed by user actionprotected void setupCutOutPosition(com.google.gwt.dom.client.Element cutOut, com.google.gwt.dom.client.Element relativeTo, int padding, boolean circle)
protected void setupWindowHandlers()
protected void setupTransition()
protected void setupComputedBackgroundColor()
public com.google.gwt.event.shared.HandlerRegistration addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<MaterialCutOut> handler)
addCloseHandler in interface com.google.gwt.event.logical.shared.HasCloseHandlers<MaterialCutOut>public com.google.gwt.event.shared.HandlerRegistration addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
addClickHandler in interface com.google.gwt.event.dom.client.HasClickHandlersCopyright © 2016. All rights reserved.