Package com.tagtraum.beatunes.matchtable
Class MatchTable
- java.lang.Object
-
- com.tagtraum.beatunes.songtable.SongContextComponent
-
- com.tagtraum.beatunes.matchtable.MatchTable
-
- All Implemented Interfaces:
DoubleClickListener,TableView,View,ApplicationComponent<BeaTunes>
public class MatchTable extends SongContextComponent implements TableView, DoubleClickListener
Table used to display songs matching the selected song in theSongTable.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description MatchTable(BeaTunes application)Creates the component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JComponent$$$getRootComponent$$$()protected voidadjustToTheme(Theme theme)React to theme changes.voiddoubleClick(ActionEvent event)Initializes this component and its sub components.JComponentgetComponent()The actual visual component for this view.ConfigurableComponentgetConfiguration()The configuration to be used in the app's preferences dialog.SimpleSongTableModelgetFilterTableModel()Table model for the match table.JTextFieldgetFilterTextField()Returns the filter text field.StringgetId()Component id.MatchRuleSetgetMatchRuleSet()The currently used match rule set.PlayListgetPlayList()Returns the source playlist we want to find matches in.PlayList.SubstringFilterPropertygetSubstringFilterProperty()Returns the current substring filter property.ButtonModelgetSyncButtonModel()JTablegetTable()Returns the actual table component.voidinit()Initializes this component.voidregisterDoubleClick(String actionId)Registers an action to perform on double clicks.voidsetMatchRuleSet(MatchRuleSet matchRuleSet)Sets the current match rule set.voidsetSubstringFilterProperty(PlayList.SubstringFilterProperty substringFilterProperty)Sets the substring filter property.voidshutdown()Shuts down this component and its sub components.voidupdate(AudioSong song)Is called when the component is expected to update its view.-
Methods inherited from class com.tagtraum.beatunes.songtable.SongContextComponent
fireDelayedUpdate, getApplication, getShowHideAction, getShowHideActionId, getSongTable, initVisibility, setApplication, setShowHideActionId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.tagtraum.beatunes.View
getFocusRoot
-
-
-
-
Constructor Detail
-
MatchTable
public MatchTable(BeaTunes application)
Creates the component.- Parameters:
application- application
-
-
Method Detail
-
adjustToTheme
protected void adjustToTheme(Theme theme)
Description copied from class:SongContextComponentReact to theme changes. Default implementation is empty.- Overrides:
adjustToThemein classSongContextComponent- Parameters:
theme- theme
-
getId
public String getId()
Description copied from class:SongContextComponentComponent id. Useful forPluginManager.getPlugin(Object).- Specified by:
getIdin interfaceApplicationComponent<BeaTunes>- Specified by:
getIdin classSongContextComponent- Returns:
- component id
-
getSubstringFilterProperty
public PlayList.SubstringFilterProperty getSubstringFilterProperty()
Returns the current substring filter property.- Returns:
- filter property
-
setSubstringFilterProperty
public void setSubstringFilterProperty(PlayList.SubstringFilterProperty substringFilterProperty)
Sets the substring filter property.- Parameters:
substringFilterProperty- substring filter property
-
getConfiguration
public ConfigurableComponent getConfiguration()
The configuration to be used in the app's preferences dialog.- Returns:
- configuration
-
getMatchRuleSet
public MatchRuleSet getMatchRuleSet()
The currently used match rule set.- Returns:
- match rule set
- See Also:
setMatchRuleSet(MatchRuleSet)
-
setMatchRuleSet
public void setMatchRuleSet(MatchRuleSet matchRuleSet)
Sets the current match rule set.- Parameters:
matchRuleSet- match rule set- See Also:
getMatchRuleSet()
-
getFilterTableModel
public SimpleSongTableModel getFilterTableModel()
Table model for the match table.- Specified by:
getFilterTableModelin interfaceTableView- Returns:
- table model
-
init
public void init()
Description copied from class:SongContextComponentInitializes this component. This is a non-empty implementation. Make sure to call super.init() when you override this.- Specified by:
initin interfaceApplicationComponent<BeaTunes>- Overrides:
initin classSongContextComponent
-
getSyncButtonModel
public ButtonModel getSyncButtonModel()
-
shutdown
public void shutdown()
Shuts down this component and its sub components.- Specified by:
shutdownin interfaceApplicationComponent<BeaTunes>- Overrides:
shutdownin classSongContextComponent
-
doubleClick
public void doubleClick(ActionEvent event)
Initializes this component and its sub components.- Specified by:
doubleClickin interfaceDoubleClickListener- Parameters:
event- action event
-
registerDoubleClick
public void registerDoubleClick(String actionId)
Registers an action to perform on double clicks.- Parameters:
actionId- id
-
getFilterTextField
public JTextField getFilterTextField()
Returns the filter text field.- Returns:
- filter text field
-
getTable
public JTable getTable()
Returns the actual table component.
-
update
public void update(AudioSong song)
Description copied from class:SongContextComponentIs called when the component is expected to update its view. This can have programmatic reasons or happen as a result ofSongContextComponent.fireDelayedUpdate(). Typically you are notified when the selection in the mainSongTablechanges and stays stable for at least 250ms (SongContextComponent.UPDATE_DELAY).- Specified by:
updatein classSongContextComponent- Parameters:
song- (first) song that was selected or null, if no songs are selected- See Also:
SongContextComponent.getSongTable(),SongTable.getSelectedSong()
-
getPlayList
public PlayList getPlayList()
Returns the source playlist we want to find matches in.- Returns:
- source playlist
-
getComponent
public JComponent getComponent()
Description copied from interface:ViewThe actual visual component for this view.- Specified by:
getComponentin interfaceView- Returns:
- detail component
-
$$$getRootComponent$$$
public JComponent $$$getRootComponent$$$()
-
-