* SAMv3 : correct a null pointer exception check before it gets caught and logged as an error

This commit is contained in:
mkvore-commit
2009-05-10 20:31:14 +00:00
39 changed files with 247 additions and 232 deletions

View File

@@ -3,6 +3,6 @@ build.xml.script.CRC32=9785bb9a
build.xml.stylesheet.CRC32=be360661 build.xml.stylesheet.CRC32=be360661
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=c4b345cd nbproject/build-impl.xml.data.CRC32=f630f8db
nbproject/build-impl.xml.script.CRC32=8c02c081 nbproject/build-impl.xml.script.CRC32=8c02c081
nbproject/build-impl.xml.stylesheet.CRC32=65b8de21 nbproject/build-impl.xml.stylesheet.CRC32=65b8de21

View File

@@ -58,7 +58,7 @@ jnlp.codebase.url=file:/home/mathias/Documenten/Programmeren/i2p_monotone/repo/i
jnlp.enabled=false jnlp.enabled=false
jnlp.offline-allowed=false jnlp.offline-allowed=false
jnlp.signed=false jnlp.signed=false
main.class=desktopgui.Main main.class=net.i2p.desktopgui.desktopgui.Main
manifest.file=manifest.mf manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF meta.inf.dir=${src.dir}/META-INF
platform.active=default_platform platform.active=default_platform

View File

@@ -13,7 +13,7 @@
</test-roots> </test-roots>
</data> </data>
<swingapp xmlns="http://www.netbeans.org/ns/form-swingapp/1"> <swingapp xmlns="http://www.netbeans.org/ns/form-swingapp/1">
<application-class name="desktopgui.Main"/> <application-class name="net.i2p.desktopgui.desktopgui.Main"/>
</swingapp> </swingapp>
</configuration> </configuration>
</project> </project>

View File

