Package com.tagtraum.beatunes
Class PlayListComboBoxModel
- java.lang.Object
-
- javax.swing.AbstractListModel<PlayList>
-
- com.tagtraum.beatunes.PlayListComboBoxModel
-
- All Implemented Interfaces:
PropertyChangeListener
,Serializable
,EventListener
,ComboBoxModel<PlayList>
,TreeModelListener
,ListModel<PlayList>
public class PlayListComboBoxModel extends AbstractListModel<PlayList> implements ComboBoxModel<PlayList>, TreeModelListener, PropertyChangeListener
ComboBoxModel
that shows playlists in exactly the same order as thePlayListTreeModel
.- Author:
- Hendrik Schreiber
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.AbstractListModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description PlayListComboBoxModel(MainWindow mainWindow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlayList
getElementAt(int index)
Object
getSelectedItem()
int
getSize()
boolean
isIncludeOnlineLists()
void
propertyChange(PropertyChangeEvent evt)
void
rebuildModel()
void
setIncludeOnlineLists(boolean includeOnlineLists)
Set this totrue
, if you want to include playlists that are not stored locally, like Beatport charts.void
setSelectedItem(Object anItem)
void
treeNodesChanged(TreeModelEvent e)
void
treeNodesInserted(TreeModelEvent e)
void
treeNodesRemoved(TreeModelEvent e)
void
treeStructureChanged(TreeModelEvent e)
-
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.ListModel
addListDataListener, removeListDataListener
-
-
-
-
Constructor Detail
-
PlayListComboBoxModel
public PlayListComboBoxModel(MainWindow mainWindow)
- Parameters:
mainWindow
- mainWindow
-
-
Method Detail
-
isIncludeOnlineLists
public boolean isIncludeOnlineLists()
- See Also:
setIncludeOnlineLists(boolean)
-
setIncludeOnlineLists
public void setIncludeOnlineLists(boolean includeOnlineLists)
Set this totrue
, if you want to include playlists that are not stored locally, like Beatport charts.- Parameters:
includeOnlineLists
-true
orfalse
-
setSelectedItem
public void setSelectedItem(Object anItem)
- Specified by:
setSelectedItem
in interfaceComboBoxModel<PlayList>
-
getSelectedItem
public Object getSelectedItem()
- Specified by:
getSelectedItem
in interfaceComboBoxModel<PlayList>
-
propertyChange
public void propertyChange(PropertyChangeEvent evt)
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
treeNodesChanged
public void treeNodesChanged(TreeModelEvent e)
- Specified by:
treeNodesChanged
in interfaceTreeModelListener
-
treeNodesInserted
public void treeNodesInserted(TreeModelEvent e)
- Specified by:
treeNodesInserted
in interfaceTreeModelListener
-
treeNodesRemoved
public void treeNodesRemoved(TreeModelEvent e)
- Specified by:
treeNodesRemoved
in interfaceTreeModelListener
-
treeStructureChanged
public void treeStructureChanged(TreeModelEvent e)
- Specified by:
treeStructureChanged
in interfaceTreeModelListener
-
rebuildModel
public void rebuildModel()
-
getElementAt
public PlayList getElementAt(int index)
- Specified by:
getElementAt
in interfaceListModel<PlayList>
-
-