Subversion Repositories svn.mios

Rev

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

Rev 710 Rev 738
Line 24... Line 24...
24
import java.awt.Dimension;
24
import java.awt.Dimension;
25
import java.awt.event.ActionEvent;
25
import java.awt.event.ActionEvent;
26
import java.awt.event.ActionListener;
26
import java.awt.event.ActionListener;
27
import java.util.Observable;
27
import java.util.Observable;
28
import java.util.Observer;
28
import java.util.Observer;
29
import javax.swing.JButton;
-
 
30
29
31
import javax.swing.BorderFactory;
30
import javax.swing.BorderFactory;
32
import javax.swing.BoxLayout;
31
import javax.swing.BoxLayout;
-
 
32
import javax.swing.JButton;
33
import javax.swing.JLabel;
33
import javax.swing.JLabel;
34
import javax.swing.JPanel;
34
import javax.swing.JPanel;
35
import javax.swing.JToggleButton;
35
import javax.swing.JToggleButton;
36
import javax.swing.border.BevelBorder;
36
import javax.swing.border.BevelBorder;
37
37
38
import org.midibox.sidedit.SIDEditController;
38
import org.midibox.sidedit.SIDEditController;
39
import org.midibox.sidedit.gui.bassline.BasslineGUI;
39
import org.midibox.sidedit.gui.bassline.BasslineGUI;
40
import org.midibox.sidedit.gui.drum.DrumGUI;
40
import org.midibox.sidedit.gui.drum.DrumGUI;
-
 
41
import org.midibox.sidedit.gui.ensemble.EnsembleGUI;
41
import org.midibox.sidedit.gui.lead.LeadGUI;
42
import org.midibox.sidedit.gui.lead.LeadGUI;
42
import org.midibox.sidedit.gui.multi.MultiGUI;
43
import org.midibox.sidedit.gui.multi.MultiGUI;
43
import org.midibox.sidedit.gui.ensemble.EnsembleGUI;
-
 
44
import org.midibox.sidlibr.Patch;
44
import org.midibox.sidlibr.Patch;
45
import org.midibox.utils.gui.ImageLoader;
45
import org.midibox.utils.gui.ImageLoader;
46
import org.midibox.utils.gui.MyButtonUI;
46
import org.midibox.utils.gui.MyButtonUI;
47
47
48
public class MBSIDV2EditorGUI extends JPanel implements Observer,
48
public class MBSIDV2EditorGUI extends JPanel implements Observer,
Line 52... Line 52...
52
52
53
    private JPanel editPanel;
53
    private JPanel editPanel;
54
54
55
    private JLabel tooltipLabel;
55
    private JLabel tooltipLabel;
56
56
57
    private JToggleButton stereoLink, oscillatorLink, core1Button, core2Button, core3Button, core4Button;
57
    private JToggleButton stereoLink, oscillatorLink, core1Button, core2Button,
-
 
58
            core3Button, core4Button;
58
    private JButton playButton, panicButton;
59
    private JButton playButton, panicButton;
