Subversion Repositories svn.mios

Rev

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

Rev 304 Rev 628
Line 19... Line 19...
19
 */
19
 */
20
20
21
package org.midibox.sidedit.gui;
21
package org.midibox.sidedit.gui;
22
22
23
import java.awt.BorderLayout;
23
import java.awt.BorderLayout;
24
import java.awt.Dimension;
-
 
25
import java.awt.GridLayout;
24
import java.awt.GridLayout;
-
 
25
import java.util.Vector;
26
26
-
 
27
import javax.swing.BorderFactory;
-
 
28
import javax.swing.BoxLayout;
27
import javax.swing.*;
29
import javax.swing.JPanel;
28
30
29
import java.awt.Component;
-
 
30
import java.awt.Container;
-
 
31
import java.awt.Dimension;
-
 
32
import java.util.Vector;
-
 
33
import  org.midibox.sidedit.gui.controls.*;
-
 
34
import org.midibox.sidedit.SIDEditController;
-
 
35
import org.midibox.sidedit.SIDSysexInfo;
-
 
36
import org.midibox.sidedit.SIDSysexParameterControl;
31
import org.midibox.sidedit.gui.controls.SIDSysexParameterControlGUI;
37
import org.midibox.utils.gui.ImageLoader;
-
 
38
import org.midibox.utils.gui.Knob;
-
 
39
import org.midibox.utils.gui.MyButtonUI;
-
 
40
import org.midibox.sidedit.*;
-
 