@@ -3,7 +3,7 @@
* and open the template in the editor. * and open the template in the editor.
*/ */
package desktopgui; package net.i2p.desktopgui.desktopgui;
/** /**
* *

View File

@@ -1,4 +1,4 @@
package desktopgui; package net.i2p.desktopgui.desktopgui;
/* /*
* Main.java * Main.java
@@ -6,8 +6,8 @@ package desktopgui;
import gui.Tray; import net.i2p.desktopgui.gui.Tray;
import gui.SpeedSelector; import net.i2p.desktopgui.gui.SpeedSelector;
import java.awt.SystemTray; import java.awt.SystemTray;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level; import java.util.logging.Level;
@@ -16,7 +16,7 @@ import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException; import javax.swing.UnsupportedLookAndFeelException;
import org.jdesktop.application.Application; import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication; import org.jdesktop.application.SingleFrameApplication;
import persistence.PropertyManager; import net.i2p.desktopgui.persistence.PropertyManager;
/** /**
* The main class of the application. * The main class of the application.

View File

@@ -16,6 +16,7 @@
<AuxValues> <AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/> <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
@@ -305,20 +306,20 @@
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/> <EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel8" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="updateMethod" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Component id="jToggleButton1" min="-2" max="-2" attributes="0"/> <Component id="checkUpdates" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jToggleButton2" min="-2" max="-2" attributes="0"/> <Component id="updateNow" min="-2" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</Group> </Group>
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<EmptySpace min="40" pref="40" max="40" attributes="0"/> <EmptySpace min="40" pref="40" max="40" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="jRadioButton2" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="updateDownload" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jRadioButton1" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="updateInform" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jRadioButton3" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="updateDownloadRestart" alignment="0" min="-2" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</Group> </Group>
@@ -326,7 +327,7 @@
</Group> </Group>
<Group type="102" alignment="1" attributes="0"> <Group type="102" alignment="1" attributes="0">
<EmptySpace pref="339" max="32767" attributes="0"/> <EmptySpace pref="339" max="32767" attributes="0"/>
<Component id="jToggleButton3" min="-2" max="-2" attributes="0"/> <Component id="advancedUpdateConfig" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
@@ -335,75 +336,75 @@
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="jLabel8" min="-2" max="-2" attributes="0"/> <Component id="updateMethod" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jRadioButton1" min="-2" max="-2" attributes="0"/> <Component id="updateInform" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="jRadioButton2" min="-2" max="-2" attributes="0"/> <Component id="updateDownload" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="jRadioButton3" min="-2" max="-2" attributes="0"/> <Component id="updateDownloadRestart" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <Group type="103" groupAlignment="3" attributes="0">
<Component id="jToggleButton1" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="checkUpdates" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jToggleButton2" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="updateNow" alignment="3" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace pref="181" max="32767" attributes="0"/> <EmptySpace pref="181" max="32767" attributes="0"/>
<Component id="jToggleButton3" min="-2" max="-2" attributes="0"/> <Component id="advancedUpdateConfig" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Component class="javax.swing.JLabel" name="jLabel8"> <Component class="javax.swing.JLabel" name="updateMethod">
<Properties> <Properties>
<Property name="text" type="java.lang.String" resourceKey="jLabel8.text"/> <Property name="text" type="java.lang.String" resourceKey="updateMethod.text"/>
<Property name="name" type="java.lang.String" value="jLabel8" noResource="true"/> <Property name="name" type="java.lang.String" value="updateMethod" noResource="true"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JRadioButton" name="jRadioButton1"> <Component class="javax.swing.JRadioButton" name="updateInform">
<Properties> <Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="buttonGroup1"/> <ComponentRef name="buttonGroup1"/>
</Property> </Property>
<Property name="text" type="java.lang.String" resourceKey="jRadioButton1.text"/> <Property name="text" type="java.lang.String" resourceKey="updateInform.text"/>
<Property name="name" type="java.lang.String" value="jRadioButton1" noResource="true"/> <Property name="name" type="java.lang.String" value="updateInform" noResource="true"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JRadioButton" name="jRadioButton2"> <Component class="javax.swing.JRadioButton" name="updateDownload">
<Properties> <Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="buttonGroup1"/> <ComponentRef name="buttonGroup1"/>
</Property> </Property>
<Property name="text" type="java.lang.String" resourceKey="jRadioButton2.text"/> <Property name="text" type="java.lang.String" resourceKey="updateDownload.text"/>
<Property name="name" type="java.lang.String" value="jRadioButton2" noResource="true"/> <Property name="name" type="java.lang.String" value="updateDownload" noResource="true"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JRadioButton" name="jRadioButton3"> <Component class="javax.swing.JRadioButton" name="updateDownloadRestart">
<Properties> <Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="buttonGroup1"/> <ComponentRef name="buttonGroup1"/>
</Property> </Property>
<Property name="text" type="java.lang.String" resourceKey="jRadioButton3.text"/> <Property name="text" type="java.lang.String" resourceKey="updateDownloadRestart.text"/>
<Property name="name" type="java.lang.String" value="jRadioButton3" noResource="true"/> <Property name="name" type="java.lang.String" value="updateDownloadRestart" noResource="true"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JToggleButton" name="jToggleButton1"> <Component class="javax.swing.JToggleButton" name="checkUpdates">
<Properties> <Properties>
<Property name="text" type="java.lang.String" resourceKey="jToggleButton1.text"/> <Property name="text" type="java.lang.String" resourceKey="checkUpdates.text"/>
<Property name="name" type="java.lang.String" value="jToggleButton1" noResource="true"/> <Property name="name" type="java.lang.String" value="checkUpdates" noResource="true"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JToggleButton" name="jToggleButton2"> <Component class="javax.swing.JToggleButton" name="updateNow">
<Properties> <Properties>
<Property name="text" type="java.lang.String" resourceKey="jToggleButton2.text"/> <Property name="text" type="java.lang.String" resourceKey="updateNow.text"/>
<Property name="name" type="java.lang.String" value="jToggleButton2" noResource="true"/> <Property name="name" type="java.lang.String" value="updateNow" noResource="true"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JToggleButton" name="jToggleButton3"> <Component class="javax.swing.JToggleButton" name="advancedUpdateConfig">
<Properties> <Properties>
<Property name="text" type="java.lang.String" resourceKey="jToggleButton3.text"/> <Property name="text" type="java.lang.String" resourceKey="advancedUpdateConfig.text"/>
<Property name="name" type="java.lang.String" value="jToggleButton3" noResource="true"/> <Property name="name" type="java.lang.String" value="advancedUpdateConfig" noResource="true"/>
</Properties> </Properties>
</Component> </Component>
</SubComponents> </SubComponents>
@@ -426,11 +427,11 @@
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane2" alignment="1" pref="538" max="32767" attributes="0"/> <Component id="serverFrame" alignment="1" pref="538" max="32767" attributes="0"/>
<Component id="jLabel9" alignment="0" pref="538" max="32767" attributes="0"/> <Component id="tunnelsExplanation" alignment="0" pref="538" max="32767" attributes="0"/>
<Component id="jLabel10" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="clientTunnelLabel" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jScrollPane1" alignment="0" pref="538" max="32767" attributes="0"/> <Component id="clientFrame" alignment="0" pref="538" max="32767" attributes="0"/>
<Component id="jLabel11" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="serverTunnelLabel" alignment="0" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
</Group> </Group>
@@ -440,51 +441,51 @@
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="jLabel10" min="-2" max="-2" attributes="0"/> <Component id="clientTunnelLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="jScrollPane1" pref="119" max="32767" attributes="0"/> <Component id="clientFrame" pref="119" max="32767" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="jLabel11" min="-2" max="-2" attributes="0"/> <Component id="serverTunnelLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="jScrollPane2" pref="122" max="32767" attributes="0"/> <Component id="serverFrame" pref="122" max="32767" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="jLabel9" min="-2" pref="65" max="-2" attributes="0"/> <Component id="tunnelsExplanation" min="-2" pref="65" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane1"> <Container class="javax.swing.JScrollPane" name="clientFrame">
<Properties> <Properties>
<Property name="name" type="java.lang.String" value="jScrollPane1" noResource="true"/> <Property name="name" type="java.lang.String" value="clientFrame" noResource="true"/>
</Properties> </Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
</Container> </Container>
<Container class="javax.swing.JScrollPane" name="jScrollPane2"> <Container class="javax.swing.JScrollPane" name="serverFrame">
<Properties> <Properties>
<Property name="name" type="java.lang.String" value="jScrollPane2" noResource="true"/> <Property name="name" type="java.lang.String" value="serverFrame" noResource="true"/>
</Properties> </Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
</Container> </Container>
<Component class="javax.swing.JLabel" name="jLabel9"> <Component class="javax.swing.JLabel" name="tunnelsExplanation">
<Properties> <Properties>
<Property name="text" type="java.lang.String" resourceKey="jLabel9.text"/> <Property name="text" type="java.lang.String" resourceKey="tunnelsExplanation.text"/>
<Property name="name" type="java.lang.String" value="jLabel9" noResource="true"/> <Property name="name" type="java.lang.String" value="tunnelsExplanation" noResource="true"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="jLabel10"> <Component class="javax.swing.JLabel" name="clientTunnelLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" resourceKey="jLabel10.text"/> <Property name="text" type="java.lang.String" resourceKey="clientTunnelLabel.text"/>
<Property name="name" type="java.lang.String" value="jLabel10" noResource="true"/> <Property name="name" type="java.lang.String" value="clientTunnelLabel" noResource="true"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="jLabel11"> <Component class="javax.swing.JLabel" name="serverTunnelLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" resourceKey="jLabel11.text"/> <Property name="text" type="java.lang.String" resourceKey="serverTunnelLabel.text"/>
<Property name="name" type="java.lang.String" value="jLabel11" noResource="true"/> <Property name="name" type="java.lang.String" value="serverTunnelLabel" noResource="true"/>
</Properties> </Properties>
</Component> </Component>
</SubComponents> </SubComponents>

View File

@@ -4,9 +4,9 @@
* Created on 10 april 2009, 19:04 * Created on 10 april 2009, 19:04
*/ */
package gui; package net.i2p.desktopgui.gui;
import router.configuration.SpeedHelper; import net.i2p.desktopgui.router.configuration.SpeedHelper;
/** /**
* *
@@ -55,24 +55,24 @@ public class GeneralConfiguration extends javax.swing.JFrame {
jLabel6 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel();
updatesPanel = new javax.swing.JPanel(); updatesPanel = new javax.swing.JPanel();
jLabel8 = new javax.swing.JLabel(); updateMethod = new javax.swing.JLabel();
jRadioButton1 = new javax.swing.JRadioButton(); updateInform = new javax.swing.JRadioButton();
jRadioButton2 = new javax.swing.JRadioButton(); updateDownload = new javax.swing.JRadioButton();
jRadioButton3 = new javax.swing.JRadioButton(); updateDownloadRestart = new javax.swing.JRadioButton();
jToggleButton1 = new javax.swing.JToggleButton(); checkUpdates = new javax.swing.JToggleButton();
jToggleButton2 = new javax.swing.JToggleButton(); updateNow = new javax.swing.JToggleButton();
jToggleButton3 = new javax.swing.JToggleButton(); advancedUpdateConfig = new javax.swing.JToggleButton();
tunnelPanel = new javax.swing.JPanel(); tunnelPanel = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane(); clientFrame = new javax.swing.JScrollPane();
jScrollPane2 = new javax.swing.JScrollPane(); serverFrame = new javax.swing.JScrollPane();
jLabel9 = new javax.swing.JLabel(); tunnelsExplanation = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel(); clientTunnelLabel = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel(); serverTunnelLabel = new javax.swing.JLabel();
networkPanel = new javax.swing.JPanel(); networkPanel = new javax.swing.JPanel();
advancedPanel = new javax.swing.JPanel(); advancedPanel = new javax.swing.JPanel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(desktopgui.Main.class).getContext().getResourceMap(GeneralConfiguration.class); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.i2p.desktopgui.desktopgui.Main.class).getContext().getResourceMap(GeneralConfiguration.class);
setTitle(resourceMap.getString("Form.title")); // NOI18N setTitle(resourceMap.getString("Form.title")); // NOI18N
setName("Form"); // NOI18N setName("Form"); // NOI18N
@@ -208,29 +208,29 @@ public class GeneralConfiguration extends javax.swing.JFrame {
updatesPanel.setName("updatesPanel"); // NOI18N updatesPanel.setName("updatesPanel"); // NOI18N
jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N updateMethod.setText(resourceMap.getString("updateMethod.text")); // NOI18N
jLabel8.setName("jLabel8"); // NOI18N updateMethod.setName("updateMethod"); // NOI18N
buttonGroup1.add(jRadioButton1); buttonGroup1.add(updateInform);
jRadioButton1.setText(resourceMap.getString("jRadioButton1.text")); // NOI18N updateInform.setText(resourceMap.getString("updateInform.text")); // NOI18N
jRadioButton1.setName("jRadioButton1"); // NOI18N updateInform.setName("updateInform"); // NOI18N
buttonGroup1.add(jRadioButton2); buttonGroup1.add(updateDownload);
jRadioButton2.setText(resourceMap.getString("jRadioButton2.text")); // NOI18N updateDownload.setText(resourceMap.getString("updateDownload.text")); // NOI18N
jRadioButton2.setName("jRadioButton2"); // NOI18N updateDownload.setName("updateDownload"); // NOI18N
buttonGroup1.add(jRadioButton3); buttonGroup1.add(updateDownloadRestart);
jRadioButton3.setText(resourceMap.getString("jRadioButton3.text")); // NOI18N updateDownloadRestart.setText(resourceMap.getString("updateDownloadRestart.text")); // NOI18N
jRadioButton3.setName("jRadioButton3"); // NOI18N updateDownloadRestart.setName("updateDownloadRestart"); // NOI18N
jToggleButton1.setText(resourceMap.getString("jToggleButton1.text")); // NOI18N checkUpdates.setText(resourceMap.getString("checkUpdates.text")); // NOI18N
jToggleButton1.setName("jToggleButton1"); // NOI18N checkUpdates.setName("checkUpdates"); // NOI18N
jToggleButton2.setText(resourceMap.getString("jToggleButton2.text")); // NOI18N updateNow.setText(resourceMap.getString("updateNow.text")); // NOI18N
jToggleButton2.setName("jToggleButton2"); // NOI18N updateNow.setName("updateNow"); // NOI18N
jToggleButton3.setText(resourceMap.getString("jToggleButton3.text")); // NOI18N advancedUpdateConfig.setText(resourceMap.getString("advancedUpdateConfig.text")); // NOI18N
jToggleButton3.setName("jToggleButton3"); // NOI18N advancedUpdateConfig.setName("advancedUpdateConfig"); // NOI18N
javax.swing.GroupLayout updatesPanelLayout = new javax.swing.GroupLayout(updatesPanel); javax.swing.GroupLayout updatesPanelLayout = new javax.swing.GroupLayout(updatesPanel);
updatesPanel.setLayout(updatesPanelLayout); updatesPanel.setLayout(updatesPanelLayout);
@@ -241,40 +241,40 @@ public class GeneralConfiguration extends javax.swing.JFrame {
.addGroup(updatesPanelLayout.createSequentialGroup() .addGroup(updatesPanelLayout.createSequentialGroup()
.addGap(20, 20, 20) .addGap(20, 20, 20)
.addGroup(updatesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(updatesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel8) .addComponent(updateMethod)
.addGroup(updatesPanelLayout.createSequentialGroup() .addGroup(updatesPanelLayout.createSequentialGroup()
.addComponent(jToggleButton1) .addComponent(checkUpdates)
.addGap(18, 18, 18) .addGap(18, 18, 18)
.addComponent(jToggleButton2)))) .addComponent(updateNow))))
.addGroup(updatesPanelLayout.createSequentialGroup() .addGroup(updatesPanelLayout.createSequentialGroup()
.addGap(40, 40, 40) .addGap(40, 40, 40)
.addGroup(updatesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(updatesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jRadioButton2) .addComponent(updateDownload)
.addComponent(jRadioButton1) .addComponent(updateInform)
.addComponent(jRadioButton3)))) .addComponent(updateDownloadRestart))))
.addGap(9, 9, 9)) .addGap(9, 9, 9))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, updatesPanelLayout.createSequentialGroup() .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, updatesPanelLayout.createSequentialGroup()
.addContainerGap(339, Short.MAX_VALUE) .addContainerGap(339, Short.MAX_VALUE)
.addComponent(jToggleButton3) .addComponent(advancedUpdateConfig)
.addContainerGap()) .addContainerGap())
); );
updatesPanelLayout.setVerticalGroup( updatesPanelLayout.setVerticalGroup(
updatesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) updatesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(updatesPanelLayout.createSequentialGroup() .addGroup(updatesPanelLayout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addComponent(jLabel8) .addComponent(updateMethod)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jRadioButton1) .addComponent(updateInform)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jRadioButton2) .addComponent(updateDownload)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jRadioButton3) .addComponent(updateDownloadRestart)
.addGap(18, 18, 18) .addGap(18, 18, 18)
.addGroup(updatesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addGroup(updatesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jToggleButton1) .addComponent(checkUpdates)
.addComponent(jToggleButton2)) .addComponent(updateNow))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 181, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 181, Short.MAX_VALUE)
.addComponent(jToggleButton3) .addComponent(advancedUpdateConfig)
.addContainerGap()) .addContainerGap())
); );
@@ -282,18 +282,18 @@ public class GeneralConfiguration extends javax.swing.JFrame {
tunnelPanel.setName("tunnelPanel"); // NOI18N tunnelPanel.setName("tunnelPanel"); // NOI18N
jScrollPane1.setName("jScrollPane1"); // NOI18N clientFrame.setName("clientFrame"); // NOI18N
jScrollPane2.setName("jScrollPane2"); // NOI18N serverFrame.setName("serverFrame"); // NOI18N
jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N tunnelsExplanation.setText(resourceMap.getString("tunnelsExplanation.text")); // NOI18N
jLabel9.setName("jLabel9"); // NOI18N tunnelsExplanation.setName("tunnelsExplanation"); // NOI18N
jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N clientTunnelLabel.setText(resourceMap.getString("clientTunnelLabel.text")); // NOI18N
jLabel10.setName("jLabel10"); // NOI18N clientTunnelLabel.setName("clientTunnelLabel"); // NOI18N
jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N serverTunnelLabel.setText(resourceMap.getString("serverTunnelLabel.text")); // NOI18N
jLabel11.setName("jLabel11"); // NOI18N serverTunnelLabel.setName("serverTunnelLabel"); // NOI18N
javax.swing.GroupLayout tunnelPanelLayout = new javax.swing.GroupLayout(tunnelPanel); javax.swing.GroupLayout tunnelPanelLayout = new javax.swing.GroupLayout(tunnelPanel);
tunnelPanel.setLayout(tunnelPanelLayout); tunnelPanel.setLayout(tunnelPanelLayout);
@@ -302,26 +302,26 @@ public class GeneralConfiguration extends javax.swing.JFrame {
.addGroup(tunnelPanelLayout.createSequentialGroup() .addGroup(tunnelPanelLayout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addGroup(tunnelPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(tunnelPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 538, Short.MAX_VALUE) .addComponent(serverFrame, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 538, Short.MAX_VALUE)
.addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 538, Short.MAX_VALUE) .addComponent(tunnelsExplanation, javax.swing.GroupLayout.DEFAULT_SIZE, 538, Short.MAX_VALUE)
.addComponent(jLabel10) .addComponent(clientTunnelLabel)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 538, Short.MAX_VALUE) .addComponent(clientFrame, javax.swing.GroupLayout.DEFAULT_SIZE, 538, Short.MAX_VALUE)
.addComponent(jLabel11)) .addComponent(serverTunnelLabel))
.addContainerGap()) .addContainerGap())
); );
tunnelPanelLayout.setVerticalGroup( tunnelPanelLayout.setVerticalGroup(
tunnelPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) tunnelPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(tunnelPanelLayout.createSequentialGroup() .addGroup(tunnelPanelLayout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addComponent(jLabel10) .addComponent(clientTunnelLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE) .addComponent(clientFrame, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel11) .addComponent(serverTunnelLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE) .addComponent(serverFrame, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(tunnelsExplanation, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap()) .addContainerGap())
); );
@@ -420,35 +420,35 @@ private void downloadgbKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JPanel advancedPanel; private javax.swing.JPanel advancedPanel;
private javax.swing.JToggleButton advancedUpdateConfig;
private javax.swing.JPanel applyPanel; private javax.swing.JPanel applyPanel;
private javax.swing.ButtonGroup buttonGroup1; private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JToggleButton cancel; private javax.swing.JToggleButton cancel;
private javax.swing.JToggleButton checkUpdates;
private javax.swing.JScrollPane clientFrame;
private javax.swing.JLabel clientTunnelLabel;
private javax.swing.JLabel downloadSpeedLabel; private javax.swing.JLabel downloadSpeedLabel;
private javax.swing.JTextField downloadgb; private javax.swing.JTextField downloadgb;
private javax.swing.JComboBox downloadkbps; private javax.swing.JComboBox downloadkbps;
private javax.swing.JTextField downloadspeed; private javax.swing.JTextField downloadspeed;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JRadioButton jRadioButton1;
private javax.swing.JRadioButton jRadioButton2;
private javax.swing.JRadioButton jRadioButton3;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JToggleButton jToggleButton1;
private javax.swing.JToggleButton jToggleButton2;
private javax.swing.JToggleButton jToggleButton3;
private javax.swing.JPanel networkPanel; private javax.swing.JPanel networkPanel;
private javax.swing.JToggleButton ok; private javax.swing.JToggleButton ok;
private javax.swing.JScrollPane serverFrame;
private javax.swing.JLabel serverTunnelLabel;
private javax.swing.JTabbedPane settingsPanel; private javax.swing.JTabbedPane settingsPanel;
private javax.swing.JPanel speedPanel; private javax.swing.JPanel speedPanel;
private javax.swing.JPanel tunnelPanel; private javax.swing.JPanel tunnelPanel;
private javax.swing.JLabel tunnelsExplanation;
private javax.swing.JRadioButton updateDownload;
private javax.swing.JRadioButton updateDownloadRestart;
private javax.swing.JRadioButton updateInform;
private javax.swing.JLabel updateMethod;
private javax.swing.JToggleButton updateNow;
private javax.swing.JPanel updatesPanel; private javax.swing.JPanel updatesPanel;
private javax.swing.JLabel uploadSpeedLabel; private javax.swing.JLabel uploadSpeedLabel;
private javax.swing.JTextField uploadgb; private javax.swing.JTextField uploadgb;

View File

@@ -24,7 +24,7 @@
* *
*/ */
package gui; package net.i2p.desktopgui.gui;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Frame; import java.awt.Frame;

