split welcome, add menu option for debug

This commit is contained in:
Ben Fry
2015-07-03 11:57:44 -04:00
parent 43dc2b6f68
commit aa690ff926
2 changed files with 10 additions and 26 deletions
+1 -26
View File
@@ -22,7 +22,6 @@
package processing.app.ui;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
@@ -38,29 +37,6 @@ import processing.data.StringDict;
public class WebFrame extends JFrame {
static public void main(String[] args) {
Base.initPlatform();
//File indexFile = Base.getLibFile("welcome/index.html");
final File indexFile = new File("../build/shared/lib/welcome/index.html");
EventQueue.invokeLater(new Runnable() {
public void run() {
new WebFrame(indexFile, 400) {
public void handleSubmit(StringDict dict) {
dict.print();
handleClose();
}
public void handleClose() {
System.exit(0);
}
};
}
});
}
public WebFrame(File file, int width) {
//setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
@@ -89,7 +65,6 @@ public class WebFrame extends JFrame {
}
textPane.addHyperlinkListener(new HyperlinkListener() {
@Override
public void hyperlinkUpdate(HyperlinkEvent e) {
//System.out.println(e);
@@ -115,7 +90,7 @@ public class WebFrame extends JFrame {
});
pack();
setLocationRelativeTo(null);
setVisible(true);
//setVisible(true);
}
@@ -39,6 +39,7 @@ import processing.app.ui.EditorHeader;
import processing.app.ui.EditorState;
import processing.app.ui.EditorToolbar;
import processing.app.ui.Toolkit;
import processing.app.ui.Welcome;
import processing.mode.java.debug.LineBreakpoint;
import processing.mode.java.debug.LineHighlight;
import processing.mode.java.debug.LineID;
@@ -349,6 +350,14 @@ public class JavaEditor extends Editor {
menu.add(item);
}
item = new JMenuItem("Welcome to Processing 3");
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new Welcome();
}
});
menu.add(item);
item = new JMenuItem(Language.text("menu.help.environment"));
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {