Package ucar.ui.prefs
Class Field.CheckBox
- java.lang.Object
-
- ucar.ui.prefs.Field
-
- ucar.ui.prefs.Field.CheckBox
-
-
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 inherited from class ucar.ui.prefs.Field
label, listenerList, name, popupMenu, previousValue, storeData, validValue
-
-
Constructor Summary
Constructors Constructor Description CheckBox(String fldName, String label, boolean defValue, 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.JComponentgetEditComponent()return the editing JComponentprotected ObjectgetEditValue()Get current value from editComponentprotected ObjectgetStoreValue(Object defValue)Get value from Store.booleanisSelected()Return the current valueprotected voidsetEditValue(Object value)Set current value of editComponentvoidsetSelected(boolean v)Set value; if different from current value, store in PersistenceManager and send event.protected voidsetStoreValue(Object value)Put new value into Store.-
Methods inherited from class ucar.ui.prefs.Field
accept, acceptIfDifferent, addPopupMenuAction, addPropertyChangeListener, addStandardPopups, addValidator, dfrac, finish, getDeepEditComponent, getLabel, getName, getPersistenceManager, getToolTipText, getValue, isEditable, isEnabled, next, removePropertyChangeListener, restoreValue, sendEvent, setEditable, setEnabled, setNewValueFromStore, setToolTipText, setValue, validate
-
-
-
-
Constructor Detail
-
CheckBox
public CheckBox(String fldName, String label, boolean defValue, PersistenceManager storeData)
Constructor.- Parameters:
fldName- name of the field; must be unique within the storelabel- label to display to the userdefValue- default value to start with.storeData- store/fetch data from here, may be null.- See Also:
PrefPanel.addCheckBoxField(java.lang.String, java.lang.String, 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:
getEditComponentin classField
-
getEditValue
protected Object getEditValue()
Description copied from class:FieldGet current value from editComponent- Specified by:
getEditValuein classField
-
setEditValue
protected void setEditValue(Object value)
Description copied from class:FieldSet current value of editComponent- Specified by:
setEditValuein classField
-
setStoreValue
protected void setStoreValue(Object value)
Description copied from class:FieldPut new value into Store. Must be immutable or make a copy- Specified by:
setStoreValuein classField
-
getStoreValue
protected Object getStoreValue(Object defValue)
Description copied from class:FieldGet value from Store. Must be immutable or return a copy- Specified by:
getStoreValuein classField
-
isSelected
public boolean isSelected()
Return the current value
-
setSelected
public void setSelected(boolean v)
Set value; if different from current value, store in PersistenceManager and send event.
-
-