| 1 | // License: GPL. For details, see LICENSE file.
|
|---|
| 2 | package org.openstreetmap.josm.gui.bugreport;
|
|---|
| 3 |
|
|---|
| 4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
|---|
| 5 |
|
|---|
| 6 | import javax.swing.BoxLayout;
|
|---|
| 7 | import javax.swing.JCheckBox;
|
|---|
| 8 | import javax.swing.JPanel;
|
|---|
| 9 |
|
|---|
| 10 | import 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 | */
|
|---|
| 17 | public 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 | }
|
|---|