59
60
60
    public MBSIDV2EditorGUI() {
61
    public MBSIDV2EditorGUI() {
61
62
62
        setLayout(new BorderLayout());
63
        setLayout(new BorderLayout());
Line 120... Line 121...
120
        statusBar.setLayout(new BorderLayout());
121
        statusBar.setLayout(new BorderLayout());
121
        statusBar.setBorder(BorderFactory.createRaisedBevelBorder());
122
        statusBar.setBorder(BorderFactory.createRaisedBevelBorder());
122
123
123
        stereoLink = new JToggleButton();
124
        stereoLink = new JToggleButton();
124
        stereoLink.setIcon(ImageLoader.getImageIcon("stereo.png"));
125
        stereoLink.setIcon(ImageLoader.getImageIcon("stereo.png"));
-
 
126
        stereoLink.setPreferredSize(new Dimension(
125
        stereoLink.setPreferredSize(new Dimension(stereoLink.getPreferredSize().width, 20));
127
                stereoLink.getPreferredSize().width, 20));
126
        stereoLink.addActionListener(this);
128
        stereoLink.addActionListener(this);
127
129
128
        oscillatorLink = new JToggleButton();
130
        oscillatorLink = new JToggleButton();
129
        oscillatorLink.setIcon(ImageLoader.getImageIcon("link.png"));
131
        oscillatorLink.setIcon(ImageLoader.getImageIcon("link.png"));
130
        oscillatorLink.setPreferredSize(new Dimension(oscillatorLink.getPreferredSize().width, 20));
132
        oscillatorLink.setPreferredSize(new Dimension(oscillatorLink
-
 
133
                .getPreferredSize().width, 20));
131
        oscillatorLink.addActionListener(this);
134
        oscillatorLink.addActionListener(this);
132
       
135
133
        playButton = new JButton();
136
        playButton = new JButton();
134
        playButton.setIcon(ImageLoader.getImageIcon("play.png"));
137
        playButton.setIcon(ImageLoader.getImageIcon("play.png"));
-
 
138
        playButton.setPreferredSize(new Dimension(
135
        playButton.setPreferredSize(new Dimension(playButton.getPreferredSize().width, 14));
139
                playButton.getPreferredSize().width, 14));
136
        playButton.addActionListener(this);
140
        playButton.addActionListener(this);
137
       
141
138
        panicButton = new JButton();
142
        panicButton = new JButton();
139
        panicButton.setIcon(ImageLoader.getImageIcon("panic.png"));
143
        panicButton.setIcon(ImageLoader.getImageIcon("panic.png"));
140
        panicButton.setPreferredSize(new Dimension(panicButton.getPreferredSize().width, 14));
144
        panicButton.setPreferredSize(new Dimension(panicButton
-
 
145
                .getPreferredSize().width, 14));
141
        panicButton.addActionListener(this);
146
        panicButton.addActionListener(this);
142
147
143
        JPanel buttonPanel = new JPanel();
148
        JPanel buttonPanel = new JPanel();
144
        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
149
        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
145
        buttonPanel.setBorder(BorderFactory
150
        buttonPanel.setBorder(BorderFactory
Line 148... Line 153...
148
        core1Button = new JToggleButton();
153
        core1Button = new JToggleButton();
149
        core1Button.setUI(new MyButtonUI(ImageLoader.getImageIcon("txOn.png"),
154
        core1Button.setUI(new MyButtonUI(ImageLoader.getImageIcon("txOn.png"),
150
                ImageLoader.getImageIcon("txOff.png")));
155
                ImageLoader.getImageIcon("txOff.png")));
151
        core1Button.setEnabled(false);
156
        core1Button.setEnabled(false);
152
        core2Button = new JToggleButton();
157
        core2Button = new JToggleButton();
153
        core2Button.setUI(new MyButtonUI(ImageLoader.getImageIcon("txOn.png"),ImageLoader.getImageIcon("txOff.png")));
158
        core2Button.setUI(new MyButtonUI(ImageLoader.getImageIcon("txOn.png"),
-
 
159
                ImageLoader.getImageIcon("txOff.png")));
154
        core2Button.setEnabled(false);
160
        core2Button.setEnabled(false);
155
        core3Button = new JToggleButton();
161
        core3Button = new JToggleButton();
156
        core3Button.setUI(new MyButtonUI(ImageLoader.getImageIcon("txOn.png"),
162
        core3Button.setUI(new MyButtonUI(ImageLoader.getImageIcon("txOn.png"),
157
                ImageLoader.getImageIcon("txOff.png")));
163
                ImageLoader.getImageIcon("txOff.png")));
158
        core3Button.setEnabled(false);
164
        core3Button.setEnabled(false);
Line 165... Line 171...
165
        buttonPanel.add(core2Button);
171
        buttonPanel.add(core2Button);
166
        buttonPanel.add(core3Button);
172
        buttonPanel.add(core3Button);
167
        buttonPanel.add(core4Button);
173
        buttonPanel.add(core4Button);
168
174
169
        JLabel empty1Label = new JLabel();
175
        JLabel empty1Label = new JLabel();
-
 
176
        empty1Label.setBorder(BorderFactory
170
        empty1Label.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
177
                .createBevelBorder(BevelBorder.LOWERED));
171
178
172
        tooltipLabel = new JLabel("");
179
        tooltipLabel = new JLabel("");
-
 
180
        tooltipLabel.setBorder(BorderFactory
173
        tooltipLabel.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
181
                .createBevelBorder(BevelBorder.LOWERED));
174
182
175
        JPanel linkPanel = new JPanel();
183
        JPanel linkPanel = new JPanel();
176
        linkPanel.setLayout(new BoxLayout(linkPanel, BoxLayout.X_AXIS));
184
        linkPanel.setLayout(new BoxLayout(linkPanel, BoxLayout.X_AXIS));
177
        linkPanel.add(stereoLink);
185
        linkPanel.add(stereoLink);
178
        linkPanel.add(oscillatorLink);
186
        linkPanel.add(oscillatorLink);