Back to index

moin  1.9.0~rc2
TestApplet.java
Go to the documentation of this file.
00001 /*
00002  * @(#)TestApplet.java 5.1
00003  *
00004  */
00005 
00006 package CH.ifa.draw.applet;
00007 
00008 import java.applet.Applet;
00009 import java.awt.*;
00010 import java.awt.event.*;
00011 import java.util.*;
00012 import java.io.*;
00013 import java.net.*;
00014 import CH.ifa.draw.framework.*;
00015 import CH.ifa.draw.standard.*;
00016 import CH.ifa.draw.figures.*;
00017 import CH.ifa.draw.util.*;
00018 
00019 //import javax.swing.*;
00020 
00021 public class TestApplet
00022         extends Applet
00023            implements PaletteListener {
00024 
00025     transient private ToolButton      fDefaultToolButton;
00026 
00027     private Iconkit                   fIconkit;
00028 
00029     private static final String       fgDrawPath = "/CH/ifa/draw/";
00030     public static final String        IMAGES = fgDrawPath+"images/";
00031 
00032     public void init() {
00033         fIconkit = new Iconkit(this);
00034 /*
00035        ImageIcon icon = new ImageIcon( IMAGES.substring(1)+"SEL1.gif");
00036        JButton fred = new JButton(icon);
00037        add(fred);
00038 */
00039         fDefaultToolButton = new ToolButton(this, IMAGES+"SEL",
00040                                        "Selection Tool",
00041                                        null);
00042         add(fDefaultToolButton);
00043     }
00044 
00049     public void paletteUserSelected(PaletteButton button) {
00050     }
00051 
00056     public void paletteUserOver(PaletteButton button, boolean inside) {
00057         if (inside)
00058             showStatus(((ToolButton) button).name());
00059         else
00060            showStatus("Not over");
00061     }
00062 
00063 }
00064