|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdsto.dfc.swing.undo.EditListModel
public class EditListModel
Implementation of a JList ListModel
that stores UndoableEdits, for use by the MonitoredUndoManager. The EditListModel fire ListDataEvents.
MonitoredUndoManager,
ListModel,
Serialized Form| Field Summary | |
|---|---|
protected List |
list
The list of UndoableEdits. |
protected EventListenerList |
listenerList
For managing ListDataListeners. |
| Constructor Summary | |
|---|---|
EditListModel()
Empty constructor for bean serialisation. |
|
EditListModel(List edits)
Constructs an EditListModel from the list of edits provided. |
|
| Method Summary | |
|---|---|
void |
add(int index,
Object element)
|
boolean |
add(Object o)
|
void |
addListDataListener(ListDataListener l)
Add a listener to the list that's notified each time a change to the data model occurs. |
void |
clear()
|
boolean |
contains(Object o)
|
boolean |
containsAll(List edits)
|
boolean |
doesNotContainAll(List edits)
|
protected void |
fireContentsChanged(Object source,
int index0,
int index1)
EditListModel subclasses must call this method after one or more elements of the list change. |
protected void |
fireIntervalAdded(Object source,
int index0,
int index1)
EditListModel subclasses must call this method after one or more elements are added to the model. |
protected void |
fireIntervalRemoved(Object source,
int index0,
int index1)
EditListModel subclasses must call this method after one or more elements are removed from the model. |
Object |
get(int index)
|
UndoableEdit |
getEdit(int index)
|
List |
getEdits()
Returns a list containing the EditListModel's edits. |
Object |
getElementAt(int index)
|
EventListener[] |
getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model. |
int |
getSize()
|
int |
indexOf(Object o)
|
boolean |
isEmpty()
|
Object |
remove(int index)
|
void |
remove(Object editToBeRemoved)
|
void |
removeAll(List editsToBeRemoved)
|
void |
removeListDataListener(ListDataListener l)
Remove a listener from the list that's notified each time a change to the data model occurs. |
Object |
set(int index,
Object element)
|
void |
setEdits(List edits)
Only to be used by the Deserializer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient EventListenerList listenerList
ListDataListeners.
protected List list
UndoableEdits.
| Constructor Detail |
|---|
public EditListModel()
public EditListModel(List edits)
EditListModel from the list of edits provided. It
pulls the edits out of the list, however, rather than simply using the
List provided.
| Method Detail |
|---|
public List getEdits()
EditListModel's edits. NB
Please don't modify this list or these edits. Cannot return a Collections
unmodifiable list because of serialisation issues.
public void setEdits(List edits)
public Object getElementAt(int index)
getElementAt in interface ListModelpublic void clear()
public boolean isEmpty()
public int getSize()
getSize in interface ListModelpublic boolean contains(Object o)
public boolean add(Object o)
public Object get(int index)
public UndoableEdit getEdit(int index)
public Object set(int index,
Object element)
public void add(int index,
Object element)
public Object remove(int index)
public void remove(Object editToBeRemoved)
public void removeAll(List editsToBeRemoved)
public boolean doesNotContainAll(List edits)
public boolean containsAll(List edits)
public int indexOf(Object o)
public void addListDataListener(ListDataListener l)
addListDataListener in interface ListModell - the ListDataListenerpublic void removeListDataListener(ListDataListener l)
removeListDataListener in interface ListModell - the ListDataListener
protected void fireContentsChanged(Object source,
int index0,
int index1)
source - The ListModel that changed, typically "this".index0 - One end of the new interval.index1 - The other end of the new interval.EventListenerList
protected void fireIntervalAdded(Object source,
int index0,
int index1)
source - The ListModel that changed, typically "this".index0 - One end of the new interval.index1 - The other end of the new interval.EventListenerList
protected void fireIntervalRemoved(Object source,
int index0,
int index1)
source - The ListModel that changed, typically "this".index0 - One end of the new interval.index1 - The other end of the new interval.EventListenerListpublic EventListener[] getListeners(Class listenerType)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||