|
||||||||||
| 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
jve.generated.SwingTextComponentBinder
Swing implementation of the IFieldBinder interface. This class acts as a document for a Swing JTextComponent. This field provides basic validation of the text entered into the field, to ensure the value can be parsed into the bound data type. To modify the default validation behavior, override the textToObject() method.
| 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 |
BidiElementName, ContentElementName, ElementNameAttribute, ParagraphElementName, SectionElementName |
| Fields inherited from interface javax.swing.text.Document |
StreamDescriptionProperty, TitleProperty |
| Constructor Summary | |
SwingTextComponentBinder()
|
|
| Method Summary | |
IDataObject |
getDataObject()
Get the data object that provides the data to this binder. |
java.lang.String |
getProperty()
Get the property of the data object that will be used by this binder |
javax.swing.text.JTextComponent |
getVisualTextComponent()
|
boolean |
isAutoEditable()
Check to see if the autoEditable feature is enabled. |
java.lang.String |
objectToText(java.lang.Object o)
Convert the given object into a text representation. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
void |
setAutoEditable(boolean autoEnable)
Set the auto enable property, which automatically enables/disables editing the text field when the bound data value is valid. |
void |
setDataObject(IDataObject binder)
Set the data object that provides the data used by this binder. |
void |
setProperty(java.lang.String string)
Set the property of the object that will be used as the target of this binder. |
void |
setVisualTextComponent(javax.swing.text.JTextComponent visualTextComponent)
|
java.lang.Object |
textToObject(java.lang.String text)
Convert the given text to a Object of the type that's the bound property. |
java.lang.String |
toString()
|
| Methods inherited from class javax.swing.text.PlainDocument |
getDefaultRootElement, getParagraphElement, insertString |
| Methods inherited from class javax.swing.text.AbstractDocument |
addDocumentListener, addUndoableEditListener, createPosition, dump, getAsynchronousLoadPriority, getBidiRootElement, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, putProperty, readLock, readUnlock, remove, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SwingTextComponentBinder()
| Method Detail |
public IDataObject getDataObject()
IFieldBinder
getDataObject in interface IFieldBinderpublic java.lang.String getProperty()
IFieldBinder
getProperty in interface IFieldBinderpublic void setDataObject(IDataObject binder)
IFieldBinder
setDataObject in interface IFieldBinderbinder - public void setProperty(java.lang.String string)
IFieldBinder
setProperty in interface IFieldBinderstring - public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerpublic javax.swing.text.JTextComponent getVisualTextComponent()
public void setVisualTextComponent(javax.swing.text.JTextComponent visualTextComponent)
visualTextComponent - fooa The visualTextComponent to set.public java.lang.String objectToText(java.lang.Object o)
objectToText in interface IFieldBindero - the object to convert
public java.lang.Object textToObject(java.lang.String text)
throws java.lang.IllegalArgumentException
textToObject in interface IFieldBindertext - the text value to convert
java.lang.IllegalArgumentException - if the text cannot be converted into the proper type.public boolean isAutoEditable()
public void setAutoEditable(boolean autoEnable)
autoEnable - true to enable the autoEditable feature, false to disable.public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||