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
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclear()voidPut items in the buffer in ItemMode.static CopyNoteBuffergetNotesCopy(float targetStartPosition) Return a copy of the buffer notes adjusted so that the first note is at targetStartPosition.intgetSize()booleanisEmpty()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
-