Class AbstractSongTableModel

    • Constructor Detail

      • AbstractSongTableModel

        protected AbstractSongTableModel​(BeaTunes application)
        Constructor.
        Parameters:
        application - application
      • AbstractSongTableModel

        protected AbstractSongTableModel()
        Constructor.
    • Method Detail

      • getApplication

        public BeaTunes getApplication()
      • setItemsEditable

        public void setItemsEditable​(boolean itemsEditable)
        Sets whether items are editable, e.g. by inline editors.
        Parameters:
        itemsEditable - true or false
        See Also:
        isItemsEditable()
      • setApplication

        public void setApplication​(BeaTunes beaTunes)
        Needs to be set, if you want this model to be editable.
        Parameters:
        beaTunes - beaTunes
      • addPropertyChangeListener

        public void addPropertyChangeListener​(String propertyName,
                                              PropertyChangeListener propertyChangeListener)
        Parameters:
        propertyName - property name
        propertyChangeListener - listener
      • getUnfilteredRow

        public int getUnfilteredRow​(int row)
        Description copied from interface: FilterTableModel
        Returns unfiltered row index for a given row index.
        Specified by:
        getUnfilteredRow in interface FilterTableModel<AudioSong>
        Parameters:
        row - filtered row
        Returns:
        unfiltered row or -1 if not found
      • firePropertyChange

        protected void firePropertyChange​(String propertyName,
                                          Object oldValue,
                                          Object newValue)
        Report a bound property update to any registered listeners. No event is fired if old and new are equal and non-null.
        Parameters:
        propertyName - The programmatic name of the property that was changed.
        oldValue - The old value of the property.
        newValue - The new value of the property.
      • getValueAt

        protected Object getValueAt​(AudioSong song,
                                    int rowIndex,
                                    int columnIndex)
        Returns the Song property for a specific column.
        Parameters:
        song - song
        rowIndex - row
        columnIndex - property
        Returns:
        the requested song property
      • setValue

        protected void setValue​(Object v,
                                AudioSong song,
                                int row,
                                int column)
        Parameters:
        v - value
        song - song
        row - row
        column - column
      • fireTableRowsRepaint

        public void fireTableRowsRepaint​(int first,
                                         int last)
        Fire special TableModelEvent that's only supposed to trigger a repaint. Listeners may ignore this event by checking for TableModelRepaintEvent.
        Parameters:
        first - first row
        last - last row
        See Also:
        TableModelRepaintEvent