Changeset 31268 in osm for applications/editors/josm/plugins/mapillary/src
- Timestamp:
- 2015-06-15T19:08:47+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java
r31266 r31268 76 76 false); 77 77 ZOOM_MENU = MainMenu.add(Main.main.menu.viewMenu, zoomAction, 78 false );78 false, 15); 79 79 80 80 EXPORT_MENU.setEnabled(false); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryToggleDialog.java
r31267 r31268 95 95 96 96 mode = NORMAL_MODE; 97 this.setLayout(new BorderLayout()); 98 top = new JPanel(); 99 top.setLayout(new BorderLayout()); 100 top.add(titleBar, BorderLayout.NORTH); 97 /* 98 * this.setLayout(new BorderLayout()); top = new JPanel(); 99 * top.setLayout(new BorderLayout()); top.add(titleBar, 100 * BorderLayout.NORTH); 101 */ 101 102 createLayout(mapillaryImageDisplay, normalMode, 102 103 Main.pref.getBoolean("mapillary.reverse-buttons")); 104 disableAllButtons(); 103 105 } 104 106 … … 153 155 if (this.image == null) { 154 156 mapillaryImageDisplay.setImage(null); 155 titleBar.setTitle( BASE_TITLE);157 titleBar.setTitle(tr(BASE_TITLE)); 156 158 disableAllButtons(); 157 159 return; 158 160 } 159 161 if (image instanceof MapillaryImage) { 162 mapillaryImageDisplay.hyperlink.setVisible(true); 160 163 MapillaryImage mapillaryImage = (MapillaryImage) this.image; 161 String title = BASE_TITLE;164 String title = tr(BASE_TITLE); 162 165 if (mapillaryImage.getUser() != null) 163 166 title += " -- " + mapillaryImage.getUser(); … … 214 217 imageCache.submit(this, false); 215 218 } else if (image instanceof MapillaryImportedImage) { 219 mapillaryImageDisplay.hyperlink.setVisible(false); 216 220 this.nextButton.setEnabled(false); 217 221 this.previousButton.setEnabled(false); … … 234 238 nextSignalButton.setEnabled(false); 235 239 previousSignalButton.setEnabled(false); 240 mapillaryImageDisplay.hyperlink.setVisible(false); 236 241 } 237 242 … … 385 390 public void createLayout(Component data, List<SideButton> buttons, 386 391 boolean reverse) { 387 add(data, BorderLayout.CENTER); 388 if (!buttons.isEmpty() && buttons.get(0) != null) { 392 JPanel panel = new JPanel(); 393 panel.setLayout(new BorderLayout()); 394 panel.add(data, BorderLayout.CENTER); 395 if (reverse) { 389 396 buttonsPanel = new JPanel(new GridLayout(1, 1)); 390 final JPanel buttonRowPanel = new JPanel(Main.pref.getBoolean(391 "dialog.align.left", false) ? new FlowLayout(392 FlowLayout.LEFT) : new GridLayout(1, buttons.size()));393 buttonsPanel.add(buttonRowPanel);394 for (SideButton button : buttons)395 buttonRowPanel.add(button);396 if (reverse)397 top.add(buttonsPanel, BorderLayout.SOUTH);398 else399 add(buttonsPanel, BorderLayout.SOUTH);400 } 401 add(top, BorderLayout.NORTH);397 if (!buttons.isEmpty() && buttons.get(0) != null) { 398 final JPanel buttonRowPanel = new JPanel(Main.pref.getBoolean( 399 "dialog.align.left", false) ? new FlowLayout( 400 FlowLayout.LEFT) : new GridLayout(1, buttons.size())); 401 buttonsPanel.add(buttonRowPanel); 402 for (SideButton button : buttons) 403 buttonRowPanel.add(button); 404 } 405 panel.add(buttonsPanel, BorderLayout.NORTH); 406 createLayout(panel, true, null); 407 } else 408 createLayout(panel, true, buttons); 402 409 } 403 410
Note:
See TracChangeset
for help on using the changeset viewer.