- Timestamp:
- 2016-05-11T17:10:31+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
r10179 r10190 65 65 } 66 66 67 private SaveLayersModel model;67 private final SaveLayersModel model = new SaveLayersModel(); 68 68 private UserAction action = UserAction.CANCEL; 69 69 private final UploadAndSaveProgressRenderer pnlUploadLayers = new UploadAndSaveProgressRenderer(); … … 94 94 getContentPane().setLayout(new BorderLayout()); 95 95 96 model = new SaveLayersModel();97 96 SaveLayersTable table = new SaveLayersTable(model); 98 97 JScrollPane pane = new JScrollPane(table); … … 411 410 412 411 public void redrawIcon() { 413 try { // Can fail if model is not yet setup properly 414 Image base = ((ImageIcon) getValue(BASE_ICON)).getImage(); 415 BufferedImage newIco = new BufferedImage(ICON_SIZE*3, ICON_SIZE, BufferedImage.TYPE_4BYTE_ABGR); 416 Graphics2D g = newIco.createGraphics(); 417 g.drawImage(model.getLayersToUpload().isEmpty() ? upldDis : upld, ICON_SIZE*0, 0, ICON_SIZE, ICON_SIZE, null); 418 g.drawImage(model.getLayersToSave().isEmpty() ? saveDis : save, ICON_SIZE*1, 0, ICON_SIZE, ICON_SIZE, null); 419 g.drawImage(base, ICON_SIZE*2, 0, ICON_SIZE, ICON_SIZE, null); 420 putValue(SMALL_ICON, new ImageIcon(newIco)); 421 } catch (Exception e) { 422 Main.warn(e); 423 putValue(SMALL_ICON, getValue(BASE_ICON)); 424 } 412 Image base = ((ImageIcon) getValue(BASE_ICON)).getImage(); 413 BufferedImage newIco = new BufferedImage(ICON_SIZE*3, ICON_SIZE, BufferedImage.TYPE_4BYTE_ABGR); 414 Graphics2D g = newIco.createGraphics(); 415 g.drawImage(model.getLayersToUpload().isEmpty() ? upldDis : upld, ICON_SIZE*0, 0, ICON_SIZE, ICON_SIZE, null); 416 g.drawImage(model.getLayersToSave().isEmpty() ? saveDis : save, ICON_SIZE*1, 0, ICON_SIZE, ICON_SIZE, null); 417 g.drawImage(base, ICON_SIZE*2, 0, ICON_SIZE, ICON_SIZE, null); 418 putValue(SMALL_ICON, new ImageIcon(newIco)); 425 419 } 426 420
Note:
See TracChangeset
for help on using the changeset viewer.