001 package com.croftsoft.core.gui.multi; 002 003 import java.applet.*; 004 import java.net.*; 005 006 import com.croftsoft.core.lang.NullArgumentException; 007 008 /********************************************************************* 009 * An AppletStub interface for an applet that contains applets. 010 * 011 * @version 012 * 2003-05-04 013 * @since 014 * 2002-12-21 015 * @author 016 * <a href="https://www.croftsoft.com/">David Wallace Croft</a> 017 *********************************************************************/ 018 019 public final class MultiAppletStub 020 implements AppletStub 021 ////////////////////////////////////////////////////////////////////// 022 ////////////////////////////////////////////////////////////////////// 023 { 024 025 private final Applet parentApplet; 026 027 private boolean active; 028 029 ////////////////////////////////////////////////////////////////////// 030 ////////////////////////////////////////////////////////////////////// 031 032 public MultiAppletStub ( Applet parentApplet ) 033 ////////////////////////////////////////////////////////////////////// 034 { 035 NullArgumentException.check ( this.parentApplet = parentApplet ); 036 } 037 038 ////////////////////////////////////////////////////////////////////// 039 ////////////////////////////////////////////////////////////////////// 040 041 public void appletResize ( 042 int width, 043 int height ) 044 ////////////////////////////////////////////////////////////////////// 045 { 046 parentApplet.resize ( width, height ); 047 } 048 049 public AppletContext getAppletContext ( ) 050 ////////////////////////////////////////////////////////////////////// 051 { 052 return parentApplet.getAppletContext ( ); 053 } 054 055 public URL getCodeBase ( ) 056 ////////////////////////////////////////////////////////////////////// 057 { 058 return parentApplet.getCodeBase ( ); 059 } 060 061 public URL getDocumentBase ( ) 062 ////////////////////////////////////////////////////////////////////// 063 { 064 return parentApplet.getDocumentBase ( ); 065 } 066 067 public String getParameter ( String name ) 068 ////////////////////////////////////////////////////////////////////// 069 { 070 return parentApplet.getParameter ( name ); 071 } 072 073 public boolean isActive ( ) 074 ////////////////////////////////////////////////////////////////////// 075 { 076 return active; 077 } 078 079 ////////////////////////////////////////////////////////////////////// 080 ////////////////////////////////////////////////////////////////////// 081 082 public void setActive ( boolean active ) 083 ////////////////////////////////////////////////////////////////////// 084 { 085 this.active = active; 086 } 087 088 ////////////////////////////////////////////////////////////////////// 089 ////////////////////////////////////////////////////////////////////// 090 }