| |
в
private final String PARAM_str = "str";
private final String PARAM_font = "font";
private final String PARAM_style = "style";
private final String PARAM_size = "size";
private final String PARAM_color = "color";
private final String PARAM_delay = "delay";
// -------------------------------------------------------
// getAppletInfo
// Метод, возвращающей строку информации об аплете
// -------------------------------------------------------
public String getAppletInfo()
{
return "Name: HorzScroll\r\n" +
"Author: Alexandr Frolov\r\n" +
"E-mail: [email protected]" +
"WWW: http://www.glasnet.ru/~frolov" +
"Created with Microsoft Visual J++ Version 1.0";
}
// -------------------------------------------------------
// getParameterInfo
// Иинформация о параметрах
// -------------------------------------------------------
public String[][] getParameterInfo()
{
String[][] info =
{
{ PARAM_str, "String", "String to draw" },
{ PARAM_font, "String", "Font name" },
{ PARAM_style, "String", "Font style" },
{ PARAM_size, "String", "Font size" },
{ PARAM_color, "String", "String color" },
{ PARAM_delay, "int", "Output delay" },
};
return info;
}
// -------------------------------------------------------
// init
// Метод, получающий управление при инициализации аплета
// -------------------------------------------------------
public void init()
{
// Рабочая строка
String param;
// Получение значений параметров
param = getParameter(PARAM_str);
if (param != null)
m_Str = param;
param = getParameter(PARAM_font);
if (param != null)
m_Fnt = param;
param = getParameter(PARAM_style);
if (param != null)
m_style = param;
param = getParameter(PARAM_size);
if (param != null)
m_size = Integer.parseInt(param);
param = getParameter(PARAM_color);
if (param != null)
m_color = param;
param = getParameter(PARAM_delay);
if (param != null)
m_delay = Integer.parseInt(param);
}
// ------------------------------------
|
|