Subversion Repositories svn.mios

Rev

Rev 213 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
213 tk 1
/*
2
 * @(#)SIDV2librarian.java  beta1   2008/01/21
3
 *
4
 * Copyright (C) 2008    Rutger Vlek (rutgervlek@hotmail.com)
5
 *
6
 * This application is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation; either version 2 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * This application is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this application; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
 */
20
 
21
package org.midibox.sidedit.gui.lead;
22
 
23
import java.awt.BorderLayout;
24
import java.awt.GridLayout;
25
import java.util.Vector;
26
 
27
import javax.swing.BorderFactory;
28
import javax.swing.BoxLayout;
29
import javax.swing.JPanel;
30
 
628 adamjking 31
import org.midibox.sidedit.gui.controls.SIDSysexParameterControlGUI;
32
 
33
public class SwinGUI extends JPanel {
34
    protected SwinGUI(Vector V1GUIv, Vector V2GUIv, Vector V3GUIv,
35
            Vector V4GUIv, Vector V5GUIv, Vector V6GUIv) {
213 tk 36
        setLayout(new BorderLayout());
37
        this.setOpaque(false);
628 adamjking 38
 
213 tk 39
        JPanel panel1 = new JPanel();
40
        panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
41
        panel1.setOpaque(false);
628 adamjking 42
 
213 tk 43
        JPanel panel2 = new JPanel();
44
        panel2.setLayout(new BoxLayout(panel2, BoxLayout.Y_AXIS));
45
        panel2.setOpaque(false);
628 adamjking 46
 
47
        panel2.add(createSwin(V1GUIv, "SwinSID (voice1 - L)"));
48
        panel2.add(createSwin(V2GUIv, "SwinSID (voice2 - L)"));
49
        panel2.add(createSwin(V3GUIv, "SwinSID (voice3 - L)"));
50
 
213 tk 51
        JPanel panel3 = new JPanel();
52
        panel3.setLayout(new BoxLayout(panel3, BoxLayout.Y_AXIS));
53
        panel3.setOpaque(false);
628 adamjking 54
 
55
        panel3.add(createSwin(V4GUIv, "SwinSID (voice4 - R)"));
56
        panel3.add(createSwin(V5GUIv, "SwinSID (voice5 - R)"));
57
        panel3.add(createSwin(V6GUIv, "SwinSID (voice6 - R)"));
58
 
213 tk 59
        panel1.add(panel2);
628 adamjking 60
        panel1.add(panel3);
61
 
62
        this.add(panel1, BorderLayout.NORTH);
213 tk 63
    }
64
 
65
    protected JPanel createSwin(Vector vGUI, String s) {
628 adamjking 66
 
213 tk 67
        JPanel swinPanel = new JPanel();
628 adamjking 68
        swinPanel.setLayout(new GridLayout(1, 5));
213 tk 69
        swinPanel.setBorder(BorderFactory.createEtchedBorder());
70
        swinPanel.setBorder(BorderFactory.createTitledBorder(s));
71
        swinPanel.setOpaque(false);
628 adamjking 72
 
213 tk 73
        swinPanel.add((SIDSysexParameterControlGUI) vGUI.elementAt(24));
628 adamjking 74
        swinPanel.add((SIDSysexParameterControlGUI) vGUI.elementAt(28));
213 tk 75
        swinPanel.add((SIDSysexParameterControlGUI) vGUI.elementAt(25));
76
        swinPanel.add((SIDSysexParameterControlGUI) vGUI.elementAt(27));
77
        swinPanel.add((SIDSysexParameterControlGUI) vGUI.elementAt(26));
628 adamjking 78
 
213 tk 79
        return swinPanel;
628 adamjking 80
    }
213 tk 81
}