Examples of Applet


Examples of java.applet.Applet

        final Class<?> clazz = api.getLauncher().getClassLoader()
                .loadClass("net.minecraft.client.MinecraftApplet");
       
        doChanges(api, clazz);
       
        final Applet applet = (Applet) clazz.newInstance();
       
        return applet;
    }
View Full Code Here

Examples of java.applet.Applet

      else
        str2 = "<lf>";
    }
    sb.append("  line.separator: " + str1 + str2+"\n");
     
    Applet applet = IJ.getApplet();
    if (applet!=null) {
      sb.append("\n");
      sb.append("  code base: "+applet.getCodeBase()+"\n");
      sb.append("  document base: "+applet.getDocumentBase()+"\n");
      sb.append("  sample images dir: "+Prefs.getImagesURL()+"\n");
      TextWindow tw = new TextWindow("Properties", new String(sb), 400, 400);
      return;
    }
    sb.append("\n");
View Full Code Here

Examples of java.applet.Applet

  /** Opens the specified URL (default is the ImageJ home page). */
  public void run(String theURL) {
    if (error) return;
    if (theURL==null || theURL.equals(""))
      theURL = "http://rsb.info.nih.gov/ij/";
    Applet applet = IJ.getApplet();
    if (applet!=null) {
      try {
        applet.getAppletContext().showDocument(new URL(theURL), "_blank" );
      } catch (Exception e) {}
      return;
    }
    try {openURL(theURL);}
    catch (IOException e) {}
View Full Code Here

Examples of java.applet.Applet

    @Before
    public 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("list", "value1, value2");
        parameters.setProperty("listesc", "value1\\,value2");

        if (supportsApplet)
        {
            Applet applet = new Applet()
            {
                /**
                 * Serial version UID.
                 */
                private static final long serialVersionUID = 1L;
View Full Code Here

Examples of java.applet.Applet

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

Examples of java.applet.Applet

                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

Examples of java.applet.Applet

      else
        str2 = "<lf>";
    }
    sb.append("  line.separator: " + str1 + str2+"\n");
     
    Applet applet = IJ.getApplet();
    if (applet!=null) {
      sb.append("\n");
      sb.append("  code base: "+applet.getCodeBase()+"\n");
      sb.append("  document base: "+applet.getDocumentBase()+"\n");
      sb.append("  sample images dir: "+Prefs.getImagesURL()+"\n");
      TextWindow tw = new TextWindow("Properties", new String(sb), 400, 400);
      return;
    }
    sb.append("\n");
View Full Code Here

Examples of java.applet.Applet

  /** Opens the specified URL (default is the ImageJ home page). */
  public void run(String theURL) {
    if (error) return;
    if (theURL==null || theURL.equals(""))
      theURL = IJ.URL;
    Applet applet = IJ.getApplet();
    if (applet!=null) {
      try {
        applet.getAppletContext().showDocument(new URL(theURL), "_blank" );
      } catch (Exception e) {}
      return;
    }
    try {openURL(theURL);}
    catch (IOException e) {}
View Full Code Here

Examples of java.applet.Applet

    }
  }
 
  // Plugins>Macros>Open Startup Macros command
  void openStartupMacros() {
    Applet applet = IJ.getApplet();
    if (applet!=null) {
      IJ.run("URL...", "url="+IJ.URL+"/applet/StartupMacros.txt");
    } else {
      String path = IJ.getDirectory("macros")+"/StartupMacros.txt";
      File f = new File(path);
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.