FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

merge additions · processing/processing@927e91c · GitHub

Repository navigation

Commit 927e91c

Browse files
committed
merge additions
2 parents 9f946ff + 3d4bf5c commit 927e91c

28 files changed

Lines changed: 106 additions & 130 deletions

File tree

‎app/build.xml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@
6565
<!-- env used to set classpath below -->
6666
<property environment="env" />
6767

68-
<!-- need to stay at 1.6 until we update ecj.jar -->
69-
<javac source="1.6"
70-
target="1.6"
68+
<javac source="1.7"
69+
target="1.7"
7170
destdir="bin"
7271
excludes="**/tools/format/**"
7372
encoding="UTF-8"

‎app/src/processing/app/WebServer.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ boolean printHeaders(ZipEntry targ, PrintStream ps) throws IOException {
370370
int ind = name.lastIndexOf('.');
371371
String ct = null;
372372
if (ind > 0) {
373-
ct = (String) map.get(name.substring(ind));
373+
ct = map.get(name.substring(ind));
374374
}
375375
if (ct == null) {
376376
//System.err.println("unknown content type " + name.substring(ind));
@@ -417,7 +417,7 @@ boolean printHeaders(File targ, PrintStream ps) throws IOException {
417417
int ind = name.lastIndexOf('.');
418418
String ct = null;
419419
if (ind > 0) {
420-
ct = (String) map.get(name.substring(ind));
420+
ct = map.get(name.substring(ind));
421421
}
422422
if (ct == null) {
423423
ct = "unknown/unknown";

‎app/src/processing/app/languages/PDE_es.properties‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ preferences.requires_restart = requiere reiniciar Processing
120120
preferences.sketchbook_location = Ubicación del sketchbook
121121
preferences.sketchbook_location.popup = Ubicación del sketchbook
122122
preferences.language = Idioma
123-
preferences.editor_and_console_font = Fuenta de la consola y el editor
123+
preferences.editor_and_console_font = Fuente de la consola y el editor
124124
preferences.editor_and_console_font.tip = \
125125
Selecciona la fuente usada en el editor y la consola.<br>\
126126
Sólo las fuentes con caracteres de ancho fijo pueden<br>\

‎app/src/processing/app/platform/LinuxPlatform.java‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,24 @@ public void init(Base base) {
4141
(!javaVendor.contains("Sun") && !javaVendor.contains("Oracle")) ||
4242
javaVM == null || !javaVM.contains("Java")) {
4343
Base.showWarning("Not fond of this Java VM",
44-
"Processing requires Java 6 from Sun (i.e. the sun-java-jdk\n" +
44+
"Processing requires Java 7 from Sun (i.e. the sun-java-jdk\n" +
4545
"package on Ubuntu). Other versions such as OpenJDK, IcedTea,\n" +
4646
"and GCJ are strongly discouraged. Among other things, you're\n" +
4747
"likely to run into problems with sketch window size and\n" +
4848
"placement. For more background, please read the wiki:\n" +
49-
"http://wiki.processing.org/w/Supported_Platforms#Linux", null);
49+
"https://github.com/processing/processing/wiki/Supported-Platforms#Linux", null);
5050
}
51-
52-
// Set x11 WM_CLASS property which is used as the application
51+
52+
// Set x11 WM_CLASS property which is used as the application
5353
// name by Gnome3 and other window managers.
5454
// https://github.com/processing/processing/issues/2534
5555
try {
5656
Toolkit xToolkit = Toolkit.getDefaultToolkit();
57-
java.lang.reflect.Field awtAppClassNameField =
57+
java.lang.reflect.Field awtAppClassNameField =
5858
xToolkit.getClass().getDeclaredField("awtAppClassName");
5959
awtAppClassNameField.setAccessible(true);
6060
awtAppClassNameField.set(xToolkit, "Processing");
61-
61+
6262
} catch(Exception e) {
6363
// In case the implementation details change
6464
e.printStackTrace();

‎app/src/processing/app/platform/ThinkDifferent.java‎

Lines changed: 52 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
Part of the Processing project - http://processing.org
55
6-
Copyright (c) 2012-2013 The Processing Foundation
6+
Copyright (c) 2012-2014 The Processing Foundation
77
Copyright (c) 2007-2012 Ben Fry and Casey Reas
88
99
This program is free software; you can redistribute it and/or
@@ -23,32 +23,28 @@
2323
package processing.app.platform;
2424

2525
import java.awt.event.*;
26+
import java.io.File;
2627

2728
import javax.swing.*;
2829

29-
import processing.app.About;
30-
import processing.app.Base;
31-
import processing.app.Toolkit;
32-
import processing.app.Language;
33-
3430
import com.apple.eawt.*;
31+
import com.apple.eawt.AppEvent.*;
32+
33+
import processing.app.*;
3534

3635

3736
/**
3837
* Deal with issues related to thinking differently. This handles the basic
3938
* Mac OS X menu commands (and apple events) for open, about, prefs, etc.
4039
*
41-
* Based on OSXAdapter.java from Apple DTS.
42-
*
4340
* As of 0140, this code need not be built on platforms other than OS X,
4441
* because of the new platform structure which isolates through reflection.
4542
*
46-
* This suppresses deprecation warnings because to use the new code, all users
47-
* would be forced to use Java Update 3 on OS X 10.6, and Java Update 8 on
48-
* OS X 10.5, which doesn't seem likely at the moment.
43+
* Rewritten for 0232 to remove deprecation issues, per the message
44+
* <a href="http://lists.apple.com/archives/java-dev/2012/Jan/msg00101.html">here</a>.
45+
* (We're able to do this now because we're dropping older Java versions.)
4946
*/
50-
@SuppressWarnings("deprecation")
51-
public class ThinkDifferent implements ApplicationListener {
47+
public class ThinkDifferent {
5248

5349
// pseudo-singleton model; no point in making multiple instances
5450
// of the EAWT application or our adapter
@@ -57,26 +53,54 @@ public class ThinkDifferent implements ApplicationListener {
5753
private static Application application;
5854

5955
// reference to the app where the existing quit, about, prefs code is
60-
private Base base;
56+
//private Base base;
6157

6258

63-
static protected void init(Base base) {
59+
static protected void init(final Base base) {
6460
if (application == null) {
65-
//application = new com.apple.eawt.Application();
6661
application = Application.getApplication();
6762
}
6863
if (adapter == null) {
69-
adapter = new ThinkDifferent(base);
64+
adapter = new ThinkDifferent(); //base);
7065
}
71-
application.addApplicationListener(adapter);
72-
application.setEnabledAboutMenu(true);
73-
application.setEnabledPreferencesMenu(true);
74-
75-
// Set the menubar to be used when nothing else is open. http://j.mp/dkZmka
76-
// Only available since Java for Mac OS X 10.6 Update 1, but removed
77-
// dynamic loading code because that should be installed in 10.6.8, and
78-
// we may be dropped 10.6 really soon anyway
7966

67+
application.setAboutHandler(new AboutHandler() {
68+
public void handleAbout(AboutEvent ae) {
69+
new About(null);
70+
}
71+
});
72+
73+
application.setPreferencesHandler(new PreferencesHandler() {
74+
public void handlePreferences(PreferencesEvent arg0) {
75+
base.handlePrefs();
76+
}
77+
});
78+
79+
application.setOpenFileHandler(new OpenFilesHandler() {
80+
public void openFiles(OpenFilesEvent event) {
81+
for (File file : event.getFiles()) {
82+
base.handleOpen(file.getAbsolutePath());
83+
}
84+
}
85+
});
86+
87+
application.setPrintFileHandler(new PrintFilesHandler() {
88+
public void printFiles(PrintFilesEvent event) {
89+
// TODO not yet implemented
90+
}
91+
});
92+
93+
application.setQuitHandler(new QuitHandler() {
94+
public void handleQuitRequestWith(QuitEvent event, QuitResponse response) {
95+
if (base.handleQuit()) {
96+
response.performQuit();
97+
} else {
98+
response.cancelQuit();
99+
}
100+
}
101+
});
102+
103+
// Set the menubar to be used when nothing else is open.
80104
JMenuBar defaultMenuBar = new JMenuBar();
81105
JMenu fileMenu = buildFileMenu(base);
82106
defaultMenuBar.add(fileMenu);
@@ -107,9 +131,9 @@ static protected void init(Base base) {
107131
}
108132

109133

110-
public ThinkDifferent(Base base) {
111-
this.base = base;
112-
}
134+
// public ThinkDifferent(Base base) {
135+
// this.base = base;
136+
// }
113137

114138

115139
/**
@@ -154,64 +178,4 @@ public void actionPerformed(ActionEvent e) {
154178

155179
return fileMenu;
156180
}
157-
158-
159-
// implemented handler methods. These are basically hooks into existing
160-
// functionality from the main app, as if it came over from another platform.
161-
public void handleAbout(ApplicationEvent ae) {
162-
if (base != null) {
163-
ae.setHandled(true);
164-
new About(null);
165-
} else {
166-
throw new IllegalStateException("handleAbout: Base instance detached from listener");
167-
}
168-
}
169-
170-
171-
public void handlePreferences(ApplicationEvent ae) {
172-
if (base != null) {
173-
base.handlePrefs();
174-
ae.setHandled(true);
175-
} else {
176-
throw new IllegalStateException("handlePreferences: Base instance detached from listener");
177-
}
178-
}
179-
180-
181-
public void handleOpenApplication(ApplicationEvent ae) {
182-
}
183-
184-
185-
public void handleOpenFile(ApplicationEvent ae) {
186-
// System.out.println("got open file event " + ae.getFilename());
187-
String filename = ae.getFilename();
188-
base.handleOpen(filename);
189-
ae.setHandled(true);
190-
}
191-
192-
193-
public void handlePrintFile(ApplicationEvent ae) {
194-
// TODO implement os x print handler here (open app, call handlePrint, quit)
195-
}
196-
197-
198-
public void handleQuit(ApplicationEvent ae) {
199-
if (base != null) {
200-
/*
201-
/ You MUST setHandled(false) if you want to delay or cancel the quit.
202-
/ This is important for cross-platform development -- have a universal quit
203-
/ routine that chooses whether or not to quit, so the functionality is identical
204-
/ on all platforms. This example simply cancels the AppleEvent-based quit and
205-
/ defers to that universal method.
206-
*/
207-
boolean result = base.handleQuit();
208-
ae.setHandled(result);
209-
} else {
210-
throw new IllegalStateException("handleQuit: Base instance detached from listener");
211-
}
212-
}
213-
214-
215-
public void handleReOpenApplication(ApplicationEvent arg0) {
216-
}
217181
}

‎app/src/processing/app/syntax/InputHandler.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public abstract class InputHandler extends KeyAdapter
140140
*/
141141
public static ActionListener getAction(String name)
142142
{
143-
return (ActionListener)actions.get(name);
143+
return actions.get(name);
144144
}
145145

146146
/**

‎build/build.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ remove the spaces for depth since it should be double dash, but screws up commen
916916
<arg line="core -type f -exec rm -rf {} ';'" />
917917
</exec>
918918

919-
<javadoc access="public" author="false" classpath="../core/library/jogl-all.jar:../core/bin:../core/library/gluegen-rt.jar" destdir="javadoc/core" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.6" splitindex="false" use="false" version="false">
919+
<javadoc access="public" author="false" classpath="../core/library/jogl-all.jar:../core/bin:../core/library/gluegen-rt.jar" destdir="javadoc/core" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.7" splitindex="false" use="false" version="false">
920920

921921
<!-- provide links for java.* classes.
922922
also suppresses the java.lang prefix in the text. -->
@@ -943,7 +943,7 @@ remove the spaces for depth since it should be double dash, but screws up commen
943943
<arg line="everything -type f -exec rm -rf {} ';'" />
944944
</exec>
945945

946-
<javadoc access="public" author="false" classpath="../java/libraries/video/library/jna.jar:../java/libraries/serial/bin:lib/antlr.jar:../core/library/jogl-all.jar:../java/libraries/video/bin:lib/apple.jar:lib/jna.jar:lib/ant-launcher.jar:../java/libraries/pdf/bin:lib/ant.jar:../core/bin:../java/libraries/pdf/library/itext.jar:../java/libraries/video/library/gstreamer-java.jar:lib/org-netbeans-swing-outline.jar:../java/libraries/dxf/bin:bin:../java/libraries/net/bin:../java/libraries/serial/library/jssc.jar:../core/library/gluegen-rt.jar:${java.home}/lib/tools.jar" destdir="javadoc/everything" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.6" splitindex="false" use="false" version="false" noqualifier="all">
946+
<javadoc access="public" author="false" classpath="../java/libraries/video/library/jna.jar:../java/libraries/serial/bin:lib/antlr.jar:../core/library/jogl-all.jar:../java/libraries/video/bin:lib/apple.jar:lib/jna.jar:lib/ant-launcher.jar:../java/libraries/pdf/bin:lib/ant.jar:../core/bin:../java/libraries/pdf/library/itext.jar:../java/libraries/video/library/gstreamer-java.jar:lib/org-netbeans-swing-outline.jar:../java/libraries/dxf/bin:bin:../java/libraries/net/bin:../java/libraries/serial/library/jssc.jar:../core/library/gluegen-rt.jar:${java.home}/lib/tools.jar" destdir="javadoc/everything" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.7" splitindex="false" use="false" version="false" noqualifier="all">
947947

948948
<arg value="-notimestamp" />
949949

‎build/shared/tools/MovieMaker/build.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
<target name="compile" description="Compile sources">
1010
<mkdir dir="bin" />
11-
<javac target="1.6"
12-
source="1.6"
11+
<javac target="1.7"
12+
source="1.7"
1313
srcdir="src"
1414
destdir="bin"
1515
encoding="UTF-8"

‎core/build.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<mkdir dir="bin" />
2828
<javac source="1.7"
29-
target="1.7"
29+
target="1.7"
3030
encoding="UTF-8"
3131
includeAntRuntime="false"
3232
debug="true"

‎core/src/processing/data/FloatList.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public void append(FloatList list) {
300300

301301

302302
// same as splice
303-
public void insert(int index, int[] values) {
303+
public void insert(int index, float[] values) {
304304
if (index < 0) {
305305
throw new IllegalArgumentException("insert() index cannot be negative: it was " + index);
306306
}
@@ -328,7 +328,7 @@ public void insert(int index, int[] values) {
328328
}
329329

330330

331-
public void insert(int index, IntList list) {
331+
public void insert(int index, FloatList list) {
332332
insert(index, list.values());
333333
}
334334

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL