public class DateDocument extends PlainDocument implements Internationalization
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DateDocument.DateFormatCache |
protected static class |
DateDocument.DateFormatCacheKey |
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement| Modifier and Type | Field and Description |
|---|---|
protected Date |
currentDate |
protected Timestamp |
currentTimestamp |
protected SimpleDateFormat |
dateFormat |
protected String |
datePattern |
static boolean |
DEBUG |
protected static Locale |
defaultLocale |
protected static SimpleDateFormat |
dfConstructor |
protected Date |
insertedDate |
protected Locale |
locale |
lineLimitAttribute, tabSizeAttributeBAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementNameDEBUG_LANGUAGEStreamDescriptionProperty, TitleProperty| Constructor and Description |
|---|
DateDocument() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildPattern() |
void |
format() |
Date |
getDate() |
String |
getDatePattern() |
SimpleDateFormat |
getFormat() |
Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated.
|
Timestamp |
getTimestampValue() |
protected Timestamp |
getTimestampValue(String date) |
void |
insertString(int offset,
String sValue,
AttributeSet attributes)
Date pattern is known:
- Non numeric characters are allowed. |
protected void |
insertStringWithoutCheck(int offset,
String sValue,
AttributeSet attributes) |
boolean |
isValid() |
protected boolean |
isValid(String date) |
void |
setComponentLocale(Locale l) |
void |
setDatePattern(String newPattern) |
void |
setResourceBundle(ResourceBundle resources)
Sets the language resource bundle.
|
void |
setValue(Date value) |
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdateaddDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlockpublic static boolean DEBUG
protected static SimpleDateFormat dfConstructor
protected static Locale defaultLocale
protected SimpleDateFormat dateFormat
protected String datePattern
protected Date insertedDate
protected Date currentDate
protected Timestamp currentTimestamp
protected Locale locale
public void setValue(Date value)
public Timestamp getTimestampValue()
public SimpleDateFormat getFormat()
public void format()
protected void buildPattern()
public void setDatePattern(String newPattern)
public String getDatePattern()
public Date getDate()
public boolean isValid()
protected boolean isValid(String date)
public void insertString(int offset,
String sValue,
AttributeSet attributes)
throws BadLocationException
insertString in interface DocumentinsertString in class PlainDocumentBadLocationExceptionprotected void insertStringWithoutCheck(int offset,
String sValue,
AttributeSet attributes)
throws BadLocationException
BadLocationExceptionpublic Vector getTextsToTranslate()
InternationalizationgetTextsToTranslate in interface Internationalizationpublic void setResourceBundle(ResourceBundle resources)
InternationalizationsetResourceBundle in interface Internationalizationresources - the new language bundle.public void setComponentLocale(Locale l)
setComponentLocale in interface InternationalizationCopyright © 2016 Imatia Innovation S.L.. All rights reserved.