mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 01:29:17 +01:00
further changes, more reworking
This commit is contained in:
@@ -36,11 +36,18 @@ import javax.swing.undo.*;
|
||||
|
||||
|
||||
public class PdeSketchbook {
|
||||
JMenu sketchbookMenu;
|
||||
PdeEditor editor;
|
||||
|
||||
//JMenu sketchbookMenu;
|
||||
JMenu menu;
|
||||
File sketchbookFolder;
|
||||
String sketchbookPath;
|
||||
|
||||
|
||||
public PdeSketchbook(PdeEditor editor) {
|
||||
this.editor = editor;
|
||||
}
|
||||
|
||||
|
||||
// listener for sketchbk items uses getParent() to figure out
|
||||
// the directories above it
|
||||
@@ -58,12 +65,13 @@ public class PdeSketchbook {
|
||||
}
|
||||
}
|
||||
|
||||
public void rebuildSketchbookMenu() {
|
||||
rebuildSketchbookMenu(sketchbookMenu);
|
||||
}
|
||||
|
||||
public void rebuildSketchbookMenu(Menu menu) {
|
||||
menu.removeAll();
|
||||
public JMenu rebuildMenu() {
|
||||
if (menu == null) {
|
||||
menu = new JMenu("Open");
|
||||
} else {
|
||||
menu.removeAll();
|
||||
}
|
||||
|
||||
try {
|
||||
//MenuItem newSketchItem = new MenuItem("New Sketch");
|
||||
@@ -141,6 +149,7 @@ public class PdeSketchbook {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user