diff options
Diffstat (limited to 'netx/net/sourceforge')
-rw-r--r-- | netx/net/sourceforge/jnlp/PluginParameters.java | 31 |
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(); } |