View File

@@ -12,6 +12,7 @@
<AuxValues> <AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/> <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>

View File

@@ -4,7 +4,7 @@
* Created on 10 april 2009, 19:17 * Created on 10 april 2009, 19:17
*/ */
package gui; package net.i2p.desktopgui.gui;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.File; import java.io.File;
@@ -73,7 +73,7 @@ public class LogViewer extends javax.swing.JFrame {
clearButton = new javax.swing.JButton(); clearButton = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(desktopgui.Main.class).getContext().getResourceMap(LogViewer.class); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.i2p.desktopgui.desktopgui.Main.class).getContext().getResourceMap(LogViewer.class);
setTitle(resourceMap.getString("Form.title")); // NOI18N setTitle(resourceMap.getString("Form.title")); // NOI18N
setName("Form"); // NOI18N setName("Form"); // NOI18N

View File

@@ -16,6 +16,7 @@
<AuxValues> <AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/> <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>

View File

@@ -4,15 +4,14 @@
* Created on 3 april 2009, 13:57 * Created on 3 april 2009, 13:57
*/ */
package gui; package net.i2p.desktopgui.gui;
import java.awt.Dimension;
import java.awt.Point; import java.awt.Point;
import java.util.Properties; import java.util.Properties;
import javax.swing.JComboBox; import javax.swing.JComboBox;
import javax.swing.JTextField; import javax.swing.JTextField;
import persistence.PropertyManager; import net.i2p.desktopgui.persistence.PropertyManager;
import util.IntegerVerifier; import net.i2p.desktopgui.util.IntegerVerifier;
/** /**
* *
@@ -60,7 +59,7 @@ public class SpeedSelector extends javax.swing.JFrame {
downloadkbps = new javax.swing.JComboBox(); downloadkbps = new javax.swing.JComboBox();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(desktopgui.Main.class).getContext().getResourceMap(SpeedSelector.class); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.i2p.desktopgui.desktopgui.Main.class).getContext().getResourceMap(SpeedSelector.class);
setTitle(resourceMap.getString("Form.title")); // NOI18N setTitle(resourceMap.getString("Form.title")); // NOI18N
setMinimumSize(new java.awt.Dimension(610, 330)); setMinimumSize(new java.awt.Dimension(610, 330));
setName("Form"); // NOI18N setName("Form"); // NOI18N

View File

@@ -20,6 +20,7 @@
<AuxValues> <AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/> <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>

View File

@@ -4,14 +4,13 @@
* Created on 3 april 2009, 14:36 * Created on 3 april 2009, 14:36
*/ */
package gui; package net.i2p.desktopgui.gui;
import java.awt.Dimension;
import java.awt.Point; import java.awt.Point;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Properties; import java.util.Properties;
import javax.swing.AbstractButton; import javax.swing.AbstractButton;
import persistence.PropertyManager; import net.i2p.desktopgui.persistence.PropertyManager;
/** /**
* *
@@ -48,7 +47,7 @@ public class SpeedSelector2 extends javax.swing.JFrame {
jLabel1 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(desktopgui.Main.class).getContext().getResourceMap(SpeedSelector2.class); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.i2p.desktopgui.desktopgui.Main.class).getContext().getResourceMap(SpeedSelector2.class);
setTitle(resourceMap.getString("Form.title")); // NOI18N setTitle(resourceMap.getString("Form.title")); // NOI18N
setMinimumSize(new java.awt.Dimension(610, 330)); setMinimumSize(new java.awt.Dimension(610, 330));
setName("Form"); // NOI18N setName("Form"); // NOI18N

View File

@@ -4,16 +4,16 @@
* Created on 3 april 2009, 15:17 * Created on 3 april 2009, 15:17
*/ */
package gui; package net.i2p.desktopgui.gui;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Point; import java.awt.Point;
import java.util.Properties; import java.util.Properties;
import javax.swing.JComboBox; import javax.swing.JComboBox;
import javax.swing.JTextField; import javax.swing.JTextField;
import persistence.PropertyManager; import net.i2p.desktopgui.persistence.PropertyManager;
import router.configuration.SpeedHandler; import net.i2p.desktopgui.router.configuration.SpeedHandler;
import router.configuration.SpeedHelper; import net.i2p.desktopgui.router.configuration.SpeedHelper;
/** /**
* *
@@ -67,7 +67,7 @@ public class SpeedSelector3 extends javax.swing.JFrame {
explanation = new javax.swing.JLabel(); explanation = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(desktopgui.Main.class).getContext().getResourceMap(SpeedSelector3.class); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.i2p.desktopgui.desktopgui.Main.class).getContext().getResourceMap(SpeedSelector3.class);
setTitle(resourceMap.getString("Form.title")); // NOI18N setTitle(resourceMap.getString("Form.title")); // NOI18N
setMinimumSize(new java.awt.Dimension(670, 330)); setMinimumSize(new java.awt.Dimension(670, 330));
setName("Form"); // NOI18N setName("Form"); // NOI18N

View File

@@ -1,4 +1,4 @@
package gui; package net.i2p.desktopgui.gui;
/** /**
* *

View File

@@ -3,9 +3,9 @@
* and open the template in the editor. * and open the template in the editor.
*/ */
package gui; package net.i2p.desktopgui.gui;
import desktopgui.*; import net.i2p.desktopgui.desktopgui.*;
import java.awt.AWTException; import java.awt.AWTException;
import java.awt.Desktop; import java.awt.Desktop;
import java.awt.Image; import java.awt.Image;
@@ -23,9 +23,9 @@ import java.util.logging.Logger;
import javax.swing.JMenu; import javax.swing.JMenu;
import javax.swing.JMenuItem; import javax.swing.JMenuItem;
import javax.swing.JPopupMenu; import javax.swing.JPopupMenu;
import router.RouterHandler; import net.i2p.desktopgui.router.RouterHandler;
import router.RouterHelper; import net.i2p.desktopgui.router.RouterHelper;
import router.configuration.PeerHelper; import net.i2p.desktopgui.router.configuration.PeerHelper;
/** /**
* *

View File

@@ -12,6 +12,7 @@
<AuxValues> <AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/> <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>

View File

@@ -4,10 +4,10 @@
* Created on 13 april 2009, 13:48 * Created on 13 april 2009, 13:48
*/ */
package gui; package net.i2p.desktopgui.gui;
import javax.swing.JFrame; import javax.swing.JFrame;
import router.RouterHelper; import net.i2p.desktopgui.router.RouterHelper;
/** /**
* *
@@ -24,7 +24,7 @@ public class Version extends javax.swing.JDialog {
super(parent, modal); super(parent, modal);
initComponents(); initComponents();
String i2pVersion = RouterHelper.getVersion(); String i2pVersion = RouterHelper.getVersion();
String guiVersion = desktopgui.GUIVersion.VERSION; String guiVersion = net.i2p.desktopgui.desktopgui.GUIVersion.VERSION;
this.I2PVersion.setText("<html><h1>" + i2pVersion + "</h1></html>"); this.I2PVersion.setText("<html><h1>" + i2pVersion + "</h1></html>");
this.GUIVersion.setText("<html><h1>" + guiVersion + "</h1></html>"); this.GUIVersion.setText("<html><h1>" + guiVersion + "</h1></html>");
this.setVisible(true); this.setVisible(true);
@@ -46,7 +46,7 @@ public class Version extends javax.swing.JDialog {
GUIVersion = new javax.swing.JLabel(); GUIVersion = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(desktopgui.Main.class).getContext().getResourceMap(Version.class); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.i2p.desktopgui.desktopgui.Main.class).getContext().getResourceMap(Version.class);
setTitle(resourceMap.getString("Form.title")); // NOI18N setTitle(resourceMap.getString("Form.title")); // NOI18N
setName("Form"); // NOI18N setName("Form"); // NOI18N

View File

@@ -5,16 +5,6 @@ jLabel4.text=Monthly usage:
jLabel5.text=GB jLabel5.text=GB
jLabel6.text=GB jLabel6.text=GB
jLabel7.text=Explanation ... jLabel7.text=Explanation ...
jLabel8.text=What is your preferred automatic update setting?
jRadioButton1.text=Only inform about updates
jRadioButton2.text=Download and verify update file, do not restart
jRadioButton3.text=Download, verify and restart
jToggleButton1.text=Check for updates now
jToggleButton2.text=Update available: update now
jToggleButton3.text=Advanced update configuration
jLabel9.text=Tunnel explanation
jLabel10.text=Client tunnels:
jLabel11.text=Server tunnels:
Form.title=General Configuration Form.title=General Configuration
speedPanel.TabConstraints.tabTitle=Speed speedPanel.TabConstraints.tabTitle=Speed
updatesPanel.TabConstraints.tabTitle=Updates updatesPanel.TabConstraints.tabTitle=Updates
@@ -27,3 +17,13 @@ uploadspeed.text=jTextField1
downloadspeed.text=jTextField2 downloadspeed.text=jTextField2
uploadgb.text=jTextField3 uploadgb.text=jTextField3
downloadgb.text=jTextField4 downloadgb.text=jTextField4
updateMethod.text=What is your preferred automatic update setting?
updateInform.text=Only inform about updates
updateDownload.text=Download and verify update file, do not restart
updateDownloadRestart.text=Download, verify and restart
checkUpdates.text=Check for updates now
updateNow.text=Update available: update now
advancedUpdateConfig.text=Advanced update configuration
clientTunnelLabel.text=Client tunnels:
serverTunnelLabel.text=Server tunnels:
tunnelsExplanation.text=Tunnel explanation

View File

@@ -1,4 +1,4 @@
package persistence; package net.i2p.desktopgui.persistence;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;

View File

@@ -3,7 +3,7 @@
* and open the template in the editor. * and open the template in the editor.
*/ */
package router; package net.i2p.desktopgui.router;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;

