FileDocCategorySizeDatePackage
ColorScribble.javaAPI DocExample1977Sat Jun 02 03:10:00 BST 2001None

ColorScribble

public class ColorScribble extends Scribble

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringgetAppletInfo()

        return "Scribble v. 0.02.\nWritten by David Flanagan.";
    
protected java.awt.ColorgetColorParameter(java.lang.String name)

        String value = this.getParameter(name);
        int intvalue;
        try { intvalue = Integer.parseInt(value, 16); }
        catch (NumberFormatException e) { return null; }
        return new Color(intvalue);
    
public java.lang.String[][]getParameterInfo()

        String[][] info = {
            // Array of arrays of strings describing each parameter.
            // Format: parameter name, parameter type, parameter description
            {"foreground", "hexidecimal color value", "foreground color"},
            {"background", "hexidecimal color value", "background color"}
        };
        return info;
    
public voidinit()

        super.init();
        Color foreground = getColorParameter("foreground");
        Color background = getColorParameter("background");
        if (foreground != null) this.setForeground(foreground);
        if (background != null) this.setBackground(background);