public class MaterialDatePicker extends AbstractValueWidget<Date> implements JsLoader, HasPlaceholder, com.google.gwt.event.logical.shared.HasOpenHandlers<MaterialDatePicker>, com.google.gwt.event.logical.shared.HasCloseHandlers<MaterialDatePicker>, HasIcon, HasReadOnly
<m:MaterialDatePicker ui:field="datePicker">
datePicker.setDate(new Date());
| Modifier and Type | Class and Description |
|---|---|
static class |
MaterialDatePicker.MaterialDatePickerType
Enum for identifying various selection types for the picker.
|
MaterialWidget.Featurecom.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabledcom.google.gwt.editor.client.Editor.Ignore, com.google.gwt.editor.client.Editor.Path| Modifier and Type | Field and Description |
|---|---|
protected com.google.gwt.dom.client.Element |
pickatizedDateInput |
$this| Constructor and Description |
|---|
MaterialDatePicker() |
MaterialDatePicker(String placeholder) |
MaterialDatePicker(String placeholder,
Date value) |
MaterialDatePicker(String placeholder,
Date value,
MaterialDatePicker.MaterialDatePickerType selectionType) |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<MaterialDatePicker> handler) |
com.google.gwt.event.shared.HandlerRegistration |
addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<MaterialDatePicker> handler) |
void |
clear() |
void |
clearErrorOrSuccess()
Clear the error or success states.
|
void |
clearValues()
Deprecated.
|
void |
close()
Programmatically close the date picker component
|
DatePickerContainer |
getContainer() |
Date |
getDate() |
DateInput |
getDateInput() |
Date |
getDateMax()
Get the maximum date limit.
|
Date |
getDateMin()
Get the minimum date limit.
|
MaterialLabel |
getErrorLabel() |
protected ErrorMixin<AbstractValueWidget,MaterialLabel> |
getErrorMixin() |
String |
getFormat() |
MaterialIcon |
getIcon()
Get the icon widget.
|
Color |
getIconColor()
Get the color of the icon
|
Label |
getLabel() |
DatePickerLanguage |
getLanguage() |
Orientation |
getOrientation() |
protected JsMaterialElement |
getPicker() |
protected Date |
getPickerDate()
Get the pickers date.
|
String |
getPickerId() |
com.google.gwt.dom.client.Element |
getPickerRootElement() |
String |
getPlaceholder() |
MaterialLabel |
getPlaceholderLabel() |
protected ReadOnlyMixin<MaterialDatePicker,DateInput> |
getReadOnlyMixin() |
MaterialDatePicker.MaterialDatePickerType |
getSelectionType()
Get the pickers selection type.
|
int |
getTabIndex() |
Date |
getValue() |
int |
getYearsToDisplay() |
boolean |
isAutoClose() |
boolean |
isEnabled() |
boolean |
isIconPrefix()
Is the icon prefix in the container.
|
boolean |
isOpen() |
boolean |
isReadOnly() |
boolean |
isToggleReadOnly() |
void |
load() |
protected void |
onClose() |
protected void |
onLoad() |
protected void |
onOpen() |
void |
onUnload() |
void |
open()
Programmatically open the date picker component
|
void |
reload() |
protected void |
select() |
void |
setAutoClose(boolean autoClose)
Enables or disables auto closing when selecting a date.
|
void |
setContainer(DatePickerContainer container)
Set the Root Picker Container (Default : SELF)
|
void |
setDate(Date date)
Sets the current date of the picker.
|
void |
setDateMax(Date dateMax)
Set the maximum date limit.
|
void |
setDateMin(Date dateMin)
Set the minimum date limit.
|
void |
setDateSelectionType(MaterialDatePicker.MaterialDatePickerType type)
Deprecated.
|
void |
setEnabled(boolean enabled) |
void |
setError(String error)
Errors occur when an app fails to complete what is expected, such as:
- The app does not understand user input
- The system or app fails
- A user intends to run incompatible operations concurrently
|
void |
setFormat(String format)
To call before initialization.
|
void |
setIconColor(Color iconColor)
Sets the color of the icon.
|
void |
setIconFontSize(double size,
com.google.gwt.dom.client.Style.Unit unit)
Set the font size of the icon.
|
void |
setIconPosition(IconPosition position)
Set the position of the icon.
|
void |
setIconPrefix(boolean prefix)
Make the icon prefix in its container.
|
void |
setIconSize(IconSize size)
Size of icon.
|
void |
setIconType(IconType iconType)
Set Material Design icon.
|
void |
setLanguage(DatePickerLanguage language) |
void |
setOrientation(Orientation orientation) |
void |
setPickerDate(com.google.gwt.core.client.JsDate date,
com.google.gwt.dom.client.Element picker)
Set the pickers date.
|
void |
setPlaceholder(String placeholder) |
protected void |
setPopupEnabled(boolean enabled) |
void |
setReadOnly(boolean value) |
void |
setSelectionType(MaterialDatePicker.MaterialDatePickerType selectionType)
Set the pickers selection type.
|
void |
setSelectionType(MaterialDatePicker.MaterialDatePickerType selectionType,
int yearsToDisplay)
Set the pickers selection type with the ability to set the number of years to display
in the dropdown list.
|
void |
setSuccess(String success)
Set the success message marking a widget as success.
|
void |
setTabIndex(int index) |
void |
setToggleReadOnly(boolean toggle) |
protected void |
setupLanguage(DatePickerLanguage language) |
void |
setValue(Date value) |
void |
setValue(Date value,
boolean fireEvents) |
void |
setYearsToDisplay(int yearsToDisplay)
Ability to set the number of years to display
in the dropdown list.
|
void |
stop()
Deprecated.
|
void |
unload() |
addValidationChangedHandler, addValidator, addValueChangeHandler, createBlankValidator, getErrorHandler, getErrorHandlerMixin, getErrorHandlerType, getValidatorMixin, isAllowBlank, isValidateOnBlur, removeValidator, reset, setAllowBlank, setErrorHandler, setErrorHandlerType, setHelperText, setupBlurValidation, setValidateOnBlur, setValidators, setValue, showErrors, validate, validate$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, getOpacity, getOrientationMixin, getPerspective, getPerspectiveOrigin, getScrollspy, getScrollspyMixin, getSeparatorMixin, getShadow, getShadowMixin, getShowOn, getShowOnMixin, getTextAlign, getTextAlignMixin, getTextColor, getTooltip, getTooltipDelayMs, getTooltipHTML, getTooltipMixin, getTooltipPosition, getTransform, getTransformMixin, getTransformOrigin, getTransformStyle, getTruncateMixin, getVerticalAlign, getVerticalAlignMixin, getWaves, getWavesMixin, getWidth, insert, insert, isCircle, isDetectOrientation, isFeatureEnabled, isHoverable, isSeparator, isTruncate, 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, setOpacity, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPerspective, setPerspectiveOrigin, setRight, setScrollspy, setSeparator, setShadow, setShowOn, setStyle, setTextAlign, setTextColor, setTooltip, setTooltipDelayMs, setTooltipHTML, setTooltipPosition, setTop, setTransform, setTransformOrigin, setTransformStyle, setTransition, setTruncate, setVerticalAlign, setVisibility, setWaves, stopTouchStartEvent, windowadd, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, remove, removeadd, adopt, 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, spliteratorprotected com.google.gwt.dom.client.Element pickatizedDateInput
public MaterialDatePicker()
public MaterialDatePicker(String placeholder)
public MaterialDatePicker(String placeholder, Date value)
public MaterialDatePicker(String placeholder, Date value, MaterialDatePicker.MaterialDatePickerType selectionType)
protected void onLoad()
onLoad in class MaterialWidgetpublic void onUnload()
onUnload in class MaterialWidget@Deprecated public void setDateSelectionType(MaterialDatePicker.MaterialDatePickerType type)
setSelectionType(MaterialDatePickerType)type - public String getPickerId()
public com.google.gwt.dom.client.Element getPickerRootElement()
public void setDate(Date date)
date - - must not be nullpublic Date getDateMin()
public void setDateMin(Date dateMin)
public Date getDateMax()
public void setDateMax(Date dateMax)
public void setPickerDate(com.google.gwt.core.client.JsDate date, com.google.gwt.dom.client.Element picker)
protected Date getPickerDate()
protected JsMaterialElement getPicker()
public String getPlaceholder()
getPlaceholder in interface HasPlaceholderpublic void setPlaceholder(String placeholder)
setPlaceholder in interface HasPlaceholderpublic MaterialDatePicker.MaterialDatePickerType getSelectionType()
public void setSelectionType(MaterialDatePicker.MaterialDatePickerType selectionType)
public void setSelectionType(MaterialDatePicker.MaterialDatePickerType selectionType, int yearsToDisplay)
public void setOrientation(Orientation orientation)
setOrientation in interface HasOrientationsetOrientation in class MaterialWidgetpublic Orientation getOrientation()
getOrientation in interface HasOrientationgetOrientation in class MaterialWidgetpublic void setError(String error)
HasErrorsetError in interface HasErrorsetError in class AbstractValueWidget<Date>public void setSuccess(String success)
HasErrorsetSuccess in interface HasErrorsetSuccess in class AbstractValueWidget<Date>public void clearErrorOrSuccess()
HasErrorclearErrorOrSuccess in interface HasErrorclearErrorOrSuccess in class AbstractValueWidget<Date>public void setValue(Date value, boolean fireEvents)
setValue in interface com.google.gwt.user.client.ui.HasValue<Date>setValue in class AbstractValueWidget<Date>public void setValue(Date value)
setValue in interface com.google.gwt.user.client.TakesValue<Date>setValue in interface com.google.gwt.user.client.ui.HasValue<Date>setValue in class AbstractValueWidget<Date>public void setEnabled(boolean enabled)
setEnabled in interface com.google.gwt.user.client.ui.HasEnabledsetEnabled in class MaterialWidgetpublic boolean isEnabled()
isEnabled in interface com.google.gwt.user.client.ui.HasEnabledisEnabled in class MaterialWidgetpublic void setTabIndex(int index)
setTabIndex in interface com.google.gwt.user.client.ui.FocusablesetTabIndex in class MaterialWidgetpublic int getTabIndex()
getTabIndex in interface com.google.gwt.user.client.ui.FocusablegetTabIndex in class MaterialWidgetpublic DatePickerLanguage getLanguage()
public void setLanguage(DatePickerLanguage language)
protected void setupLanguage(DatePickerLanguage language)
public MaterialIcon getIcon()
HasIconpublic void setIconType(IconType iconType)
HasIconsetIconType in interface HasIconpublic void setIconPosition(IconPosition position)
HasIconsetIconPosition in interface HasIconpublic void setIconSize(IconSize size)
HasIconsetIconSize in interface HasIconpublic void setIconFontSize(double size, com.google.gwt.dom.client.Style.Unit unit)
HasIconsetIconFontSize in interface HasIconpublic void setIconColor(Color iconColor)
HasIconsetIconColor in interface HasIconpublic Color getIconColor()
HasIcongetIconColor in interface HasIconpublic void setIconPrefix(boolean prefix)
HasIconsetIconPrefix in interface HasIconpublic boolean isIconPrefix()
HasIconisIconPrefix in interface HasIconpublic void setReadOnly(boolean value)
setReadOnly in interface HasReadOnlypublic boolean isReadOnly()
isReadOnly in interface HasReadOnlypublic void setToggleReadOnly(boolean toggle)
setToggleReadOnly in interface HasReadOnlypublic boolean isToggleReadOnly()
isToggleReadOnly in interface HasReadOnlypublic DateInput getDateInput()
public boolean isAutoClose()
public void setAutoClose(boolean autoClose)
public int getYearsToDisplay()
public void setYearsToDisplay(int yearsToDisplay)
public DatePickerContainer getContainer()
public void setContainer(DatePickerContainer container)
public MaterialLabel getPlaceholderLabel()
public MaterialLabel getErrorLabel()
public void close()
public void open()
public boolean isOpen()
protected void select()
protected void onClose()
protected void onOpen()
@Deprecated public void clearValues()
clear()@Deprecated public void stop()
unload()public void clear()
clear in interface com.google.gwt.user.client.ui.HasWidgetsclear in class com.google.gwt.user.client.ui.Panelprotected void setPopupEnabled(boolean enabled)
public com.google.gwt.event.shared.HandlerRegistration addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<MaterialDatePicker> handler)
addCloseHandler in interface com.google.gwt.event.logical.shared.HasCloseHandlers<MaterialDatePicker>public com.google.gwt.event.shared.HandlerRegistration addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<MaterialDatePicker> handler)
addOpenHandler in interface com.google.gwt.event.logical.shared.HasOpenHandlers<MaterialDatePicker>protected ErrorMixin<AbstractValueWidget,MaterialLabel> getErrorMixin()
getErrorMixin in class AbstractValueWidget<Date>protected ReadOnlyMixin<MaterialDatePicker,DateInput> getReadOnlyMixin()
Copyright © 2018. All rights reserved.