Subversion Repositories svn.mios

Rev

Rev 762 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 762 Rev 808
Line 34... Line 34...
34
import javax.swing.UIManager;
34
import javax.swing.UIManager;
35
import javax.swing.event.MenuEvent;
35
import javax.swing.event.MenuEvent;
36
import javax.swing.event.MenuListener;
36
import javax.swing.event.MenuListener;
37
37
38
import org.midibox.apps.virtualkeyboard.VirtualKeyboard;
38
import org.midibox.apps.virtualkeyboard.VirtualKeyboard;
39
import org.midibox.midi.MidiRouterDevice;
39
import org.midibox.midi.VirtualMidiDevice;
40
import org.midibox.midi.gui.MidiDeviceRoutingGUI;
40
import org.midibox.midi.gui.MidiDeviceRoutingGUI;
41
import org.midibox.midi.gui.MidiKeyboardControllerGUI;
41
import org.midibox.midi.gui.MidiKeyboardControllerGUI;
42
import org.midibox.utils.gui.ImageLoader;
42
import org.midibox.utils.gui.ImageLoader;
43
43
44
public class VirtualKeyboardGUI extends JPanel {
44
public class VirtualKeyboardGUI extends JPanel {
Line 79... Line 79...
79
        midiDeviceRoutingGUI = new MidiDeviceRoutingGUI(virtualKeyboard
79
        midiDeviceRoutingGUI = new MidiDeviceRoutingGUI(virtualKeyboard
80
                .getMidiDeviceRouting());
80
                .getMidiDeviceRouting());
81
81
82
        midiDeviceRoutingGUI.setBorder(BorderFactory.createEtchedBorder());
82
        midiDeviceRoutingGUI.setBorder(BorderFactory.createEtchedBorder());
83
83
84
        midiDeviceRoutingGUI.addMidiDeviceIcon(MidiRouterDevice.class,
84
        midiDeviceRoutingGUI.addMidiDeviceIcon(VirtualMidiDevice.class,
85
                ImageLoader.getImageIcon("virtualMidiDevice.png"));
85
                ImageLoader.getImageIcon("virtualMidiDevice.png"));
86
86
87
        add(midiDeviceRoutingGUI, gbc);
87
        add(midiDeviceRoutingGUI, gbc);
88
88
89
        gbc.gridy++;
89
        gbc.gridy++;
Line 91... Line 91...
91
        gbc.fill = GridBagConstraints.NONE;
91
        gbc.fill = GridBagConstraints.NONE;
92
        gbc.weightx = 0;
92
        gbc.weightx = 0;
93
        gbc.weighty = 0;
93
        gbc.weighty = 0;
94
94
95
        midiKeyboardControllerGUI = new MidiKeyboardControllerGUI(
95
        midiKeyboardControllerGUI = new MidiKeyboardControllerGUI(
96
                virtualKeyboard.getMidiKeyboardControllerDevice()
96
                virtualKeyboard.getMidiKeyboardController());
97
                        .getMidiKeyboardController());
-
 
98
97
99
        midiKeyboardControllerGUI.setBorder(BorderFactory.createEtchedBorder());
98
        midiKeyboardControllerGUI.setBorder(BorderFactory.createEtchedBorder());
100
99
101
        add(midiKeyboardControllerGUI, gbc);
100
        add(midiKeyboardControllerGUI, gbc);
102
    }
101
    }
Line 174... Line 173...
174
173
175
    public void setLookAndFeel(String lookAndFeel) {
174
    public void setLookAndFeel(String lookAndFeel) {
176
         
175
177
        this.lookAndFeel = lookAndFeel;
176
        this.lookAndFeel = lookAndFeel;
178
       
177
-
 
178
        if (!lookAndFeel
179
        if (!lookAndFeel.equals(UIManager.getLookAndFeel().getClass().getName())) {
179
                .equals(UIManager.getLookAndFeel().getClass().getName())) {
180
           
180
181
            JOptionPane
181
            JOptionPane
182
            .showMessageDialog(
182
                    .showMessageDialog(
183
                            VirtualKeyboardGUI.this,
183
                            VirtualKeyboardGUI.this,
184
                            "The selected Look & Feel will be applied the next time you restart Virtual Keyboard",
184
                            "The selected Look & Feel will be applied the next time you restart Virtual Keyboard",