Class tea.set.BaseA
All Packages Class Hierarchy This Package Previous Next Index
Class tea.set.BaseA
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----tea.set.BaseA
- public class BaseA
- extends Applet
BaseA is the base class for all Tea Set applets. It handles
the basic component functions, such as setting of colors and fonts.
Because every type of Tea Set applet has the widget name as the
prefix of the parameter name, the widget name is passed to BaseA
as init argument, and it's appended with the actual argument
name to retrieve the parameter related to the subclass applet.
$NAME is the widget name of the subclass applet.
Parameters supported by this applet includes:
- $NAME.FOREGROUND
- the value of this parameter can be any
one of the color defined in java.awt.Color, or it can be a RGB
value in the format R:G:B, where R, G, and B are numeric values
for RGB.
The specified color will become the foreground color of this
applet.
- $NAME.BACKGROUND
- the value of this parameter can be any
one of the color defined in java.awt.Color, or it can be a RGB
value in the format R:G:B, where R, G, and B are numeric values
for RGB.
The specified color will become the background color of this
applet.
- $NAME.FONT
- the value of this parameter is the logical
name of a font defined in the platform property list.
- $NAME.FONTNAME
- the name of font. Normally supported font
names are: Courier, Dialog, Helvetica, TimesRoman, Symbol.
- $NAME.FONTSIZE
- specify size of font.
- $NAME.FONTSTYLE
- style could be either PLAIN, BOLD, or
ITALIC.
- See Also:
- TextGrid
-
BaseA()
-
-
getColor(String)
- Return a Color object from color name.
-
getParameter(String)
- If applet id is set by setAppletID(), prepend the applet id to the
qualified parameter name.
-
init(String)
- Handles initialization of general applet parameters.
-
parseList(String, int)
- Parse an integer list.
-
setAppletID(String)
- Set the applet id to the string.
-
startComponents(Container)
- Start all applets in this container.
-
stopComponents(Container)
- Stop all applets in this container.
BaseA
public BaseA()
init
public void init(String name)
- Handles initialization of general applet parameters.
The name is used to qualify the parameter names.
- Parameters:
- name - the name of the widget.
setAppletID
public void setAppletID(String id)
- Set the applet id to the string.
- Parameters:
- id - applet id, set by container applets.
- See Also:
- Folder, Grid
getParameter
public String getParameter(String pname)
- If applet id is set by setAppletID(), prepend the applet id to the
qualified parameter name. If parameter exists for this name, return
its value. Otherwise get the parameter value for the qualified
name without applet id.
- Parameters:
- pname - applet parameter name.
- Returns:
- applet parameter value.
- Overrides:
- getParameter in class Applet
getColor
public Color getColor(String cname)
- Return a Color object from color name.
- Parameters:
- cname - color name, one of the values defined in java.awt.Color.
- Returns:
- the java.awt.Color object corresponding to the color name.
parseList
protected static int[] parseList(String str,
int num)
- Parse an integer list.
- Parameters:
- str - the string to parse.
- num - number of items in the list.
startComponents
protected void startComponents(Container container)
- Start all applets in this container.
- Parameters:
- container - the container component to start.
stopComponents
protected void stopComponents(Container container)
- Stop all applets in this container.
- Parameters:
- container - the container component to stop.
All Packages Class Hierarchy This Package Previous Next Index