org.odftoolkit.simple.form
Class DateField
java.lang.Object
org.odftoolkit.simple.Component
org.odftoolkit.simple.form.FormControl
org.odftoolkit.simple.form.Field
org.odftoolkit.simple.form.DateField
public class DateField
- extends Field
This class represents a date field of form.
Method Summary |
void |
formatDate(String formatStr,
Locale locale)
Format the date value according to the appointed format and locale. |
String |
getDateFormat()
Get the format code which is used to format the display value |
static DateField |
getInstanceOf(FormFormattedTextElement element)
Get an instance of date field by an instance of FormFormattedTextElement,
while searching the document content to make a bind with the DrawControl
which already reference to this date field. |
void |
setDropDownVisible(boolean isVisible)
Set the visibility of the drop-down button. |
Methods inherited from class org.odftoolkit.simple.form.Field |
getCurrentValue, getFormatString, getId, getName, getSimpleIterator, getValue, setControlImplementation, setCurrentValue, setFormatString, setId, setName, setSpinButonVisible, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstanceOf
public static DateField getInstanceOf(FormFormattedTextElement element)
- Get an instance of date field by an instance of FormFormattedTextElement,
while searching the document content to make a bind with the DrawControl
which already reference to this date field.
- Parameters:
element
- - an instance of FormFormattedTextElement
- Returns:
- an instance of date field
setDropDownVisible
public void setDropDownVisible(boolean isVisible)
- Set the visibility of the drop-down button.
- Parameters:
isVisible
- - the visibility of drop-down button.
formatDate
public void formatDate(String formatStr,
Locale locale)
- Format the date value according to the appointed format and locale.
- Parameters:
formatStr
- - format codelocale
- - locale information
getDateFormat
public String getDateFormat()
- Get the format code which is used to format the display value
- Returns:
- the format code
Copyright © 2010-2017 The Apache Software Foundation. All Rights Reserved.