Examples of Applet


Examples of java.applet.Applet

        System.out.println("Launching with applet wrapper...");
        try
        {
          Class<?> MCAppletClass = cl.loadClass(
              "net.minecraft.client.MinecraftApplet");
          Applet mcappl = (Applet) MCAppletClass.newInstance();
          MCFrame mcWindow = new MCFrame(windowtitle);
          mcWindow.start(mcappl, userName, sessionId, winSize, maximize);
        } catch (InstantiationException e)
        {
          System.out.println("Applet wrapper failed! Falling back " +
View Full Code Here

Examples of java.applet.Applet

   * @see #getApplet(String)
   * @see AppletContext#getApplets()
   */
  @Override
  public @Nonnull Enumeration<Applet> getApplets() {
    Applet applet = appletFrom(statusDisplay);
    return applet == null ? NO_APPLETS : enumeration(newArrayList(applet));
  }
View Full Code Here

Examples of java.applet.Applet

  }

  @Test
  public void should_get_applet() {
    AppletContext context = mock(AppletContext.class);
    Applet applet = mock(Applet.class);
    String name = "applet";
    when(target.getAppletContext()).thenReturn(context);
    when(context.getApplet(name)).thenReturn(applet);
    assertThat(driver.getApplet(name)).isSameAs(applet);
  }
View Full Code Here

Examples of java.applet.Applet

    verify(windows).markAsClosed(window);
  }

  @Test
  public void shouldProcessEventWithIdEqualToWindowClosedAndWithNotRootWindow() {
    final Applet applet = new Applet();
    window.add(applet);
    when(context.storedQueueFor(applet)).thenReturn(applet.getToolkit().getSystemEventQueue());
    monitor.eventDispatched(new ComponentEvent(applet, WINDOW_CLOSED));
    verifyNoMoreInteractions(windows);
  }
View Full Code Here

Examples of java.applet.Applet

    public static Window startAppletApp(Class appletClass) throws InstantiationException, IllegalAccessException
    {
        //try starting as applet
        if (Applet.class.isAssignableFrom(appletClass))
        {
            Applet app = (Applet) appletClass.newInstance();
            Window win = new Frame();
            win.add(app);
            app.setStub(new EmptyAppletStub());
            app.init();
            win.pack();
            win.show();
            return win; //successful, so return
        } else
        {
View Full Code Here

Examples of java.applet.Applet

        final Properties parameters = new Properties();
        parameters.setProperty("key1", "value1");
        parameters.setProperty("key2", "value2");
        parameters.setProperty("list", "value1, value2");

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

Examples of java.applet.Applet

        return new AppletConfiguration(applet);
    }

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

Examples of java.applet.Applet

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

Examples of java.applet.Applet

        parameters.setProperty("key2", "value2");
        parameters.setProperty("list", "value1, value2");

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

Examples of java.applet.Applet

    protected AbstractConfiguration getEmptyConfiguration()
    {
        if (supportsApplet)
        {
            return new AppletConfiguration(new Applet());
        }
        else
        {
            return new BaseConfiguration();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.