Changeset 23389 in osm for applications
- Timestamp:
- 2010-09-28T20:39:51+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/smed
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/src/smed/menu/file/TabManager.java
r23382 r23389 67 67 splugDir = new SmedFile(pluginDirName + "/splug"); 68 68 69 for(SmedPluggable p : plugins){ 70 if(splugDir.isVisible(p.getFileName()) && !splugDir.isDeleted(p.getFileName())) model.addElement (p.getName()); 71 else if(splugDir.isDeleted(p.getFileName())) model.addElement("delete - " + p.getName()); 72 else model.addElement("invisible - " + p.getName()); 73 } 69 if(plugins != null) { 70 for(SmedPluggable p : plugins){ 71 if(splugDir.isVisible(p.getFileName()) && !splugDir.isDeleted(p.getFileName())) model.addElement (p.getName()); 72 else if(splugDir.isDeleted(p.getFileName())) model.addElement("delete - " + p.getName()); 73 else model.addElement("invisible - " + p.getName()); 74 } 75 } else model.addElement("no plugin loaded"); 74 76 75 77 modelSize = model.getSize(); … … 334 336 Icon icon = null; 335 337 336 for(SmedPluggable p : plugins) { 337 String str = model.get(i).toString(); 338 339 if(str.length() > 9 && str.substring(0,9).equals("invisible")) { 340 splugDir.setVisible(p.getFileName(),false); 341 } else splugDir.setVisible(p.getFileName(),true); 338 if(plugins != null) { 339 for(SmedPluggable p : plugins) { 340 String str = model.get(i).toString(); 341 342 if(str.length() > 9 && str.substring(0,9).equals("invisible")) { 343 splugDir.setVisible(p.getFileName(),false); 344 } else splugDir.setVisible(p.getFileName(),true); 342 345 343 if(str.length() > 6 && str.substring(0,6).equals("delete")) {344 splugDir.setDeleted(p.getFileName(),true);345 } else splugDir.setDeleted(p.getFileName(),false);346 if(str.length() > 6 && str.substring(0,6).equals("delete")) { 347 splugDir.setDeleted(p.getFileName(),true); 348 } else splugDir.setDeleted(p.getFileName(),false); 346 349 347 i++;348 }350 i++; 351 } 349 352 350 tabbedPane.removeAll();353 tabbedPane.removeAll(); 351 354 352 JComponent panel = null;355 JComponent panel = null; 353 356 354 for(SmedPluggable p : plugins) {355 if(splugDir.isVisible(p.getFileName()) && !splugDir.isDeleted(p.getFileName())) {356 357 for(SmedPluggable p : plugins) { 358 if(splugDir.isVisible(p.getFileName()) && !splugDir.isDeleted(p.getFileName())) { 359 panel = p.getComponent(); 357 360 358 tabbedPane.addTab(p.getName(),icon, panel, p.getInfo()); 359 } 361 tabbedPane.addTab(p.getName(),icon, panel, p.getInfo()); 362 } 363 } 360 364 } 361 365 … … 390 394 int i = 0; 391 395 392 for(SmedPluggable p : plugins) { 393 if(selModel.isSelectedIndex(i)) model.set(i,s + p.getName()); 394 i++; 396 if(plugins != null) { 397 for(SmedPluggable p : plugins) { 398 if(selModel.isSelectedIndex(i)) model.set(i,s + p.getName()); 399 i++; 400 } 395 401 } 396 402 } -
applications/editors/josm/plugins/smed/src/smed/tabs/SmedTabAction.java
r23382 r23389 4 4 5 5 import java.awt.BorderLayout; 6 import java.awt.Dimension; 6 7 import java.awt.event.ActionEvent; 7 8 import java.awt.event.KeyEvent; … … 58 59 59 60 //Display the window. 60 frame.pack(); 61 frame.setSize(new Dimension(420, 460)); 62 // frame.pack(); 61 63 frame.setVisible(true); 62 64 }
Note:
See TracChangeset
for help on using the changeset viewer.