Back to index

moin  1.9.0~rc2
LightweightDrawApplet.java
Go to the documentation of this file.
00001 // Copyright (C) 2001 Motorola - All rights reserved
00002 package CH.ifa.draw.appframe;
00003 
00004 import java.applet.Applet;
00005 import java.awt.*;
00006 import java.awt.event.*;
00007 import java.util.*;
00008 import java.io.*;
00009 import java.net.*;
00010 
00011 import CH.ifa.draw.framework.*;
00012 import CH.ifa.draw.standard.*;
00013 import CH.ifa.draw.figures.*;
00014 import CH.ifa.draw.util.*;
00015 import CH.ifa.draw.applet.*;
00016 import CH.ifa.draw.contrib.*;
00017 
00018 public  class LightweightDrawApplet extends Applet implements Application {
00019 
00020     private Frame frame;
00021 
00022     public void      init() {
00023         init(new DrawFrame("LightweightDrawApplet", this));
00024     }
00025 
00026     protected void init(Frame f) {
00027        frame = f;
00028        frame.pack();
00029        frame.show();
00030     }
00031 
00032     public void stop() {
00033        frame.hide();
00034        frame.dispose();
00035     }
00036 
00037     public void start() {
00038        frame.show();
00039     }
00040 
00042     public void showStatus(String s) {
00043        super.showStatus(s);
00044     }
00045 
00047     public String getParameter(String name) {
00048        return super.getParameter(name);
00049     }
00050 
00052     public URL getURL(String relURL) throws MalformedURLException {
00053        return new URL(getCodeBase(), relURL);
00054     }
00055 
00057     public void popupFrame(URL url, String title) {
00058        getAppletContext().showDocument(url, title);
00059     }
00060 }