home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 139 / dpcs0999.iso / Web / CFserver / data1.cab / Java / netscape / application / Application.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-04-12  |  17.2 KB  |  739 lines

  1. package netscape.application;
  2.  
  3. import java.applet.Applet;
  4. import java.applet.AppletContext;
  5. import java.awt.Component;
  6. import java.awt.Container;
  7. import java.awt.Frame;
  8. import java.awt.MediaTracker;
  9. import java.awt.Panel;
  10. import java.io.InputStream;
  11. import java.net.URL;
  12. import netscape.util.Enumeration;
  13. import netscape.util.Hashtable;
  14. import netscape.util.InconsistencyException;
  15. import netscape.util.Vector;
  16.  
  17. public class Application implements Runnable, EventProcessor {
  18.    static Hashtable groupToApplication = new Hashtable();
  19.    static final String _releaseName = "IFC 1.1";
  20.    static Clipboard clipboard;
  21.    static Object clipboardLock = new Object();
  22.    Applet applet;
  23.    AppletResources _appResources;
  24.    EventLoop eventLoop = new EventLoop();
  25.    Vector _languageVector;
  26.    Vector rootViews = new Vector();
  27.    RootView mainRootView;
  28.    boolean didCreateApplet;
  29.    Vector _modalVector = new Vector();
  30.    Vector observers = new Vector();
  31.    Vector activeMenuViews = new Vector();
  32.    MediaTracker tracker;
  33.    int bitmapCount;
  34.    Hashtable bitmapByName = new Hashtable();
  35.    Hashtable soundByName = new Hashtable();
  36.    Hashtable fontByName = new Hashtable();
  37.    DebugGraphicsInfo debugGraphicsInfo;
  38.    TimerQueue timerQueue;
  39.    Object cleanupLock;
  40.    boolean isPaused;
  41.    boolean _kbdUIEnabled = true;
  42.    Window currentDocumentWindow;
  43.    KeyboardArrow keyboardArrow;
  44.    public static final int TOP_LEFT_POSITION = 0;
  45.    public static final int BOTTOM_LEFT_POSITION = 1;
  46.    public static final int TOP_RIGHT_POSITION = 2;
  47.    public static final int BOTTOM_RIGHT_POSITION = 3;
  48.    static final int FIRST_POSITION = 0;
  49.    static final int LAST_POSITION = 3;
  50.    static final int arrowXOffset = 0;
  51.    static final int arrowYOffset = 0;
  52.  
  53.    public Application() {
  54.       groupToApplication.put(Thread.currentThread().getThreadGroup(), this);
  55.       FoundationApplet var1 = FoundationApplet.applet();
  56.       if (var1 == null) {
  57.          var1 = this.createApplet();
  58.          var1.setApplication(this);
  59.          this.didCreateApplet = true;
  60.       } else {
  61.          this.isPaused = true;
  62.          var1.setupCanvas(this);
  63.       }
  64.  
  65.       this.applet = var1;
  66.       this._appResources = new AppletResources(this, this.codeBase());
  67.       this.timerQueue = new TimerQueue();
  68.    }
  69.  
  70.    public static String releaseName() {
  71.       return "IFC 1.1";
  72.    }
  73.  
  74.    public Application(Applet var1) {
  75.       groupToApplication.put(Thread.currentThread().getThreadGroup(), this);
  76.       this.applet = var1;
  77.       this._appResources = new AppletResources(this, this.codeBase());
  78.       this.timerQueue = new TimerQueue();
  79.       this.appletStarted();
  80.    }
  81.  
  82.    public static Application application() {
  83.       ThreadGroup var0 = Thread.currentThread().getThreadGroup();
  84.       Application var1 = (Application)groupToApplication.get(var0);
  85.       if (var1 == null) {
  86.          var1 = FoundationApplet.currentApplication();
  87.       }
  88.  
  89.       return var1;
  90.    }
  91.  
  92.    public void init() {
  93.    }
  94.  
  95.    public void cleanup() {
  96.       Enumeration var1 = groupToApplication.keys();
  97.       this.applicationDidStop();
  98.       if (this.applet instanceof FoundationApplet) {
  99.          ((FoundationApplet)this.applet).cleanup();
  100.       }
  101.  
  102.       if (this.didCreateApplet) {
  103.          ((FoundationApplet)this.applet).destroyFromIFC();
  104.       }
  105.  
  106.       while(var1.hasMoreElements()) {
  107.          ThreadGroup var2 = (ThreadGroup)var1.nextElement();
  108.          Application var3 = (Application)groupToApplication.get(var2);
  109.          if (var3 == this) {
  110.             groupToApplication.remove(var2);
  111.             return;
  112.          }
  113.       }
  114.  
  115.    }
  116.  
  117.    public void stopRunning() {
  118.       this.eventLoop.stopRunning();
  119.    }
  120.  
  121.    void stopRunningForAWT() {
  122.       Object var1 = this.cleanupLock;
  123.       synchronized(var1){}
  124.  
  125.       try {
  126.          this.eventLoop.stopRunning();
  127.  
  128.          while(true) {
  129.             try {
  130.                this.cleanupLock.wait();
  131.                return;
  132.             } catch (InterruptedException var5) {
  133.             }
  134.          }
  135.       } catch (Throwable var6) {
  136.          throw var6;
  137.       }
  138.    }
  139.  
  140.    public void run() {
  141.       this.cleanupLock = new Object();
  142.       this.applicationDidStart();
  143.       this.init();
  144.       this.eventLoop.run();
  145.       this.cleanup();
  146.       Object var1 = this.cleanupLock;
  147.       synchronized(var1){}
  148.  
  149.       try {
  150.          this.cleanupLock.notify();
  151.       } catch (Throwable var3) {
  152.          throw var3;
  153.       }
  154.  
  155.    }
  156.  
  157.    public EventLoop eventLoop() {
  158.       return this.eventLoop;
  159.    }
  160.  
  161.    Vector languagePreferences() {
  162.       if (this._languageVector == null) {
  163.          this._languageVector = new Vector();
  164.       }
  165.  
  166.       return this._languageVector;
  167.    }
  168.  
  169.    void syncGraphics() {
  170.    }
  171.  
  172.    InputStream streamForInterface(String var1) {
  173.       return this._appResources.streamForInterface(var1);
  174.    }
  175.  
  176.    InputStream streamForResourceOfType(String var1, String var2) {
  177.       return this._appResources.streamForResourceOfType(var1, var2);
  178.    }
  179.  
  180.    public boolean isApplet() {
  181.       return !this.didCreateApplet;
  182.    }
  183.  
  184.    InputStream streamForRelativePath(String var1) {
  185.       URL var2;
  186.       try {
  187.          var2 = new URL(this.codeBase(), var1);
  188.       } catch (Exception var6) {
  189.          System.err.println("Application.streamForRelativePath() - " + var6);
  190.          var2 = null;
  191.       }
  192.  
  193.       if (var2 == null) {
  194.          return null;
  195.       } else {
  196.          InputStream var3;
  197.          try {
  198.             var3 = var2.openStream();
  199.          } catch (Exception var5) {
  200.             System.err.println("Application.streamForURL() - Trouble retrieving URL " + var2 + " : " + var5);
  201.             var3 = null;
  202.          }
  203.  
  204.          return var3;
  205.       }
  206.    }
  207.  
  208.    AppletContext getAppletContext() {
  209.       return this.applet == null ? null : this.applet.getAppletContext();
  210.    }
  211.  
  212.    public URL codeBase() {
  213.       return this.applet.getCodeBase();
  214.    }
  215.  
  216.    public String parameterNamed(String var1) {
  217.       return this.applet == null ? null : this.applet.getParameter(var1);
  218.    }
  219.  
  220.    public RootView mainRootView() {
  221.       return this.mainRootView;
  222.    }
  223.  
  224.    public void setMainRootView(RootView var1) {
  225.       this.addRootView(var1);
  226.       this.mainRootView = var1;
  227.    }
  228.  
  229.    RootView firstRootView() {
  230.       return (RootView)this.rootViews.lastElement();
  231.    }
  232.  
  233.    public Vector rootViews() {
  234.       return this.rootViews;
  235.    }
  236.  
  237.    public Vector externalWindows() {
  238.       int var2 = this.rootViews.count();
  239.       Vector var3 = new Vector();
  240.  
  241.       for(int var1 = 0; var1 < var2; ++var1) {
  242.          RootView var4 = (RootView)this.rootViews.elementAt(var1);
  243.          ExternalWindow var5 = var4.externalWindow();
  244.          if (var5 != null) {
  245.             var3.addElement(var5);
  246.          }
  247.       }
  248.  
  249.       return var3;
  250.    }
  251.  
  252.    void addRootView(RootView var1) {
  253.       if (!this.rootViews.contains(var1)) {
  254.          this.rootViews.insertElementAt(var1, 0);
  255.          var1.setApplication(this);
  256.       }
  257.  
  258.    }
  259.  
  260.    void removeRootView(RootView var1) {
  261.       this.rootViews.removeElement(var1);
  262.       var1.setApplication((Application)null);
  263.       if (this.rootViews.count() > 0) {
  264.          ((RootView)this.rootViews.lastElement()).didBecomeFirstRootView();
  265.       }
  266.  
  267.    }
  268.  
  269.    void makeFirstRootView(RootView var1) {
  270.       if (this.rootViews.indexOf(var1) != -1) {
  271.          if (this.rootViews.lastElement() != var1) {
  272.             RootView var2 = (RootView)this.rootViews.lastElement();
  273.             this.rootViews.removeElement(var1);
  274.             this.rootViews.addElement(var1);
  275.             if (var2 != null) {
  276.                var2.didResignFirstRootView();
  277.             }
  278.  
  279.             var1.didBecomeFirstRootView();
  280.          }
  281.  
  282.       }
  283.    }
  284.  
  285.    Frame frame() {
  286.       Object var1;
  287.       for(var1 = this.applet; var1 != null && !(var1 instanceof Frame); var1 = ((Component)var1).getParent()) {
  288.       }
  289.  
  290.       return var1 != null ? (Frame)var1 : null;
  291.    }
  292.  
  293.    synchronized MediaTracker mediaTracker() {
  294.       if (this.tracker == null) {
  295.          this.tracker = new MediaTracker(this.applet);
  296.       }
  297.  
  298.       return this.tracker;
  299.    }
  300.  
  301.    synchronized int nextBitmapNumber() {
  302.       return this.bitmapCount++;
  303.    }
  304.  
  305.    synchronized TimerQueue timerQueue() {
  306.       return this.timerQueue;
  307.    }
  308.  
  309.    void addActiveMenuView(MenuView var1) {
  310.       this.activeMenuViews.addElementIfAbsent(var1);
  311.    }
  312.  
  313.    void removeActiveMenuView(MenuView var1) {
  314.       this.activeMenuViews.removeElement(var1);
  315.    }
  316.  
  317.    public void willProcessEvent(Event var1) {
  318.    }
  319.  
  320.    void willProcessInternalEvent(Event var1) {
  321.       if (this.activeMenuViews.count() != 0 && var1.type() == -1) {
  322.          MenuView var2 = (MenuView)this.activeMenuViews.lastElement();
  323.          var2.mouseWillDown((MouseEvent)var1);
  324.       }
  325.    }
  326.  
  327.    public void didProcessEvent(Event var1) {
  328.    }
  329.  
  330.    void didProcessInternalEvent(Event var1) {
  331.       this.drawAllDirtyViews();
  332.    }
  333.  
  334.    void drawAllDirtyViews() {
  335.       int var2 = this.rootViews.count();
  336.  
  337.       for(int var1 = 0; var1 < var2; ++var1) {
  338.          RootView var3 = (RootView)this.rootViews.elementAt(var1);
  339.          var3.drawDirtyViews();
  340.          var3._updateCursorAndMoveView();
  341.       }
  342.  
  343.    }
  344.  
  345.    boolean isMac() {
  346.       String var1 = System.getProperty("os.name");
  347.       return var1 != null && var1.startsWith("Mac");
  348.    }
  349.  
  350.    public void keyDown(KeyEvent var1) {
  351.       boolean var2 = false;
  352.       RootView var3 = this.firstRootView();
  353.       if (var3 != null) {
  354.          var3.processKeyboardEvent(var1, false);
  355.       }
  356.  
  357.    }
  358.  
  359.    public void keyUp(KeyEvent var1) {
  360.    }
  361.  
  362.    void beginModalSessionForView(View var1) {
  363.       if (var1 == null) {
  364.          throw new InconsistencyException("beginModalSessionForView called with null view");
  365.       } else {
  366.          this._modalVector.addElement(var1);
  367.          RootView var2 = var1.rootView();
  368.          if (var2 != null) {
  369.             var2.updateCursor();
  370.          }
  371.  
  372.       }
  373.    }
  374.  
  375.    void endModalSessionForView(View var1) {
  376.       if (var1 != this._modalVector.lastElement()) {
  377.          throw new InconsistencyException("endModalSessionForView called for a view that is not the last modal view");
  378.       } else {
  379.          this._modalVector.removeLastElement();
  380.          RootView var2 = var1.rootView();
  381.          if (var2 != null) {
  382.             var2.updateCursor();
  383.             var2.validateSelectedView();
  384.          }
  385.  
  386.       }
  387.    }
  388.  
  389.    public View modalView() {
  390.       return this._modalVector.count() > 0 ? (View)this._modalVector.lastElement() : null;
  391.    }
  392.  
  393.    boolean isModalViewShowing() {
  394.       return this._modalVector.count() != 0;
  395.    }
  396.  
  397.    public void performCommandAndWait(Target var1, String var2, Object var3) {
  398.       CommandEvent var4 = new CommandEvent(var1, var2, var3);
  399.       this.eventLoop.addEventAndWait(var4);
  400.    }
  401.  
  402.    public void performCommandLater(Target var1, String var2, Object var3, boolean var4) {
  403.       CommandEvent var5 = new CommandEvent(var1, var2, var3);
  404.       if (var4) {
  405.          this.eventLoop.filterEvents(new CommandFilter(var5.target, var5.command, var3));
  406.       }
  407.  
  408.       this.eventLoop.addEvent(var5);
  409.    }
  410.  
  411.    public void performCommandLater(Target var1, String var2, Object var3) {
  412.       this.performCommandLater(var1, var2, var3, false);
  413.    }
  414.  
  415.    protected FoundationApplet createApplet() {
  416.       Frame var1 = new Frame();
  417.       FoundationApplet var2 = new FoundationApplet();
  418.       ((Container)var1).add(var2);
  419.       var1.addNotify();
  420.       ((Panel)var2).addNotify();
  421.       ((Applet)var2).setStub(new FoundationAppletStub());
  422.       return var2;
  423.    }
  424.  
  425.    String exceptionHeader() {
  426.       return "Uncaught exception.  IFC release: IFC 1.1";
  427.    }
  428.  
  429.    public void addObserver(ApplicationObserver var1) {
  430.       this.observers.addElementIfAbsent(var1);
  431.    }
  432.  
  433.    public void removeObserver(ApplicationObserver var1) {
  434.       this.observers.removeElement(var1);
  435.    }
  436.  
  437.    public void appletStarted() {
  438.       int var1 = this.observers.count();
  439.       this.isPaused = false;
  440.  
  441.       while(var1-- > 0) {
  442.          ApplicationObserver var2 = (ApplicationObserver)this.observers.elementAt(var1);
  443.          var2.applicationDidResume(this);
  444.       }
  445.  
  446.       var1 = this.rootViews.count();
  447.  
  448.       while(var1-- > 0) {
  449.          RootView var4 = (RootView)this.rootViews.elementAt(var1);
  450.          if (var4.externalWindow() == null) {
  451.             var4.setVisible(true);
  452.          }
  453.       }
  454.  
  455.    }
  456.  
  457.    public void appletStopped() {
  458.       int var1 = this.observers.count();
  459.       this.isPaused = true;
  460.  
  461.       while(var1-- > 0) {
  462.          ApplicationObserver var2 = (ApplicationObserver)this.observers.elementAt(var1);
  463.          var2.applicationDidPause(this);
  464.       }
  465.  
  466.       var1 = this.rootViews.count();
  467.  
  468.       while(var1-- > 0) {
  469.          RootView var4 = (RootView)this.rootViews.elementAt(var1);
  470.          if (var4.externalWindow() == null) {
  471.             var4.setVisible(false);
  472.          }
  473.       }
  474.  
  475.    }
  476.  
  477.    void applicationDidStart() {
  478.       int var1 = this.observers.count();
  479.  
  480.       while(var1-- > 0) {
  481.          ApplicationObserver var2 = (ApplicationObserver)this.observers.elementAt(var1);
  482.          var2.applicationDidStart(this);
  483.       }
  484.  
  485.    }
  486.  
  487.    void applicationDidStop() {
  488.       int var1 = this.observers.count();
  489.  
  490.       while(var1-- > 0) {
  491.          ApplicationObserver var2 = (ApplicationObserver)this.observers.elementAt(var1);
  492.          var2.applicationDidStop(this);
  493.       }
  494.  
  495.    }
  496.  
  497.    public void processEvent(Event var1) {
  498.       if (var1 instanceof ApplicationEvent) {
  499.          if (var1.type == -26) {
  500.             this.appletStopped();
  501.             return;
  502.          }
  503.  
  504.          if (var1.type == -27) {
  505.             this.appletStarted();
  506.          }
  507.       }
  508.  
  509.    }
  510.  
  511.    public boolean isRunning() {
  512.       return this.eventLoop.isRunning();
  513.    }
  514.  
  515.    public boolean isPaused() {
  516.       return this.isPaused();
  517.    }
  518.  
  519.    static Clipboard clipboard() {
  520.       Object var0 = clipboardLock;
  521.       synchronized(var0){}
  522.  
  523.       Clipboard var2;
  524.       try {
  525.          if (clipboard == null) {
  526.             clipboard = JDK11AirLock.clipboard();
  527.             if (clipboard == null) {
  528.                clipboard = new TextBag();
  529.             }
  530.          }
  531.  
  532.          var2 = clipboard;
  533.       } catch (Throwable var4) {
  534.          throw var4;
  535.       }
  536.  
  537.       return var2;
  538.    }
  539.  
  540.    public void makeCurrentDocumentWindow(Window var1) {
  541.       if (var1 != null && !var1.containsDocument()) {
  542.          throw new InconsistencyException("makeCurrentDocumentWindow: window is not a document");
  543.       } else {
  544.          if (this.currentDocumentWindow != null) {
  545.             this.currentDocumentWindow.didResignCurrentDocument();
  546.             this.currentDocumentWindow = null;
  547.          }
  548.  
  549.          if (var1 != null) {
  550.             this.currentDocumentWindow = var1;
  551.             this.currentDocumentWindow.didBecomeCurrentDocument();
  552.          }
  553.  
  554.          int var2 = this.observers.count();
  555.  
  556.          while(var2-- > 0) {
  557.             ApplicationObserver var3 = (ApplicationObserver)this.observers.elementAt(var2);
  558.  
  559.             try {
  560.                var3.currentDocumentDidChange(this, this.currentDocumentWindow);
  561.             } catch (IncompatibleClassChangeError var4) {
  562.             }
  563.          }
  564.  
  565.       }
  566.    }
  567.  
  568.    public Window currentDocumentWindow() {
  569.       return this.currentDocumentWindow;
  570.    }
  571.  
  572.    public void chooseNextCurrentDocumentWindow(Window var1) {
  573.       Window var2 = null;
  574.       if (var1 != null && !(var1 instanceof ExternalWindow)) {
  575.          if (((InternalWindow)var1).rootView() != null) {
  576.             var2 = this._chooseNextInternalWindowWithDocument(((InternalWindow)var1).rootView(), (InternalWindow)var1);
  577.          }
  578.       } else {
  579.          var2 = this._chooseNextExternalWindowWithDocument((ExternalWindow)var1);
  580.          if (var2 == null && this.mainRootView() != null) {
  581.             var2 = this._chooseNextInternalWindowWithDocument(this.mainRootView(), (InternalWindow)null);
  582.          }
  583.       }
  584.  
  585.       this.makeCurrentDocumentWindow(var2);
  586.    }
  587.  
  588.    Window _chooseNextInternalWindowWithDocument(RootView var1, InternalWindow var2) {
  589.       Vector var3 = var1.internalWindows();
  590.  
  591.       for(int var5 = var3.count() - 1; var5 >= 0; --var5) {
  592.          InternalWindow var4 = (InternalWindow)var3.elementAt(var5);
  593.          if (var4 != var2 && var4.containsDocument()) {
  594.             return var4;
  595.          }
  596.       }
  597.  
  598.       return null;
  599.    }
  600.  
  601.    Window _chooseNextExternalWindowWithDocument(ExternalWindow var1) {
  602.       Vector var2 = this.externalWindows();
  603.  
  604.       for(int var4 = var2.count() - 1; var4 >= 0; --var4) {
  605.          ExternalWindow var3 = (ExternalWindow)var2.elementAt(var4);
  606.          if (var3 != var1 && var3.containsDocument()) {
  607.             return var3;
  608.          }
  609.       }
  610.  
  611.       return null;
  612.    }
  613.  
  614.    void focusChanged(View var1) {
  615.       int var2 = this.observers.count();
  616.  
  617.       while(var2-- > 0) {
  618.          ApplicationObserver var3 = (ApplicationObserver)this.observers.elementAt(var2);
  619.  
  620.          try {
  621.             var3.focusDidChange(this, var1);
  622.          } catch (IncompatibleClassChangeError var4) {
  623.          }
  624.       }
  625.  
  626.    }
  627.  
  628.    KeyboardArrow keyboardArrow() {
  629.       if (this.keyboardArrow == null) {
  630.          this.keyboardArrow = new KeyboardArrow();
  631.       }
  632.  
  633.       return this.keyboardArrow;
  634.    }
  635.  
  636.    public int keyboardArrowPosition(View var1) {
  637.       RootView var2 = var1.rootView();
  638.       Rect var3 = ((View)var2).localBounds();
  639.       new Point();
  640.       Rect var4 = new Rect();
  641.       var1.computeVisibleRect(var4);
  642.       var4.intersectWith(var1.keyboardRect());
  643.       var1.convertRectToView(var2, var4, var4);
  644.  
  645.       for(int var8 = 0; var8 <= 3; ++var8) {
  646.          Image var5 = this.keyboardArrowImage(var8);
  647.          Point var6 = this.keyboardArrowHotSpot(var8);
  648.          Point var7 = this.keyboardArrowLocation(var1, var8);
  649.          var7.x -= var6.x;
  650.          var7.y -= var6.y;
  651.          if (var3.contains(new Rect(var7.x, var7.y, var5.width(), var5.height()))) {
  652.             return var8;
  653.          }
  654.       }
  655.  
  656.       return 0;
  657.    }
  658.  
  659.    public Image keyboardArrowImage(int var1) {
  660.       switch (var1) {
  661.          case 0:
  662.             return Bitmap.bitmapNamed("netscape/application/topLeftArrow.gif");
  663.          case 1:
  664.             return Bitmap.bitmapNamed("netscape/application/bottomLeftArrow.gif");
  665.          case 2:
  666.             return Bitmap.bitmapNamed("netscape/application/topRightArrow.gif");
  667.          case 3:
  668.             return Bitmap.bitmapNamed("netscape/application/bottomRightArrow.gif");
  669.          default:
  670.             return null;
  671.       }
  672.    }
  673.  
  674.    public Point keyboardArrowHotSpot(int var1) {
  675.       switch (var1) {
  676.          case 0:
  677.             return new Point(8, 12);
  678.          case 1:
  679.             return new Point(8, 0);
  680.          case 2:
  681.             return new Point(0, 12);
  682.          case 3:
  683.             return new Point(0, 0);
  684.          default:
  685.             return null;
  686.       }
  687.    }
  688.  
  689.    public Point keyboardArrowLocation(View var1, int var2) {
  690.       RootView var3 = var1.rootView();
  691.       ((View)var3).localBounds();
  692.       Rect var4 = var1.localBounds();
  693.       var4 = new Rect();
  694.       var1.computeVisibleRect(var4);
  695.       var4.intersectWith(var1.keyboardRect());
  696.       if (var4.width != 0 && var4.height != 0) {
  697.          var1.convertRectToView(var1.rootView(), var4, var4);
  698.          switch (var2) {
  699.             case 0:
  700.                return new Point(var4.x, var4.y);
  701.             case 1:
  702.                return new Point(var4.x, var4.y + var4.height);
  703.             case 2:
  704.                return new Point(var4.x + var4.width, var4.y);
  705.             case 3:
  706.                return new Point(var4.x + var4.width, var4.y + var4.height);
  707.             default:
  708.                throw new InconsistencyException("Unknown position " + var2);
  709.          }
  710.       } else {
  711.          return new Point(Integer.MAX_VALUE, Integer.MAX_VALUE);
  712.       }
  713.    }
  714.  
  715.    public void setKeyboardUIEnabled(boolean var1) {
  716.       this._kbdUIEnabled = var1;
  717.    }
  718.  
  719.    public boolean isKeyboardUIEnabled() {
  720.       return this._kbdUIEnabled;
  721.    }
  722.  
  723.    public Applet applet() {
  724.       return this.applet;
  725.    }
  726.  
  727.    public AppletResources appletResources() {
  728.       return this._appResources;
  729.    }
  730.  
  731.    public static String clipboardText() {
  732.       return clipboard().text();
  733.    }
  734.  
  735.    public static void setClipboardText(String var0) {
  736.       clipboard().setText(var0);
  737.    }
  738. }
  739.