home *** CD-ROM | disk | FTP | other *** search
- package sun.activator.plugin.win32;
-
- import java.awt.Panel;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.util.Hashtable;
- import sun.activator.AppletViewer;
-
- class AppletPluginPanel extends AppletViewer implements PluginPanel {
- URL oldDocURL;
- Hashtable atts = null;
- // $FF: renamed from: id int
- int field_0;
- boolean javaEnabled = true;
-
- AppletPluginPanel(Hashtable var1, int var2, URL var3, boolean var4) {
- super(new AppletPluginContext(var2));
- this.atts = var1;
- this.field_0 = var2;
- this.oldDocURL = var3;
- this.javaEnabled = var4;
- ((AppletViewer)this).setDocumentBase(var3);
- StringBuffer var5 = new StringBuffer(var3.toString());
- int var6 = var3.toString().indexOf("|");
- if (var6 >= 0) {
- var5.setCharAt(var6, ':');
-
- try {
- ((AppletViewer)this).setDocumentBase(new URL(var3, var5.toString()));
- } catch (MalformedURLException var7) {
- }
- }
-
- ((AppletViewer)this).initProperties();
- }
-
- public Object getJavaObject() {
- return ((AppletViewer)this).getViewedObject();
- }
-
- public Panel getPanel() {
- return this;
- }
-
- protected String getParameterFromHTML(String var1) {
- return (String)this.atts.get(var1.toLowerCase());
- }
-
- public String getWaitingMessage() {
- return this.javaEnabled ? "Loading Java Applet ..." : "Project Java Activator is not enabled ...";
- }
-
- public void showAppletException(Throwable var1) {
- if (var1 != null) {
- PluginContext.showStatus(this.field_0, "Project Java Activator Exception: " + var1.toString());
- var1.printStackTrace();
- }
-
- }
-
- public void showAppletStatus(String var1) {
- if (var1 != null) {
- String var2 = ((AppletViewer)this).getName();
- if (var2 != null) {
- PluginContext.showStatus(this.field_0, "Project Java Activator: Applet " + var2 + " " + var1);
- } else {
- PluginContext.showStatus(this.field_0, "Project Java Activator: Applet " + var1);
- }
- }
-
- }
-
- public synchronized void startPanel() {
- if (this.javaEnabled) {
- ((AppletViewer)this).init();
- }
-
- }
-
- public synchronized void stopPanel() {
- if (this.javaEnabled) {
- ((AppletViewer)this).onClose(-1);
- }
-
- }
- }
-