117 |
new JCheckBox(i18n.getLabel("MidiDevicePane.checkActive")); |
new JCheckBox(i18n.getLabel("MidiDevicePane.checkActive")); |
118 |
|
|
119 |
private final JLabel lPorts = new JLabel(i18n.getLabel("MidiDevicePane.lPorts")); |
private final JLabel lPorts = new JLabel(i18n.getLabel("MidiDevicePane.lPorts")); |
120 |
|
private final JSpinner spinnerPorts; |
|
private final JSpinner spinnerPorts |
|
|
= new JSpinner(new SpinnerNumberModel(1, 1, 100, 1)); |
|
|
|
|
121 |
private final JLabel lPort = new JLabel(i18n.getLabel("MidiDevicePane.lPort")); |
private final JLabel lPort = new JLabel(i18n.getLabel("MidiDevicePane.lPort")); |
122 |
private final JComboBox cbPort = new JComboBox(); |
private final JComboBox cbPort = new JComboBox(); |
123 |
|
|
149 |
p.add(Box.createRigidArea(new Dimension(12, 0))); |
p.add(Box.createRigidArea(new Dimension(12, 0))); |
150 |
p.add(lPorts); |
p.add(lPorts); |
151 |
p.add(Box.createRigidArea(new Dimension(5, 0))); |
p.add(Box.createRigidArea(new Dimension(5, 0))); |
152 |
|
|
153 |
|
Parameter<Integer> prm = midiDeviceModel.getDeviceInfo().getPortsParameter(); |
154 |
|
int min = 1; |
155 |
|
if(prm.getRangeMin() != null) min = prm.getRangeMin().intValue(); |
156 |
|
int max = 50; |
157 |
|
if(prm.getRangeMax() != null) max = prm.getRangeMax().intValue(); |
158 |
|
spinnerPorts = new JSpinner(new SpinnerNumberModel(1, min, max, 1)); |
159 |
|
if(prm.isFixed()) spinnerPorts.setEnabled(false); |
160 |
|
|
161 |
p.add(spinnerPorts); |
p.add(spinnerPorts); |
162 |
p.setOpaque(false); |
p.setOpaque(false); |
163 |
|
|