source: josm/trunk/src/org/openstreetmap/josm/gui/bugreport/BugReportSettingsPanel.java@ 13661

Last change on this file since 13661 was 12649, checked in by Don-vip, 7 years ago

see #15182 - code refactoring to avoid dependence on GUI packages from Preferences

File size: 1.5 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.bugreport;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import javax.swing.BoxLayout;
7import javax.swing.JCheckBox;
8import javax.swing.JPanel;
9
10import org.openstreetmap.josm.tools.bugreport.BugReport;
11
12/**
13 * This panel displays the settings that can be changed before submitting a bug report to the web page.
14 * @author Michael Zangl
15 * @since 10585
16 */
17public class BugReportSettingsPanel extends JPanel {
18 /**
19 * Creates the new settings panel.
20 * @param report The report this panel should influence.
21 */
22 public BugReportSettingsPanel(BugReport report) {
23 setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
24
25 JCheckBox statusReport = new JCheckBox(tr("Include the system status report."));
26 statusReport.setSelected(report.isIncludeStatusReport());
27 statusReport.addChangeListener(e -> report.setIncludeStatusReport(statusReport.isSelected()));
28 add(statusReport);
29
30 JCheckBox data = new JCheckBox(tr("Include information about the data you were working on."));
31 data.setSelected(report.isIncludeData());
32 data.addChangeListener(e -> report.setIncludeData(data.isSelected()));
33 add(data);
34
35 JCheckBox allStackTraces = new JCheckBox(tr("Include all stack traces."));
36 allStackTraces.setSelected(report.isIncludeAllStackTraces());
37 allStackTraces.addChangeListener(e -> report.setIncludeAllStackTraces(allStackTraces.isSelected()));
38 add(allStackTraces);
39 }
40}
Note: See TracBrowser for help on using the repository browser.