41
32
42
public class GlobalGUI extends JPanel{
33
public class GlobalGUI extends JPanel {
43
34
44
    public GlobalGUI(Vector globalGUIv, Vector extGUIv) {
35
    public GlobalGUI(Vector globalGUIv, Vector extGUIv) {
45
        setLayout(new BorderLayout());
36
        setLayout(new BorderLayout());
Line 62... Line 53...
62
        hardwarePanel.setOpaque(false);
53
        hardwarePanel.setOpaque(false);
63
       
54
64
        JPanel subPanel2 = new JPanel();
55
        JPanel subPanel2 = new JPanel();
65
        subPanel2.setLayout(new BoxLayout(subPanel2, BoxLayout.X_AXIS));
56
        subPanel2.setLayout(new BoxLayout(subPanel2, BoxLayout.X_AXIS));
66
        subPanel2.setBorder(BorderFactory.createEtchedBorder());
57
        subPanel2.setBorder(BorderFactory.createEtchedBorder());
-
 
58
        subPanel2.setBorder(BorderFactory
67
        subPanel2.setBorder(BorderFactory.createTitledBorder("Hardware Information Flags"));
59
                .createTitledBorder("Hardware Information Flags"));
68
        subPanel2.setOpaque(false);
60
        subPanel2.setOpaque(false);
69
       
61
70
        subPanel2.add((SIDSysexParameterControlGUI) midiParameterGUI.elementAt(0));    
62
        subPanel2.add((SIDSysexParameterControlGUI) midiParameterGUI
-
 
63
                .elementAt(0));
71
        subPanel2.add((SIDSysexParameterControlGUI) midiParameterGUI.elementAt(1));
64
        subPanel2.add((SIDSysexParameterControlGUI) midiParameterGUI
-
 
65
                .elementAt(1));
72
        subPanel2.add((SIDSysexParameterControlGUI) midiParameterGUI.elementAt(2));
66
        subPanel2.add((SIDSysexParameterControlGUI) midiParameterGUI
-
 
67
                .elementAt(2));
73
       
68
74
        JPanel subPanel3 = new JPanel();
69
        JPanel subPanel3 = new JPanel();
75
        subPanel3.setLayout(new BoxLayout(subPanel3, BoxLayout.Y_AXIS));
70
        subPanel3.setLayout(new BoxLayout(subPanel3, BoxLayout.Y_AXIS));
76
        subPanel3.setBorder(BorderFactory.createEtchedBorder());
71
        subPanel3.setBorder(BorderFactory.createEtchedBorder());
-
 
72
        subPanel3.setBorder(BorderFactory
77
        subPanel3.setBorder(BorderFactory.createTitledBorder("ADSR Bug Workaround"));
73
                .createTitledBorder("ADSR Bug Workaround"));
78
        subPanel3.setOpaque(false);
74
        subPanel3.setOpaque(false);
79
        subPanel3.add((SIDSysexParameterControlGUI) midiParameterGUI.elementAt(3));
75
        subPanel3.add((SIDSysexParameterControlGUI) midiParameterGUI
-
 
76
                .elementAt(3));
80
       
77
81
        JPanel subPanel4 = new JPanel();
78
        JPanel subPanel4 = new JPanel();
82
        subPanel4.setLayout(new BoxLayout(subPanel4, BoxLayout.Y_AXIS));
79
        subPanel4.setLayout(new BoxLayout(subPanel4, BoxLayout.Y_AXIS));
83
        subPanel4.setBorder(BorderFactory.createEtchedBorder());
80
        subPanel4.setBorder(BorderFactory.createEtchedBorder());
84
        subPanel4.setBorder(BorderFactory.createTitledBorder("Master Volume"));
81
        subPanel4.setBorder(BorderFactory.createTitledBorder("Master Volume"));
85
        subPanel4.setOpaque(false);
82
        subPanel4.setOpaque(false);
86
        subPanel4.add((SIDSysexParameterControlGUI) midiParameterGUI.elementAt(4));
83
        subPanel4.add((SIDSysexParameterControlGUI) midiParameterGUI
87
       
-
 
-
 
84
                .elementAt(4));
88
       
85
89
        hardwarePanel.add(subPanel2);
86
        hardwarePanel.add(subPanel2);
90
        hardwarePanel.add(subPanel3);
87
        hardwarePanel.add(subPanel3);
91
        hardwarePanel.add(subPanel4);
88
        hardwarePanel.add(subPanel4);
92
        return hardwarePanel;
89
        return hardwarePanel;
Line 94... Line 91...
94
   
91
95
    protected JPanel createExt(Vector midiParameterGUI) {
92
    protected JPanel createExt(Vector midiParameterGUI) {
96
        JPanel extPanel = new JPanel();
93
        JPanel extPanel = new JPanel();
97
        extPanel.setLayout(new GridLayout(2,8));
94
        extPanel.setLayout(new GridLayout(2, 8));
98
        extPanel.setBorder(BorderFactory.createEtchedBorder());
95
        extPanel.setBorder(BorderFactory.createEtchedBorder());
-
 
96
        extPanel.setBorder(BorderFactory
99
        extPanel.setBorder(BorderFactory.createTitledBorder("External Switch / CV"));
97
                .createTitledBorder("External Switch / CV"));
100
        extPanel.setOpaque(false); 
98
        extPanel.setOpaque(false);
101
       
99
102
        for (int c = 0; c < midiParameterGUI.size(); c++) {
100
        for (int c = 0; c < midiParameterGUI.size(); c++) {
103
            extPanel.add((SIDSysexParameterControlGUI) midiParameterGUI.elementAt(c));
101
            extPanel.add((SIDSysexParameterControlGUI) midiParameterGUI
-
 
102
                    .elementAt(c));
104
        }
103
        }
105
        return extPanel;
104
        return extPanel;
106
    }
105
    }
107
   
106
108
    protected JPanel createKnobs(Vector midiParameterGUI) {
107
    protected JPanel createKnobs(Vector midiParameterGUI) {
Line 124... Line 123...
124
        knobPanel.setLayout(new BoxLayout(knobPanel, BoxLayout.Y_AXIS));
123
        knobPanel.setLayout(new BoxLayout(knobPanel, BoxLayout.Y_AXIS));
125
        knobPanel.setBorder(BorderFactory.createEtchedBorder());
124
        knobPanel.setBorder(BorderFactory.createEtchedBorder());
126
        knobPanel.setBorder(BorderFactory.createTitledBorder(s));
125
        knobPanel.setBorder(BorderFactory.createTitledBorder(s));
127
        knobPanel.setOpaque(false);
126
        knobPanel.setOpaque(false);
128
       
127
129
        knobPanel.add((SIDSysexParameterControlGUI) midiParameterGUI.elementAt(5+offset));
128
        knobPanel.add((SIDSysexParameterControlGUI) midiParameterGUI
-
 
129
                .elementAt(5 + offset));
130
        knobPanel.add((SIDSysexParameterControlGUI) midiParameterGUI.elementAt(6+offset));
130
        knobPanel.add((SIDSysexParameterControlGUI) midiParameterGUI
-
 
131
                .elementAt(6 + offset));
131
        knobPanel.add((SIDSysexParameterControlGUI) midiParameterGUI.elementAt(7+offset));
132
        knobPanel.add((SIDSysexParameterControlGUI) midiParameterGUI
-
 
133
                .elementAt(7 + offset));
132
        knobPanel.add((SIDSysexParameterControlGUI) midiParameterGUI.elementAt(8+offset));
134
        knobPanel.add((SIDSysexParameterControlGUI) midiParameterGUI
-
 
135
                .elementAt(8 + offset));
133
        knobPanel.add((SIDSysexParameterControlGUI) midiParameterGUI.elementAt(9+offset));
136
        knobPanel.add((SIDSysexParameterControlGUI) midiParameterGUI
-
 
137
                .elementAt(9 + offset));
134
       
138
135
        return knobPanel;
139
        return knobPanel;
136
    }
140
    }
137
}
141
}