|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.core.RefDataClass
com.smartgwt.client.widgets.form.fields.FormItem
com.smartgwt.client.widgets.form.fields.StaticTextItem
com.smartgwt.client.widgets.form.fields.MiniDateRangeItem
public class MiniDateRangeItem
Provides a compact interface for editing a date range, by providing a formatted, read-only display of the current selected date range with an icon to launch a DateRangeDialog to edit the range.
| Field Summary |
|---|
| Fields inherited from class com.smartgwt.client.core.JsObject |
|---|
jsObj |
| Constructor Summary | |
|---|---|
MiniDateRangeItem()
|
|
MiniDateRangeItem(JavaScriptObject jsObj)
|
|
MiniDateRangeItem(String name)
|
|
MiniDateRangeItem(String name,
String title)
|
|
| Method Summary | |
|---|---|
Boolean |
allowRelativeDates()
Whether the DateRangeDialog opened when the pickerIcon is clicked should display RelativeDateItems or DateItems. |
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. |
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. |
Date |
getFromDate()
Initial value for the "from" date. |
String |
getFromDateOnlyPrefix()
The text to prepend to the formatted date when only a fromDate is supplied. |
static MiniDateRangeItem |
getOrCreateRef(JavaScriptObject jsObj)
|
FormItemIcon |
getPickerIcon()
Icon that launches a DateChooser for choosing an absolute date. |
String |
getPickerIconPrompt()
The prompt to show when the mouse is hovered over the pickerIcon. |
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 |
String |
getTextBoxStyle()
Base CSS class name for a form item's text box element. |
Date |
getToDate()
Initial value for the "to" date. |
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. |
Boolean |
hasAdvancedCriteria()
Overridden to return true: dateRangeItems always generate AdvancedCriteria. |
void |
setAutoValidate(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(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. |
void |
setFromDate(Date fromDate)
Initial value for the "from" date. |
void |
setFromDateOnlyPrefix(String fromDateOnlyPrefix)
The text to prepend to the formatted date when only a fromDate is supplied. |
void |
setJavaScriptObject(JavaScriptObject jsObj)
|
void |
setPickerIcon(FormItemIcon pickerIcon)
Icon that launches a DateChooser for choosing an absolute date. |
void |
setPickerIconPrompt(String pickerIconPrompt)
The prompt to show when the mouse is hovered over the pickerIcon. |
void |
setShouldSaveValue(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(String textBoxStyle)
Base CSS class name for a form item's text box element. |
void |
setToDate(Date toDate)
Initial value for the "to" date. |
void |
setToDateOnlyPrefix(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. |
| Methods inherited from class com.smartgwt.client.widgets.form.fields.StaticTextItem |
|---|
getClipValue, getDateFormatter, getEscapeHTML, getWrap, setClipValue, setDateFormatter, setEscapeHTML, setWrap |
| Methods inherited from class com.smartgwt.client.core.RefDataClass |
|---|
getRef, getRef |
| Methods inherited from class com.smartgwt.client.core.DataClass |
|---|
doAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute |
| Methods inherited from class com.smartgwt.client.core.JsObject |
|---|
setJsObj |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public MiniDateRangeItem()
public MiniDateRangeItem(JavaScriptObject jsObj)
public MiniDateRangeItem(String name)
public MiniDateRangeItem(String name,
String title)
| Method Detail |
|---|
public static MiniDateRangeItem getOrCreateRef(JavaScriptObject jsObj)
public void setJavaScriptObject(JavaScriptObject jsObj)
setJavaScriptObject in class StaticTextItempublic void setAutoValidate(Boolean autoValidate)
"OK"-click, and refuse to dismiss if these items contain invalid values.
autoValidate
autoValidate - New auto-validate setting.. Default value is truepublic Boolean getAutoValidate()
"OK"-click, and refuse to dismiss if these items contain invalid values.
public void setCanFocus(Boolean canFocus)
setCanFocus in class FormItemcanFocus - canFocus Default value is trueFocus overview and related methodspublic 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 - 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(String fromDateOnlyPrefix)
fromDate is supplied.
fromDateOnlyPrefix - . See String. Default value is "Since"public String getFromDateOnlyPrefix()
fromDate is supplied.
Stringpublic void setPickerIcon(FormItemIcon pickerIcon)
DateChooser for choosing an absolute date.
pickerIcon - pickerIcon Default value is nullpublic FormItemIcon getPickerIcon()
DateChooser for choosing an absolute date.
public void setPickerIconPrompt(String pickerIconPrompt)
pickerIcon.
setPickerIconPrompt in class FormItempickerIconPrompt - . See String. Default value is "Show Date Chooser"public String getPickerIconPrompt()
pickerIcon.
getPickerIconPrompt in class FormItemStringpublic void setShouldSaveValue(Boolean shouldSaveValue)
DynamicForm.getValuesAsCriteria is called, for the
criterion to be included in the returned AdvancedCriteria object
setShouldSaveValue in class FormItemshouldSaveValue - shouldSaveValue Default value is truepublic Boolean getShouldSaveValue()
DynamicForm.getValuesAsCriteria is called, for the
criterion to be included in the returned AdvancedCriteria object
getShouldSaveValue in class FormItempublic void setTextBoxStyle(String textBoxStyle)
NOTE: See the CompoundFormItem_skinning discussion
for special skinning considerations.
setTextBoxStyle in class StaticTextItemtextBoxStyle - . See FormItemBaseStyle. Default value is "textItem"FormItem.setCellStyle(java.lang.String),
Appearance overview and related methodspublic String getTextBoxStyle()
NOTE: See the CompoundFormItem_skinning discussion
for special skinning considerations.
getTextBoxStyle in class StaticTextItemFormItemBaseStyleFormItem.getCellStyle(),
Appearance overview and related methodspublic void setToDateOnlyPrefix(String toDateOnlyPrefix)
toDate is supplied.
toDateOnlyPrefix - . See String. Default value is "Before"public String getToDateOnlyPrefix()
toDate is supplied.
Stringpublic Boolean allowRelativeDates()
pickerIcon is clicked should display RelativeDateItems or DateItems.
public Boolean hasAdvancedCriteria()
hasAdvancedCriteria in class FormItemCriteriaEditing overview and related methodspublic void setFromDate(Date fromDate)
fromDate for this DateRangeItem.
fromDate - the date from which this item should start it's range. Default value is todaypublic Date getFromDate()
public void setToDate(Date toDate)
toDate for this DateRangeItem.
toDate - the date at which this item should end it's range. Default value is todaypublic Date getToDate()
public DateRange getValue()
DateRange object that excludes start and end values if they aren't set.
getValue in class FormItempublic 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||