Subversion Repositories svn.mios

Rev

Rev 213 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 213 Rev 628
Line 28... Line 28...
28
28
29
import javax.swing.BorderFactory;
29
import javax.swing.BorderFactory;
30
import javax.swing.BoxLayout;
30
import javax.swing.BoxLayout;
31
import javax.swing.JPanel;
31
import javax.swing.JPanel;
32
32
33
import  org.midibox.sidedit.gui.controls.*;
-
 
-
 
33
import org.midibox.sidedit.gui.controls.SIDSysexParameterControlGUI;
34
34
35
public class ArpGUI extends JPanel{
-
 
36
    protected ArpGUI(Vector V1GUIv, Vector V2GUIv, Vector V3GUIv, Vector V4GUIv, Vector V5GUIv, Vector V6GUIv) {
-
 
-
 
35
public class ArpGUI extends JPanel {
-
 
36
    protected ArpGUI(Vector V1GUIv, Vector V2GUIv, Vector V3GUIv,
-
 
37
            Vector V4GUIv, Vector V5GUIv, Vector V6GUIv) {
37
        setLayout(new BorderLayout());
38
        setLayout(new BorderLayout());
38
        this.setOpaque(false);
39
        this.setOpaque(false);
39
       
-
 
-
 
40
40
        JPanel panel1 = new JPanel();
41
        JPanel panel1 = new JPanel();
41
        panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
42
        panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
42
        panel1.setOpaque(false);
43
        panel1.setOpaque(false);
43
       
-
 
-
 
44
44
        JPanel panel2 = new JPanel();
45
        JPanel panel2 = new JPanel();
45
        panel2.setLayout(new BoxLayout(panel2, BoxLayout.Y_AXIS));
46
        panel2.setLayout(new BoxLayout(panel2, BoxLayout.Y_AXIS));
46
        panel2.setOpaque(false);
47
        panel2.setOpaque(false);
47
       
-
 
48
        panel2.add(createArp(V1GUIv,"ARP (voice1 - L)"));
-
 
49
        panel2.add(createArp(V2GUIv,"ARP (voice2 - L)"));
-
 
50
        panel2.add(createArp(V3GUIv,"ARP (voice3 - L)"));
-
 
51
       
-
 
-
 
48
-
 
49
        panel2.add(createArp(V1GUIv, "ARP (voice1 - L)"));
-
 
50
        panel2.add(createArp(V2GUIv, "ARP (voice2 - L)"));
-
 
51
        panel2.add(createArp(V3GUIv, "ARP (voice3 - L)"));
-
 
52
52
        JPanel panel3 = new JPanel();
53
        JPanel panel3 = new JPanel();
53
        panel3.setLayout(new BoxLayout(panel3, BoxLayout.Y_AXIS));
54
        panel3.setLayout(new BoxLayout(panel3, BoxLayout.Y_AXIS));
54
        panel3.setOpaque(false);
55
        panel3.setOpaque(false);
55
       
-
 
56
        panel3.add(createArp(V4GUIv,"ARP (voice4 - R)"));
-
 
57
        panel3.add(createArp(V5GUIv,"ARP (voice5 - R)"));
-
 
58
        panel3.add(createArp(V6GUIv,"ARP (voice6 - R)"));
-
 
59
       
-
 
-
 
56
-
 
57
        panel3.add(createArp(V4GUIv, "ARP (voice4 - R)"));
-
 
58
        panel3.add(createArp(V5GUIv, "ARP (voice5 - R)"));
-
 
59
        panel3.add(createArp(V6GUIv, "ARP (voice6 - R)"));
-
 
60
60
        panel1.add(panel2);
61
        panel1.add(panel2);
61
        panel1.add(panel3);    
-
 
62
       
-
 
63
        this.add(panel1, BorderLayout.NORTH);
-
 
-
 
62
        panel1.add(panel3);
-
 
63
-
 
64
        this.add(panel1, BorderLayout.NORTH);
64
    }
65
    }
65
66
66
    protected JPanel createArp(Vector vGUI, String s) {
67
    protected JPanel createArp(Vector vGUI, String s) {
67
        JPanel arpPanel = new JPanel();
68
        JPanel arpPanel = new JPanel();
68
        arpPanel.setLayout(new BoxLayout(arpPanel, BoxLayout.X_AXIS));
69
        arpPanel.setLayout(new BoxLayout(arpPanel, BoxLayout.X_AXIS));
69
        arpPanel.setBorder(BorderFactory.createEtchedBorder());
70
        arpPanel.setBorder(BorderFactory.createEtchedBorder());
70
        arpPanel.setBorder(BorderFactory.createTitledBorder(s));
71
        arpPanel.setBorder(BorderFactory.createTitledBorder(s));
71
        arpPanel.setOpaque(false);
72
        arpPanel.setOpaque(false);
72
       
-
 
-
 
73
73
        JPanel subPanel1 = new JPanel(new GridBagLayout());
74
        JPanel subPanel1 = new JPanel(new GridBagLayout());
74
        subPanel1.setOpaque(false);
75
        subPanel1.setOpaque(false);
75
        GridBagConstraints c = new GridBagConstraints();       
-
 
-
 
76
        GridBagConstraints c = new GridBagConstraints();
76
        c.fill = GridBagConstraints.HORIZONTAL;
77
        c.fill = GridBagConstraints.HORIZONTAL;
77
        c.ipadx = 10;
78
        c.ipadx = 10;
78
        // First row
79
        // First row
79
        c.gridx = 0;c.gridy = 0;c.gridwidth=1;
-
 
-
 
80
        c.gridx = 0;
-
 
81
        c.gridy = 0;
-
 
82
        c.gridwidth = 1;
80
        subPanel1.add((SIDSysexParameterControlGUI) vGUI.elementAt(14), c);
83
        subPanel1.add((SIDSysexParameterControlGUI) vGUI.elementAt(14), c);
81
        c.gridx = 1;c.gridy = 0;c.gridwidth=2;
-
 
-
 
84
        c.gridx = 1;
-
 
85
        c.gridy = 0;
-
 
86
        c.gridwidth = 2;
82
        subPanel1.add((SIDSysexParameterControlGUI) vGUI.elementAt(15), c);
87
        subPanel1.add((SIDSysexParameterControlGUI) vGUI.elementAt(15), c);
83
           
-
 
-
 
88
84
        // Second row
89
        // Second row
85
        c.gridx = 0;c.gridy = 1;c.gridwidth=1;
-
 
-
 
90
        c.gridx = 0;
-
 
91
        c.gridy = 1;
-
 
92
        c.gridwidth = 1;
86
        subPanel1.add((SIDSysexParameterControlGUI) vGUI.elementAt(20), c);
93
        subPanel1.add((SIDSysexParameterControlGUI) vGUI.elementAt(20), c);
87
        c.gridx = 1;c.gridy = 1;c.gridwidth=1;
-
 
-
 
94
        c.gridx = 1;
-
 
95
        c.gridy = 1;
-
 
96
        c.gridwidth = 1;
88
        subPanel1.add((SIDSysexParameterControlGUI) vGUI.elementAt(23), c);
97
        subPanel1.add((SIDSysexParameterControlGUI) vGUI.elementAt(23), c);
89
        c.gridx = 2;c.gridy = 1;c.gridwidth=1;
-
 
-
 
98
        c.gridx = 2;
-
 
99
        c.gridy = 1;
-
 
100
        c.gridwidth = 1;
90
        subPanel1.add((SIDSysexParameterControlGUI) vGUI.elementAt(22), c);
101
        subPanel1.add((SIDSysexParameterControlGUI) vGUI.elementAt(22), c);
91
       
-
 
-
 
102
92
        JPanel subPanel2 = new JPanel();
103
        JPanel subPanel2 = new JPanel();
93
        subPanel2.setLayout(new GridLayout(2,3));
-
 
-
 
104
        subPanel2.setLayout(new GridLayout(2, 3));
94
        subPanel2.setOpaque(false);
105
        subPanel2.setOpaque(false);
95
       
-
 
-
 
106
96
        subPanel2.add((SIDSysexParameterControlGUI) vGUI.elementAt(16));
107
        subPanel2.add((SIDSysexParameterControlGUI) vGUI.elementAt(16));
97
        subPanel2.add((SIDSysexParameterControlGUI) vGUI.elementAt(17));
108
        subPanel2.add((SIDSysexParameterControlGUI) vGUI.elementAt(17));
98
        subPanel2.add((SIDSysexParameterControlGUI) vGUI.elementAt(18));
109
        subPanel2.add((SIDSysexParameterControlGUI) vGUI.elementAt(18));
99
        subPanel2.add((SIDSysexParameterControlGUI) vGUI.elementAt(21));
110
        subPanel2.add((SIDSysexParameterControlGUI) vGUI.elementAt(21));
100
        subPanel2.add((SIDSysexParameterControlGUI) vGUI.elementAt(19));
111
        subPanel2.add((SIDSysexParameterControlGUI) vGUI.elementAt(19));
101
        arpPanel.add(subPanel1);
112
        arpPanel.add(subPanel1);
102
        arpPanel.add(subPanel2);
113
        arpPanel.add(subPanel2);
103
       
-
 
-
 
114
104
        return arpPanel;
115
        return arpPanel;
105
    }  
-
 
-
 
116
    }
106
}
117
}