Changeset 16965 in josm


Ignore:
Timestamp:
2020-08-29T16:38:56+02:00 (4 years ago)
Author:
simon04
Message:

fix #19731 - Imagery providers: move reload button next to activate button

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryProvidersPanel.java

    r16960 r16965  
    55import static org.openstreetmap.josm.tools.I18n.tr;
    66
     7import java.awt.BorderLayout;
    78import java.awt.Color;
    89import java.awt.Component;
     
    101102    /** The toolbar on the middle of the panel **/
    102103    public final JToolBar middleToolbar;
    103     /** The toolbar on the right of default providers **/
    104     public final JToolBar defaultToolbar;
    105104
    106105    // Private members
     
    261260        JPanel defaultPane = new JPanel(new GridBagLayout());
    262261        JScrollPane scrolldef = new JScrollPane(defaultTable);
    263         scrolldef.setPreferredSize(new Dimension(200, 200));
    264262        defaultPane.add(defaultFilter, GBC.eol().insets(0, 0, 0, 0).fill(GridBagConstraints.HORIZONTAL));
    265263        defaultPane.add(scrolldef, GBC.eol().insets(0, 0, 0, 0).fill(GridBagConstraints.BOTH));
     
    279277        defaultMap.setZoomControlsVisible(false);
    280278        defaultMap.setMinimumSize(new Dimension(100, 200));
    281         add(defaultMap, GBC.std().fill(GridBagConstraints.BOTH).weight(0.33, 0.6).insets(5, 0, 0, 0));
     279        add(defaultMap, GBC.eol().fill(GridBagConstraints.BOTH).weight(0.33, 0.6).insets(5, 0, 0, 0));
    282280
    283281        defaultTableListener = new DefListSelectionListener();
    284282        defaultTable.getSelectionModel().addListSelectionListener(defaultTableListener);
    285 
    286         defaultToolbar = new JToolBar(JToolBar.VERTICAL);
    287         defaultToolbar.setFloatable(false);
    288         defaultToolbar.setBorderPainted(false);
    289         defaultToolbar.setOpaque(false);
    290         defaultToolbar.add(new ReloadAction());
    291         add(defaultToolbar, GBC.eol().anchor(GBC.SOUTH).insets(0, 0, 5, 0));
    292283
    293284        HtmlPanel help = new HtmlPanel(tr("New default entries can be added in the <a href=\"{0}\">Wiki</a>.",
    294285            Config.getUrls().getJOSMWebsite()+"/wiki/Maps"));
    295286        help.enableClickableHyperlinks();
    296         add(help, GBC.eol().insets(10, 0, 0, 0).fill(GBC.HORIZONTAL));
     287        add(help, GBC.eol().insets(5, 0, 0, 0).fill(GBC.HORIZONTAL));
    297288
    298289        ActivateAction activate = new ActivateAction();
     
    304295        middleToolbar.setBorderPainted(false);
    305296        middleToolbar.setOpaque(false);
     297        middleToolbar.add(new ReloadAction());
    306298        middleToolbar.add(btnActivate);
    307299        add(middleToolbar, GBC.eol().anchor(GBC.CENTER).insets(5, 5, 5, 0));
     
    309301        add(Box.createHorizontalGlue(), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
    310302
    311         add(new JLabel(tr("Selected entries:")), GBC.eol().insets(5, 0, 0, 0));
     303        JPanel activePanel = new JPanel(new BorderLayout());
     304        activePanel.add(new JLabel(tr("Selected entries:")), BorderLayout.NORTH);
    312305        JScrollPane scroll = new JScrollPane(activeTable);
    313         add(scroll, GBC.std().fill(GridBagConstraints.BOTH).span(GridBagConstraints.RELATIVE).weight(1.0, 0.4).insets(5, 0, 0, 5));
    314         scroll.setPreferredSize(new Dimension(200, 200));
     306        activePanel.add(scroll, BorderLayout.CENTER);
    315307
    316308        activeToolbar = new JToolBar(JToolBar.VERTICAL);
     
    322314        activeToolbar.add(new NewEntryAction(ImageryInfo.ImageryType.WMTS));
    323315        activeToolbar.add(remove);
    324         add(activeToolbar, GBC.eol().anchor(GBC.NORTH).insets(0, 0, 5, 5));
     316        activePanel.add(activeToolbar, BorderLayout.EAST);
     317        add(activePanel, GBC.eol().fill(GridBagConstraints.BOTH).weight(2.0, 0.4).insets(5, 0, 0, 5));
    325318    }
    326319
Note: See TracChangeset for help on using the changeset viewer.