multiappletstub.java

来自「CroftSoft Code Library是一个开源的可移植的纯Java游戏库」· Java 代码 · 共 90 行

JAVA
90
字号
     package com.croftsoft.core.gui.multi;

     import java.applet.*;
     import java.net.*;     import com.croftsoft.core.lang.NullArgumentException;

     /*********************************************************************
     * An AppletStub interface for an applet that contains applets.
     *
     * @version
     *   2003-05-04
     * @since
     *   2002-12-21
     * @author
     *   <a href="http://www.croftsoft.com/">David Wallace Croft</a>
     *********************************************************************/

     public final class  MultiAppletStub
       implements AppletStub
     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////
     {

     private final Applet  parentApplet;

     private boolean  active;

     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////

     public  MultiAppletStub ( Applet  parentApplet )
     //////////////////////////////////////////////////////////////////////
     {       NullArgumentException.check ( this.parentApplet = parentApplet );
     }

     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////

     public void  appletResize (
       int  width,
       int  height )
     //////////////////////////////////////////////////////////////////////
     {
       parentApplet.resize ( width, height );
     }

     public AppletContext  getAppletContext ( )
     //////////////////////////////////////////////////////////////////////
     {
       return parentApplet.getAppletContext ( );
     }

     public URL  getCodeBase ( )
     //////////////////////////////////////////////////////////////////////
     {
       return parentApplet.getCodeBase ( );
     }

     public URL  getDocumentBase ( )
     //////////////////////////////////////////////////////////////////////
     {
       return parentApplet.getDocumentBase ( );
     }

     public String  getParameter ( String  name )
     //////////////////////////////////////////////////////////////////////
     {
       return parentApplet.getParameter ( name );
     }

     public boolean  isActive ( )
     //////////////////////////////////////////////////////////////////////
     {
       return active;
     }

     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////

     public void  setActive ( boolean  active )
     //////////////////////////////////////////////////////////////////////
     {
       this.active = active;
     }

     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////
     }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?