|
@@ -46,6 +46,7 @@ public class GUI implements CategoryListener {
|
|
|
private final JMenu mnHelp = new JMenu("Help");
|
|
|
private final JCheckBox consoleLogCheckBox = new JCheckBox("Show program console log");
|
|
|
private final JCheckBox useFlexibleDevicesCheckBox = new JCheckBox("Automatically use flexible devices");
|
|
|
+ private final JCheckBox showSupplyBarsCheckBox = new JCheckBox("Show supply bars.");
|
|
|
private final JMenuItem mntmOpen = new JMenuItem("Open");
|
|
|
private final JMenuItem mntmNew = new JMenuItem("New");
|
|
|
private final JMenuItem mntmSave = new JMenuItem("Save");
|
|
@@ -687,6 +688,16 @@ public class GUI implements CategoryListener {
|
|
|
mnNewMenuView.add(mntmCanvasSize);
|
|
|
mnNewMenuView.add(mntmSplitView);
|
|
|
|
|
|
+ /*
|
|
|
+ * Adds Checkbox to turn supply bars on/off
|
|
|
+ */
|
|
|
+ mnNewMenuView.add(showSupplyBarsCheckBox);
|
|
|
+ showSupplyBarsCheckBox.setSelected(true);
|
|
|
+ showSupplyBarsCheckBox.addActionListener(arg0 -> {
|
|
|
+ controller.setShowSupplyBars(showSupplyBarsCheckBox.isSelected());
|
|
|
+ canvas.repaint();
|
|
|
+ });
|
|
|
+
|
|
|
// Split View
|
|
|
mntmSplitView.addActionListener(actionEvent -> {
|
|
|
if (splitPaneCanvasConsole.getLeftComponent() instanceof JSplitPane) {
|