001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.tools.bugreport; 003 004import static org.openstreetmap.josm.tools.I18n.tr; 005 006import javax.swing.BoxLayout; 007import javax.swing.JCheckBox; 008import javax.swing.JPanel; 009 010/** 011 * This panel displays the settings that can be changed before submitting a bug report to the web page. 012 * @author Michael Zangl 013 * @since 10585 014 */ 015public class BugReportSettingsPanel extends JPanel { 016 /** 017 * Creates the new settings panel. 018 * @param report The report this panel should influence. 019 */ 020 public BugReportSettingsPanel(BugReport report) { 021 setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); 022 023 JCheckBox statusReport = new JCheckBox(tr("Include the system status report.")); 024 statusReport.setSelected(report.isIncludeStatusReport()); 025 statusReport.addChangeListener(e -> report.setIncludeStatusReport(statusReport.isSelected())); 026 add(statusReport); 027 028 JCheckBox data = new JCheckBox(tr("Include information about the data you were working on.")); 029 data.setSelected(report.isIncludeData()); 030 data.addChangeListener(e -> report.setIncludeData(data.isSelected())); 031 add(data); 032 033 JCheckBox allStackTraces = new JCheckBox(tr("Include all stack traces.")); 034 allStackTraces.setSelected(report.isIncludeAllStackTraces()); 035 allStackTraces.addChangeListener(e -> report.setIncludeAllStackTraces(allStackTraces.isSelected())); 036 add(allStackTraces); 037 } 038}