@@ -255,12 +255,12 @@ public boolean postProcessKeyEvent(KeyEvent e)
255
255
256
256
private boolean ctrlShiftTabWasPressed (KeyEvent e )
257
257
{
258
- return (e .getKeyCode () == KeyEvent .VK_TAB ) && ((e .getModifiers () & KeyEvent .CTRL_MASK ) != 0 ) && ((e .getModifiers () & KeyEvent .SHIFT_MASK ) != 0 ) && _playlistTabbedPane .getDocumentCount () > 0 && e .getID () == KeyEvent .KEY_PRESSED ;
258
+ return (e .getKeyCode () == KeyEvent .VK_TAB ) && ((e .getModifiersEx () & KeyEvent .CTRL_DOWN_MASK ) != 0 ) && ((e .getModifiersEx () & KeyEvent .SHIFT_DOWN_MASK ) != 0 ) && _playlistTabbedPane .getDocumentCount () > 0 && e .getID () == KeyEvent .KEY_PRESSED ;
259
259
}
260
260
261
261
private boolean ctrlTabWasPressed (KeyEvent e )
262
262
{
263
- return (e .getKeyCode () == KeyEvent .VK_TAB ) && ((e .getModifiers () & KeyEvent .CTRL_MASK ) != 0 ) && ((e .getModifiers () & KeyEvent .SHIFT_MASK ) == 0 ) && _playlistTabbedPane .getDocumentCount () > 0 && e .getID () == KeyEvent .KEY_PRESSED ;
263
+ return (e .getKeyCode () == KeyEvent .VK_TAB ) && ((e .getModifiersEx () & KeyEvent .CTRL_DOWN_MASK ) != 0 ) && ((e .getModifiersEx () & KeyEvent .SHIFT_DOWN_MASK ) == 0 ) && _playlistTabbedPane .getDocumentCount () > 0 && e .getID () == KeyEvent .KEY_PRESSED ;
264
264
}
265
265
};
266
266
@@ -290,7 +290,7 @@ private void handleMouseEvent(MouseEvent e)
290
290
{
291
291
int rowIx = _playlistDirectoryTree .getRowForLocation (p .x , p .y );
292
292
boolean isOverItem = rowIx >= 0 ;
293
- if (isOverItem && (e .getModifiers () & ActionEvent .CTRL_MASK ) > 0 )
293
+ if (isOverItem && (e .getModifiersEx () & ActionEvent .CTRL_MASK ) > 0 )
294
294
{
295
295
_playlistDirectoryTree .addSelectionRow (rowIx );
296
296
}
@@ -620,70 +620,70 @@ private void initComponents()
620
620
_miRefreshDirectoryTree = new JMenuItem ();
621
621
_miRemovePlaylistDirectory = new JMenuItem ();
622
622
_miOpenSelectedPlaylists = new JMenuItem ();
623
- _miOpenSelectedPlaylistLocation = new JMenuItem ();
623
+ JMenuItem _miOpenSelectedPlaylistLocation = new JMenuItem ();
624
624
_miExactMatchesSearch = new JMenuItem ();
625
625
_miClosestMatchesSearch = new JMenuItem ();
626
626
_miDeleteFile = new JMenuItem ();
627
627
_miRenameSelectedItem = new JMenuItem ();
628
- _statusPanel = new JPanel ();
628
+ JPanel _statusPanel = new JPanel ();
629
629
statusLabel = new JLabel ();
630
- _splitPane = new JSplitPane ();
630
+ JSplitPane _splitPane = new JSplitPane ();
631
631
_leftSplitPane = new JSplitPane ();
632
- _mediaLibraryPanel = new JPanel ();
633
- _mediaLibraryButtonPanel = new JPanel ();
634
- _addMediaDirButton = new JButton ();
632
+ JPanel _mediaLibraryPanel = new JPanel ();
633
+ JPanel _mediaLibraryButtonPanel = new JPanel ();
634
+ JButton _addMediaDirButton = new JButton ();
635
635
_removeMediaDirButton = new JButton ();
636
636
_refreshMediaDirsButton = new JButton ();
637
- _mediaLibraryScrollPane = new JScrollPane ();
637
+ JScrollPane _mediaLibraryScrollPane = new JScrollPane ();
638
638
_lstMediaLibraryDirs = new JList <String >(new String []{"Please Add A Media Directory..." });
639
- _playlistDirectoryPanel = new JPanel ();
640
- _treeScrollPane = new JScrollPane ();
639
+ JPanel _playlistDirectoryPanel = new JPanel ();
640
+ JScrollPane _treeScrollPane = new JScrollPane ();
641
641
_playlistDirectoryTree = new JTree ();
642
- _playlistsDirectoryButtonPanel = new JPanel ();
643
- _btnSetPlaylistsDir = new JButton ();
644
- _btnRefresh = new JButton ();
642
+ JPanel _playlistsDirectoryButtonPanel = new JPanel ();
643
+ JButton _btnSetPlaylistsDir = new JButton ();
644
+ JButton _btnRefresh = new JButton ();
645
645
_btnOpenSelected = new JButton ();
646
646
_btnQuickRepair = new JButton ();
647
647
_btnDeepRepair = new JButton ();
648
648
_playlistPanel = new JPanel ();
649
- _gettingStartedPanel = new JPanel ();
650
- _verticalPanel = new JPanel ();
651
- _openIconButton = new JButton ();
652
- _spacerPanel = new JPanel ();
653
- _newIconButton = new JButton ();
654
- _docTabPanel = new JPanel ();
655
- _playlistTabbedPane = new JDocumentTabbedPane ();
656
- _mainMenuBar = new JMenuBar ();
657
- _fileMenu = new JMenu ();
658
- _newPlaylistMenuItem = new JMenuItem ();
659
- _loadMenuItem = new JMenuItem ();
660
- _openPlaylistLocationMenuItem = new JMenuItem ();
661
- _closeMenuItem = new JMenuItem ();
662
- _closeAllMenuItem = new JMenuItem ();
663
- jSeparator1 = new Separator ();
664
- _saveMenuItem = new JMenuItem ();
665
- _saveAsMenuItem = new JMenuItem ();
666
- _saveAllMenuItem = new JMenuItem ();
667
- jSeparator2 = new Separator ();
668
- _miReload = new JMenuItem ();
669
- _miReloadAll = new JMenuItem ();
670
- jSeparator3 = new Separator ();
649
+ JPanel _gettingStartedPanel = new JPanel ();
650
+ JPanel _verticalPanel = new JPanel ();
651
+ JButton _openIconButton = new JButton ();
652
+ JPanel _spacerPanel = new JPanel ();
653
+ JButton _newIconButton = new JButton ();
654
+ JPanel _docTabPanel = new JPanel ();
655
+ _playlistTabbedPane = new JDocumentTabbedPane <> ();
656
+ JMenuBar _mainMenuBar = new JMenuBar ();
657
+ JMenu _fileMenu = new JMenu ();
658
+ JMenuItem _newPlaylistMenuItem = new JMenuItem ();
659
+ JMenuItem _loadMenuItem = new JMenuItem ();
660
+ JMenuItem _openPlaylistLocationMenuItem = new JMenuItem ();
661
+ JMenuItem _closeMenuItem = new JMenuItem ();
662
+ JMenuItem _closeAllMenuItem = new JMenuItem ();
663
+ Separator jSeparator1 = new Separator ();
664
+ JMenuItem _saveMenuItem = new JMenuItem ();
665
+ JMenuItem _saveAsMenuItem = new JMenuItem ();
666
+ JMenuItem _saveAllMenuItem = new JMenuItem ();
667
+ Separator jSeparator2 = new Separator ();
668
+ JMenuItem _miReload = new JMenuItem ();
669
+ JMenuItem _miReloadAll = new JMenuItem ();
670
+ Separator jSeparator3 = new Separator ();
671
671
recentMenu = new JMenu ();
672
- _clearHistoryMenuItem = new JMenuItem ();
673
- jSeparator4 = new Separator ();
674
- _appOptionsMenuItem = new JMenuItem ();
675
- jSeparator5 = new Separator ();
676
- _exitMenuItem = new JMenuItem ();
677
- _repairMenu = new JMenu ();
678
- _miBatchRepair = new JMenuItem ();
679
- _miExactMatchRepairOpenPlaylists = new JMenuItem ();
680
- _miClosestMatchRepairOpenPlaylists = new JMenuItem ();
672
+ JMenuItem _clearHistoryMenuItem = new JMenuItem ();
673
+ Separator jSeparator4 = new Separator ();
674
+ JMenuItem _appOptionsMenuItem = new JMenuItem ();
675
+ Separator jSeparator5 = new Separator ();
676
+ JMenuItem _exitMenuItem = new JMenuItem ();
677
+ JMenu _repairMenu = new JMenu ();
678
+ JMenuItem _miBatchRepair = new JMenuItem ();
679
+ JMenuItem _miExactMatchRepairOpenPlaylists = new JMenuItem ();
680
+ JMenuItem _miClosestMatchRepairOpenPlaylists = new JMenuItem ();
681
681
_batchRepairWinampMenuItem = new JMenuItem ();
682
682
_extractPlaylistsMenuItem = new JMenuItem ();
683
- _helpMenu = new JMenu ();
684
- _helpMenuItem = new JMenuItem ();
685
- _updateCheckMenuItem = new JMenuItem ();
686
- _aboutMenuItem = new JMenuItem ();
683
+ JMenu _helpMenu = new JMenu ();
684
+ JMenuItem _helpMenuItem = new JMenuItem ();
685
+ JMenuItem _updateCheckMenuItem = new JMenuItem ();
686
+ JMenuItem _aboutMenuItem = new JMenuItem ();
687
687
688
688
_miRemovePlaylistDirectory .setText ("Remove Playlist Directory" );
689
689
_miRemovePlaylistDirectory .setToolTipText ("Remove playlist directory from configuration" );
@@ -1164,7 +1164,7 @@ public void documentClosed(JDocumentComponent<PlaylistEditCtrl> document)
1164
1164
}
1165
1165
1166
1166
@ Override
1167
- public void documentActivated (JDocumentComponent doc )
1167
+ public void documentActivated (JDocumentComponent < PlaylistEditCtrl > doc )
1168
1168
{
1169
1169
GUIScreen .this .currentTabChanged (doc );
1170
1170
}
@@ -1718,7 +1718,7 @@ private void updateAllComponentTreeUIs()
1718
1718
SwingUtilities .updateComponentTreeUI (_playlistTabbedPane );
1719
1719
}
1720
1720
1721
- private Playlist getPlaylistFromDocumentComponent (JDocumentComponent ctrl )
1721
+ private Playlist getPlaylistFromDocumentComponent (JDocumentComponent < PlaylistEditCtrl > ctrl )
1722
1722
{
1723
1723
return ((PlaylistEditCtrl ) ctrl .getComponent ()).getPlaylist ();
1724
1724
}
@@ -1858,7 +1858,7 @@ private void currentTabChanged()
1858
1858
this .currentTabChanged (_playlistTabbedPane .getActiveTab ());
1859
1859
}
1860
1860
1861
- private void currentTabChanged (JDocumentComponent documentComponent )
1861
+ private void currentTabChanged (JDocumentComponent < PlaylistEditCtrl > documentComponent )
1862
1862
{
1863
1863
Playlist list = documentComponent != null ? ((PlaylistEditCtrl ) documentComponent .getComponent ()).getPlaylist () : null ;
1864
1864
if (list == _currentPlaylist )
@@ -1913,7 +1913,7 @@ private void refreshStatusLabel(Playlist list)
1913
1913
}
1914
1914
}
1915
1915
1916
- private void updateTabTitleForPlaylist (Playlist list , JDocumentComponent comp )
1916
+ private void updateTabTitleForPlaylist (Playlist list , JDocumentComponent < PlaylistEditCtrl > comp )
1917
1917
{
1918
1918
comp .setPath (list .getPath ());
1919
1919
}
@@ -2392,7 +2392,7 @@ private void _newIconButtonActionPerformed()//GEN-FIRST:event__newIconButtonActi
2392
2392
Path path = _currentPlaylist .getPath ();
2393
2393
PlaylistEditCtrl editor = new PlaylistEditCtrl (this );
2394
2394
editor .setPlaylist (_currentPlaylist );
2395
- final JDocumentComponent tempComp = _playlistTabbedPane .openDocument (editor , path );
2395
+ final JDocumentComponent < PlaylistEditCtrl > tempComp = _playlistTabbedPane .openDocument (editor , path );
2396
2396
_playlistTabbedPane .setActiveDocument (path );
2397
2397
2398
2398
_openPlaylists .add (_currentPlaylist );
@@ -2788,9 +2788,7 @@ public static void main(String[] args) throws IOException, InterruptedException,
2788
2788
// EDT Exception
2789
2789
SwingUtilities .invokeAndWait (() -> {
2790
2790
// We are in the event dispatching thread
2791
- Thread .currentThread ().setUncaughtExceptionHandler ((thread , e ) -> {
2792
- _logger .error ("Uncaught Exception" , e );
2793
- });
2791
+ Thread .currentThread ().setUncaughtExceptionHandler ((thread , e ) -> _logger .error ("Uncaught Exception" , e ));
2794
2792
});
2795
2793
2796
2794
IAppOptions tempOptions = ApplicationOptionsConfiguration .load ().getConfig ();
@@ -2845,76 +2843,26 @@ private void addPlaylist(File playlistFile)
2845
2843
this .updatePlaylistDirectoryPanel ();
2846
2844
}
2847
2845
2848
- // <editor-fold defaultstate="collapsed" desc="Generated Code">
2849
- // Variables declaration - do not modify//GEN-BEGIN:variables
2850
- private JMenuItem _aboutMenuItem ;
2851
- private JButton _addMediaDirButton ;
2852
- private JMenuItem _appOptionsMenuItem ;
2853
2846
private JMenuItem _batchRepairWinampMenuItem ;
2854
2847
private JButton _btnDeepRepair ;
2855
2848
private JButton _btnOpenSelected ;
2856
2849
private JButton _btnQuickRepair ;
2857
- private JButton _btnRefresh ;
2858
- private JButton _btnSetPlaylistsDir ;
2859
- private JMenuItem _clearHistoryMenuItem ;
2860
- private JMenuItem _closeAllMenuItem ;
2861
- private JMenuItem _closeMenuItem ;
2862
- private JPanel _docTabPanel ;
2863
2850
private JDocumentTabbedPane <PlaylistEditCtrl > _playlistTabbedPane ;
2864
- private JMenuItem _exitMenuItem ;
2865
2851
private JMenuItem _extractPlaylistsMenuItem ;
2866
- private JMenu _fileMenu ;
2867
- private JPanel _gettingStartedPanel ;
2868
- private JMenu _helpMenu ;
2869
- private JMenuItem _helpMenuItem ;
2870
2852
private JSplitPane _leftSplitPane ;
2871
- private JMenuItem _loadMenuItem ;
2872
- private JMenuItem _openPlaylistLocationMenuItem ;
2873
2853
private JList <String > _lstMediaLibraryDirs ;
2874
- private JMenuBar _mainMenuBar ;
2875
- private JPanel _mediaLibraryButtonPanel ;
2876
- private JPanel _mediaLibraryPanel ;
2877
- private JScrollPane _mediaLibraryScrollPane ;
2878
- private JMenuItem _miBatchRepair ;
2879
- private JMenuItem _miClosestMatchRepairOpenPlaylists ;
2880
2854
private JMenuItem _miClosestMatchesSearch ;
2881
2855
private JMenuItem _miDeleteFile ;
2882
- private JMenuItem _miExactMatchRepairOpenPlaylists ;
2883
2856
private JMenuItem _miExactMatchesSearch ;
2884
2857
private JMenuItem _miOpenSelectedPlaylists ;
2885
- private JMenuItem _miOpenSelectedPlaylistLocation ;
2886
2858
private JMenuItem _miRefreshDirectoryTree ;
2887
2859
private JMenuItem _miRemovePlaylistDirectory ;
2888
- private JMenuItem _miReload ;
2889
- private JMenuItem _miReloadAll ;
2890
2860
private JMenuItem _miRenameSelectedItem ;
2891
- private JButton _newIconButton ;
2892
- private JMenuItem _newPlaylistMenuItem ;
2893
- private JButton _openIconButton ;
2894
- private JPanel _playlistDirectoryPanel ;
2895
2861
private JTree _playlistDirectoryTree ;
2896
2862
private JPanel _playlistPanel ;
2897
2863
private JPopupMenu _playlistTreeRightClickMenu ;
2898
- private JPanel _playlistsDirectoryButtonPanel ;
2899
2864
private JButton _refreshMediaDirsButton ;
2900
2865
private JButton _removeMediaDirButton ;
2901
- private JMenu _repairMenu ;
2902
- private JMenuItem _saveAllMenuItem ;
2903
- private JMenuItem _saveAsMenuItem ;
2904
- private JMenuItem _saveMenuItem ;
2905
- private JPanel _spacerPanel ;
2906
- private JSplitPane _splitPane ;
2907
- private JPanel _statusPanel ;
2908
- private JScrollPane _treeScrollPane ;
2909
- private JMenuItem _updateCheckMenuItem ;
2910
- private JPanel _verticalPanel ;
2911
- private Separator jSeparator1 ;
2912
- private Separator jSeparator2 ;
2913
- private Separator jSeparator3 ;
2914
- private Separator jSeparator4 ;
2915
- private Separator jSeparator5 ;
2916
2866
private JMenu recentMenu ;
2917
2867
private JLabel statusLabel ;
2918
- // End of variables declaration//GEN-END:variables
2919
- // </editor-fold>
2920
2868
}
0 commit comments