org.browsecode.helpers.reorderablelistpanel
Class ReorderableEvent<T>
java.lang.Object
org.browsecode.helpers.reorderablelistpanel.ReorderableEvent<T>
public class ReorderableEvent<T>
- extends java.lang.Object
Note that there is only a slight distinction between a DELETED event and a REORDERED event where the newIndex is null,
and only a slight distinction between an INSERTED event and a REORDERED event where the oldIndex is null -- this may matter only to the implementation of the GUI.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REORDERED
public static final java.lang.String REORDERED
- See Also:
- Constant Field Values
DELETED
public static final java.lang.String DELETED
- See Also:
- Constant Field Values
INSERTED
public static final java.lang.String INSERTED
- See Also:
- Constant Field Values
ReorderableEvent
public ReorderableEvent(java.lang.String type,
T item,
java.lang.Integer oldIndex,
java.lang.Integer newIndex,
ReorderableListModel source)
ReorderableEvent
public ReorderableEvent(java.lang.String type,
T item,
java.lang.Integer newIndex,
ReorderableListModel source)
- Parameters:
type
- must equal INSERTEDitem
- newIndex
- source
-
getType
public java.lang.String getType()
- One of REORDERED, DELETED, or CREATED.
- Returns:
getItem
public T getItem()
- Get the item that was reordered, deleted, or created.
- Returns:
getSource
public ReorderableListModel getSource()
- Returns:
- Returns the source that generated the event.
getNewIndex
public java.lang.Integer getNewIndex()
- Returns:
- Returns the newIndex. If this is null, the item was moved to another location.
getOldIndex
public java.lang.Integer getOldIndex()
- Returns:
- Returns the oldIndex. If this is null, the item was just created or just came from another source.