/[svn]/jsampler/trunk/src/org/jsampler/view/fantasia/DevicesPane.java
ViewVC logotype

Annotation of /jsampler/trunk/src/org/jsampler/view/fantasia/DevicesPane.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1729 - (hide annotations) (download)
Tue Apr 29 22:22:40 2008 UTC (16 years, 1 month ago) by iliev
File size: 3214 byte(s)
* Added support for handling lost files in the Instruments Database
  (In the Instruments Database window choose Actions/Check For Lost Files)
* Fantasia: Added option to show the Instruments Database
  on the Right-Side Pane of the Fantasia's main window
  (choose Edit/Preferences, then click the `View' tab)
* Added new menu item in the Instruments Database window: Edit/Find
* Some minor bugfixes and enhancements

1 iliev 1286 /*
2     * JSampler - a java front-end for LinuxSampler
3     *
4     * Copyright (C) 2005-2007 Grigor Iliev <grigor@grigoriliev.com>
5     *
6     * This file is part of JSampler.
7     *
8     * JSampler is free software; you can redistribute it and/or modify
9     * it under the terms of the GNU General Public License version 2
10     * as published by the Free Software Foundation.
11     *
12     * JSampler is distributed in the hope that it will be useful,
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     * GNU General Public License for more details.
16     *
17     * You should have received a copy of the GNU General Public License
18     * along with JSampler; if not, write to the Free Software
19     * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20     * MA 02111-1307 USA
21     */
22    
23     package org.jsampler.view.fantasia;
24    
25     import java.awt.BorderLayout;
26     import java.awt.Dimension;
27     import java.awt.Graphics;
28     import java.awt.Insets;
29    
30     import java.beans.PropertyChangeEvent;
31     import java.beans.PropertyChangeListener;
32    
33 iliev 1729 import javax.swing.BorderFactory;
34 iliev 1286 import javax.swing.JPanel;
35    
36     import org.jvnet.substance.SubstanceLookAndFeel;
37     import org.jvnet.substance.button.ClassicButtonShaper;
38     import org.jvnet.substance.utils.SubstanceConstants.FocusKind;
39    
40     import static org.jsampler.view.fantasia.FantasiaI18n.i18n;
41     import static org.jsampler.view.fantasia.FantasiaPrefs.*;
42    
43     /**
44     *
45     * @author Grigor Iliev
46     */
47     public class DevicesPane extends JPanel {
48 iliev 1729 private final TaskPaneContainer taskPaneContainer = new TaskPaneContainer();
49 iliev 1286 private final TaskPane midiDevicesTaskPane = new TaskPane();
50     private final TaskPane audioDevicesTaskPane = new TaskPane();
51    
52     /** Creates a new instance of <code>DevicesPane</code> */
53     public
54     DevicesPane() {
55 iliev 1729 setOpaque(false);
56 iliev 1286 setLayout(new BorderLayout());
57     midiDevicesTaskPane.setTitle(i18n.getLabel("DevicesPane.midiDevicesTaskPane"));
58     midiDevicesTaskPane.setAnimated(preferences().getBoolProperty(ANIMATED));
59    
60     preferences().addPropertyChangeListener(ANIMATED, new PropertyChangeListener() {
61     public void
62     propertyChange(PropertyChangeEvent e) {
63     boolean b = preferences().getBoolProperty(ANIMATED);
64     midiDevicesTaskPane.setAnimated(b);
65     }
66     });
67    
68     audioDevicesTaskPane.setTitle(i18n.getLabel("DevicesPane.audioDevicesTaskPane"));
69     audioDevicesTaskPane.setAnimated(preferences().getBoolProperty(ANIMATED));
70    
71     preferences().addPropertyChangeListener(ANIMATED, new PropertyChangeListener() {
72     public void
73     propertyChange(PropertyChangeEvent e) {
74     boolean b = preferences().getBoolProperty(ANIMATED);
75     audioDevicesTaskPane.setAnimated(b);
76     }
77     });
78    
79     midiDevicesTaskPane.putClientProperty (
80     SubstanceLookAndFeel.FOCUS_KIND, FocusKind.NONE
81     );
82    
83     taskPaneContainer.putClientProperty (
84     SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY, new ClassicButtonShaper()
85     );
86    
87     taskPaneContainer.add(midiDevicesTaskPane);
88     taskPaneContainer.add(audioDevicesTaskPane);
89 iliev 1729 taskPaneContainer.setBorder(BorderFactory.createEmptyBorder());
90 iliev 1286 add(taskPaneContainer);
91    
92     midiDevicesTaskPane.add(new MidiDevicesPane());
93     audioDevicesTaskPane.add(new AudioDevicesPane());
94    
95     taskPaneContainer.setOpaque(false);
96     }
97     }

  ViewVC Help
Powered by ViewVC