aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/PluginParameters.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-31 10:19:48 +0100
committerSven Gothel <[email protected]>2014-01-31 10:19:48 +0100
commitf826663e9609b73783deea475872646242c8abb9 (patch)
tree64f60a686ffae66753bb62b7b135964e9b2fcc83 /netx/net/sourceforge/jnlp/PluginParameters.java
parentf5a0517ac704b36e3d94aa3d5547ddf95889ab95 (diff)
ITW NPP: Pass window position through all layers, added as 'xpos' and 'ypos' in message and parameters ; ...
- Relative position of window maybe important in regards to overlapping applet windows as well as for an upcoming OSX support. However, client may still need to calculate the location on screen. - Applet3Panel added toString() - Applet3Panel, PluginApplet3Viewer: Better naming for browser notification - appletResize -> browserSizeChanged, etc
Diffstat (limited to 'netx/net/sourceforge/jnlp/PluginParameters.java')
-rw-r--r--netx/net/sourceforge/jnlp/PluginParameters.java31
1 files changed, 21 insertions, 10 deletions
diff --git a/netx/net/sourceforge/jnlp/PluginParameters.java b/netx/net/sourceforge/jnlp/PluginParameters.java
index c3a958c..99e01c4 100644
--- a/netx/net/sourceforge/jnlp/PluginParameters.java
+++ b/netx/net/sourceforge/jnlp/PluginParameters.java
@@ -37,13 +37,13 @@ exception statement from your version. */
package net.sourceforge.jnlp;
+import static net.sourceforge.jnlp.runtime.Translator.R;
+
import java.net.URL;
import java.util.Collections;
import java.util.Hashtable;
import java.util.Map;
-import static net.sourceforge.jnlp.runtime.Translator.R;
-
/**
* Represents plugin applet parameters, backed by a Hashtable.
*/
@@ -77,7 +77,7 @@ public class PluginParameters {
/**
* Used for compatibility with Hashtable-expecting classes.
- *
+ *
* @return the underlying hashtable.
*/
public Hashtable<String, String> getUnderlyingHashtable() {
@@ -150,13 +150,23 @@ public class PluginParameters {
return getDefaulted("archive", "");
}
+ public int getX() {
+ final String yposStr = getDefaulted("xpos", "0");
+ return Integer.valueOf(yposStr);
+ }
+
+ public int getY() {
+ final String xposStr = getDefaulted("ypos", "0");
+ return Integer.valueOf(xposStr);
+ }
+
public int getWidth() {
- String widthStr = getDefaulted("width", "0");
+ final String widthStr = getDefaulted("width", "0");
return Integer.valueOf(widthStr);
}
public int getHeight() {
- String heightStr = getDefaulted("height", "0");
+ final String heightStr = getDefaulted("height", "0");
return Integer.valueOf(heightStr);
}
@@ -166,12 +176,12 @@ public class PluginParameters {
}
public String getUniqueKey(URL codebase) {
- /* According to http://download.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/applet-compatibility.html,
+ /* According to http://download.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/applet-compatibility.html,
* classloaders are shared iff these properties match:
* codebase, cache_archive, java_archive, archive
- *
+ *
* To achieve this, we create the uniquekey based on those 4 values,
- * always in the same order. The initial "<NAME>=" parts ensure a
+ * always in the same order. The initial "<NAME>=" parts ensure a
* bad tag cannot trick the loader into getting shared with another.
*/
return "codebase=" + codebase.toExternalForm() + "cache_archive="
@@ -180,7 +190,7 @@ public class PluginParameters {
}
/**
- * Replace an attribute with its 'java_'-prefixed version.
+ * Replace an attribute with its 'java_'-prefixed version.
* Note that java_* aliases override older names:
* http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/using_tags.html#in-nav
*/
@@ -195,7 +205,7 @@ public class PluginParameters {
/**
* Creates the underlying hash table with the proper overrides. Ensure all
* keys are lowercase consistently.
- *
+ *
* @param params
* the properties, before parameter aliasing rules.
* @return the resulting parameter table
@@ -236,6 +246,7 @@ public class PluginParameters {
return params;
}
+ @Override
public String toString() {
return parameters.toString();
}