com.frinika.sequencer.gui.selection
Class DragList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<Item>
              extended by com.frinika.sequencer.gui.selection.DragList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Item>, java.util.Collection<Item>, java.util.List<Item>, java.util.RandomAccess

public class DragList
extends java.util.Vector<Item>

The drag list is a copy of the multiEventSelection. The copy is created by calling startDrag The after calling startDrag the caller can modifying the items in the drag list (e.g. the pith start tick etc). use the notification methods in this class to inform the GUI of changes. There are two types of observer. DragEventListener is interested in changes to the drag list. FeedbackItemListener is interested in a single representive item. Tpically an element of the drag list (defined as a parameter to start drag) Calling endDrag(false) will cause the original selected events to be replaced by the dragList. endDrag(true) will leave the originals and add the dragList to the part. You can call directly invoke notifyFeedbackListeners(Item it) if you wish to update the single item view listening to the DragList. (Any cleaner way to do this ?)

Author:
pjl
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
DragList(ProjectContainer project)
           
 
Method Summary
 void addDragEventListener(DragEventListener o)
           
 void addFeedbackItemListener(FeedbackEventListener o)
           
 void endDrag(boolean copy)
           
 void endDragController()
           
 void notifyDragEventListeners()
           
 void notifyFeedbackItemListeners()
           
 void notifyFeedbackItemListeners(Item ev)
           
 void removeDragEventListener(DragEventListener o)
           
 void removeFeedbackItemListener(FeedbackEventListener o)
           
 void startDrag(Item dragItemRef)
          Start a drag.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DragList

public DragList(ProjectContainer project)
Method Detail

endDrag

public void endDrag(boolean copy)

endDragController

public void endDragController()

startDrag

public void startDrag(Item dragItemRef)
Start a drag.

Parameters:
dragItem - reference item for displaying feedback (the copy of this item in the draglist can be observered as it is being draged) getDragReferenceItem();

addDragEventListener

public void addDragEventListener(DragEventListener o)

removeDragEventListener

public void removeDragEventListener(DragEventListener o)

notifyDragEventListeners

public void notifyDragEventListeners()

addFeedbackItemListener

public void addFeedbackItemListener(FeedbackEventListener o)

removeFeedbackItemListener

public void removeFeedbackItemListener(FeedbackEventListener o)

notifyFeedbackItemListeners

public void notifyFeedbackItemListeners(Item ev)

notifyFeedbackItemListeners

public void notifyFeedbackItemListeners()