|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.webcompmath.applets.AppletUtilities
public class AppletUtilities
This class includes various utility methods used by WCM applets.
Constructor Summary | |
---|---|
AppletUtilities()
|
Method Summary | |
---|---|
static java.awt.Color |
getColorParam(java.applet.Applet app,
java.lang.String data)
Get The value of an applet parameter that specifies a color. |
static java.awt.Color |
getColorParam(java.applet.Applet app,
java.lang.String paramName,
java.awt.Color defaultColor)
Get The value of an applet parameter that specifies a color. |
static double[] |
getNumericParam(java.applet.Applet app,
java.lang.String paramName)
Get The value of an applet parameter that consists of a list of numbers. |
static double[] |
getNumericParam(java.applet.Applet app,
java.lang.String paramName,
double[] defaults)
Get The value of an applet parameter that consists of a list of numbers. |
static java.lang.String |
getParameter(java.applet.Applet app,
java.lang.String paramName,
java.lang.String defaultValue)
Get the value of an applet parameter, but return a default if the value is null. |
static void |
setUIFontSize(float fs)
Set the default font size for all Swing default fonts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AppletUtilities()
Method Detail |
---|
public static void setUIFontSize(float fs)
fs
- the new font sizepublic static java.lang.String getParameter(java.applet.Applet app, java.lang.String paramName, java.lang.String defaultValue)
app
- the applet to get a parameter from (usually "this")paramName
- The name of the applet parameter.defaultValue
- The value to be returned if getParameter(paramName) is null.
public static double[] getNumericParam(java.applet.Applet app, java.lang.String paramName)
app
- the applet to get a parameter from (usually "this")paramName
- the name of the parameter to get
public static double[] getNumericParam(java.applet.Applet app, java.lang.String paramName, double[] defaults)
app
- the applet to get a parameter from (usually "this")paramName
- The name of the applet parameter.defaults
- The value to be returned if getParameter(paramName) is null or
is not a valid list of numbers.
public static java.awt.Color getColorParam(java.applet.Applet app, java.lang.String data)
app
- the applet to get a parameter from (usually "this")data
- the name of the parameter
public static java.awt.Color getColorParam(java.applet.Applet app, java.lang.String paramName, java.awt.Color defaultColor)
app
- the applet to get a parameter from (usually "this")paramName
- The name of the applet parameter.defaultColor
- The value to be returned if getParameter(paramName) is null or
is not a valid color.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |