Class RhythmJTable

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable

public class RhythmJTable extends JTable implements PropertyChangeListener
A JTable to show a list of rhythms.

Highlight the favorite rhythms.

See Also:
  • Constructor Details

    • RhythmJTable

      public RhythmJTable()
  • Method Details

    • setHiddenColumns

      public void setHiddenColumns(List<Integer> hiddenColumns)
      Parameters:
      hiddenColumns - The indexes of the columns to hide. If null all columns are shown.
    • getModel

      public RhythmJTable.RhythmTableModel getModel()
      Overrides:
      getModel in class JTable
    • getRhythm

      public RhythmInfo getRhythm(Point p)
      The rhythm corresponding to the row which encloses the specified point.
      Parameters:
      p -
      Returns:
      Can be null.
    • getSelectedRhythm

      public RhythmInfo getSelectedRhythm()
      Returns:
      The Rhythm corresponding to the selected row, or null if no selection or no data.
    • setSelectedRhythm

      public void setSelectedRhythm(RhythmInfo ri)
      Select the row corresponding to the specified rhythm.

      The method also scroll the table to make the selected instrument visible.

      Parameters:
      ri -
    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Specified by:
      propertyChange in interface PropertyChangeListener