Class FavoriteRhythms

java.lang.Object
org.jjazz.rhythmdatabase.api.FavoriteRhythms

public class FavoriteRhythms extends Object
Store the favorite rhythms as preferences.
  • Field Details

    • PROP_FAVORITE_RHYTHM

      public static String PROP_FAVORITE_RHYTHM
      oldValue=rhythm if removed, newValue=rhythm if added.
  • Method Details

    • getInstance

      public static FavoriteRhythms getInstance()
    • addRhythm

      public boolean addRhythm(RhythmInfo ri)
      Add a favorite rhythm.
      Parameters:
      ri -
      Returns:
      True if added successfully (r was not already present).
    • removeRhythm

      public boolean removeRhythm(RhythmInfo ri)
      Remove a favorite rhythm.
      Parameters:
      ri -
      Returns:
      True if removed successfully (r was present).
    • contains

      public boolean contains(RhythmInfo ri)
    • getRhythms

      public List<RhythmInfo> getRhythms()
      All the favorite rhythms.
      Returns:
    • getRhythms

      public List<RhythmInfo> getRhythms(RhythmProvider rp)
      The favorite rhythms for the specified RhythmProvider.
      Parameters:
      rp -
      Returns:
    • getRhythms

      public List<RhythmInfo> getRhythms(TimeSignature ts)
      The favorite rhythms for the specified TimeSignature.
      Parameters:
      ts -
      Returns:
    • addPropertyListener

      public void addPropertyListener(PropertyChangeListener l)
    • removePropertyListener

      public void removePropertyListener(PropertyChangeListener l)