java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
org.schooltool.client.gui.widgets.DateFormattedDocument
- All Implemented Interfaces:
- javax.swing.text.Document, java.io.Serializable
- public class DateFormattedDocument
- extends javax.swing.text.PlainDocument
| 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 |
| 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 |
propertyChange
protected transient java.beans.PropertyChangeSupport propertyChange
fieldFormat
private java.lang.String fieldFormat
fieldDate
private java.util.Date fieldDate
DateFormattedDocument
public DateFormattedDocument()
- Default Constructor uses dd/MM/yyyy format
eg 21/01/2002
DateFormattedDocument
public DateFormattedDocument(java.lang.String aFormat)
- Constructor accepts a String representing the format pattern
getDate
public java.util.Date getDate()
- Gets the date property (java.util.Date) value.
getFormat
public java.lang.String getFormat()
- Gets the format property (java.lang.String) value.
insertString
public void insertString(int offset,
java.lang.String str,
javax.swing.text.AttributeSet attr)
throws javax.swing.text.BadLocationException
- Description copied from class:
javax.swing.text.PlainDocument
- Inserts a string into the document. If the document property
'
filterNewLines' is set to Boolean.TRUE, then
all newlines in the inserted string are replaced by space characters,
otherwise the superclasses behaviour is executed.
Inserting content causes a write lock to be acquired during this method
call.
remove
public void remove(int offset,
int len)
throws javax.swing.text.BadLocationException
- Description copied from class:
javax.swing.text.AbstractDocument
- Removes a piece of content from this
Document.
setDate
public void setDate(java.util.Date date)
- Sets the date property (java.util.Date) value.
setFormat
public void setFormat(java.lang.String format)
- Sets the format property (java.lang.String) value.
firePropertyChange
public void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
- The firePropertyChange method is used to support the propertyChange field.
getPropertyChange
protected java.beans.PropertyChangeSupport getPropertyChange()
- Accessor for the propertyChange field.
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
- The addPropertyChangeListener method was generated to support the propertyChange field.