com.frinika.sequencer.model
Class EditHistoryEntry

java.lang.Object
  extended by com.frinika.sequencer.model.EditHistoryEntry

public class EditHistoryEntry
extends java.lang.Object

EditHistoryEntry represents one entry in the edit history - being a single event.

Author:
Peter Johan Salomonsen

Field Summary
static int EDIT_HISTORY_TYPE_ADD
           
static int EDIT_HISTORY_TYPE_REMOVE
           
 
Constructor Summary
EditHistoryEntry(EditHistoryContainer editHistoryContainer, EditHistoryRecorder recorder, int editHistoryType, EditHistoryRecordable recordable)
           
 
Method Summary
 int getEditHistoryType()
           
 EditHistoryEntry getInvertedClone()
          Return a cloned EditHistoryEntry with the opposite editHistoryType.
 EditHistoryRecordable getRecordable()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EDIT_HISTORY_TYPE_ADD

public static final int EDIT_HISTORY_TYPE_ADD
See Also:
Constant Field Values

EDIT_HISTORY_TYPE_REMOVE

public static final int EDIT_HISTORY_TYPE_REMOVE
See Also:
Constant Field Values
Constructor Detail

EditHistoryEntry

public EditHistoryEntry(EditHistoryContainer editHistoryContainer,
                        EditHistoryRecorder recorder,
                        int editHistoryType,
                        EditHistoryRecordable recordable)
Parameters:
editHistoryContainer -
recorder -
editHistoryType -
recordable - - Either a MultiEvent or MidiEvent
Method Detail

getEditHistoryType

public int getEditHistoryType()
Returns:
Returns the editHistoryType.

getRecordable

public EditHistoryRecordable getRecordable()
Returns:
Returns the event (Either a MultiEvent or a MidiEvent) affected by this entry

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getInvertedClone

public EditHistoryEntry getInvertedClone()
Return a cloned EditHistoryEntry with the opposite editHistoryType. Used to notify listeners when undoing in order to indicate that the previous action was reversed

Returns: