Field.BeanTableField, Field.CheckBox, Field.Date, Field.Double, Field.EnumCombo, Field.Int, Field.Password, Field.Text, Field.TextArea, Field.TextCombo
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JFormattedTextField |
tf |
label, listenerList, name, popupMenu, previousValue, storeData, validValue
Constructor and Description |
---|
Date(java.lang.String name,
java.lang.String label,
java.util.Date defValue,
PersistenceManager storeData)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
_validate(java.lang.StringBuffer buff)
See if edit value is valid, put error message in buff.
|
java.util.Date |
getDate()
Return the current value
|
javax.swing.JComponent |
getEditComponent()
return the editing JComponent
|
protected java.lang.Object |
getEditValue()
Get current value from editComponent
|
protected java.lang.Object |
getStoreValue(java.lang.Object defValue)
Get value from Store.
|
boolean |
isEditable()
Can user edit.
|
void |
setDate(java.util.Date newValue)
Set value; if different from current value, store in PersistenceManager and
send event.
|
void |
setEditable(boolean isEditable)
Set whether the field is editable, default == enabled
|
protected void |
setEditValue(java.lang.Object value)
Set current value of editComponent
|
protected void |
setStoreValue(java.lang.Object value)
Set value; if different from current value, store in PersistenceManager and
send event.
|
accept, acceptIfDifferent, addPopupMenuAction, addPropertyChangeListener, addStandardPopups, addValidator, dfrac, finish, getDeepEditComponent, getLabel, getName, getPersistenceManager, getToolTipText, getValue, isEnabled, next, removePropertyChangeListener, restoreValue, sendEvent, setEnabled, setNewValueFromStore, setToolTipText, setValue, validate
public Date(java.lang.String name, java.lang.String label, java.util.Date defValue, PersistenceManager storeData)
name
- of the field; must be unique within the storelabel
- to display to the userdefValue
- default value to start with.storeData
- store/fetch data from here, may be null.PrefPanel.addDateField(java.lang.String, java.lang.String, java.util.Date)
public javax.swing.JComponent getEditComponent()
getEditComponent
in class Field
protected boolean _validate(java.lang.StringBuffer buff)
protected java.lang.Object getEditValue()
Field
getEditValue
in class Field
protected void setEditValue(java.lang.Object value)
Field
setEditValue
in class Field
public boolean isEditable()
isEditable
in class Field
public void setEditable(boolean isEditable)
Field
setEditable
in class Field
protected void setStoreValue(java.lang.Object value)
setStoreValue
in class Field
protected java.lang.Object getStoreValue(java.lang.Object defValue)
Field
getStoreValue
in class Field
public java.util.Date getDate()
public void setDate(java.util.Date newValue)