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