|
From: <an...@us...> - 2008-02-04 17:00:03
|
Revision: 731
http://magicmap.svn.sourceforge.net/magicmap/?rev=731&view=rev
Author: anweiss
Date: 2008-02-04 07:51:35 -0800 (Mon, 04 Feb 2008)
Log Message:
-----------
renamed pollintevall to pollinterval and selected the correct pollinterval in the options menu at startup
Modified Paths:
--------------
trunk/magicmapclient/src/net/sf/magicmap/client/controller/ServerPoller.java
trunk/magicmapclient/src/net/sf/magicmap/client/gui/MainFrame.java
trunk/magicmapclient/src/net/sf/magicmap/client/utils/Settings.java
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/controller/ServerPoller.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/controller/ServerPoller.java 2008-02-04 15:43:54 UTC (rev 730)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/controller/ServerPoller.java 2008-02-04 15:51:35 UTC (rev 731)
@@ -40,7 +40,7 @@
}
public void start(){
- this.timer.scheduleAtFixedRate(pollPositionsTimerTask(), Settings.POLL_DELAY, Settings.getPollIntevall());
+ this.timer.scheduleAtFixedRate(pollPositionsTimerTask(), Settings.POLL_DELAY, Settings.getPollInterval());
this.timer.scheduleAtFixedRate(pollGeoPointsTimerTask(), Settings.POLL_DELAY + 1000, 120000);
}
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/gui/MainFrame.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/MainFrame.java 2008-02-04 15:43:54 UTC (rev 730)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/MainFrame.java 2008-02-04 15:51:35 UTC (rev 731)
@@ -253,7 +253,7 @@
menu.add(dataInvocationRate);
for (int i = 0; i < MainFrame.numberOfdataInvocationRateAction; i++)
dataInvocationRate.add(GUIBuilder.createCheckBoxMenuItem(this.dataInvocationRateAction[i], false));
- this.dataInvocationRateAction[4].setSelected(true);
+ this.dataInvocationRateAction[(Settings.getPollInterval()/1000)-1].setSelected(true);
return menu;
}
@@ -590,7 +590,7 @@
}
}
};
-
+
this.homepageAction = new MagicAction("homepage") {
/**
@@ -806,7 +806,7 @@
for (int j = 0; j < MainFrame.numberOfdataInvocationRateAction; j++)
MainFrame.this.dataInvocationRateAction[j].setSelected(false);
MainFrame.this.dataInvocationRateAction[thisAction].setSelected(true);
- Settings.setPollIntevall((thisAction + 1) * 1000);
+ Settings.setPollInterval((thisAction + 1) * 1000);
Controller.getInstance().restartServerPoller();
}
};
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/utils/Settings.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/utils/Settings.java 2008-02-04 15:43:54 UTC (rev 730)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/utils/Settings.java 2008-02-04 15:51:35 UTC (rev 731)
@@ -36,7 +36,7 @@
private static final String settingsFileName = "settings.ini";
private static final String SERVERNAMES_KEY = "servernames";
private static final String LASTSELECTEDSERVER_KEY = "lastselectedserver";
- private static final String POLLINTERVALL_KEY = "pollintevall";
+ private static final String POLLINTERVAL_KEY = "pollinterval";
private static final String CLIENTNAME_KEY = "clientname";
private static final String STANDALONE_KEY = "standalone";
// private static final String VIEWOPTION_KEY = "viewoption";
@@ -55,7 +55,7 @@
private static ArrayList<String> default_server_list = new ArrayList<String>();
private static int lastSelectedServer = 0;
public static final int TIMEOUT = 15000;
- private static int pollIntevall = 5000;
+ private static int pollInterval = 5000;
public static final long POLL_DELAY = 500;
public static String WEBSERVICE_PATH = "/magicmap/services/";
@@ -80,12 +80,12 @@
Settings.clientMAC = clientMAC;
}
- public static int getPollIntevall(){
- return Settings.pollIntevall;
+ public static int getPollInterval(){
+ return Settings.pollInterval;
}
- public static void setPollIntevall(int pollIntevall){
- Settings.pollIntevall = pollIntevall;
+ public static void setPollInterval(int pollInterval){
+ Settings.pollInterval = pollInterval;
}
public static String getClientName(){
@@ -207,11 +207,11 @@
else
// default value
Settings.lastSelectedServer = 0;
- if ((property = Settings.settingsProperties.getProperty(Settings.POLLINTERVALL_KEY)) != null)
- Settings.pollIntevall = Integer.parseInt(property.trim());
+ if ((property = Settings.settingsProperties.getProperty(Settings.POLLINTERVAL_KEY)) != null)
+ Settings.pollInterval = Integer.parseInt(property.trim());
else
// default value
- Settings.pollIntevall = 5000;
+ Settings.pollInterval = 5000;
if ((property = Settings.settingsProperties.getProperty(Settings.CLIENTNAME_KEY)) != null)
Settings.clientName = property.trim();
else
@@ -282,7 +282,7 @@
Settings.settingsProperties.put(Settings.SERVERNAMES_KEY, property.substring(0, property.lastIndexOf(',')));
Settings.settingsProperties.put(Settings.LASTSELECTEDSERVER_KEY, String
.valueOf(Settings.lastSelectedServer));
- Settings.settingsProperties.put(Settings.POLLINTERVALL_KEY, String.valueOf(Settings.pollIntevall));
+ Settings.settingsProperties.put(Settings.POLLINTERVAL_KEY, String.valueOf(Settings.pollInterval));
Settings.settingsProperties.put(Settings.CLIENTNAME_KEY, Settings.clientName);
if (Settings.standAlone)
property = "YES";
@@ -297,7 +297,7 @@
+ "# This file stores the configuration for MagicMap. #" + newline
+ "# #" + newline
+ "####################################################################" + newline
- + newline + "# Comma seperated list of default MagicMap-Servers" + newline
+ + newline + "# Comma separated list of default MagicMap-Servers" + newline
+ "# servernames= server-url1:port1, server-url2:port2 , ..." + newline + newline
+ "# lastselectedserver=index" + newline + newline + "# pollintevall=time in ms" + newline
+ newline + "# clientname=" + newline + newline + "# standalone=(YES|NO)");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|