| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -65,9 +65,8 @@ | |||
| 65 | 65 | <!-- env used to set classpath below --> | |
| 66 | 66 | <property environment="env" /> | |
| 67 | 67 | ||
| 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" | ||
| 71 | 70 | destdir="bin" | |
| 72 | 71 | excludes="**/tools/format/**" | |
| 73 | 72 | encoding="UTF-8" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -370,7 +370,7 @@ boolean printHeaders(ZipEntry targ, PrintStream ps) throws IOException { | |||
| 370 | 370 | int ind = name.lastIndexOf('.'); | |
| 371 | 371 | String ct = null; | |
| 372 | 372 | if (ind > 0) { | |
| 373 | - ct = (String) map.get(name.substring(ind)); | ||
| 373 | + ct = map.get(name.substring(ind)); | ||
| 374 | 374 | } | |
| 375 | 375 | if (ct == null) { | |
| 376 | 376 | //System.err.println("unknown content type " + name.substring(ind)); | |
@@ -417,7 +417,7 @@ boolean printHeaders(File targ, PrintStream ps) throws IOException { | |||
| 417 | 417 | int ind = name.lastIndexOf('.'); | |
| 418 | 418 | String ct = null; | |
| 419 | 419 | if (ind > 0) { | |
| 420 | - ct = (String) map.get(name.substring(ind)); | ||
| 420 | + ct = map.get(name.substring(ind)); | ||
| 421 | 421 | } | |
| 422 | 422 | if (ct == null) { | |
| 423 | 423 | ct = "unknown/unknown"; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -120,7 +120,7 @@ preferences.requires_restart = requiere reiniciar Processing | |||
| 120 | 120 | preferences.sketchbook_location = Ubicación del sketchbook | |
| 121 | 121 | preferences.sketchbook_location.popup = Ubicación del sketchbook | |
| 122 | 122 | 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 | ||
| 124 | 124 | preferences.editor_and_console_font.tip = \ | |
| 125 | 125 | Selecciona la fuente usada en el editor y la consola.<br>\ | |
| 126 | 126 | Sólo las fuentes con caracteres de ancho fijo pueden<br>\ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,24 +41,24 @@ public void init(Base base) { | |||
| 41 | 41 | (!javaVendor.contains("Sun") && !javaVendor.contains("Oracle")) || | |
| 42 | 42 | javaVM == null || !javaVM.contains("Java")) { | |
| 43 | 43 | 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" + | ||
| 45 | 45 | "package on Ubuntu). Other versions such as OpenJDK, IcedTea,\n" + | |
| 46 | 46 | "and GCJ are strongly discouraged. Among other things, you're\n" + | |
| 47 | 47 | "likely to run into problems with sketch window size and\n" + | |
| 48 | 48 | "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); | ||
| 50 | 50 | } | |
| 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 | ||
| 53 | 53 | // name by Gnome3 and other window managers. | |
| 54 | 54 | // https://github.com/processing/processing/issues/2534 | |
| 55 | 55 | try { | |
| 56 | 56 | Toolkit xToolkit = Toolkit.getDefaultToolkit(); | |
| 57 | - java.lang.reflect.Field awtAppClassNameField = | ||
| 57 | + java.lang.reflect.Field awtAppClassNameField = | ||
| 58 | 58 | xToolkit.getClass().getDeclaredField("awtAppClassName"); | |
| 59 | 59 | awtAppClassNameField.setAccessible(true); | |
| 60 | 60 | awtAppClassNameField.set(xToolkit, "Processing"); | |
| 61 | - | ||
| 61 | + | ||
| 62 | 62 | } catch(Exception e) { | |
| 63 | 63 | // In case the implementation details change | |
| 64 | 64 | e.printStackTrace(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | /* | |
| 4 | 4 | Part of the Processing project - http://processing.org | |
| 5 | 5 | ||
| 6 | - Copyright (c) 2012-2013 The Processing Foundation | ||
| 6 | + Copyright (c) 2012-2014 The Processing Foundation | ||
| 7 | 7 | Copyright (c) 2007-2012 Ben Fry and Casey Reas | |
| 8 | 8 | ||
| 9 | 9 | This program is free software; you can redistribute it and/or | |
@@ -23,32 +23,28 @@ | |||
| 23 | 23 | package processing.app.platform; | |
| 24 | 24 | ||
| 25 | 25 | import java.awt.event.*; | |
| 26 | + import java.io.File; | ||
| 26 | 27 | ||
| 27 | 28 | import javax.swing.*; | |
| 28 | 29 | ||
| 29 | - import processing.app.About; | ||
| 30 | - import processing.app.Base; | ||
| 31 | - import processing.app.Toolkit; | ||
| 32 | - import processing.app.Language; | ||
| 33 | - | ||
| 34 | 30 | import com.apple.eawt.*; | |
| 31 | + import com.apple.eawt.AppEvent.*; | ||
| 32 | + | ||
| 33 | + import processing.app.*; | ||
| 35 | 34 | ||
| 36 | 35 | ||
| 37 | 36 | /** | |
| 38 | 37 | * Deal with issues related to thinking differently. This handles the basic | |
| 39 | 38 | * Mac OS X menu commands (and apple events) for open, about, prefs, etc. | |
| 40 | 39 | * | |
| 41 | - * Based on OSXAdapter.java from Apple DTS. | ||
| 42 | - * | ||
| 43 | 40 | * As of 0140, this code need not be built on platforms other than OS X, | |
| 44 | 41 | * because of the new platform structure which isolates through reflection. | |
| 45 | 42 | * | |
| 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.) | ||
| 49 | 46 | */ | |
| 50 | - @SuppressWarnings("deprecation") | ||
| 51 | - public class ThinkDifferent implements ApplicationListener { | ||
| 47 | + public class ThinkDifferent { | ||
| 52 | 48 | ||
| 53 | 49 | // pseudo-singleton model; no point in making multiple instances | |
| 54 | 50 | // of the EAWT application or our adapter | |
@@ -57,26 +53,54 @@ public class ThinkDifferent implements ApplicationListener { | |||
| 57 | 53 | private static Application application; | |
| 58 | 54 | ||
| 59 | 55 | // reference to the app where the existing quit, about, prefs code is | |
| 60 | - private Base base; | ||
| 56 | + //private Base base; | ||
| 61 | 57 | ||
| 62 | 58 | ||
| 63 | - static protected void init(Base base) { | ||
| 59 | + static protected void init(final Base base) { | ||
| 64 | 60 | if (application == null) { | |
| 65 | - //application = new com.apple.eawt.Application(); | ||
| 66 | 61 | application = Application.getApplication(); | |
| 67 | 62 | } | |
| 68 | 63 | if (adapter == null) { | |
| 69 | - adapter = new ThinkDifferent(base); | ||
| 64 | + adapter = new ThinkDifferent(); //base); | ||
| 70 | 65 | } | |
| 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 | ||
| 79 | 66 | ||
| 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. | ||
| 80 | 104 | JMenuBar defaultMenuBar = new JMenuBar(); | |
| 81 | 105 | JMenu fileMenu = buildFileMenu(base); | |
| 82 | 106 | defaultMenuBar.add(fileMenu); | |
@@ -107,9 +131,9 @@ static protected void init(Base base) { | |||
| 107 | 131 | } | |
| 108 | 132 | ||
| 109 | 133 | ||
| 110 | - public ThinkDifferent(Base base) { | ||
| 111 | - this.base = base; | ||
| 112 | - } | ||
| 134 | + // public ThinkDifferent(Base base) { | ||
| 135 | + // this.base = base; | ||
| 136 | + // } | ||
| 113 | 137 | ||
| 114 | 138 | ||
| 115 | 139 | /** | |
@@ -154,64 +178,4 @@ public void actionPerformed(ActionEvent e) { | |||
| 154 | 178 | ||
| 155 | 179 | return fileMenu; | |
| 156 | 180 | } | |
| 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 | - } | ||
| 217 | 181 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -140,7 +140,7 @@ public abstract class InputHandler extends KeyAdapter | |||
| 140 | 140 | */ | |
| 141 | 141 | public static ActionListener getAction(String name) | |
| 142 | 142 | { | |
| 143 | - return (ActionListener)actions.get(name); | ||
| 143 | + return actions.get(name); | ||
| 144 | 144 | } | |
| 145 | 145 | ||
| 146 | 146 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -916,7 +916,7 @@ remove the spaces for depth since it should be double dash, but screws up commen | |||
| 916 | 916 | <arg line="core -type f -exec rm -rf {} ';'" /> | |
| 917 | 917 | </exec> | |
| 918 | 918 | ||
| 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"> | ||
| 920 | 920 | ||
| 921 | 921 | <!-- provide links for java.* classes. | |
| 922 | 922 | 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 | |||
| 943 | 943 | <arg line="everything -type f -exec rm -rf {} ';'" /> | |
| 944 | 944 | </exec> | |
| 945 | 945 | ||
| 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"> | ||
| 947 | 947 | ||
| 948 | 948 | <arg value="-notimestamp" /> | |
| 949 | 949 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,8 +8,8 @@ | |||
| 8 | 8 | ||
| 9 | 9 | <target name="compile" description="Compile sources"> | |
| 10 | 10 | <mkdir dir="bin" /> | |
| 11 | - <javac target="1.6" | ||
| 12 | - source="1.6" | ||
| 11 | + <javac target="1.7" | ||
| 12 | + source="1.7" | ||
| 13 | 13 | srcdir="src" | |
| 14 | 14 | destdir="bin" | |
| 15 | 15 | encoding="UTF-8" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,7 @@ | |||
| 26 | 26 | ||
| 27 | 27 | <mkdir dir="bin" /> | |
| 28 | 28 | <javac source="1.7" | |
| 29 | - target="1.7" | ||
| 29 | + target="1.7" | ||
| 30 | 30 | encoding="UTF-8" | |
| 31 | 31 | includeAntRuntime="false" | |
| 32 | 32 | debug="true" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -300,7 +300,7 @@ public void append(FloatList list) { | |||
| 300 | 300 | ||
| 301 | 301 | ||
| 302 | 302 | // same as splice | |
| 303 | - public void insert(int index, int[] values) { | ||
| 303 | + public void insert(int index, float[] values) { | ||
| 304 | 304 | if (index < 0) { | |
| 305 | 305 | throw new IllegalArgumentException("insert() index cannot be negative: it was " + index); | |
| 306 | 306 | } | |
@@ -328,7 +328,7 @@ public void insert(int index, int[] values) { | |||
| 328 | 328 | } | |
| 329 | 329 | ||
| 330 | 330 | ||
| 331 | - public void insert(int index, IntList list) { | ||
| 331 | + public void insert(int index, FloatList list) { | ||
| 332 | 332 | insert(index, list.values()); | |
| 333 | 333 | } | |
| 334 | 334 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments