borland Packages  Class Hierarchy  dbswing Package 

DBPlainDocument component

java.lang.Object
   +----javax.swing.text.AbstractDocument
           +----javax.swing.text.PlainDocument
                   +----com.borland.dbswing.DBPlainDocument

About the DBPlainDocument component

Variables  Constructors  Properties  Methods  Event Listeners

Implements Serializable, Document

Note: This is a feature of JBuilder Professional and Enterprise.

DBPlainDocument is the default document (model) for text components that are attached to a DataSet column of type STRING.

DBPlainDocument has a maxLength property that enforces a limitation on the number of characters that can be entered into a field. The default value of maxLength is based upon the Column's precision property value. If precision is -1, input is not limited by maxLength. To set maxLength, use code that looks like this:

((DBPlainDocument) jdbTextField1.getDocument()).setMaxLength(25);
You might set maxLength for a column that is not provided by the query, or for a TableDataSet. Don't set precision for a Column from a QueryDataSet larger than the value from the server because you won't be able to save those values back to the server. Also remember that if you set precision on a Column from a server, the server's value takes precedence over yours unless you turn off metaDataUpdate. It is for this reason that we suggest setting maxLength instead.

To enforce additional input constraints at the model level (for example, to convert input characters to uppercase), extend DBPlainDocument as necessary and set it as the text component's model.


DBPlainDocument variables

Variables implemented in javax.swing.text.AbstractDocument

Variables implemented in javax.swing.text.PlainDocument

DBPlainDocument constructors

DBPlainDocument properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

Properties implemented in javax.swing.text.AbstractDocument

Properties implemented in javax.swing.text.PlainDocument

DBPlainDocument methods

Methods implemented in this class

Methods implemented in java.lang.Object

Methods implemented in javax.swing.text.AbstractDocument

Methods implemented in javax.swing.text.PlainDocument

DBPlainDocument event listeners


DBPlainDocument constructors

DBPlainDocument()

  public DBPlainDocument()
Creates a DBPlainDocument by calling the constructor of its superclass.

DBPlainDocument properties

maxLength

 public int getMaxLength()
 public void setMaxLength(int maxLength)
Returns and sets the maximum number of characters that can be entered into a field.

DBPlainDocument event listeners

This component is a source for the following event sets.

document

 public void addDocumentListener(javax.swing.event.DocumentListener )
 public void removeDocumentListener(javax.swing.event.DocumentListener )

undoableEdit

 public void addUndoableEditListener(javax.swing.event.UndoableEditListener )
 public void removeUndoableEditListener(javax.swing.event.UndoableEditListener )