// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   RoundedLedComponent.java

import java.applet.Applet;
import java.awt.*;

public class RoundedLedComponent extends RoundedComponent
{

    RoundedLedComponent(int i, int j, int k, int l, int i1)
    {
        super(i, j, k, l, i1);
        setBackground(Color.white);
        setLayout(null);
        currentLed = ledOff;
    }

    public void paint(Graphics g)
    {
        if(currentRnd != null)
            g.drawImage(currentRnd, 0, 0, this);
        if(currentLed != null)
            g.drawImage(currentLed, 0, 0, this);
    }

    public void setActiveState(int i)
    {
        if(i == 0)
            currentLed = ledOff;
        else
        if(i == 1)
            currentLed = ledOn1;
        else
        if(i == 2)
            currentLed = ledOn2;
        else
        if(i == 3)
            currentLed = ledOn3;
        repaint();
    }

    public static void staticInit(Applet applet)
    {
        RoundedComponent.staticInit(applet);
        ledOff = Const.getImage("ledoff.gif");
        ledOn1 = Const.getImage("ledon1.gif");
        ledOn2 = Const.getImage("ledon2.gif");
        ledOn3 = Const.getImage("ledon3.gif");
    }

    static Image ledOn1;
    static Image ledOn2;
    static Image ledOn3;
    static Image ledOff;
    Image currentLed;
}
