/** * Allow miniDateRangeItems' values to show up in the form's values array, or if {@link * com.smartgwt.client.widgets.form.DynamicForm#getValuesAsCriteria DynamicForm.getValuesAsCriteria} is called, for the * criterion to be included in the returned AdvancedCriteria object * * * @return Boolean */ public Boolean getShouldSaveValue() { return getAttributeAsBoolean("shouldSaveValue"); }
/** * The prompt to show when the mouse is hovered over the {@link * com.smartgwt.client.widgets.form.fields.MiniDateRangeItem#getPickerIcon pickerIcon}. * * * @return String */ public String getPickerIconPrompt() { return getAttributeAsString("pickerIconPrompt"); }
public MiniDateRangeItem(String name, String title) { setName(name); setTitle(title); setAttribute("editorType", "MiniDateRangeItem"); }
public MiniDateRangeItem(String name) { setName(name); setAttribute("editorType", "MiniDateRangeItem"); }
/** * Initial value for the "from" date. * * * @return java.util.Date */ public java.util.Date getFromDate() { if(!isCreated()) { return getAttributeAsDate("fromDate"); } else { DateRange dateRange = getValue(); return dateRange == null ? null : dateRange.getStartDate(); } }
/** * Initial value for the "from" date. * Sets the {@link DateRangeItem#getFromDate fromDate} for this DateRangeItem. * * @param fromDate the date from which this item should start it's range. Default value is today */ public void setFromDate(java.util.Date fromDate) { setAttribute("fromDate", fromDate); }
/** * Icon that launches a {@link com.smartgwt.client.widgets.DateChooser} for choosing an absolute date. * * * @return FormItemIcon */ public FormItemIcon getPickerIcon() { return new FormItemIcon(getAttributeAsJavaScriptObject("pickerIcon")); }
public static MiniDateRangeItem getOrCreateRef(JavaScriptObject jsObj) { if(jsObj == null) return null; RefDataClass obj = RefDataClass.getRef(jsObj); if(obj != null) { obj.setJsObj(jsObj); return (MiniDateRangeItem) obj; } else { return new MiniDateRangeItem(jsObj); } }
/** * Format for displaying dates in to the user. Defaults to the system-wide default established by * setDefaultDisplayFormat. <P> 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 <code>Month date1 * - date2, Year</code> and, if in different months of the same year, <code>Month1 date1 - Month2 date2, Year</code>. * * * @return DateDisplayFormat */ public DateDisplayFormat getDateDisplayFormat() { return EnumUtil.getEnum(DateDisplayFormat.values(), getAttribute("dateDisplayFormat")); }
/** * Initial value for the "to" date. * * * @return java.util.Date */ public java.util.Date getToDate() { if(!isCreated()) { return getAttributeAsDate("toDate"); } else { DateRange dateRange = getValue(); return dateRange == null ? null : dateRange.getEndDate(); } }
/** * Initial value for the "to" date. * Sets the {@link DateRangeItem#getToDate toDate} for this DateRangeItem. * * @param toDate the date at which this item should end it's range. Default value is today */ public void setToDate(java.util.Date toDate) { setAttribute("toDate", toDate); }
/** * Base CSS class name for a form item's text box element. <P> NOTE: See the {@link CompoundFormItem_skinning} discussion * for special skinning considerations. * * @param textBoxStyle textBoxStyle Default value is "textItem" * @see com.smartgwt.client.widgets.form.fields.FormItem#setCellStyle * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setTextBoxStyle(String textBoxStyle) { setAttribute("textBoxStyle", textBoxStyle); }
/** * Base CSS class name for a form item's text box element. <P> NOTE: See the {@link CompoundFormItem_skinning} discussion * for special skinning considerations. * * * @return String * @see com.smartgwt.client.widgets.form.fields.FormItem#getCellStyle * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public String getTextBoxStyle() { return getAttributeAsString("textBoxStyle"); }
public MiniDateRangeItem(){ setAttribute("editorType", "MiniDateRangeItem"); }
/** * The prompt to show when the mouse is hovered over the {@link * com.smartgwt.client.widgets.form.fields.MiniDateRangeItem#getPickerIcon pickerIcon}. * * @param pickerIconPrompt pickerIconPrompt Default value is "Show Date Chooser" */ public void setPickerIconPrompt(String pickerIconPrompt) { setAttribute("pickerIconPrompt", pickerIconPrompt); }
/** * Allow miniDateRangeItems' values to show up in the form's values array, or if {@link * com.smartgwt.client.widgets.form.DynamicForm#getValuesAsCriteria DynamicForm.getValuesAsCriteria} is called, for the * criterion to be included in the returned AdvancedCriteria object * * @param shouldSaveValue shouldSaveValue Default value is true */ public void setShouldSaveValue(Boolean shouldSaveValue) { setAttribute("shouldSaveValue", shouldSaveValue); }
/** * Format for displaying dates in to the user. Defaults to the system-wide default established by * setDefaultDisplayFormat. <P> 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 <code>Month date1 * - date2, Year</code> and, if in different months of the same year, <code>Month1 date1 - Month2 date2, Year</code>. * * @param dateDisplayFormat dateDisplayFormat Default value is null */ public void setDateDisplayFormat(DateDisplayFormat dateDisplayFormat) { setAttribute("dateDisplayFormat", dateDisplayFormat.getValue()); }
/** * Icon that launches a {@link com.smartgwt.client.widgets.DateChooser} for choosing an absolute date. * * @param pickerIcon pickerIcon Default value is null */ public void setPickerIcon(FormItemIcon pickerIcon) { setAttribute("pickerIcon", pickerIcon.getJsObj()); }