mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
split welcome, add menu option for debug
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user