aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-05-05 12:16:43 +0000
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-05-05 12:16:43 +0000
commit9dbd0f9d6c0f2766bf4ae7cb37cd1dbae2eb1aa2 (patch)
tree722203ea02d5df15296ea3f8c0036d939b7ab83b
parent82b87dac9a0f3049b7bb7618b22b8b704b8da073 (diff)
downloadvaadin-framework-9dbd0f9d6c0f2766bf4ae7cb37cd1dbae2eb1aa2.tar.gz
vaadin-framework-9dbd0f9d6c0f2766bf4ae7cb37cd1dbae2eb1aa2.zip
Renamed a method based on review #6936
svn changeset:18647/svn branch:6.6
-rwxr-xr-xsrc/com/vaadin/terminal/gwt/client/ApplicationConnection.java2
-rw-r--r--src/com/vaadin/terminal/gwt/client/BrowserInfo.java5
-rw-r--r--src/com/vaadin/terminal/gwt/server/WebBrowser.java19
-rw-r--r--tests/src/com/vaadin/tests/application/WebBrowserTest.java2
4 files changed, 15 insertions, 13 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
index 6cd9d6bed9..5f808ea8cd 100755
--- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
+++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
@@ -352,7 +352,7 @@ public class ApplicationConnection {
int screenHeight = BrowserInfo.get().getScreenHeight();
int tzOffset = BrowserInfo.get().getTimezoneOffset();
int rtzOffset = BrowserInfo.get().getRawTimezoneOffset();
- int dstDiff = BrowserInfo.get().getDSTDifference();
+ int dstDiff = BrowserInfo.get().getDSTSavings();
boolean dstInEffect = BrowserInfo.get().isDSTInEffect();
long curDate = BrowserInfo.get().getCurrentDate().getTime();
String widgetsetVersion = ApplicationConfiguration.VERSION;
diff --git a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java
index 966dd3f863..3c908556fa 100644
--- a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java
+++ b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java
@@ -350,9 +350,10 @@ public class BrowserInfo {
* Gets the difference in minutes between the browser's GMT timezone and
* DST.
*
- * @return the amount of minutes that the timezone shifts when DST is active
+ * @return the amount of minutes that the timezone shifts when DST is in
+ * effect
*/
- public native int getDSTDifference()
+ public native int getDSTSavings()
/*-{
var d = new Date();
var tzo1 = d.getTimezoneOffset(); // current offset
diff --git a/src/com/vaadin/terminal/gwt/server/WebBrowser.java b/src/com/vaadin/terminal/gwt/server/WebBrowser.java
index 7c77313019..1b0d7fe986 100644
--- a/src/com/vaadin/terminal/gwt/server/WebBrowser.java
+++ b/src/com/vaadin/terminal/gwt/server/WebBrowser.java
@@ -28,7 +28,7 @@ public class WebBrowser implements Terminal {
private boolean secureConnection;
private int timezoneOffset = 0;
private int rawTimezoneOffset = 0;
- private int dstDifference;
+ private int dstSavings;
private boolean dstInEffect;
private Date currentDate;
@@ -91,7 +91,7 @@ public class WebBrowser implements Terminal {
* TimeZone offset in minutes from GMT
* @param rtzo
* raw TimeZone offset in minutes from GMT (w/o DST adjustment)
- * @param dstDiff
+ * @param dstSavings
* the difference between the raw TimeZone and DST in minutes
* @param dstInEffect
* is DST currently active in the region or not?
@@ -100,7 +100,7 @@ public class WebBrowser implements Terminal {
*/
void updateBrowserProperties(Locale locale, String address,
boolean secureConnection, String agent, String sw, String sh,
- String tzo, String rtzo, String dstDiff, String dstInEffect,
+ String tzo, String rtzo, String dstSavings, String dstInEffect,
String curDate) {
this.locale = locale;
this.address = address;
@@ -134,12 +134,12 @@ public class WebBrowser implements Terminal {
rawTimezoneOffset = 0; // default gmt+0
}
}
- if (dstDiff != null) {
+ if (dstSavings != null) {
try {
// browser->java conversion: min->ms
- dstDifference = Integer.parseInt(dstDiff) * 60 * 1000;
+ this.dstSavings = Integer.parseInt(dstSavings) * 60 * 1000;
} catch (final NumberFormatException e) {
- dstDifference = 0; // default no difference
+ this.dstSavings = 0; // default no savings
}
}
if (dstInEffect != null) {
@@ -347,10 +347,11 @@ public class WebBrowser implements Terminal {
* Gets the difference in minutes between the browser's GMT TimeZone and
* DST.
*
- * @return the amount of minutes that the TimeZone shifts when DST is active
+ * @return the amount of minutes that the TimeZone shifts when DST is in
+ * effect
*/
- public int getDSTDifference() {
- return dstDifference;
+ public int getDSTSavings() {
+ return dstSavings;
}
/**
diff --git a/tests/src/com/vaadin/tests/application/WebBrowserTest.java b/tests/src/com/vaadin/tests/application/WebBrowserTest.java
index 60339efdaf..08c9061d45 100644
--- a/tests/src/com/vaadin/tests/application/WebBrowserTest.java
+++ b/tests/src/com/vaadin/tests/application/WebBrowserTest.java
@@ -63,7 +63,7 @@ public class WebBrowserTest extends TestBase {
containsLabel.setValue(contains ? "Yes" : "No");
dstDiffLabel.setValue(String.valueOf(getBrowser()
- .getDSTDifference()));
+ .getDSTSavings()));
dstInEffectLabel
.setValue(getBrowser().isDSTInEffect() ? "Yes"