further changes, more reworking

This commit is contained in:
benfry
2003-11-08 23:52:51 +00:00
parent d63eeda0a2
commit 227788d1ed
8 changed files with 157 additions and 102 deletions

View File

@@ -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;
}