|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
com.sdm.quasar.client.swing.ui.text.DateFilterDocument
This Document formats a text while editing like a date
with given date format.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.text.AbstractDocument |
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement |
| Field Summary |
| Fields inherited from class javax.swing.text.PlainDocument |
lineLimitAttribute, tabSizeAttribute |
| Fields inherited from class javax.swing.text.AbstractDocument |
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName |
| Fields inherited from interface javax.swing.text.Document |
StreamDescriptionProperty, TitleProperty |
| Constructor Summary | |
DateFilterDocument()
Constructs a JDateFieldFilter object with the default format |
|
DateFilterDocument(int style,
java.util.Locale locale)
Constructs a JDateFieldFilter object with the format
definde by a style and Locale, see DateFormat.getDateInstance(int, Locale) |
|
DateFilterDocument(java.text.SimpleDateFormat aFormat)
Constructs a JDateFieldFilter object with the given format. |
|
DateFilterDocument(java.lang.String aFormat)
Constructs a JDateFieldFilter object with the given format. |
|
DateFilterDocument(java.lang.String aFormat,
java.util.Locale locale)
Constructs a JDateFieldFilter object with the given format. |
|
| Method Summary | |
java.util.Date |
getDate()
Gets the date property (java.util.Date) value. |
java.text.SimpleDateFormat |
getDateFormat()
|
java.lang.String |
getFormat()
Gets the format property (java.lang.String) value. |
void |
insertString(int offset,
java.lang.String str,
javax.swing.text.AttributeSet attr)
Inserts some content into the document. |
boolean |
isDoBeep()
|
static void |
main(java.lang.String[] args)
|
void |
remove(int offset,
int len)
Removes some content from the document. |
void |
setDate(java.util.Date date)
Sets the date property (java.util.Date) value. |
void |
setDateFormat(java.text.SimpleDateFormat dateFormat)
|
void |
setDoBeep(boolean doBeep)
|
void |
setFormat(java.lang.String format)
Sets the format property (java.lang.String) value. |
void |
setFormat(java.lang.String format,
java.util.Locale locale)
Sets the format property (java.lang.String) value. |
| Methods inherited from class javax.swing.text.PlainDocument |
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdate |
| Methods inherited from class javax.swing.text.AbstractDocument |
addDocumentListener, 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, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DateFilterDocument()
JDateFieldFilter object with the default format
public DateFilterDocument(int style,
java.util.Locale locale)
JDateFieldFilter object with the format
definde by a style and Locale, see DateFormat.getDateInstance(int, Locale)
public DateFilterDocument(java.lang.String aFormat)
JDateFieldFilter object with the given format.
aFormat - the date format pattern
public DateFilterDocument(java.lang.String aFormat,
java.util.Locale locale)
JDateFieldFilter object with the given format.
aFormat - the date format patternpublic DateFilterDocument(java.text.SimpleDateFormat aFormat)
JDateFieldFilter object with the given format.
aFormat - the date format| Method Detail |
public boolean isDoBeep()
public void setDoBeep(boolean doBeep)
public java.util.Date getDate()
setDate(java.util.Date)public java.text.SimpleDateFormat getDateFormat()
public java.lang.String getFormat()
setFormat(java.lang.String)
public void insertString(int offset,
java.lang.String str,
javax.swing.text.AttributeSet attr)
throws javax.swing.text.BadLocationException
This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.
offset - the starting offset >= 0str - the string to insert; does nothing with null/empty stringsattr - the attributes for the inserted content
javax.swing.text.BadLocationException - the given insert position is not a valid
position within the documentAbstractDocument.insertString(int, java.lang.String, javax.swing.text.AttributeSet)
public void remove(int offset,
int len)
throws javax.swing.text.BadLocationException
This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.
offset - the starting offset >= 0len - the number of characters to remove >= 0
javax.swing.text.BadLocationException - the given remove position is not a valid
position within the documentAbstractDocument.remove(int, int)public void setDate(java.util.Date date)
date - The new value for the property.getDate()public void setDateFormat(java.text.SimpleDateFormat dateFormat)
public void setFormat(java.lang.String format)
format - The new value for the property.getFormat()
public void setFormat(java.lang.String format,
java.util.Locale locale)
format - The new value for the property.getFormat()public static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||