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 void
adjustToTheme(Theme theme)
React to theme changes.void
doubleClick(ActionEvent event)
Initializes this component and its sub components.JComponent
getComponent()
The actual visual component for this view.ConfigurableComponent
getConfiguration()
The configuration to be used in the app's preferences dialog.SimpleSongTableModel
getFilterTableModel()
Table model for the match table.JTextField
getFilterTextField()
Returns the filter text field.String
getId()
Component id.MatchRuleSet
getMatchRuleSet()
The currently used match rule set.PlayList
getPlayList()
Returns the source playlist we want to find matches in.PlayList.SubstringFilterProperty
getSubstringFilterProperty()
Returns the current substring filter property.ButtonModel
getSyncButtonModel()
JTable
getTable()
Returns the actual table component.void
init()
Initializes this component.void
registerDoubleClick(String actionId)
Registers an action to perform on double clicks.void
setMatchRuleSet(MatchRuleSet matchRuleSet)
Sets the current match rule set.void
setSubstringFilterProperty(PlayList.SubstringFilterProperty substringFilterProperty)
Sets the substring filter property.void
shutdown()
Shuts down this component and its sub components.void
update(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:SongContextComponent
React to theme changes. Default implementation is empty.- Overrides:
adjustToTheme
in classSongContextComponent
- Parameters:
theme
- theme
-
getId
public String getId()
Description copied from class:SongContextComponent
Component id. Useful forPluginManager.getPlugin(Object)
.- Specified by:
getId
in interfaceApplicationComponent<BeaTunes>
- Specified by:
getId
in 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:
getFilterTableModel
in interfaceTableView
- Returns:
- table model
-
init
public void init()
Description copied from class:SongContextComponent
Initializes this component. This is a non-empty implementation. Make sure to call super.init() when you override this.- Specified by:
init
in interfaceApplicationComponent<BeaTunes>
- Overrides:
init
in classSongContextComponent
-
getSyncButtonModel
public ButtonModel getSyncButtonModel()
-
shutdown
public void shutdown()
Shuts down this component and its sub components.- Specified by:
shutdown
in interfaceApplicationComponent<BeaTunes>
- Overrides:
shutdown
in classSongContextComponent
-
doubleClick
public void doubleClick(ActionEvent event)
Initializes this component and its sub components.- Specified by:
doubleClick
in 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:SongContextComponent
Is 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 mainSongTable
changes and stays stable for at least 250ms (SongContextComponent.UPDATE_DELAY
).- Specified by:
update
in 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:View
The actual visual component for this view.- Specified by:
getComponent
in interfaceView
- Returns:
- detail component
-
$$$getRootComponent$$$
public JComponent $$$getRootComponent$$$()
-
-