- dialogPanel.setLayout(new BorderLayout());
- // Main panel
- JPanel mainPanel = new JPanel();
- mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
- _serverRadios = new JRadioButton[4];
- ButtonGroup serverRadioGroup = new ButtonGroup();
- String[] serverKeys = {"dialog.setmapbg.mapnik", "dialog.setmapbg.osma",
- "dialog.setmapbg.cyclemap", "dialog.setmapbg.other"};
- // action listener for radios
- ActionListener changeListener = new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- enableOK();
+ dialogPanel.setLayout(new BorderLayout(8, 8));
+ // intro label
+ JLabel introLabel = new JLabel(I18nManager.getText("dialog.setmapbg.intro"));
+ introLabel.setBorder(BorderFactory.createEmptyBorder(5, 4, 1, 4));
+ dialogPanel.add(introLabel, BorderLayout.NORTH);
+ // list box
+ _listModel = new MapSourceListModel();
+ _list = new JList(_listModel);
+ _list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ dialogPanel.add(new JScrollPane(_list), BorderLayout.CENTER);
+ _list.addListSelectionListener(new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent arg0) {
+ enableButtons();