Package ucar.ui.prefs
Class Field.BeanTableField
- java.lang.Object
-
- ucar.ui.prefs.Field
-
- ucar.ui.prefs.Field.BeanTableField
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ucar.ui.prefs.Field
Field.BeanTableField, Field.CheckBox, Field.Date, Field.Double, Field.EnumCombo, Field.Int, Field.Password, Field.Text, Field.TextArea, Field.TextCombo
-
-
Field Summary
Fields Modifier and Type Field Description protected BeanTable
table
-
Fields inherited from class ucar.ui.prefs.Field
label, listenerList, name, popupMenu, previousValue, storeData, validValue
-
-
Constructor Summary
Constructors Constructor Description BeanTableField(String fldName, String label, ArrayList defBeans, Class beanClass, PreferencesExt prefs, PersistenceManager storeData)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
_validate(StringBuffer buff)
See if edit value is valid, put error message in buff.JComponent
getDeepEditComponent()
JComponent
getEditComponent()
return the editing JComponentprotected Object
getEditValue()
Get current value from editComponent, will be an List of beanClassprotected Object
getStoreValue(Object defValue)
Get value from Store, will be a List of beanClass, or nullprotected void
setEditValue(Object value)
set value of editComponent, must be List of beanClassprotected void
setStoreValue(Object newValue)
Put new value into Store, must be a List ob objects of type beanClass-
Methods inherited from class ucar.ui.prefs.Field
accept, acceptIfDifferent, addPopupMenuAction, addPropertyChangeListener, addStandardPopups, addValidator, dfrac, finish, getLabel, getName, getPersistenceManager, getToolTipText, getValue, isEditable, isEnabled, next, removePropertyChangeListener, restoreValue, sendEvent, setEditable, setEnabled, setNewValueFromStore, setToolTipText, setValue, validate
-
-
-
-
Field Detail
-
table
protected BeanTable table
-
-
Constructor Detail
-
BeanTableField
public BeanTableField(String fldName, String label, ArrayList defBeans, Class beanClass, PreferencesExt prefs, PersistenceManager storeData)
Constructor.- Parameters:
fldName
- name of the field, must be unique within the store.label
- to display to the userdefBeans
- list of default beans to ues. May be null.beanClass
- class type of the beansstoreData
- store/fetch data from here, may be null.- See Also:
PrefPanel.addTextComboField(java.lang.String, java.lang.String, java.util.Collection, int, boolean)
-
-
Method Detail
-
_validate
protected boolean _validate(StringBuffer buff)
See if edit value is valid, put error message in buff.
-
getEditComponent
public JComponent getEditComponent()
return the editing JComponent- Specified by:
getEditComponent
in classField
-
getDeepEditComponent
public JComponent getDeepEditComponent()
- Overrides:
getDeepEditComponent
in classField
-
getEditValue
protected Object getEditValue()
Get current value from editComponent, will be an List of beanClass- Specified by:
getEditValue
in classField
-
setEditValue
protected void setEditValue(Object value)
set value of editComponent, must be List of beanClass- Specified by:
setEditValue
in classField
-
getStoreValue
protected Object getStoreValue(Object defValue)
Get value from Store, will be a List of beanClass, or null- Specified by:
getStoreValue
in classField
- Parameters:
defValue
- use this as the default- Returns:
- the stored object: will be an List of beanClass, or null
-
setStoreValue
protected void setStoreValue(Object newValue)
Put new value into Store, must be a List ob objects of type beanClass- Specified by:
setStoreValue
in classField
-
-