public abstract class CollectionModelEditor<T,E extends CollectionItemEditor<T>> extends java.lang.Object implements ElementProducer<T>
Modifier and Type | Class and Description |
---|---|
protected class |
CollectionModelEditor.ModelHelper |
Modifier and Type | Field and Description |
---|---|
protected CollectionModelEditor.ModelHelper |
helper |
protected E |
itemEditor |
protected static Logger |
LOG |
Modifier | Constructor and Description |
---|---|
protected |
CollectionModelEditor(E itemEditor) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
areSelectedItemsRemovable(javax.swing.ListSelectionModel selectionMode) |
boolean |
canCreateElement() |
T |
createElement() |
protected abstract java.util.List<T> |
getItems()
Mutable internal list of items (must not be exposed to client)
|
T |
getMutable(T item) |
protected boolean |
isEditable(T item) |
boolean |
isModified() |
void |
processModifiedItems(PairProcessor<? super T,? super T> processor) |
void |
reset(java.util.List<? extends T> originalItems) |
protected void |
silentlyReplaceItem(T oldItem,
T newItem,
int index) |
protected static final Logger LOG
protected final E extends CollectionItemEditor<T> itemEditor
protected final CollectionModelEditor.ModelHelper helper
protected CollectionModelEditor(E itemEditor)
public T createElement()
createElement
in interface ElementProducer<T>
public boolean canCreateElement()
canCreateElement
in interface ElementProducer<T>
protected abstract java.util.List<T> getItems()
public void reset(java.util.List<? extends T> originalItems)
public final boolean isModified()
public void processModifiedItems(PairProcessor<? super T,? super T> processor)
protected boolean isEditable(T item)
protected final boolean areSelectedItemsRemovable(javax.swing.ListSelectionModel selectionMode)