Skip to content

Commit 3aa8422

Browse files
committed
Merge remote-tracking branch 'upstream/master'
* upstream/master: (67 commits) Ordered windows jars Instantiating SplashScreenHelper in main() was leaving it null for the tests. Fixed Fixed placement of find & replace dialog Preferences frame opens on top of active editor Splashscreen Update revision.txt Resetting swing.aatext to the preferred value as soon as preferences are available Nicer fonts Macosx: halving JVM Xmx, now 512M Update revisions.txt TemperatureWebPanel.ino: added missing semicolons Convert to action pattern to allow multiple actions Provide Hooks before and after the build process Additional context for build hooks Update README.txt Windows: halving JVM Xmx, now 512M Started working on 1.6.2 Updated revisions.txt Fixed wrong path in successful message arduino-core: restored debug info in class files ...
2 parents ff21347 + 72bf977 commit 3aa8422

File tree

194 files changed

+54543
-5190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+54543
-5190
lines changed

.gitignore

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ build/windows/libastylej*
2121
build/windows/arduino-*.zip
2222
build/windows/dist/*.tar.gz
2323
build/windows/dist/*.tar.bz2
24-
build/windows/launch4j-*
24+
build/windows/launch4j-*.tgz
25+
build/windows/launch4j-*.zip
2526
build/windows/launcher/launch4j
2627
build/windows/WinAVR-*.zip
2728
build/macosx/arduino-*.zip
@@ -31,6 +32,7 @@ build/macosx/libastylej*
3132
build/macosx/appbundler*.jar
3233
build/macosx/appbundler*.zip
3334
build/macosx/appbundler
35+
build/macosx/appbundler-1.0ea-arduino2
3436
build/linux/work/
3537
build/linux/dist/*.tar.gz
3638
build/linux/dist/*.tar.bz2
@@ -43,8 +45,5 @@ test-bin
4345
.idea
4446
.DS_Store
4547
.directory
46-
build/windows/launch4j-*
47-
build/windows/launcher/launch4j
48-
build/windows/WinAVR-*.zip
4948
hardware/arduino/avr/libraries/Bridge/examples/XivelyClient/passwords.h
5049
avr-toolchain-*.zip

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ board and a development environment that implements the Processing/Wiring
66
language. Arduino can be used to develop stand-alone interactive objects or
77
can be connected to software on your computer (e.g. Flash, Processing, MaxMSP).
88
The boards can be assembled by hand or purchased preassembled; the open-source
9-
IDE can be downloaded for free.
9+
IDE can be downloaded for free at http://arduino.cc/en/Main/Software
1010

1111
* For more information, see the website at: http://www.arduino.cc/
12-
or the forums at: http://arduino.cc/forum/
12+
or the forums at: http://arduino.cc/forum/
13+
You can also follow Arduino on twitter at: https://twitter.com/arduino or like Arduino on Facebook at: https://www.facebook.com/official.arduino
1314

1415
* To report a *bug* in the software or to request *a simple enhancement* go to:
1516
http://github.com/arduino/Arduino/issues

app/lib/apple.jar

7.35 KB
Binary file not shown.

app/src/cc/arduino/view/Event.java

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* This file is part of Arduino.
3+
*
4+
* Arduino is free software; you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation; either version 2 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17+
*
18+
* As a special exception, you may use this file as part of a free software
19+
* library without restriction. Specifically, if other files instantiate
20+
* templates or use macros or inline functions from this file, or you compile
21+
* this file and link it with other files to produce an executable, this
22+
* file does not by itself cause the resulting executable to be covered by
23+
* the GNU General Public License. This exception does not however
24+
* invalidate any other reasons why the executable file might be covered by
25+
* the GNU General Public License.
26+
*
27+
* Copyright 2015 Arduino LLC (http://www.arduino.cc/)
28+
*/
29+
30+
package cc.arduino.view;
31+
32+
import java.awt.event.ActionEvent;
33+
import java.util.HashMap;
34+
import java.util.Map;
35+
36+
public class Event extends ActionEvent {
37+
38+
private final Map<String, Object> payload;
39+
40+
public Event(Object source, int id, String command) {
41+
super(source, id, command);
42+
this.payload = new HashMap<String, Object>();
43+
}
44+
45+
public Map<String, Object> getPayload() {
46+
return payload;
47+
}
48+
49+
@Override
50+
public String toString() {
51+
StringBuilder sb = new StringBuilder();
52+
sb.append(super.toString());
53+
sb.append("\n").append(payload.toString());
54+
return sb.toString();
55+
}
56+
57+
}
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* This file is part of Arduino.
3+
*
4+
* Arduino is free software; you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation; either version 2 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17+
*
18+
* As a special exception, you may use this file as part of a free software
19+
* library without restriction. Specifically, if other files instantiate
20+
* templates or use macros or inline functions from this file, or you compile
21+
* this file and link it with other files to produce an executable, this
22+
* file does not by itself cause the resulting executable to be covered by
23+
* the GNU General Public License. This exception does not however
24+
* invalidate any other reasons why the executable file might be covered by
25+
* the GNU General Public License.
26+
*
27+
* Copyright 2015 Arduino LLC (http://www.arduino.cc/)
28+
*/
29+
30+
package cc.arduino.view;
31+
32+
public interface EventListener {
33+
34+
void eventHappened(Event event);
35+
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* This file is part of Arduino.
3+
*
4+
* Arduino is free software; you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation; either version 2 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17+
*
18+
* As a special exception, you may use this file as part of a free software
19+
* library without restriction. Specifically, if other files instantiate
20+
* templates or use macros or inline functions from this file, or you compile
21+
* this file and link it with other files to produce an executable, this
22+
* file does not by itself cause the resulting executable to be covered by
23+
* the GNU General Public License. This exception does not however
24+
* invalidate any other reasons why the executable file might be covered by
25+
* the GNU General Public License.
26+
*
27+
* Copyright 2015 Arduino LLC (http://www.arduino.cc/)
28+
*/
29+
30+
package cc.arduino.view;
31+
32+
import processing.app.Preferences;
33+
34+
import java.awt.*;
35+
36+
public class ShowUncertifiedBoardWarning implements Runnable {
37+
38+
private final Frame parent;
39+
40+
public ShowUncertifiedBoardWarning(Frame parent) {
41+
this.parent = parent;
42+
}
43+
44+
@Override
45+
public void run() {
46+
UncertifiedBoardWarning uncertifiedBoardWarning = new UncertifiedBoardWarning(parent, new EventListener() {
47+
@Override
48+
public void eventHappened(cc.arduino.view.Event event) {
49+
if (!"uncertified_board_warning_ok_pressed".equals(event.getActionCommand())) {
50+
return;
51+
}
52+
Preferences.set("uncertifiedBoardWarning_dontShowMeAgain", event.getPayload().get("dontShowMeAgain").toString());
53+
}
54+
});
55+
uncertifiedBoardWarning.setLocationRelativeTo(parent);
56+
uncertifiedBoardWarning.setVisible(true);
57+
}
58+
59+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
/*
2+
* This file is part of Arduino.
3+
*
4+
* Code inspired by this tutorial http://wiki.netbeans.org/Splash_Screen_Beginner_Tutorial. License says "You may modify and use it as you wish."
5+
*
6+
* Copyright 2015 Arduino LLC (http://www.arduino.cc/)
7+
*
8+
* Arduino is free software; you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation; either version 2 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program; if not, write to the Free Software
20+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21+
*
22+
* As a special exception, you may use this file as part of a free software
23+
* library without restriction. Specifically, if other files instantiate
24+
* templates or use macros or inline functions from this file, or you compile
25+
* this file and link it with other files to produce an executable, this
26+
* file does not by itself cause the resulting executable to be covered by
27+
* the GNU General Public License. This exception does not however
28+
* invalidate any other reasons why the executable file might be covered by
29+
* the GNU General Public License.
30+
*/
31+
32+
package cc.arduino.view;
33+
34+
import java.awt.*;
35+
import java.awt.geom.Rectangle2D;
36+
import java.util.Map;
37+
38+
public class SplashScreenHelper {
39+
40+
private final Map desktopHints;
41+
private SplashScreen splash;
42+
private Rectangle2D.Double splashTextArea;
43+
private Graphics2D splashGraphics;
44+
45+
public SplashScreenHelper(SplashScreen splash) {
46+
this.splash = splash;
47+
Toolkit tk = Toolkit.getDefaultToolkit();
48+
desktopHints = (Map) tk.getDesktopProperty("awt.font.desktophints");
49+
}
50+
51+
public void splashText(String str) {
52+
if (splash == null) {
53+
printText(str);
54+
return;
55+
}
56+
if (!splash.isVisible()) {
57+
return;
58+
}
59+
60+
if (splashTextArea == null) {
61+
// stake out some area for our status information
62+
splashTextArea = new Rectangle2D.Double(0, 300, 520, 30);
63+
64+
// create the Graphics environment for drawing status info
65+
splashGraphics = splash.createGraphics();
66+
67+
if (desktopHints != null) {
68+
splashGraphics.addRenderingHints(desktopHints);
69+
}
70+
}
71+
72+
// erase the last status text
73+
splashGraphics.setPaint(new Color(245, 245, 245));
74+
splashGraphics.fill(splashTextArea);
75+
76+
// draw the text
77+
splashGraphics.setPaint(Color.BLACK);
78+
FontMetrics metrics = splashGraphics.getFontMetrics();
79+
splashGraphics.drawString(str, (int) splashTextArea.getX() + 10, (int) splashTextArea.getY() + (30 - metrics.getHeight()) + 4);
80+
81+
// make sure it's displayed
82+
splash.update();
83+
}
84+
85+
public void close() {
86+
if (splash == null) {
87+
return;
88+
}
89+
splash.close();
90+
}
91+
92+
public void printText(String str) {
93+
System.out.println(str);
94+
}
95+
96+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
3+
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
4+
<Properties>
5+
<Property name="defaultCloseOperation" type="int" value="2"/>
6+
<Property name="title" type="java.lang.String" value="_(&quot;Not supported board&quot;)"/>
7+
<Property name="modal" type="boolean" value="true"/>
8+
<Property name="name" type="java.lang.String" value="uncertifiedBoardWarning" noResource="true"/>
9+
<Property name="resizable" type="boolean" value="false"/>
10+
</Properties>
11+
<SyntheticProperties>
12+
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
13+
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
14+
</SyntheticProperties>
15+
<AuxValues>
16+
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
17+
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
18+
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
19+
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
20+
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
21+
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
22+
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
23+
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
24+
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
25+
</AuxValues>
26+
27+
<Layout>
28+
<DimensionLayout dim="0">
29+
<Group type="103" groupAlignment="0" attributes="0">
30+
<Group type="102" alignment="0" attributes="0">
31+
<EmptySpace max="-2" attributes="0"/>
32+
<Group type="103" groupAlignment="0" attributes="0">
33+
<Component id="jLabel1" pref="0" max="32767" attributes="0"/>
34+
<Group type="102" attributes="0">
35+
<Component id="dontShowMeAgain" min="-2" max="-2" attributes="0"/>
36+
<EmptySpace pref="206" max="32767" attributes="0"/>
37+
<Component id="ok" min="-2" pref="82" max="-2" attributes="0"/>
38+
</Group>
39+
</Group>
40+
<EmptySpace max="-2" attributes="0"/>
41+
</Group>
42+
</Group>
43+
</DimensionLayout>
44+
<DimensionLayout dim="1">
45+
<Group type="103" groupAlignment="0" attributes="0">
46+
<Group type="102" alignment="0" attributes="0">
47+
<EmptySpace max="-2" attributes="0"/>
48+
<Component id="jLabel1" min="-2" pref="87" max="-2" attributes="0"/>
49+
<EmptySpace max="-2" attributes="0"/>
50+
<Group type="103" groupAlignment="3" attributes="0">
51+
<Component id="dontShowMeAgain" alignment="3" min="-2" max="-2" attributes="0"/>
52+
<Component id="ok" alignment="3" min="-2" max="-2" attributes="0"/>
53+
</Group>
54+
<EmptySpace max="32767" attributes="0"/>
55+
</Group>
56+
</Group>
57+
</DimensionLayout>
58+
</Layout>
59+
<SubComponents>
60+
<Component class="javax.swing.JLabel" name="jLabel1">
61+
<Properties>
62+
<Property name="text" type="java.lang.String" value="&lt;html&gt;&lt;body&gt;This board comes from an non certified manufacturer.&lt;br&gt;We won&apos;t be able to provide any support if it doesn&apos;t work as expected.&lt;/body&gt;&lt;/html&gt;"/>
63+
<Property name="verticalAlignment" type="int" value="1"/>
64+
</Properties>
65+
</Component>
66+
<Component class="javax.swing.JCheckBox" name="dontShowMeAgain">
67+
<Properties>
68+
<Property name="text" type="java.lang.String" value="Don&apos;t show me again"/>
69+
<Property name="name" type="java.lang.String" value="dontShowMeAgain" noResource="true"/>
70+
</Properties>
71+
</Component>
72+
<Component class="javax.swing.JButton" name="ok">
73+
<Properties>
74+
<Property name="text" type="java.lang.String" value="OK"/>
75+
</Properties>
76+
<Events>
77+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="okActionPerformed"/>
78+
</Events>
79+
</Component>
80+
</SubComponents>
81+
</Form>

0 commit comments

Comments
 (0)