Class CopyNoteBuffer

java.lang.Object
org.jjazz.pianoroll.api.CopyNoteBuffer

public class CopyNoteBuffer extends Object
Singleton class to manage NoteEvent copy/paste operations.
  • Field Details

  • Method Details

    • getInstance

      public static CopyNoteBuffer getInstance()
    • copy

      public void copy(List<NoteEvent> notes)
      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

      public NoteEvent getFirstNote()
      Returns:
      Can be null if buffer is empty.
    • getLastNote

      public NoteEvent getLastNote()
      Returns:
      Can be null if buffer is empty.
    • isEmpty

      public boolean isEmpty()
    • getNotesCopy

      public List<NoteEvent> getNotesCopy(float targetStartPosition)
      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

      public void addPropertyChangeListener(PropertyChangeListener listener)
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)