001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.plugins.streetside.gui; 003 004import static org.openstreetmap.josm.tools.I18n.tr; 005 006import javax.swing.JCheckBox; 007import javax.swing.JLabel; 008import javax.swing.JPanel; 009import javax.swing.JSpinner; 010import javax.swing.SpinnerModel; 011import javax.swing.SpinnerNumberModel; 012 013/** 014 * Dialog to set the walk mode options. 015 * 016 * @author nokutu 017 * 018 */ 019public class StreetsideWalkDialog extends JPanel { 020 021 private static final long serialVersionUID = 7974881240732957573L; 022 023 /** Spin containing the interval value. */ 024 public SpinnerModel spin; 025 /** Whether it must wait for the picture to be downloaded */ 026 public JCheckBox waitForPicture; 027 /** Whether the view must follow the selected image. */ 028 public JCheckBox followSelection; 029 /** Go forward or backwards */ 030 public JCheckBox goForward; 031 032 /** 033 * Main constructor 034 */ 035 public StreetsideWalkDialog() { 036 JPanel interval = new JPanel(); 037 spin = new SpinnerNumberModel(2000, 500, 10000, 500); 038 interval.add(new JLabel("Interval (miliseconds): ")); 039 interval.add(new JSpinner(spin)); 040 add(interval); 041 042 waitForPicture = new JCheckBox(tr("Wait for full quality pictures")); 043 waitForPicture.setSelected(true); 044 add(waitForPicture); 045 046 followSelection = new JCheckBox(tr("Follow selected image")); 047 followSelection.setSelected(true); 048 add(followSelection); 049 050 goForward = new JCheckBox(tr("Go forward")); 051 goForward.setSelected(true); 052 add(goForward); 053 } 054}