/*
	A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;

import coobean.gui.cootips;
public class test_ct extends Applet
{
	public void init()
	{
		// Take out this line if you don't use symantec.itools.net.RelativeURL or symantec.itools.awt.util.StatusScroller
		
		// This code is automatically generated by Visual Cafe when you add
		// components to the visual environment. It instantiates and initializes
		// the components. To modify the code, only use code syntax that matches
		// what Visual Cafe can generate, or Visual Cafe may be unable to back
		// parse your Java file into its visual environment.
		//{{INIT_CONTROLS
		setLayout(null);
		setSize(538,341);
		setFont(new Font("Serif", Font.PLAIN, 12));
		setForeground(new Color(0));
		setBackground(new Color(12632256));
		button1 = new java.awt.Button();
		button1.setLabel("button");
		button1.setBounds(24,12,104,28);
		button1.setBackground(new Color(12632256));
		add(button1);
		list1 = new java.awt.List(4);
		list1.addItem("1111");
		list1.addItem("2222");
		list1.addItem("3333");
		list1.addItem("4444");
		add(list1);
		list1.setBounds(144,12,122,75);
		canvas1 = new java.awt.Canvas();
		canvas1.setBounds(300,12,93,68);
		add(canvas1);
		textField1 = new java.awt.TextField();
		textField1.setText("Sound loop here");
		textField1.setBounds(24,108,95,33);
		add(textField1);
		textArea1 = new java.awt.TextArea();
		textArea1.setBounds(144,108,152,85);
		add(textArea1);
		choice1 = new java.awt.Choice();
		choice1.addItem("aaaa");
		choice1.addItem("bbbb");
		choice1.addItem("cccc");
		try {
			choice1.select(0);
		}
		catch (IllegalArgumentException e) { }
		add(choice1);
		choice1.setBounds(336,84,147,72);
		panel1 = new java.awt.Panel();
		panel1.setLayout(null);
		panel1.setBounds(24,228,120,43);
		panel1.setBackground(new Color(16776960));
		add(panel1);
		label1 = new java.awt.Label("This label field is an example where Cootips is used as for sound only.");
		label1.setBounds(24,288,492,24);
		label1.setFont(new Font("Dialog", Font.PLAIN, 16));
		add(label1);
		checkbox1 = new java.awt.Checkbox("NoSound");
		checkbox1.setBounds(240,228,96,24);
		add(checkbox1);
		Group1 = new CheckboxGroup();
		radioButton1 = new java.awt.Checkbox("radiobutton", Group1, false);
		radioButton1.setBounds(420,228,78,27);
		add(radioButton1);
		cootips1 = new coobean.gui.cootips();
		cootips1.setVisible(false);
		cootips1.setBounds(0,0,20,40);
		cootips1.setBackground(new Color(16776960));
		add(cootips1);
		//}}
		
	    //cootips1.setApplet(this);
	    
	
		//{{REGISTER_LISTENERS
		SymMouse aSymMouse = new SymMouse();
		button1.addMouseListener(aSymMouse);
		this.addMouseListener(aSymMouse);
		list1.addMouseListener(aSymMouse);
		textField1.addMouseListener(aSymMouse);
		textArea1.addMouseListener(aSymMouse);
		choice1.addMouseListener(aSymMouse);
		label1.addMouseListener(aSymMouse);
		panel1.addMouseListener(aSymMouse);
		checkbox1.addMouseListener(aSymMouse);
		radioButton1.addMouseListener(aSymMouse);
		//}}
	}
	
	//{{DECLARE_CONTROLS
	java.awt.Button button1;
	java.awt.List list1;
	java.awt.Canvas canvas1;
	java.awt.TextField textField1;
	java.awt.TextArea textArea1;
	java.awt.Choice choice1;
	java.awt.Panel panel1;
	java.awt.Label label1;
	java.awt.Checkbox checkbox1;
	java.awt.Checkbox radioButton1;
	CheckboxGroup Group1;
	coobean.gui.cootips cootips1;
	//}}

	class SymMouse extends java.awt.event.MouseAdapter
	{
		public void mouseEntered(java.awt.event.MouseEvent event)
		{
			Object object = event.getSource();
			if (object == button1)
				button1_MouseEntered(event);
			else if (object == test_ct.this)
				test_MouseEntered(event);
			else if (object == list1)
				list1_MouseEntered(event);
			else if (object == textField1)
				textField1_MouseEntered(event);
			else if (object == textArea1)
				textArea1_MouseEntered(event);
			else if (object == choice1)
				choice1_MouseEntered(event);
			else if (object == label1)
				label1_MouseEntered(event);
			else if (object == panel1)
				panel1_MouseEntered(event);
			else if (object == checkbox1)
				checkbox1_MouseEntered(event);
			else if (object == radioButton1)
				radioButton1_MouseEntered(event);
		}
	}

	void button1_MouseEntered(java.awt.event.MouseEvent event)
	{
		cootips1.setTips(event, "Cootips provide both tooltips and sound.   ", "sound22.au", false);
	}

	void test_MouseEntered(java.awt.event.MouseEvent event)
	{
		cootips1.setTips(event, "", "", false);
	}
	
	void choice1_MouseEntered(java.awt.event.MouseEvent event)
	{
		cootips1.setTips(event, "Adware version(the FREE version) of Cootips only allows maximum 100 char in tips.", "sound23.au", false);
	}

	void list1_MouseEntered(java.awt.event.MouseEvent event)
	{
		cootips1.setTips(event, "This is a List Box with sound...............List Box List Box  List Box List Box List Box  List Box jfkfj fjdasklfdaslk  fksdlafjasf; jf dasfj;fj fjdsfkafkdask;f;a j fksdajdkfjdaf d jfkda;lf f j; fjasdklf a;slf ajfdklasfjadfkl;a fdklasf jaklf jklsdfjkdaslf a  fasdjkfklafjdaskfj;al.", "sound22.au", false);
	}

	void textField1_MouseEntered(java.awt.event.MouseEvent event)
	{
		cootips1.setTips(event, "Sound is looping.", "sound23.au", true);
	}

	void textArea1_MouseEntered(java.awt.event.MouseEvent event)
	{
		cootips1.setTips(event, "This is a combo box without sound.", "", false);
	}

	void label1_MouseEntered(java.awt.event.MouseEvent event)
	{
		cootips1.setTips(event, "", "sound23.au", false);
	}

	void panel1_MouseEntered(java.awt.event.MouseEvent event)
	{
		
		cootips1.setTips(event, "Current version of Cootips can only support sound in applets.", "sound22.au", false);
	}

	void checkbox1_MouseEntered(java.awt.event.MouseEvent event)
	{
		cootips1.setTips(event, "This is a check box without sound", "", false);
	}

	void radioButton1_MouseEntered(java.awt.event.MouseEvent event)
	{
    	cootips1.setTips(event, "This is a radioButton with sound", "sound22.au", false);
	
	}
}