View File

@@ -1,4 +1,4 @@
package router; package net.i2p.desktopgui.router;
import net.i2p.router.RouterContext; import net.i2p.router.RouterContext;
import net.i2p.router.RouterVersion; import net.i2p.router.RouterVersion;

View File

@@ -1,4 +1,4 @@
package router.configuration; package net.i2p.desktopgui.router.configuration;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@@ -11,7 +11,7 @@ import net.i2p.router.CommSystemFacade;
import net.i2p.router.RouterContext; import net.i2p.router.RouterContext;
import net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseFacade; import net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseFacade;
import net.i2p.router.transport.ntcp.NTCPAddress; import net.i2p.router.transport.ntcp.NTCPAddress;
import router.RouterHelper; import net.i2p.desktopgui.router.RouterHelper;
/** /**
* Part of the code imported and adapted from the I2P Router Console (which is licensed as public domain) * Part of the code imported and adapted from the I2P Router Console (which is licensed as public domain)

View File

@@ -1,8 +1,8 @@
package router.configuration; package net.i2p.desktopgui.router.configuration;
import net.i2p.router.RouterContext; import net.i2p.router.RouterContext;
import net.i2p.router.transport.FIFOBandwidthRefiller; import net.i2p.router.transport.FIFOBandwidthRefiller;
import router.RouterHelper; import net.i2p.desktopgui.router.RouterHelper;
/** /**
* *

View File

@@ -1,7 +1,7 @@
package router.configuration; package net.i2p.desktopgui.router.configuration;
import net.i2p.router.transport.FIFOBandwidthRefiller; import net.i2p.router.transport.FIFOBandwidthRefiller;
import router.RouterHelper; import net.i2p.desktopgui.router.RouterHelper;
/** /**
* *

View File

@@ -1,4 +1,4 @@
package util; package net.i2p.desktopgui.util;
import javax.swing.InputVerifier; import javax.swing.InputVerifier;
import javax.swing.JComponent; import javax.swing.JComponent;

View File

@@ -92,7 +92,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
private final List tasks = new ArrayList(); private final List tasks = new ArrayList();
private int next_task_id = 1; private int next_task_id = 1;
private Set listeners = new HashSet(); private final Set listeners = new HashSet();
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
new I2PTunnel(args); new I2PTunnel(args);
@@ -668,9 +668,9 @@ public class I2PTunnel implements Logging, EventDispatcher {
*/ */
public void runConnectClient(String args[], Logging l) { public void runConnectClient(String args[], Logging l) {
if (args.length >= 1 && args.length <= 3) { if (args.length >= 1 && args.length <= 3) {
int port = -1; int _port = -1;
try { try {
port = Integer.parseInt(args[0]); _port = Integer.parseInt(args[0]);
} catch (NumberFormatException nfe) { } catch (NumberFormatException nfe) {
_log.error(getPrefix() + "Port specified is not valid: " + args[0], nfe); _log.error(getPrefix() + "Port specified is not valid: " + args[0], nfe);
return; return;
@@ -702,10 +702,10 @@ public class I2PTunnel implements Logging, EventDispatcher {
I2PTunnelTask task; I2PTunnelTask task;
ownDest = !isShared; ownDest = !isShared;
try { try {
task = new I2PTunnelConnectClient(port, l, ownDest, proxy, (EventDispatcher) this, this); task = new I2PTunnelConnectClient(_port, l, ownDest, proxy, (EventDispatcher) this, this);
addtask(task); addtask(task);
} catch (IllegalArgumentException iae) { } catch (IllegalArgumentException iae) {
_log.error(getPrefix() + "Invalid I2PTunnel config to create an httpclient [" + host + ":"+ port + "]", iae); _log.error(getPrefix() + "Invalid I2PTunnel config to create an httpclient [" + host + ":"+ _port + "]", iae);
} }
} else { } else {
l.log("connectclient <port> [<sharedClient>] [<proxy>]"); l.log("connectclient <port> [<sharedClient>] [<proxy>]");
@@ -728,9 +728,9 @@ public class I2PTunnel implements Logging, EventDispatcher {
*/ */
public void runIrcClient(String args[], Logging l) { public void runIrcClient(String args[], Logging l) {
if (args.length >= 2) { if (args.length >= 2) {
int port = -1; int _port = -1;
try { try {
port = Integer.parseInt(args[0]); _port = Integer.parseInt(args[0]);
} catch (NumberFormatException nfe) { } catch (NumberFormatException nfe) {
l.log("invalid port"); l.log("invalid port");
_log.error(getPrefix() + "Port specified is not valid: " + args[0], nfe); _log.error(getPrefix() + "Port specified is not valid: " + args[0], nfe);
@@ -757,12 +757,12 @@ public class I2PTunnel implements Logging, EventDispatcher {
String privateKeyFile = null; String privateKeyFile = null;
if (args.length >= 4) if (args.length >= 4)
privateKeyFile = args[3]; privateKeyFile = args[3];
task = new I2PTunnelIRCClient(port, args[1], l, ownDest, (EventDispatcher) this, this, privateKeyFile); task = new I2PTunnelIRCClient(_port, args[1], l, ownDest, (EventDispatcher) this, this, privateKeyFile);
addtask(task); addtask(task);
notifyEvent("ircclientTaskId", Integer.valueOf(task.getId())); notifyEvent("ircclientTaskId", Integer.valueOf(task.getId()));
} catch (IllegalArgumentException iae) { } catch (IllegalArgumentException iae) {
_log.error(getPrefix() + "Invalid I2PTunnel config to create an ircclient [" + host + ":"+ port + "]", iae); _log.error(getPrefix() + "Invalid I2PTunnel config to create an ircclient [" + host + ":"+ _port + "]", iae);
l.log("Invalid I2PTunnel configuration [" + host + ":" + port + "]"); l.log("Invalid I2PTunnel configuration [" + host + ":" + _port + "]");
notifyEvent("ircclientTaskId", Integer.valueOf(-1)); notifyEvent("ircclientTaskId", Integer.valueOf(-1));
} }
} else { } else {
@@ -786,9 +786,9 @@ public class I2PTunnel implements Logging, EventDispatcher {
*/ */
public void runSOCKSTunnel(String args[], Logging l) { public void runSOCKSTunnel(String args[], Logging l) {
if (args.length >= 1 && args.length <= 2) { if (args.length >= 1 && args.length <= 2) {
int port = -1; int _port = -1;
try { try {
port = Integer.parseInt(args[0]); _port = Integer.parseInt(args[0]);
} catch (NumberFormatException nfe) { } catch (NumberFormatException nfe) {
l.log("invalid port"); l.log("invalid port");
_log.error(getPrefix() + "Port specified is not valid: " + args[0], nfe); _log.error(getPrefix() + "Port specified is not valid: " + args[0], nfe);
@@ -802,7 +802,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
ownDest = !isShared; ownDest = !isShared;
I2PTunnelTask task; I2PTunnelTask task;
task = new I2PSOCKSTunnel(port, l, ownDest, (EventDispatcher) this, this); task = new I2PSOCKSTunnel(_port, l, ownDest, (EventDispatcher) this, this);
addtask(task); addtask(task);
notifyEvent("sockstunnelTaskId", Integer.valueOf(task.getId())); notifyEvent("sockstunnelTaskId", Integer.valueOf(task.getId()));
} else { } else {
@@ -820,9 +820,9 @@ public class I2PTunnel implements Logging, EventDispatcher {
*/ */
public void runStreamrClient(String args[], Logging l) { public void runStreamrClient(String args[], Logging l) {
if (args.length == 3) { if (args.length == 3) {
InetAddress host; InetAddress _host;
try { try {
host = InetAddress.getByName(args[0]); _host = InetAddress.getByName(args[0]);
} catch (UnknownHostException uhe) { } catch (UnknownHostException uhe) {
l.log("unknown host"); l.log("unknown host");
_log.error(getPrefix() + "Error resolving " + args[0], uhe); _log.error(getPrefix() + "Error resolving " + args[0], uhe);
@@ -830,9 +830,9 @@ public class I2PTunnel implements Logging, EventDispatcher {
return; return;
} }
int port = -1; int _port = -1;
try { try {
port = Integer.parseInt(args[1]); _port = Integer.parseInt(args[1]);
} catch (NumberFormatException nfe) { } catch (NumberFormatException nfe) {
l.log("invalid port"); l.log("invalid port");
_log.error(getPrefix() + "Port specified is not valid: " + args[0], nfe); _log.error(getPrefix() + "Port specified is not valid: " + args[0], nfe);
@@ -840,7 +840,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
return; return;
} }
StreamrConsumer task = new StreamrConsumer(host, port, args[2], l, (EventDispatcher) this, this); StreamrConsumer task = new StreamrConsumer(_host, _port, args[2], l, (EventDispatcher) this, this);
task.startRunning(); task.startRunning();
addtask(task); addtask(task);
notifyEvent("streamrtunnelTaskId", Integer.valueOf(task.getId())); notifyEvent("streamrtunnelTaskId", Integer.valueOf(task.getId()));
@@ -859,9 +859,9 @@ public class I2PTunnel implements Logging, EventDispatcher {
*/ */
public void runStreamrServer(String args[], Logging l) { public void runStreamrServer(String args[], Logging l) {
if (args.length == 2) { if (args.length == 2) {
int port = -1; int _port = -1;
try { try {
port = Integer.parseInt(args[0]); _port = Integer.parseInt(args[0]);
} catch (NumberFormatException nfe) { } catch (NumberFormatException nfe) {
l.log("invalid port"); l.log("invalid port");
_log.error(getPrefix() + "Port specified is not valid: " + args[0], nfe); _log.error(getPrefix() + "Port specified is not valid: " + args[0], nfe);
@@ -877,7 +877,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
return; return;
} }
StreamrProducer task = new StreamrProducer(port, privKeyFile, args[1], l, (EventDispatcher) this, this); StreamrProducer task = new StreamrProducer(_port, privKeyFile, args[1], l, (EventDispatcher) this, this);
task.startRunning(); task.startRunning();
addtask(task); addtask(task);
notifyEvent("streamrtunnelTaskId", Integer.valueOf(task.getId())); notifyEvent("streamrtunnelTaskId", Integer.valueOf(task.getId()));

View File

@@ -200,9 +200,9 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 implements I2PSession {
protected class MuxedAvailabilityNotifier extends AvailabilityNotifier { protected class MuxedAvailabilityNotifier extends AvailabilityNotifier {
private LinkedBlockingQueue<MsgData> _msgs; private LinkedBlockingQueue<MsgData> _msgs;
private AtomicBoolean _alive = new AtomicBoolean(false); private volatile Boolean _alive = new Boolean(false);
private static final int POISON_SIZE = -99999; private static final int POISON_SIZE = -99999;
private AtomicBoolean stopping = new AtomicBoolean(false); private final AtomicBoolean stopping = new AtomicBoolean(false);
public MuxedAvailabilityNotifier() { public MuxedAvailabilityNotifier() {
_msgs = new LinkedBlockingQueue(); _msgs = new LinkedBlockingQueue();
@@ -210,28 +210,29 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 implements I2PSession {
@Override @Override
public void stopNotifying() { public void stopNotifying() {
if(stopping.get()) return;
stopping.set(true);
boolean again = true; boolean again = true;
// _msgs.clear(); synchronized (stopping) {
// Thread.yield(); if(!stopping.get()) {
if (_alive.get()) { stopping.set(true);
// System.out.println("I2PSessionMuxedImpl.stopNotifying()"); if (_alive.equals(true)) {
_msgs.clear(); // System.out.println("I2PSessionMuxedImpl.stopNotifying()");
while(again) { _msgs.clear();
try { while(again) {
_msgs.put(new MsgData(0, POISON_SIZE, 0, 0, 0)); try {
again = false; _msgs.put(new MsgData(0, POISON_SIZE, 0, 0, 0));
// System.out.println("I2PSessionMuxedImpl.stopNotifying() success."); again = false;
} catch (InterruptedException ie) { // System.out.println("I2PSessionMuxedImpl.stopNotifying() success.");
continue; } catch (InterruptedException ie) {
continue;
}
}
} }
_alive = false;
stopping.set(false);
} }
stopping.notifyAll();
} }
_alive.set(false);
stopping.set(false); // Do we need this?
} }
/** unused */ /** unused */
@Override @Override
public void available(long msgId, int size) { throw new IllegalArgumentException("no"); } public void available(long msgId, int size) { throw new IllegalArgumentException("no"); }
@@ -245,8 +246,8 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 implements I2PSession {
@Override @Override
public void run() { public void run() {
MsgData msg; MsgData msg;
_alive.set(true); _alive=true;
while (_alive.get()) { while (_alive) {
try { try {
msg = _msgs.take(); msg = _msgs.take();
} catch (InterruptedException ie) { } catch (InterruptedException ie) {

View File

@@ -1,3 +1,14 @@
2009-05-09 sponge
* merge
2009-05-09 sponge
* fixed OOM on lock (woops! my bad!)
2009-05-08 Mathiasdm
* desktopgui: moved files to stop polluting the namespace
(everything now in net.i2p.desktopgui)
* desktopgui: some variable renaming in general configuration
2009-05-07 mkvore 2009-05-07 mkvore
* SAM: version 3 added * SAM: version 3 added
* SAM: blocking case corrected on simultaneous client connection (v.1-3) * SAM: blocking case corrected on simultaneous client connection (v.1-3)

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 10; public final static long BUILD = 12;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;