public class MiniDateRangeItem extends StaticTextItem
DateRangeDialog to edit the range.FormItem.CustomStateGetter, FormItem.StateCustomizerscClassName, warnOnEditorTypeConversion, warnOnEditorTypeConversionDefaultidfactoryCreated, factoryProperties, readOnly| Constructor and Description |
|---|
MiniDateRangeItem() |
MiniDateRangeItem(com.google.gwt.core.client.JavaScriptObject jsObj) |
MiniDateRangeItem(java.lang.String name) |
MiniDateRangeItem(java.lang.String name,
java.lang.String title) |
| Modifier and Type | Method and Description |
|---|---|
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
Changes the defaults for Canvas AutoChildren named
autoChildName. |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
DrawItem defaults)
Changes the defaults for DrawItem AutoChildren named
autoChildName. |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
Changes the defaults for FormItem AutoChildren named
autoChildName. |
static void |
changePickerIconDefaults(FormItemIcon defaults) |
java.lang.Boolean |
getAllowRelativeDates()
Whether the
DateRangeDialog opened when the pickerIcon is clicked should display RelativeDateItems or DateItems. |
java.lang.Boolean |
getAutoValidate()
If this attribute is set to true, the pop up date range dialog will automatically validate the user-entered "to"
and "from" values on
"OK"-click, and refuse to dismiss if these items contain invalid values. |
java.lang.Boolean |
getCanFocus()
MiniDateRangeItems are marked as canFocus:true, and set up with properties such that focus will always go to the icon to
launch the dateRange dialog.
|
DateDisplayFormat |
getDateDisplayFormat()
Format for displaying dates to the user.
|
java.util.Date |
getFromDate()
Initial value for the "from" date.
|
java.lang.String |
getFromDateOnlyPrefix()
The text to prepend to the formatted date when only a
fromDate is supplied. |
static MiniDateRangeItem |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
FormItemIcon |
getPickerIcon()
Icon that launches a
DateChooser for choosing an absolute date. |
java.lang.String |
getPickerIconPrompt()
The prompt to show when the mouse is hovered over the
pickerIcon. |
DateRangeDialog |
getRangeDialog()
Pop-up
DateRangeDialog for entering a date range. |
java.lang.Boolean |
getShouldSaveValue()
Allow miniDateRangeItems' values to show up in the form's values array, or if
DynamicForm.getValuesAsCriteria() is called, for the
criterion to be included in the returned AdvancedCriteria object |
java.lang.String |
getTextBoxStyle()
Base CSS class name for a form item's text box element.
|
java.util.Date |
getToDate()
Initial value for the "to" date.
|
java.lang.String |
getToDateOnlyPrefix()
The text to prepend to the formatted date when only a
toDate is supplied. |
DateRange |
getValue()
Retrieves the current value of this dateRangeItem.
|
java.lang.Boolean |
hasAdvancedCriteria()
Overridden to return true: dateRangeItems always generate AdvancedCriteria.
|
void |
setAllowRelativeDates(java.lang.Boolean allowRelativeDates)
Whether the
DateRangeDialog opened when the pickerIcon is clicked should display RelativeDateItems or DateItems. |
void |
setAutoValidate(java.lang.Boolean autoValidate)
If this attribute is set to true, the pop up date range dialog will automatically validate the user-entered "to"
and "from" values on
"OK"-click, and refuse to dismiss if these items contain invalid values. |
void |
setCanFocus(java.lang.Boolean canFocus)
MiniDateRangeItems are marked as canFocus:true, and set up with properties such that focus will always go to the icon to
launch the dateRange dialog.
|
void |
setCriterionGetter(FormItemCriterionGetter getter)
The default
getCriterion() implementation returns the Criterion entered in the fields shown in the rangeDialog. |
void |
setDateDisplayFormat(DateDisplayFormat dateDisplayFormat)
Format for displaying dates to the user.
|
static void |
setDefaultProperties(MiniDateRangeItem miniDateRangeItemProperties)
Class level method to set the default properties of this class.
|
void |
setFromDate(java.util.Date fromDate)
Initial value for the "from" date.
|
void |
setFromDateOnlyPrefix(java.lang.String fromDateOnlyPrefix)
The text to prepend to the formatted date when only a
fromDate is supplied. |
void |
setPickerIcon(FormItemIcon pickerIcon)
Icon that launches a
DateChooser for choosing an absolute date. |
void |
setPickerIconPrompt(java.lang.String pickerIconPrompt)
The prompt to show when the mouse is hovered over the
pickerIcon. |
void |
setShouldSaveValue(java.lang.Boolean shouldSaveValue)
Allow miniDateRangeItems' values to show up in the form's values array, or if
DynamicForm.getValuesAsCriteria() is called, for the
criterion to be included in the returned AdvancedCriteria object |
void |
setTextBoxStyle(java.lang.String textBoxStyle)
Base CSS class name for a form item's text box element.
|
void |
setToDate(java.util.Date toDate)
Initial value for the "to" date.
|
void |
setToDateOnlyPrefix(java.lang.String toDateOnlyPrefix)
The text to prepend to the formatted date when only a
toDate is supplied. |
void |
setValue(DateRange value)
Sets the value for this dateRangeItem.
|
getApplyAlignToText, getApplyHeightToTextBox, getCanSelectText, getClipValue, getDateFormatter, getEditProxyConstructor, getEscapeHTML, getWrap, setApplyAlignToText, setApplyHeightToTextBox, setCanSelectText, setClipValue, setDateFormatter, setDefaultProperties, setEditProxyConstructor, setEscapeHTML, setWrap_getValue, addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addEditorEnterHandler, addEditorExitHandler, addFocusHandler, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addPendingStatusChangedHandler, addPickerIconClickHandler, addTitleClickHandler, addTitleDoubleClickHandler, addTitleHoverHandler, addValueHoverHandler, addValueIconClickHandler, asSGWTComponent, blurItem, canEditCriterion, clearErrors, clearValue, disable, disableIcon, enable, enableIcon, error, error, errorIfNotCreated, focusInItem, getAccessKey, getAlign, getAllowExpressions, getAlwaysFetchMissingValues, getAriaRole, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsObject, getAttributeAsString, getAutoComplete, getBrowserInputType, getBrowserSpellCheck, getCanEdit, getCanEditOpaqueValues, getCanvasAutoChild, getCellHeight, getCellStyle, getChangeOnKeypress, getClassName, getClipStaticValue, getClipTitle, getConfig, getContainerWidget, getControlStyle, getCriteriaField, getCriterion, getCriterion, getCursorPosition, getCustomState, getDataPath, getDecimalPad, getDecimalPrecision, getDefaultIconSrc, getDisabled, getDisableIconsOnReadOnly, getDisplayField, getDisplayFieldName, getDisplayValue, getDisplayValue, getEditorTypeConfig, getEditPendingCSSText, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getErrors, getExportFormat, getFetchMissingValues, getFieldName, getFilterLocally, getForeignDisplayField, getForm, getFormat, getFormItemAutoChild, getFullDataPath, getGlobalTabIndex, getGridColNum, getGridRowNum, getHeight, getHeightAsString, getHidden, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIcon, getIconHeight, getIconHSpace, getIconPageRect, getIconPrompt, getIconRect, getIconVAlign, getIconWidth, getImageURLPrefix, getImageURLSuffix, getImplicitSave, getImplicitSaveOnBlur, getInputFormat, getLeft, getLoadingDisplayValue, getLocateItemBy, getMultipleValueSeparator, getName, getOperator, getOptionCriteria, getOptionFilterContext, getOptionOperationId, getOriginalValueMessage, getPageLeft, getPageRect, getPageTop, getPicker, getPickerIconHeight, getPickerIconName, getPickerIconProperties, getPickerIconSrc, getPickerIconStyle, getPickerIconWidth, getPixelHeight, getPixelWidth, getPrintTextBoxStyle, getPrintTitleStyle, getPrompt, getReadOnlyDisplay, getReadOnlyHover, getReadOnlyTextBoxStyle, getRect, getRedrawOnChange, getRejectInvalidValueOnChange, getRequired, getRequiredMessage, getRowSpan, getSaveOnEnter, getScClassName, getSelectedRecord, getSelectOnClick, getSelectOnFocus, getShowClippedTitleOnHover, getShowClippedValueOnHover, getShowDeletions, getShowDisabled, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocused, getShowFocusedErrorState, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowOldValueInHover, getShowOverIcons, getShowPending, getShowPickerIcon, getShowRTL, getShowTitle, getShowValueIconOnly, getStartRow, getStaticHeight, getStopOnError, getSupportsCutPasteEvents, getSuppressValueIcon, getSynchronousValidation, getTabIndex, getTextAlign, getTimeFormatter, getTitle, getTitleAlign, getTitleColSpan, getTitleOrientation, getTitleStyle, getTitleVAlign, getTooltip, getTop, getType, getUseDisabledHintStyleForReadOnly, getValidateOnChange, getValidateOnExit, getValidOperators, getVAlign, getValueAsRecordList, getValueDeselectedCSSText, getValueField, getValueFieldName, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getVisible, getVisibleHeight, getVisibleTitleWidth, getVisibleWidth, getWarnOnEditorTypeConversion, getWarnOnEditorTypeConversionDefault, getWidth, getWidthAsString, getWrapTitle, handleWarnOnEditorTypeConversion, hasErrors, hide, hideIcon, invalidateDisplayValueCache, isCreated, isCutEvent, isDisabled, isDrawn, isFocused, isInGrid, isPasteEvent, isVisible, linkToInstanceUponCreate, mapDisplayToValue, mapValueToDisplay, mapValueToDisplay, mapValueToDisplay, redraw, redraw, setAccessKey, setAlign, setAllowExpressions, setAlwaysFetchMissingValues, setAriaRole, setAriaState, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoComplete, setBrowserInputType, setBrowserSpellCheck, setCanEdit, setCanEditCriterionPredicate, setCanEditOpaqueValues, setCellHeight, setCellStyle, setChangeOnKeypress, setClipStaticValue, setClipTitle, setColSpan, setColSpan, setControlStyle, setCriteriaField, setCriterion, setCriterionSetter, setCustomStateGetter, setDataPath, setDecimalPad, setDecimalPrecision, setDefaultIconSrc, setDefaultProperties, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisableIconsOnReadOnly, setDisplayField, setDisplayFormat, setDisplayFormat, setEditorProperties, setEditorType, setEditorType, setEditorType, setEditorValueFormatter, setEditorValueParser, setEditPendingCSSText, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setErrors, setErrors, setExportFormat, setFetchMissingValues, setFilterLocally, setForeignDisplayField, setFormat, setGlobalTabIndex, setHeight, setHeight, setHidden, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverHeight, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setIconDisabled, setIconHeight, setIconHSpace, setIconPrompt, setIcons, setIconVAlign, setIconWidth, setImageURLPrefix, setImageURLSuffix, setImplicitSave, setImplicitSaveOnBlur, setInitHandler, setInputFormat, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setItemValueHoverFormatter, setJavaScriptObject, setLeft, setLoadingDisplayValue, setLocateItemBy, setMultipleValueSeparator, setName, setNullProperty, setOperator, setOptionCriteria, setOptionDataSource, setOptionFilterContext, setOptionOperationId, setOriginalValueMessage, setPickerIconHeight, setPickerIconName, setPickerIconProperties, setPickerIconSrc, setPickerIconStyle, setPickerIconWidth, setPrintTextBoxStyle, setPrintTitleStyle, setPrompt, setProperty, setProperty, setProperty, setProperty, setProperty, setReadOnlyDisplay, setReadOnlyHover, setReadOnlyTextBoxStyle, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRequiredMessage, setRowSpan, setSaveOnEnter, setScClassName, setSelectOnClick, setSelectOnFocus, setShowClippedTitleOnHover, setShowClippedValueOnHover, setShowDeletions, setShowDisabled, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocused, setShowFocusedErrorState, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIfCondition, setShowOldValueInHover, setShowOverIcons, setShowPending, setShowPickerIcon, setShowRTL, setShowTitle, setShowValueIconOnly, setStartRow, setStateCustomizer, setStaticHeight, setStopOnError, setSupportsCutPasteEvents, setSuppressValueIcon, setSynchronousValidation, setTabIndex, setTextAlign, setTimeFormatter, setTitle, setTitleAlign, setTitleColSpan, setTitleHoverFormatter, setTitleOrientation, setTitleStyle, setTitleVAlign, setTooltip, setTop, setType, setUseDisabledHintStyleForReadOnly, setValidateOnChange, setValidateOnExit, setValidators, setValidOperators, setVAlign, setValue, setValue, setValue, setValue, setValue, setValue, setValueDeselectedCSSText, setValueField, setValueFormatter, setValueHoverFormatter, setValueIconHeight, setValueIconLeftPadding, setValueIconMapper, setValueIconRightPadding, setValueIcons, setValueIconSize, setValueIconWidth, setValueMap, setValueMap, setVisible, setWarnOnEditorTypeConversion, setWarnOnEditorTypeConversionDefault, setWidth, setWidth, setWrapTitle, shouldApplyHeightToTextBox, shouldFetchMissingValue, shouldSaveOnEnter, shouldStopKeyPressBubbling, show, showIcon, showPicker, stopHover, storeValue, storeValue, updateState, validate, valueClippedgetRef, getRef, internalSetIDapplyFactoryProperties, doAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, getReadOnly, isFactoryCreated, logConfiguration, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated, setReadOnlypublic MiniDateRangeItem()
public MiniDateRangeItem(com.google.gwt.core.client.JavaScriptObject jsObj)
public MiniDateRangeItem(java.lang.String name)
public MiniDateRangeItem(java.lang.String name,
java.lang.String title)
public static MiniDateRangeItem getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public static void changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
autoChildName.autoChildName - name of an AutoChild to customize the defaults for.defaults - Canvas defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties. For usage tips on this
param, see SGWTProperties.AutoChildUsagepublic static void changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
autoChildName.autoChildName - name of an AutoChild to customize the defaults for.defaults - FormItem defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties. For usage tips on this
param, see SGWTProperties.AutoChildUsagepublic static void changeAutoChildDefaults(java.lang.String autoChildName,
DrawItem defaults)
autoChildName.autoChildName - name of an AutoChild to customize the defaults for.defaults - DrawItem defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties. For usage tips on this
param, see SGWTProperties.AutoChildUsagepublic static void changePickerIconDefaults(FormItemIcon defaults)
public void setAllowRelativeDates(java.lang.Boolean allowRelativeDates)
DateRangeDialog opened when the pickerIcon is clicked should display RelativeDateItems or DateItems.allowRelativeDates - Default value is truepublic java.lang.Boolean getAllowRelativeDates()
DateRangeDialog opened when the pickerIcon is clicked should display RelativeDateItems or DateItems.public void setAutoValidate(java.lang.Boolean autoValidate)
"OK"-click, and refuse to dismiss if these items contain invalid values.
autoValidateautoValidate - New auto-validate setting.. Default value is truepublic java.lang.Boolean getAutoValidate()
"OK"-click, and refuse to dismiss if these items contain invalid values.public void setCanFocus(java.lang.Boolean canFocus)
setCanFocus in class FormItemcanFocus - Default value is trueFocus overview and related methodspublic java.lang.Boolean getCanFocus()
getCanFocus in class FormItemFocus overview and related methodspublic void setDateDisplayFormat(DateDisplayFormat dateDisplayFormat)
If this attribute is unset, the display value is formatted intelligently according to the dates involved. For example, if both dates appear in the same month, the value will be formatted as
Month date1 - date2, Year
and, if in different months of the same year,
Month1 date1 -
Month2 date2, Year.
If either date-value is unset, the display-value is formatted according to fromDateOnlyPrefix and toDateOnlyPrefix.
dateDisplayFormat - Default value is nullpublic DateDisplayFormat getDateDisplayFormat()
If this attribute is unset, the display value is formatted intelligently according to the dates involved. For example, if both dates appear in the same month, the value will be formatted as
Month date1 - date2, Year
and, if in different months of the same year,
Month1 date1 -
Month2 date2, Year.
If either date-value is unset, the display-value is formatted according to fromDateOnlyPrefix and toDateOnlyPrefix.
public void setFromDateOnlyPrefix(java.lang.String fromDateOnlyPrefix)
fromDate is supplied.fromDateOnlyPrefix - Default value is "Since"public java.lang.String getFromDateOnlyPrefix()
fromDate is supplied.public void setPickerIcon(FormItemIcon pickerIcon)
DateChooser for choosing an absolute date.pickerIcon - Default value is nullpublic FormItemIcon getPickerIcon()
DateChooser for choosing an absolute date.public void setPickerIconPrompt(java.lang.String pickerIconPrompt)
pickerIcon.setPickerIconPrompt in class FormItempickerIconPrompt - See HTMLString . Default value is "Show Date Chooser"public java.lang.String getPickerIconPrompt()
pickerIcon.getPickerIconPrompt in class FormItemHTMLStringpublic DateRangeDialog getRangeDialog()
DateRangeDialog for entering a date range.
For an overview of how to use and configure AutoChildren, see Using AutoChildren.
public void setShouldSaveValue(java.lang.Boolean shouldSaveValue)
DynamicForm.getValuesAsCriteria() is called, for the
criterion to be included in the returned AdvancedCriteria objectsetShouldSaveValue in class FormItemshouldSaveValue - Default value is truepublic java.lang.Boolean getShouldSaveValue()
DynamicForm.getValuesAsCriteria() is called, for the
criterion to be included in the returned AdvancedCriteria objectgetShouldSaveValue in class FormItempublic void setTextBoxStyle(java.lang.String textBoxStyle)
NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.
If the
textBoxStyle is changed at runtime, updateState() must be called to update the visual state of this item.
setTextBoxStyle in class StaticTextItemtextBoxStyle - See FormItemBaseStyle . Default value is "textItem"FormItem.setCellStyle(java.lang.String),
Appearance overview and related methodspublic java.lang.String getTextBoxStyle()
NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.
If the
textBoxStyle is changed at runtime, updateState() must be called to update the visual state of this item.
getTextBoxStyle in class StaticTextItemFormItemBaseStyleFormItem.getCellStyle(),
Appearance overview and related methodspublic void setToDateOnlyPrefix(java.lang.String toDateOnlyPrefix)
toDate is supplied.toDateOnlyPrefix - Default value is "Before"public java.lang.String getToDateOnlyPrefix()
toDate is supplied.public java.lang.Boolean hasAdvancedCriteria()
hasAdvancedCriteria in class FormItemCriteriaEditing overview and related methodspublic static void setDefaultProperties(MiniDateRangeItem miniDateRangeItemProperties)
Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.
miniDateRangeItemProperties - properties that should be used as new defaults when instances of this class are createdSGWTPropertiespublic void setFromDate(java.util.Date fromDate)
fromDate for this DateRangeItem.fromDate - the date from which this item should start it's range. Default value is todaypublic java.util.Date getFromDate()
public void setToDate(java.util.Date toDate)
toDate for this DateRangeItem.toDate - the date at which this item should end it's range. Default value is todaypublic java.util.Date getToDate()
public DateRange getValue()
DateRange object that excludes start and end values if they aren't set.public void setValue(DateRange value)
DateRange object
that optionally includes both start and end values.value - the new value for this itempublic void setCriterionGetter(FormItemCriterionGetter getter)
getCriterion() implementation returns the Criterion entered in the fields shown in the rangeDialog. If both dates are entered, a
Criterion with an "and" operator and both "greaterOrEqual" and
"lessOrEqual" sub-criteria will be returned. If either date is omitted, only the "greaterOrEqual" (from date) or
"lessOrEqual" (to date) Criterion is returned.
setCriterionGetter in class FormItemgetter - provides a method to get a criterion object based on this field's current edited value(s).FormItem.setCriterionGetter(com.smartgwt.client.widgets.form.FormItemCriterionGetter),
CriteriaEditing overview and related methods