()
| 112 | |
| 113 | |
| 114 | public void trigger() { |
| 115 | final JDialog dialog = new JDialog(editor, Language.text("export"), true); |
| 116 | |
| 117 | JPanel panel = new JPanel(); |
| 118 | panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); |
| 119 | panel.add(Box.createVerticalStrut(6)); |
| 120 | |
| 121 | JLabel label = new JLabel(Language.text("export.description"), SwingConstants.CENTER); |
| 122 | label.setBorder(new EmptyBorder(0, 8, 0, 0)); |
| 123 | panel.add(label); |
| 124 | panel.add(Box.createVerticalStrut(12)); |
| 125 | |
| 126 | JPanel platformPanel = new JPanel(); |
| 127 | int half = (variantButtons.size() + 1) / 2; |
| 128 | |
| 129 | Box leftPlatforms = Box.createVerticalBox(); |
| 130 | for (int i = 0; i < half; i++) { |
| 131 | leftPlatforms.add(variantButtons.get(i)); |
| 132 | } |
| 133 | |
| 134 | Box rightPlatforms = Box.createVerticalBox(); |
| 135 | for (int i = half; i < variantButtons.size(); i++) { |
| 136 | rightPlatforms.add(variantButtons.get(i)); |
| 137 | } |
| 138 | |
| 139 | platformPanel.add(leftPlatforms); |
| 140 | platformPanel.add(rightPlatforms); |
| 141 | |
| 142 | platformPanel.setBorder(new TitledBorder(Language.text("export.platforms"))); |
| 143 | platformPanel.setAlignmentX(Component.LEFT_ALIGNMENT); |
| 144 | panel.add(platformPanel); |
| 145 | |
| 146 | int divWidth = platformPanel.getPreferredSize().width; |
| 147 | |
| 148 | final JCheckBox showStopButton = new JCheckBox(Language.text("export.options.show_stop_button")); |
| 149 | showStopButton.setSelected(Preferences.getBoolean("export.application.stop")); |
| 150 | showStopButton.addItemListener(e -> Preferences.setBoolean("export.application.stop", showStopButton.isSelected())); |
| 151 | showStopButton.setEnabled(Preferences.getBoolean("export.application.present")); |
| 152 | showStopButton.setBorder(new EmptyBorder(3, 13, 6, 13)); |
| 153 | |
| 154 | final JCheckBox presentButton = new JCheckBox(Language.text("export.options.present")); |
| 155 | presentButton.setSelected(Preferences.getBoolean("export.application.present")); |
| 156 | presentButton.addItemListener(e -> { |
| 157 | boolean sal = presentButton.isSelected(); |
| 158 | Preferences.setBoolean("export.application.present", sal); |
| 159 | showStopButton.setEnabled(sal); |
| 160 | }); |
| 161 | presentButton.setBorder(new EmptyBorder(3, 13, 3, 13)); |
| 162 | |
| 163 | JPanel presentPanel = new JPanel(); |
| 164 | presentPanel.setLayout(new BoxLayout(presentPanel, BoxLayout.Y_AXIS)); |
| 165 | Box fullScreenBox = Box.createHorizontalBox(); |
| 166 | fullScreenBox.add(presentButton); |
| 167 | |
| 168 | fullScreenBox.add(new ColorPreference("run.present.bgcolor")); |
| 169 | fullScreenBox.add(Box.createHorizontalStrut(10)); |
| 170 | fullScreenBox.add(Box.createHorizontalGlue()); |
| 171 |
no test coverage detected