Package org.jjazz.pianoroll.api
Class CopyNoteBuffer
java.lang.Object
org.jjazz.pianoroll.api.CopyNoteBuffer
Singleton class to manage NoteEvent copy/paste operations.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
clear()
void
Put items in the buffer in ItemMode.static CopyNoteBuffer
getNotesCopy
(float targetStartPosition) Return a copy of the buffer notes adjusted so that the first note is at targetStartPosition.int
getSize()
boolean
isEmpty()
void
-
Field Details
-
PROP_EMPTY
- See Also:
-
-
Method Details
-
getInstance
-
copy
Put items in the buffer in ItemMode.- Parameters:
notes
-
-
clear
public void clear() -
getSize
public int getSize()- Returns:
- int The number of notes in the buffer.
-
getFirstNote
- Returns:
- Can be null if buffer is empty.
-
getLastNote
- Returns:
- Can be null if buffer is empty.
-
isEmpty
public boolean isEmpty() -
getNotesCopy
Return a copy of the buffer notes adjusted so that the first note is at targetStartPosition.- Parameters:
targetStartPosition
-- Returns:
- Can be an empty list
-
addPropertyChangeListener
-
removePropertyChangeListener
-