Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.schooltool.client.gui.widgets
Class DateFormattedDocument  view DateFormattedDocument download DateFormattedDocument.java

java.lang.Object
  extended byjavax.swing.text.AbstractDocument
      extended byjavax.swing.text.PlainDocument
          extended byorg.schooltool.client.gui.widgets.DateFormattedDocument
All Implemented Interfaces:
javax.swing.text.Document, java.io.Serializable

public class DateFormattedDocument
extends javax.swing.text.PlainDocument


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
private  java.util.Date fieldDate
           
private  java.lang.String fieldFormat
           
protected  java.beans.PropertyChangeSupport propertyChange
           
 
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
DateFormattedDocument()
          Default Constructor uses dd/MM/yyyy format eg 21/01/2002
DateFormattedDocument(java.lang.String aFormat)
          Constructor accepts a String representing the format pattern
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          The addPropertyChangeListener method was generated to support the propertyChange field.
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          The firePropertyChange method is used to support the propertyChange field.
 java.util.Date getDate()
          Gets the date property (java.util.Date) value.
 java.lang.String getFormat()
          Gets the format property (java.lang.String) value.
protected  java.beans.PropertyChangeSupport getPropertyChange()
          Accessor for the propertyChange field.
 void insertString(int offset, java.lang.String str, javax.swing.text.AttributeSet attr)
          Inserts a string into the document.
 void remove(int offset, int len)
          Removes a piece of content from this Document.
 void setDate(java.util.Date date)
          Sets the date property (java.util.Date) value.
 void setFormat(java.lang.String format)
          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
 

Field Detail

propertyChange

protected transient java.beans.PropertyChangeSupport propertyChange

fieldFormat

private java.lang.String fieldFormat

fieldDate

private java.util.Date fieldDate
Constructor Detail

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

Method Detail

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.