source: josm/trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryDialog.java@ 13745

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

fix #15081 - "Add Imagery URL" help link does not exist - use Help/Preferences/Imagery

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.preferences.imagery;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.awt.Component;
7import java.awt.Dimension;
8
9import org.openstreetmap.josm.gui.ExtendedDialog;
10import org.openstreetmap.josm.gui.preferences.imagery.AddImageryPanel.ContentValidationListener;
11
12/**
13 * Dialog shown to add a new imagery (WMS/TMS/WMTS) source from imagery preferences.
14 * @since 5731
15 */
16public class AddImageryDialog extends ExtendedDialog implements ContentValidationListener {
17
18 /**
19 * Constructs a new AddImageryDialog.
20 * @param parent The parent element that will be used for position and maximum size
21 * @param panel The content that will be displayed in the message dialog
22 */
23 public AddImageryDialog(Component parent, AddImageryPanel panel) {
24 super(parent, tr("Add Imagery URL"), tr("OK"), tr("Cancel"));
25 setButtonIcons("ok", "cancel");
26 setCancelButton(2);
27 configureContextsensitiveHelp("/Preferences/Imagery", true /* show help button */);
28 setContent(panel, false);
29 setMinimumSize(new Dimension(300, 400));
30 panel.addContentValidationListener(this);
31 }
32
33 @Override
34 public void setupDialog() {
35 super.setupDialog();
36 contentChanged(false);
37 }
38
39 @Override
40 public void contentChanged(boolean isValid) {
41 buttons.get(0).setEnabled(isValid);
42 }
43}
Note: See TracBrowser for help on using the repository browser.