Changeset 16965 in josm
- Timestamp:
- 2020-08-29T16:38:56+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryProvidersPanel.java
r16960 r16965 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 6 7 import java.awt.BorderLayout; 7 8 import java.awt.Color; 8 9 import java.awt.Component; … … 101 102 /** The toolbar on the middle of the panel **/ 102 103 public final JToolBar middleToolbar; 103 /** The toolbar on the right of default providers **/104 public final JToolBar defaultToolbar;105 104 106 105 // Private members … … 261 260 JPanel defaultPane = new JPanel(new GridBagLayout()); 262 261 JScrollPane scrolldef = new JScrollPane(defaultTable); 263 scrolldef.setPreferredSize(new Dimension(200, 200));264 262 defaultPane.add(defaultFilter, GBC.eol().insets(0, 0, 0, 0).fill(GridBagConstraints.HORIZONTAL)); 265 263 defaultPane.add(scrolldef, GBC.eol().insets(0, 0, 0, 0).fill(GridBagConstraints.BOTH)); … … 279 277 defaultMap.setZoomControlsVisible(false); 280 278 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)); 282 280 283 281 defaultTableListener = new DefListSelectionListener(); 284 282 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));292 283 293 284 HtmlPanel help = new HtmlPanel(tr("New default entries can be added in the <a href=\"{0}\">Wiki</a>.", 294 285 Config.getUrls().getJOSMWebsite()+"/wiki/Maps")); 295 286 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)); 297 288 298 289 ActivateAction activate = new ActivateAction(); … … 304 295 middleToolbar.setBorderPainted(false); 305 296 middleToolbar.setOpaque(false); 297 middleToolbar.add(new ReloadAction()); 306 298 middleToolbar.add(btnActivate); 307 299 add(middleToolbar, GBC.eol().anchor(GBC.CENTER).insets(5, 5, 5, 0)); … … 309 301 add(Box.createHorizontalGlue(), GBC.eol().fill(GridBagConstraints.HORIZONTAL)); 310 302 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); 312 305 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); 315 307 316 308 activeToolbar = new JToolBar(JToolBar.VERTICAL); … … 322 314 activeToolbar.add(new NewEntryAction(ImageryInfo.ImageryType.WMTS)); 323 315 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)); 325 318 } 326 319
Note:
See TracChangeset
for help on using the changeset viewer.