Package java.applet

Examples of java.applet.Applet$URLAudioClip


    public Enumeration<Applet> getApplets() {
       
        synchronized (proxies) {
            ArrayList<Applet> applets = new ArrayList<Applet>();
            for (Proxy p : proxies) {
                Applet a = p.getApplet();
                if (a != null) {
                    applets.add(a);
                }
            }
            return Collections.enumeration(applets);
View Full Code Here


                if (focusLog.isLoggable(Level.FINER)) {
                    focusLog.log(Level.FINER, "default component is " + toFocus);
                }
            }
            if (toFocus == null) {
                Applet applet = EmbeddedFrame.getAppletIfAncestorOf(this);
                if (applet != null) {
                    toFocus = applet;
                }
            }
            return toFocus;
View Full Code Here

        Thread.sleep(100);
      }
      catch (InterruptedException ignore) { }
    }

    Applet applet = null;
    try {
      applet = MinecraftLauncher.getMinecraftApplet(Launcher.getGameUpdater().getBuild().getLibraries());
    } catch (CorruptedMinecraftJarException corruption) {
      corruption.printStackTrace();
    } catch (MinecraftVerifyException verify) {
      Launcher.clearCache();
      JOptionPane.showMessageDialog(getParent(), "Your installation is corrupt, and has been cleaned. \nTry to login again.\n\n If that fails, close and restart this launcher.");
      this.setVisible(false);
      this.dispose();
      Launcher.getLoginFrame().enableForm();
      return;
    }
    if (applet == null) {
      String message = "Failed to launch Spoutcraft!";
      this.setVisible(false);
      JOptionPane.showMessageDialog(getParent(), message);
      this.dispose();
      Launcher.getLoginFrame().enableForm();
      return;
    }

    StartupParameters params = Utils.getStartupParameters();

    minecraft = new MinecraftAppletEnglober(applet);
    minecraft.addParameter("username", user);
    minecraft.addParameter("sessionid", session);
    minecraft.addParameter("downloadticket", downloadTicket);
    minecraft.addParameter("spoutcraftlauncher", "true");
    minecraft.addParameter("portable", params.isPortable() + "");
    minecraft.addParameter("working_directory", Utils.getWorkingDirectory().getAbsolutePath());
    if (params.getServer() != null) {
      minecraft.addParameter("server", params.getServer());
      if (params.getPort() != null) {
        minecraft.addParameter("port", params.getPort());
      } else {
        minecraft.addParameter("port", "25565");
      }
    } else if (Settings.getDirectJoin() != null && Settings.getDirectJoin().length() > 0) {
      String address = Settings.getDirectJoin();
      String port = "25565";
      if (address.contains(":")) {
        String[] s = address.split(":");
        address = s[0];
        port = s[1];
      }
      minecraft.addParameter("server", address);
      minecraft.addParameter("port", port);
    }
    if (params.getProxyHost() != null) {
      minecraft.addParameter("proxy_host", params.getProxyHost());
    }
    if (params.getProxyPort() != null) {
      minecraft.addParameter("proxy_port", params.getProxyPort());
    }
    if (params.getProxyUser() != null) {
      minecraft.addParameter("proxy_user", params.getProxyUser());
    }
    if (params.getProxyPassword() != null) {
      minecraft.addParameter("proxy_pass", params.getProxyPassword());
    }
    //minecraft.addParameter("fullscreen", WindowMode.getModeById(Settings.getWindowModeId()) == WindowMode.FULL_SCREEN ? "true" : "false");

    applet.setStub(minecraft);
    this.add(minecraft);

    validate();
    this.setVisible(true);
    // TODO: Incredibly hacky fix for grey screens due to Minecraft not making the resources directory.
View Full Code Here

    public Enumeration<Applet> getApplets() {
       
        synchronized (proxies) {
            ArrayList<Applet> applets = new ArrayList<Applet>();
            for (Proxy p : proxies) {
                Applet a = p.getApplet();
                if (a != null) {
                    applets.add(a);
                }
            }
            return Collections.enumeration(applets);
View Full Code Here

        public void windowClosing(WindowEvent e) {
            JFrame frame = (JFrame)e.getWindow();
            frameList.remove(frame);

            Applet applet = ((AppletFrame)frame).getApplet();
            if(applet != null){
                ViewerAppletContext ac =
                    (ViewerAppletContext)applet.getAppletContext();
                ac.remove(applet);
            }

            if (frameList.isEmpty())
                System.exit(0);
View Full Code Here

            loaders.put(codeBase, loader);
        }

        loader.addURLs(appletInfo.getClassLoaderURLs());
        Class clz = loader.loadClass(code);
        Applet applet = (Applet)clz.newInstance();

        applets.add(applet);

        String name = appletInfo.getParameter("NAME");
        if(name != null && name != "") namedApplets.put(name, applet);

        applet.setStub(new ViewerAppletStub(applet, appletInfo));

        return applet;
    }
View Full Code Here

                try {
                    result = c.newInstance();

                    if (result instanceof Applet) {
                        Applet applet = (Applet) result;

                        applet.init();
                    }
                } catch (IllegalAccessException iae) {
                    throw new ClassNotFoundException(iae.getClass() + ": " //$NON-NLS-1$
                            + iae.getMessage());
                }
View Full Code Here

     */
    protected void setUp() throws Exception
    {
        try
        {
            new Applet();
            supportsApplet = true;
        }
        catch (Exception ex)
        {
            // cannot use applets
View Full Code Here

        parameters.setProperty("list", "value1, value2");
        parameters.setProperty("listesc", "value1\\,value2");

        if (supportsApplet)
        {
            Applet applet = new Applet()
            {
                public String getParameter(String key)
                {
                    return parameters.getProperty(key);
                }
View Full Code Here

    protected AbstractConfiguration getEmptyConfiguration()
    {
        if (supportsApplet)
        {
            return new AppletConfiguration(new Applet());
        }
        else
        {
            return new BaseConfiguration();
        }
View Full Code Here

TOP

Related Classes of java.applet.Applet$URLAudioClip

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.