Creates a new check box menu item to the given container @param c The container @param txt Text for the menu item @param selected Is the check box selected (by default) @param setting Name of the setting where the check-box-selected true/false value is read from (if not found, the "selected" paramet
(Container c,String txt, boolean selected, String setting)
| 151 | * @return The created check box menu item |
| 152 | */ |
| 153 | private JCheckBoxMenuItem createCheckItem(Container c,String txt, |
| 154 | boolean selected, String setting) { |
| 155 | Settings s = new Settings(gui.MainWindow.GUI_NS); |
| 156 | |
| 157 | JCheckBoxMenuItem i = new JCheckBoxMenuItem(txt); |
| 158 | if (setting == null) { |
| 159 | i.setSelected(selected); |
| 160 | } else { |
| 161 | i.setSelected(s.getBoolean(setting, selected)); |
| 162 | } |
| 163 | |
| 164 | i.addActionListener(this); |
| 165 | c.add(i); |
| 166 | |
| 167 | return i; |
| 168 | } |
| 169 | |
| 170 | |
| 171 | private void updatePlayfieldSettings() { |
no test coverage detected