|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
K
- the type of the value map keysV
- the type of the value map valuespublic interface ValueChangeMapEditModel<K,V>
Specifies an object which facilitates the editing of values in a ValueChangeMap
Method Summary | |
---|---|
void |
addValueListener(K key,
ActionListener listener)
|
void |
addValueMapSetListener(ActionListener listener)
|
void |
addValueSetListener(K key,
ActionListener listener)
|
ValueChangeMap<K,V> |
getDefaultValueMap()
|
StateObserver |
getModifiedState()
|
ValueMapValidator<K,V> |
getValidator()
|
StateObserver |
getValidState()
|
V |
getValue(K key)
Returns the value associated with the given key in the underlying value map |
EventObserver |
getValueChangeObserver(K key)
|
boolean |
isModified()
|
boolean |
isNullable(K key)
|
boolean |
isValid()
|
boolean |
isValid(K key,
int action)
Returns true if the given value is valid for the given key, using the validate method |
boolean |
isValueNull(K key)
|
void |
removeValueListener(K key,
ActionListener listener)
|
void |
removeValueMapSetListener(ActionListener listener)
|
void |
removeValueSetListener(K key,
ActionListener listener)
|
void |
setValue(K key,
V value)
Sets the given value in the underlying value map |
void |
setValueMap(ValueChangeMap<K,V> valueMap)
Sets the active value map, that is, deep copies the value from the source map into the underlying map |
void |
validate(K key,
int action)
Checks if the value associated with the give key is valid, throws a ValidationException if not |
Methods inherited from interface org.jminor.common.model.Refreshable |
---|
clear, refresh |
Method Detail |
---|
StateObserver getModifiedState()
isModified()
StateObserver getValidState()
getValidator()
,
isValid()
void addValueSetListener(K key, ActionListener listener)
key
- the key for which to monitor value changeslistener
- a listener notified each time the value of key
is setvoid removeValueSetListener(K key, ActionListener listener)
key
- the keylistener
- the listener to removevoid addValueMapSetListener(ActionListener listener)
listener
- a listener notified each time the value map is setvoid removeValueMapSetListener(ActionListener listener)
listener
- the listener to removevoid addValueListener(K key, ActionListener listener)
key
- the key for which to monitor value changeslistener
- a listener notified each time the value of key
changesvoid removeValueListener(K key, ActionListener listener)
key
- the keylistener
- the listener to removeEventObserver getValueChangeObserver(K key)
key
- the key for which to retrieve the event
key
changesValueMapValidator<K,V> getValidator()
void setValueMap(ValueChangeMap<K,V> valueMap)
valueMap
- the map to set as active, if null then the default map value is set as activegetDefaultValueMap()
,
addValueMapSetListener(java.awt.event.ActionListener)
boolean isNullable(K key)
key
- the key
boolean isValueNull(K key)
key
- the key
void setValue(K key, V value)
key
- the key to associate the given value withvalue
- the value to associate with the given keyV getValue(K key)
key
- the key of the value to retrieve
ValueChangeMap<K,V> getDefaultValueMap()
void validate(K key, int action) throws ValidationException
key
- the keyaction
- describes the action requiring validation,
ValueChangeMapEditModel.INSERT, ValueChangeMapEditModel.UPDATE or ValueChangeMapEditModel.UNKNOWN
ValidationException
- if the given value is not valid for the given keyboolean isValid(K key, int action)
validate
method
key
- the keyaction
- describes the action requiring validation,
ValueChangeMapEditModel.INSERT, ValueChangeMapEditModel.UPDATE or ValueChangeMapEditModel.UNKNOWN
validate(Object, int)
,
ValueMapValidator.validate(ValueMap, Object, int)
boolean isValid()
()
boolean isModified()
getModifiedState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |