Package java.applet

Examples of java.applet.Applet$URLAudioClip


    @Before
    public 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()
            {
                /**
                 * Serial version UID.
                 */
                private static final long serialVersionUID = 1L;
View Full Code Here

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

        }
    }

    private void createAppletMethodAndProperties() throws Exception {
        final HtmlApplet appletNode = (HtmlApplet) getDomNodeOrDie();
        final Applet applet = appletNode.getApplet();
        if (applet == null) {
            return;
        }

        // Rhino should provide the possibility to declare delegate for Functions as it does for properties!!!
        for (final Method method : applet.getClass().getMethods()) {
            final Function f = new BaseFunction() {
                private static final long serialVersionUID = 1748611972272176674L;

                @Override
                public Object call(final Context cx, final Scriptable scope,
View Full Code Here

    this.sourceName = sourceName;
    this.width = width;
    this.height = height;
    if (null != IO.applet)
    {
      Applet applet = IO.applet;
      URL url = applet.getCodeBase();
      image = applet.getImage(url, sourceName);
    }
    else
    {
      image = Toolkit.getDefaultToolkit().getImage(sourceName);
    }
View Full Code Here

    add(outputArea);

    // resize(400, 300);
    if (container instanceof Applet)
    {
      Applet applet = (Applet) container;
      int width = Integer.parseInt(applet.getParameter("width"));
      int height = Integer.parseInt(applet.getParameter("height"));
      reshape(0, 0, width, height); // within the parents coordinates
    }

    changeFocus(readField, inputField);
  }
View Full Code Here

  {
    if (null == IO.applet)
    {
      return 0;
    }
    Applet applet = IO.applet;
    return putArg(0, new JavaObject(applet), p);
  }
View Full Code Here

    public static void main(String s[]) {
        Frame f = new Frame("BufferedShapeMover");
        f.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}
        });
  Applet applet = new BufferedShapeMover();
  f.add("Center", applet);
  applet.init();
  f.pack();
        f.setSize(new Dimension(550,250));
        f.show();
    }
View Full Code Here

     * @return the parent applet or {@ null}
     * @since 1.6
     */
    public static Applet getAppletIfAncestorOf(Component comp) {
        Container parent = comp.getParent();
        Applet applet = null;
        while (parent != null && !(parent instanceof EmbeddedFrame)) {
//ae            if (parent instanceof Applet) {
//                applet = (Applet)parent;
//            }
            parent = parent.getParent();
View Full Code Here

         * - each instantiated Applet is initialized using Applet.init() (this is not done for deserialized ones)
         * - finally AppletS get activated using the AppletInitializerS activate-Method
         *
         * The order of operations is important for compatibility.   
         */
        Applet applet = null;
        if (bean instanceof Applet)
        {
            // Makes a second instanceof call unneccessary (instanceof is expensive).
            applet = (Applet) bean;

            /* The AppletStub's code and document base is set as follows:
             * The code base is always the URL from where the class data originated
             * (without the package name).
             * If the Applet was deserialized the document base is the location of
             * the serialized instance (usually the ".ser" file) otherwise its the URL
             * from where the class data originated (usually the absolute directory
             * location of the ".class" file).
             */
            applet.setStub(
                new DummyAppletStub(
                    applet
                        .getClass()
                        .getProtectionDomain()
                        .getCodeSource()
                        .getLocation(),
                    (beanLocation == null) ? classLocation : beanLocation));

            // Runs the Applet's initialization using an AppletInitializer.
            if (initializer != null)
            {
                initializer.initialize(applet, beanContext);
            }
        }

        // Adds the new bean to its BeanContext.
        if (beanContext != null)
        {
            beanContext.add(bean);
        }

        if (applet != null)
        {

            // Initializes an instantiated (not deserialized) Applet using its own method.
            if (beanLocation == null)
            {
                applet.init();
            }

            // Runs the Applet's activation using an AppletInitializer.
            if (initializer != null)
            {
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.