Package io.guise.framework.model
Class DefaultListSelectEditor<V>
java.lang.Object
io.guise.framework.model.AbstractListSelectEditor<V>
io.guise.framework.model.DefaultListSelectEditor<V>
- Type Parameters:
V
- The type of values contained in the model.
- All Implemented Interfaces:
ListSelectEditor<V>
The default implementation for editing values in a list model. Prototypes are provided for common edit functionality. This class registers itself with the
given list, which will cause memory leaks if an instance of this class is discarded without also discarding the list. The editing component class and the
list select model's value class must each have a public default constructor.
- Author:
- Garret Wilson
-
Constructor Summary
ConstructorDescriptionDefaultListSelectEditor
(ListSelectModel<V> listSelectModel, Class<? extends ValuedComponent<V>> valuedComponentClass) List select model and valued component constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected V
Creates a new value to add to the list.protected ValuedComponent<V>
Creates a component for editing a value.Class<? extends ValuedComponent<V>>
Methods inherited from class io.guise.framework.model.AbstractListSelectEditor
editValue, editValue, getEditActionPrototype, getInsertActionPrototype, getListSelectModel, getLowerActionPrototype, getRaiseActionPrototype, getRemoveActionPrototype, insertValue, lowerValue, raiseValue, removeValue, updateProperties
-
Constructor Details
-
DefaultListSelectEditor
public DefaultListSelectEditor(ListSelectModel<V> listSelectModel, Class<? extends ValuedComponent<V>> valuedComponentClass) List select model and valued component constructor.- Parameters:
listSelectModel
- The list select model this prototype manipulates.valuedComponentClass
- The class for the component allowing a list value to be edited.- Throws:
NullPointerException
- if the given list select model and/or value component class isnull
.
-
-
Method Details
-
getValuedComponentClass
- Returns:
- The class for the component allowing a list value to be edited.
-
createValue
Creates a new value to add to the list.This implementation instantiates a default instance of the list select model's value class.
- Specified by:
createValue
in classAbstractListSelectEditor<V>
- Returns:
- A new default value to add.
- See Also:
-
createValuedComponent
Creates a component for editing a value.This version creates a new valued component from the valued component class.
- Specified by:
createValuedComponent
in classAbstractListSelectEditor<V>
- Returns:
- A component for editing the value.
- See Also:
-