1 package com.melloware.jukes.gui.view;
2
3 import java.awt.BorderLayout;
4 import java.awt.Dimension;
5 import java.awt.EventQueue;
6 import java.awt.FlowLayout;
7 import java.awt.event.ActionEvent;
8 import java.awt.event.ActionListener;
9 import java.beans.PropertyChangeEvent;
10 import java.beans.PropertyChangeListener;
11 import java.util.Map;
12 import java.util.prefs.Preferences;
13
14 import javax.sound.sampled.SourceDataLine;
15 import javax.swing.BorderFactory;
16 import javax.swing.JComponent;
17 import javax.swing.JLabel;
18 import javax.swing.JPanel;
19 import javax.swing.JProgressBar;
20 import javax.swing.JSplitPane;
21 import javax.swing.JToolBar;
22 import javax.swing.Timer;
23
24 import javazoom.jlgui.basicplayer.BasicController;
25 import javazoom.jlgui.basicplayer.BasicPlayer;
26 import javazoom.jlgui.basicplayer.BasicPlayerEvent;
27 import javazoom.jlgui.basicplayer.BasicPlayerListener;
28
29 import org.apache.commons.lang.StringUtils;
30 import org.apache.commons.logging.Log;
31 import org.apache.commons.logging.LogFactory;
32 import org.apache.log4j.Level;
33 import org.apache.log4j.Logger;
34
35 import com.jgoodies.looks.LookUtils;
36 import com.jgoodies.uif.action.ActionManager;
37 import com.jgoodies.uif.application.Application;
38 import com.jgoodies.uif.panel.SimpleInternalFrame;
39 import com.jgoodies.uif.util.ComponentTreeUtils;
40 import com.jgoodies.uifextras.util.ActionLabel;
41 import com.jgoodies.uifextras.util.UIFactory;
42 import com.melloware.jukes.db.HibernateUtil;
43 import com.melloware.jukes.db.orm.Track;
44 import com.melloware.jukes.file.Playlist;
45 import com.melloware.jukes.file.Disclist;
46 import com.melloware.jukes.file.image.ImageFactory;
47 import com.melloware.jukes.gui.tool.Actions;
48 import com.melloware.jukes.gui.tool.MainModule;
49 import com.melloware.jukes.gui.tool.Resources;
50 import com.melloware.jukes.gui.tool.Settings;
51 import com.melloware.jukes.gui.view.component.SpectrumTimeAnalyzer;
52 import com.melloware.jukes.gui.view.editor.ArtistEditor;
53 import com.melloware.jukes.gui.view.editor.DiscEditor;
54 import com.melloware.jukes.gui.view.editor.EditorPanel;
55 import com.melloware.jukes.gui.view.editor.EmptyPanel;
56 import com.melloware.jukes.gui.view.editor.TrackEditor;
57 import com.melloware.jukes.gui.view.editor.WelcomePanel;
58 import com.melloware.jukes.util.TimeSpan;
59
60
61
62
63
64
65
66
67
68
69 public final class MainPageBuilder
70 implements BasicPlayerListener {
71
72 private static final Log LOG = LogFactory.getLog(MainPageBuilder.class);
73 private static final Dimension PREFERRED_SIZE = LookUtils.IS_LOW_RESOLUTION ? new Dimension(800, 600)
74 : new Dimension(1024, 768);
75 private static final String MAIN_DIVIDER_LOCATION_KEY = "mainDividerLocation";
76 private static final String VIEWER_DIVIDER_LOCATION_KEY = "viewerDividerLocation";
77 private static final String NAVIGATOR_DIVIDER_LOCATION_KEY = "navigatorDividerLocation";
78 private static final String NAVIGATOR_VISIBLE_KEY = "navigatorVisible";
79 private static final String PLAYLIST_VISIBLE_KEY = "playlistVisible";
80 private static final String DISCLIST_VISIBLE_KEY = "disclistVisible";
81 private static final TimeSpan TIMESPAN = new TimeSpan(0);
82 private ActionLabel trackField;
83 private EditorPanel editorPanel;
84 private FilterPanel filterPanel;
85 private JLabel bitrateField;
86 private JLabel durationField;
87 private JPanel mainPage;
88 private JProgressBar elapsedBar;
89 private JSplitPane editorPlaylistSplitPane;
90 private JSplitPane mainSplitPane;
91 private JSplitPane navigatorSplitPane;
92 private long elapsedTime;
93 private final MainFrame mainframe;
94 private final MainModule mainModule;
95 private Map audioInfo;
96 private NavigationPanelBuilder navigationPanel;
97 private final Playlist playlist;
98 private PlaylistPanel playlistPanel;
99 private final Disclist disclist;
100 private DisclistPanel disclistPanel;
101 private SimpleInternalFrame navigator;
102 private Timer timer;
103 private Boolean disclistVisible;
104 private Boolean playlistVisible;
105
106
107
108
109
110
111 MainPageBuilder(MainModule mainModule) {
112 this.mainModule = mainModule;
113 this.playlist = new Playlist();
114 this.disclist = new Disclist();
115 this.mainModule.addPropertyChangeListener(this.playlist);
116 this.mainModule.addPropertyChangeListener(this.disclist);
117 this.mainframe = (MainFrame)Application.getDefaultParentFrame();
118 MainModule.SETTINGS.addPropertyChangeListener(new PresentationSettingsChangeHandler());
119 }
120
121
122
123
124
125
126 public Playlist getPlaylist() {
127 return this.playlist;
128 }
129
130
131
132
133
134
135 public Disclist getDisclist() {
136 return this.disclist;
137 }
138
139
140
141
142 public void setController(BasicController controller) {
143 if (LOG.isDebugEnabled()) {
144 LOG.debug("Controller " + controller);
145 }
146 }
147
148
149
150
151 public void setFilterVisible(boolean b) {
152 if (isFilterVisible() == b) {
153 return;
154 }
155 if (b) {
156 navigatorSplitPane.setTopComponent(navigator);
157 navigatorSplitPane.setBottomComponent(filterPanel);
158 int navigatorDividerLocation = Application.getUserPreferences().getInt(NAVIGATOR_DIVIDER_LOCATION_KEY, -1);
159 if ((navigatorDividerLocation > 50) && (navigatorDividerLocation < (mainPage.getHeight() - 50))) {
160 navigatorSplitPane.setDividerLocation(navigatorDividerLocation);
161 }
162 } else {
163 navigatorSplitPane.setTopComponent(navigator);
164 navigatorSplitPane.setBottomComponent(null);
165 }
166 }
167
168
169
170
171
172
173 public void setPlaylistVisible(boolean visible) {
174
175
176
177
178
179 if (visible) {
180 editorPlaylistSplitPane.setTopComponent(editorPanel);
181 editorPlaylistSplitPane.setBottomComponent(playlistPanel);
182 int verticalDividerLocation = Application.getUserPreferences().getInt(VIEWER_DIVIDER_LOCATION_KEY, -1);
183 if ((verticalDividerLocation > 100) && (verticalDividerLocation < (mainPage.getHeight() - 50))) {
184 editorPlaylistSplitPane.setDividerLocation(verticalDividerLocation);
185 }
186 playlistVisible = true;
187 } else {
188 if (disclistVisible != null) {
189 if (disclistVisible) {
190 editorPlaylistSplitPane.setBottomComponent(disclistPanel);
191 } else {
192 editorPlaylistSplitPane.setBottomComponent(null);
193 }
194 editorPlaylistSplitPane.setTopComponent(editorPanel);
195 playlistVisible = false;
196 } else {
197 editorPlaylistSplitPane.setTopComponent(editorPanel);
198 editorPlaylistSplitPane.setBottomComponent(null);
199 playlistVisible = false;
200 }
201 }
202 }
203
204
205
206
207 public boolean isFilterVisible() {
208 return navigatorSplitPane.getBottomComponent() != null;
209 }
210
211
212
213
214 public boolean isPlaylistVisible() {
215 return playlistVisible;
216
217 }
218
219
220
221
222 public void opened(Object stream, Map properties) {
223 audioInfo = properties;
224
225
226
227
228
229
230
231
232
233
234
235 final Track track = playlist.getCurrentTrack();
236 final String title = track.getName();
237 final String disc = track.getDisc().getName();
238 final String artist = track.getDisc().getArtist().getName();
239 final Long duration = Long.valueOf(track.getDuration() * 1000);
240 final String bitrate = (track.getBitrate().intValue()) + " kbps";
241 final Runnable updateList = new Runnable() {
242 public void run() {
243 trackField.setText(artist + " - " + disc + " - " + title);
244 bitrateField.setText(bitrate);
245 final int ms = (int)(duration.longValue());
246 TIMESPAN.setTime(duration.longValue());
247 durationField.setText(TIMESPAN.getMusicDuration());
248 elapsedBar.setValue(0);
249 elapsedBar.setMaximum(ms);
250
251
252 if (mainframe.getTrayIcon() != null) {
253 mainframe.getTrayIcon().setToolTip(artist + " - " + title);
254 }
255
256
257 refreshUI();
258 }
259 };
260 EventQueue.invokeLater(updateList);
261
262
263 }
264
265
266
267
268 public void progress(int bytesread, long microseconds, byte[] pcmdata, Map properties) {
269 if (audioInfo.containsKey("audio.type")) {
270 String audioformat = (String) audioInfo.get("audio.type");
271 if (audioformat.equalsIgnoreCase("mp3")) {
272 mainframe.getAnalyzer().writeDSP(pcmdata);
273 }
274 }
275
276 this.setElapsedTime(microseconds);
277 }
278
279
280
281
282 public void refreshUI() {
283
284 navigator.updateUI();
285 editorPanel.updateUI();
286
287 }
288
289
290
291
292 public void restoreFrom(Preferences userPrefs) {
293 int mainDividerLocation = userPrefs.getInt(MAIN_DIVIDER_LOCATION_KEY, -1);
294 int verticalDividerLocation = userPrefs.getInt(VIEWER_DIVIDER_LOCATION_KEY, -1);
295 int navigatorDividerLocation = userPrefs.getInt(NAVIGATOR_DIVIDER_LOCATION_KEY, -1);
296 setPlaylistVisible(userPrefs.getBoolean(PLAYLIST_VISIBLE_KEY, true));
297 setDisclistVisible(userPrefs.getBoolean(DISCLIST_VISIBLE_KEY, true));
298 setFilterVisible(userPrefs.getBoolean(NAVIGATOR_VISIBLE_KEY, true));
299
300 if ((mainDividerLocation > 100) && (mainDividerLocation < (mainPage.getWidth() - 50))) {
301 mainSplitPane.setDividerLocation(mainDividerLocation);
302 }
303 if ((verticalDividerLocation > 100) && (verticalDividerLocation < (mainPage.getHeight() - 50))) {
304 editorPlaylistSplitPane.setDividerLocation(verticalDividerLocation);
305 }
306 if ((navigatorDividerLocation > 50) && (navigatorDividerLocation < (mainPage.getHeight() - 50))) {
307 navigatorSplitPane.setDividerLocation(navigatorDividerLocation);
308 }
309 }
310
311
312
313
314 public void stateUpdated(BasicPlayerEvent event) {
315 if (LOG.isDebugEnabled()) {
316 LOG.debug("stateUpdated : " + event.toString());
317 }
318 final SpectrumTimeAnalyzer analyzer = mainframe.getAnalyzer();
319 switch (event.getCode()) {
320
321
322
323 case BasicPlayerEvent.PLAYING:
324 case BasicPlayerEvent.OPENED:
325 case BasicPlayerEvent.RESUMED: {
326 mainframe.updateTrayIcon(ImageFactory.ICO_TRAYPLAY.getImage());
327 if ((audioInfo.containsKey("basicplayer.sourcedataline")) && (analyzer != null)) {
328 analyzer.setupDSP((SourceDataLine)audioInfo.get("basicplayer.sourcedataline"));
329 analyzer.startDSP((SourceDataLine)audioInfo.get("basicplayer.sourcedataline"));
330 }
331 timer.start();
332 break;
333 }
334 case BasicPlayerEvent.PAUSED: {
335 timer.stop();
336 mainframe.updateTrayIcon(ImageFactory.ICO_TRAYPAUSE.getImage());
337 break;
338 }
339 case BasicPlayerEvent.STOPPED: {
340 timer.stop();
341 mainframe.updateTrayIcon(ImageFactory.ICO_TRAYSTOP.getImage());
342 if (analyzer != null) {
343 analyzer.stopDSP();
344 analyzer.repaint();
345 }
346 final Runnable updateList = new Runnable() {
347 public void run() {
348 elapsedBar.setValue(0);
349 TIMESPAN.setTime(0);
350 elapsedBar.setString(TIMESPAN.getMusicDuration());
351 }
352 };
353 EventQueue.invokeLater(updateList);
354 break;
355 }
356 case BasicPlayerEvent.EOM: {
357 timer.stop();
358 final Track track = (Track)getPlaylist().getNext();
359 if (track != null) {
360 mainframe.getPlayer().play(track.getTrackUrl());
361 }
362 break;
363 }
364 default: {
365 break;
366 }
367 }
368 }
369
370
371
372
373
374
375 public void storeIn(Preferences userPrefs) {
376 if (isPlaylistVisible()) {
377 int verticalDividerLocation = editorPlaylistSplitPane.getDividerLocation();
378 userPrefs.putInt(VIEWER_DIVIDER_LOCATION_KEY, verticalDividerLocation);
379 }
380 if (isFilterVisible()) {
381 int navigatorDividerLocation = navigatorSplitPane.getDividerLocation();
382 userPrefs.putInt(NAVIGATOR_DIVIDER_LOCATION_KEY, navigatorDividerLocation);
383 }
384
385 if (isDisclistVisible()) {
386 int verticalDividerLocation = editorPlaylistSplitPane.getDividerLocation();
387 userPrefs.putInt(VIEWER_DIVIDER_LOCATION_KEY, verticalDividerLocation);
388 }
389 int mainDividerLocation = mainSplitPane.getDividerLocation();
390 userPrefs.putInt(MAIN_DIVIDER_LOCATION_KEY, mainDividerLocation);
391 userPrefs.putBoolean(NAVIGATOR_VISIBLE_KEY, isFilterVisible());
392 userPrefs.putBoolean(PLAYLIST_VISIBLE_KEY, isPlaylistVisible());
393 userPrefs.putBoolean(DISCLIST_VISIBLE_KEY, isDisclistVisible());
394 }
395
396
397
398
399
400 JComponent build() {
401 initComponents();
402
403 mainPage = new RefreshedPanel();
404 mainPage.setLayout(new BorderLayout());
405 mainPage.add(new MainToolBarBuilder().build(), BorderLayout.NORTH);
406 mainPage.add(buildMainSplitPane(), BorderLayout.CENTER);
407 mainPage.add(buildStatusBar(), BorderLayout.SOUTH);
408 mainPage.setPreferredSize(PREFERRED_SIZE);
409
410 return mainPage;
411 }
412
413
414
415
416
417 private JComponent buildEditorHelpPanel() {
418 editorPlaylistSplitPane = UIFactory.createStrippedSplitPane(JSplitPane.VERTICAL_SPLIT, buildEditorPanel(),
419 playlistPanel, 0.667);
420 return editorPlaylistSplitPane;
421 }
422
423
424
425
426 private EditorPanel buildEditorPanel() {
427 WelcomePanel welcomePanel = new WelcomePanel();
428
429 editorPanel.addEditor(welcomePanel);
430 editorPanel.addEditor(new EmptyPanel());
431 editorPanel.addEditor(new ArtistEditor());
432 editorPanel.addEditor(new DiscEditor());
433 editorPanel.addEditor(new TrackEditor());
434
435 editorPanel.setActiveEditor(welcomePanel);
436 return editorPanel;
437 }
438
439
440
441
442
443 private JComponent buildFilterPanel() {
444 return UIFactory.createStrippedSplitPane(JSplitPane.VERTICAL_SPLIT, navigator, filterPanel, 0.64);
445 }
446
447
448
449
450
451 private JComponent buildMainSplitPane() {
452 navigatorSplitPane = (JSplitPane)buildFilterPanel();
453 mainSplitPane = UIFactory.createStrippedSplitPane(JSplitPane.HORIZONTAL_SPLIT, navigatorSplitPane,
454 buildEditorHelpPanel(), 0.25);
455 mainSplitPane.setBorder(BorderFactory.createEmptyBorder(6, 4, 0, 4));
456 return mainSplitPane;
457 }
458
459
460
461
462 private JPanel buildStatusBar() {
463 final JPanel statusPanel = new JPanel(new BorderLayout());
464 final JPanel infoPanel = new JPanel(new FlowLayout(FlowLayout.TRAILING));
465 final JToolBar toolbar = MainToolBarBuilder.buildPlayerToolBar();
466 toolbar.setBorder(BorderFactory.createEmptyBorder());
467 infoPanel.setBorder(BorderFactory.createEmptyBorder());
468 statusPanel.add(toolbar, BorderLayout.WEST);
469 statusPanel.add(infoPanel, BorderLayout.EAST);
470 statusPanel.setBorder(BorderFactory.createEmptyBorder());
471 infoPanel.add(trackField);
472 trackField.setBorder(BorderFactory.createEmptyBorder());
473 infoPanel.add(bitrateField);
474 bitrateField.setBorder(BorderFactory.createEmptyBorder());
475 infoPanel.add(durationField);
476 durationField.setBorder(BorderFactory.createEmptyBorder());
477 infoPanel.add(elapsedBar);
478 elapsedBar.setBorder(BorderFactory.createEmptyBorder());
479 return statusPanel;
480 }
481
482
483
484
485 private void initComponents() {
486 navigator = new SimpleInternalFrame(Resources.getString("navigator.label"));
487 navigator.setFrameIcon(Resources.NAVIGATOR_ICON);
488 navigationPanel = new NavigationPanelBuilder(mainModule);
489 navigator.setContent(navigationPanel.build());
490 navigator.setSelected(true);
491 navigator.setMinimumSize(new Dimension(100, 100));
492 navigator.setPreferredSize(new Dimension(160, 200));
493 navigator.setFrameIcon(Resources.NAVIGATOR_ICON);
494
495 filterPanel = new FilterPanel(MainModule.SETTINGS);
496 filterPanel.setSelected(true);
497 filterPanel.setMinimumSize(new Dimension(100, 45));
498 filterPanel.setPreferredSize(new Dimension(100, 45));
499
500 editorPanel = new EditorPanel(mainModule);
501 editorPanel.setMinimumSize(new Dimension(200, 100));
502 editorPanel.setPreferredSize(new Dimension(400, 200));
503
504 playlistPanel = new PlaylistPanel(this.playlist);
505 playlistPanel.setName("playlistPanel");
506 playlistPanel.setMinimumSize(new Dimension(300, 100));
507 playlistPanel.setPreferredSize(new Dimension(300, 100));
508
509
510 disclistPanel = new DisclistPanel(this.disclist);
511 disclistPanel.setName("disclistPanel");
512 disclistPanel.setMinimumSize(new Dimension(300, 100));
513 disclistPanel.setPreferredSize(new Dimension(300, 100));
514
515 trackField = new ActionLabel("");
516 trackField.addActionListener(new ActionListener() {
517
518
519 public void actionPerformed(ActionEvent event) {
520 LOG.debug("Track clicked");
521 if (playlist.getCurrentTrack() != null) {
522 mainModule.selectNodeInTree(playlist.getCurrentTrack());
523 }
524 }
525 });
526 bitrateField = UIFactory.createPlainLabel("");
527 durationField = UIFactory.createPlainLabel("");
528 elapsedBar = new JProgressBar(0, 1);
529 elapsedBar.setIndeterminate(false);
530 elapsedBar.setStringPainted(true);
531 elapsedBar.setString("");
532
533 timer = new Timer(950, new ActionListener() {
534
535 public void actionPerformed(ActionEvent aE) {
536 final int elapsed = (int)(getElapsedTime() / 1000);
537 TIMESPAN.setTime(elapsed);
538 elapsedBar.setValue(elapsed);
539 elapsedBar.setString(TIMESPAN.getMusicDuration());
540 }
541 });
542 }
543
544
545
546
547
548
549 protected synchronized long getElapsedTime() {
550 return this.elapsedTime;
551 }
552
553
554
555
556
557
558 protected synchronized void setElapsedTime(long aElapsedTime) {
559 this.elapsedTime = aElapsedTime;
560 }
561
562
563 private class PresentationSettingsChangeHandler
564 implements PropertyChangeListener {
565
566
567
568
569
570
571 public void propertyChange(PropertyChangeEvent evt) {
572 final String[] props = {
573 Settings.PROPERTYNAME_AUDIT_INFO, Settings.PROPERTYNAME_COVER_SIZE_LARGE,
574 Settings.PROPERTYNAME_COVER_SIZE_SMALL
575 };
576 final String[] refreshprops = {
577 Settings.PROPERTYNAME_DISPLAY_FORMAT_DISC, Settings.PROPERTYNAME_DISPLAY_FORMAT_TRACK,
578 Settings.PROPERTYNAME_NEW_FILE_IN_DAYS
579 };
580 final String[] connectProps = {
581 Settings.PROPERTYNAME_REMOTE_DATABASE_URL, Settings.PROPERTYNAME_DIRECTORY_DB_LOCATION
582 };
583
584 if (Settings.PROPERTYNAME_PLAYER_BUFFER_SIZE.equals(evt.getPropertyName())) {
585 LOG.debug("Buffer size changed");
586 BasicPlayer.EXTERNAL_BUFFER_SIZE = MainModule.SETTINGS.getPlayerBufferSize();
587 }
588
589 if (Settings.PROPERTYNAME_LOG_LEVEL.equals(evt.getPropertyName())) {
590 LOG.info("Log Level changed");
591 Logger.getRootLogger().setLevel(Level.toLevel(MainModule.SETTINGS.getLogLevel()));
592 Logger.getLogger("com.melloware").setLevel(Level.toLevel(MainModule.SETTINGS.getLogLevel()));
593 Logger.getLogger("com.melloware.jukes.gui").setLevel(Level.toLevel(MainModule.SETTINGS.getLogLevel()));
594 }
595
596
597 if (StringUtils.indexOfAny(evt.getPropertyName(), props) >= 0) {
598 LOG.debug("Editor options changed");
599 editorPanel.clearEditors();
600 buildEditorPanel();
601 }
602
603
604 if (StringUtils.indexOfAny(evt.getPropertyName(), connectProps) >= 0) {
605 LOG.debug("DB Location changed, reconnecting to DB and refreshing tree.");
606 HibernateUtil.shutdown();
607 final String remoteURL = MainModule.SETTINGS.getRemoteDatabaseURL();
608 if ((StringUtils.isNotBlank(remoteURL)) && (!Settings.DEFAULT_REMOTE_DATABASE_URL.equals(remoteURL))) {
609 HibernateUtil.setRemoteUrl(remoteURL);
610 } else {
611 HibernateUtil.setRemoteUrl(null);
612 }
613 ActionManager.get(Actions.CONNECT_ID).actionPerformed(null);
614 }
615
616
617 if (StringUtils.indexOfAny(evt.getPropertyName(), refreshprops) >= 0) {
618 LOG.debug("Navigation options changed.");
619 ActionManager.get(Actions.REFRESH_ID).actionPerformed(null);
620 }
621
622 if (Settings.PROPERTYNAME_ANALYZER_MODE.equals(evt.getPropertyName())) {
623 mainframe.getAnalyzer().setDisplayMode(MainModule.SETTINGS.getAnalyzerMode());
624 }
625 }
626 }
627
628 private class RefreshedPanel
629 extends JPanel {
630
631
632
633
634 public void updateUI() {
635 super.updateUI();
636 if (getComponentCount() == 0) {
637 return;
638 }
639 if ((editorPlaylistSplitPane == null) || isPlaylistVisible()) {
640 return;
641 }
642 ComponentTreeUtils.updateComponentTreeUI(editorPlaylistSplitPane);
643 }
644
645 }
646
647
648
649
650
651
652 public void setDisclistVisible(boolean visible) {
653 if (visible) {
654 editorPlaylistSplitPane.setTopComponent(editorPanel);
655 editorPlaylistSplitPane.setBottomComponent(disclistPanel);
656 int verticalDividerLocation = Application.getUserPreferences().getInt(VIEWER_DIVIDER_LOCATION_KEY, -1);
657 if ((verticalDividerLocation > 100) && (verticalDividerLocation < (mainPage.getHeight() - 50))) {
658 editorPlaylistSplitPane.setDividerLocation(verticalDividerLocation);
659 }
660 disclistVisible = true;
661 } else {
662 if (playlistVisible != null) {
663 if (playlistVisible) {
664 editorPlaylistSplitPane.setBottomComponent(playlistPanel);
665 } else {
666 editorPlaylistSplitPane.setBottomComponent(null);
667 }
668 editorPlaylistSplitPane.setTopComponent(editorPanel);
669 disclistVisible = false;
670 } else {
671 editorPlaylistSplitPane.setTopComponent(editorPanel);
672 editorPlaylistSplitPane.setBottomComponent(null);
673 disclistVisible = false;
674 }
675 }
676 }
677
678
679
680
681
682 public boolean isDisclistVisible() {
683
684 return disclistVisible;
685
686 }
687
688
689
690
691 public String panelVisible() {
692 String panelName;
693 if (editorPlaylistSplitPane.getBottomComponent() != null) {
694 panelName = editorPlaylistSplitPane.getBottomComponent().getName();
695 } else {
696 panelName = "No Panel";
697 }
698 return panelName;
699 }
700
701 }