52 |
public static class MidiDevicesPane extends JPanel { |
public static class MidiDevicesPane extends JPanel { |
53 |
private final JCheckBox checkAdditionalParams = |
private final JCheckBox checkAdditionalParams = |
54 |
new JCheckBox(i18n.getLabel("JSViewProps.checkAdditionalParams")); |
new JCheckBox(i18n.getLabel("JSViewProps.checkAdditionalParams")); |
55 |
|
|
56 |
public |
public |
57 |
MidiDevicesPane() { |
MidiDevicesPane() { |
58 |
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
77 |
public static class AudioDevicesPane extends JPanel { |
public static class AudioDevicesPane extends JPanel { |
78 |
private final JCheckBox checkAdditionalParams = |
private final JCheckBox checkAdditionalParams = |
79 |
new JCheckBox(i18n.getLabel("JSViewProps.checkAdditionalParams")); |
new JCheckBox(i18n.getLabel("JSViewProps.checkAdditionalParams")); |
80 |
|
|
81 |
public |
public |
82 |
AudioDevicesPane() { |
AudioDevicesPane() { |
83 |
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
98 |
preferences().setBoolProperty(s, checkAdditionalParams.isSelected()); |
preferences().setBoolProperty(s, checkAdditionalParams.isSelected()); |
99 |
} |
} |
100 |
} |
} |
101 |
|
|
102 |
|
public static class ConfirmationMessagesPane extends JPanel { |
103 |
|
private final JCheckBox checkConfirmChannelRemoval = |
104 |
|
new JCheckBox(i18n.getLabel("JSViewProps.checkConfirmChannelRemoval")); |
105 |
|
|
106 |
|
private final JCheckBox checkConfirmDeviceRemoval = |
107 |
|
new JCheckBox(i18n.getLabel("JSViewProps.checkConfirmDeviceRemoval")); |
108 |
|
|
109 |
|
private final JCheckBox checkConfirmAppQuit = |
110 |
|
new JCheckBox(i18n.getLabel("JSViewProps.checkConfirmAppQuit")); |
111 |
|
|
112 |
|
public |
113 |
|
ConfirmationMessagesPane() { |
114 |
|
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
115 |
|
|
116 |
|
checkConfirmChannelRemoval.setAlignmentX(JPanel.LEFT_ALIGNMENT); |
117 |
|
add(checkConfirmChannelRemoval); |
118 |
|
boolean b = preferences().getBoolProperty(CONFIRM_CHANNEL_REMOVAL); |
119 |
|
checkConfirmChannelRemoval.setSelected(b); |
120 |
|
|
121 |
|
checkConfirmDeviceRemoval.setAlignmentX(JPanel.LEFT_ALIGNMENT); |
122 |
|
add(checkConfirmDeviceRemoval); |
123 |
|
b = preferences().getBoolProperty(CONFIRM_DEVICE_REMOVAL); |
124 |
|
checkConfirmDeviceRemoval.setSelected(b); |
125 |
|
|
126 |
|
checkConfirmAppQuit.setAlignmentX(JPanel.LEFT_ALIGNMENT); |
127 |
|
add(checkConfirmAppQuit); |
128 |
|
b = preferences().getBoolProperty(CONFIRM_APP_QUIT); |
129 |
|
checkConfirmAppQuit.setSelected(b); |
130 |
|
|
131 |
|
String s = i18n.getLabel("JSViewProps.ConfirmationMessagesPane"); |
132 |
|
setBorder(BorderFactory.createTitledBorder(s)); |
133 |
|
setMaximumSize(new Dimension(Short.MAX_VALUE, getPreferredSize().height)); |
134 |
|
setAlignmentX(JPanel.LEFT_ALIGNMENT); |
135 |
|
} |
136 |
|
|
137 |
|
public void |
138 |
|
apply() { |
139 |
|
String s = CONFIRM_CHANNEL_REMOVAL; |
140 |
|
preferences().setBoolProperty(s, checkConfirmChannelRemoval.isSelected()); |
141 |
|
|
142 |
|
s = CONFIRM_DEVICE_REMOVAL; |
143 |
|
preferences().setBoolProperty(s, checkConfirmDeviceRemoval.isSelected()); |
144 |
|
|
145 |
|
s = CONFIRM_APP_QUIT; |
146 |
|
preferences().setBoolProperty(s, checkConfirmAppQuit.isSelected()); |
147 |
|
} |
148 |
|
} |
149 |
} |
} |