Set the title of the PDE window based on the current sketch, i.e. something like "sketch_070752a - Processing 0126"
()
| 2605 | * something like "sketch_070752a - Processing 0126" |
| 2606 | */ |
| 2607 | public void updateTitle() { |
| 2608 | setTitle(sketch.getName() + " | Processing " + Base.getVersionName()); |
| 2609 | |
| 2610 | if (!sketch.isUntitled()) { |
| 2611 | // set current file for OS X so that cmd-click in title bar works |
| 2612 | File sketchFile = sketch.getMainFile(); |
| 2613 | getRootPane().putClientProperty("Window.documentFile", sketchFile); |
| 2614 | } else { |
| 2615 | // per other applications, don't set this until the file has been saved |
| 2616 | getRootPane().putClientProperty("Window.documentFile", null); |
| 2617 | } |
| 2618 | |
| 2619 | // toolbar.setText(sketch.getName()); |
| 2620 | } |
| 2621 | |
| 2622 | |
| 2623 | /** |
no test coverage detected