Package org.htmlparser.tags

Examples of org.htmlparser.tags.AppletTag


                // look for applets

                // This will only work with an Applet .class file.
                // Ideally, this should be upgraded to work with Objects (IE)
                // and archives (.jar and .zip) files as well.
                AppletTag applet = (AppletTag) tag;
                binUrlStr = applet.getAppletClass();
            } else if (tag instanceof InputTag) {
                // we check the input tag type for image
                if (ATT_IS_IMAGE.equalsIgnoreCase(tag.getAttribute(ATT_TYPE))) {
                    // then we need to download the binary
                    binUrlStr = tag.getAttribute(ATT_SRC);
View Full Code Here


                    ImageTag image= (ImageTag)node;
                    binUrlStr= image.getImageURL();
                }
                else if (node instanceof AppletTag)
                {
                    AppletTag applet= (AppletTag)node;
                    binUrlStr= applet.getAppletClass();
                }
                else if (node instanceof InputTag)
                {
                    InputTag input= (InputTag)node;
                    // we check the input tag type for image
View Full Code Here

        parseAndAssertNodeCount(2);
        assertTrue(
            "Node should be an applet tag",
            node[0] instanceof AppletTag);
        // Check the data in the applet tag
        AppletTag appletTag = (AppletTag) node[0];
        assertEquals("Class Name", "Myclass.class", appletTag.getAppletClass());
        assertEquals("Archive", "test.jar", appletTag.getArchive());
        assertEquals("Codebase", "www.kizna.com", appletTag.getCodeBase());
        // Check the params data
        int cnt = 0;
        for (Enumeration e = appletTag.getParameterNames();
            e.hasMoreElements();
            )
        {
            String paramName = (String) e.nextElement();
            String paramValue = appletTag.getAttribute(paramName);
            assertEquals(
                "Param " + cnt + " value",
                paramsMap.get(paramName),
                paramValue);
            cnt++;
View Full Code Here

        parseAndAssertNodeCount(2);
        assertTrue(
            "Node should be an applet tag",
            node[0] instanceof AppletTag);
        // Check the data in the applet tag
        AppletTag appletTag = (AppletTag) node[0];
        String expectedRawString =
            "<APPLET CODE=\"Myclass.class\" CODEBASE=\"www.kizna.com\" ARCHIVE=\"test.jar\">\r\n"
                + "<PARAM VALUE=\"Value1\" NAME=\"Param1\">\r\n"
                + "<PARAM VALUE=\"Somik\" NAME=\"Name\">\r\n"
                + "<PARAM VALUE=\"23\" NAME=\"Age\">\r\n"
                + "</APPLET>";
        assertStringEquals("toHTML()", expectedRawString, appletTag.toHtml());
    }
View Full Code Here

    public Tag createTag(TagData tagData, CompositeTagData compositeTagData)
        throws ParserException
    {

        return new AppletTag(tagData, compositeTagData);
    }
View Full Code Here

                // look for applets

                // This will only work with an Applet .class file.
                // Ideally, this should be upgraded to work with Objects (IE)
                // and archives (.jar and .zip) files as well.
                AppletTag applet = (AppletTag) tag;
                binUrlStr = applet.getAppletClass();
            } else if (tag instanceof ObjectTag) {
                // look for Objects
                ObjectTag applet = (ObjectTag) tag;
                String data = applet.getAttribute(ATT_CODEBASE);
                if(!StringUtils.isEmpty(data)) {
                    binUrlStr = data;              
                }
               
                data = applet.getAttribute(ATT_DATA);
                if(!StringUtils.isEmpty(data)) {
                    binUrlStr = data;                   
                }
               
            } else if (tag instanceof InputTag) {
View Full Code Here

            // look for applets

            // This will only work with an Applet .class file.
            // Ideally, this should be upgraded to work with Objects (IE)
            // and archives (.jar and .zip) files as well.
                AppletTag applet = (AppletTag) tag;
                binUrlStr = applet.getAppletClass();
            } else if (tag instanceof InputTag) {
                // we check the input tag type for image
                if (ATT_IS_IMAGE.equalsIgnoreCase(tag.getAttribute(ATT_TYPE))) {
                    // then we need to download the binary
                    binUrlStr = tag.getAttribute(ATT_SRC);
View Full Code Here

                // look for applets

                // This will only work with an Applet .class file.
                // Ideally, this should be upgraded to work with Objects (IE)
                // and archives (.jar and .zip) files as well.
                AppletTag applet = (AppletTag) tag;
                binUrlStr = applet.getAppletClass();
            } else if (tag instanceof InputTag) {
                // we check the input tag type for image
                if (ATT_IS_IMAGE.equalsIgnoreCase(tag.getAttribute(ATT_TYPE))) {
                    // then we need to download the binary
                    binUrlStr = tag.getAttribute(ATT_SRC);
View Full Code Here

                // look for applets

                // This will only work with an Applet .class file.
                // Ideally, this should be upgraded to work with Objects (IE)
                // and archives (.jar and .zip) files as well.
                AppletTag applet = (AppletTag) tag;
                binUrlStr = applet.getAppletClass();
            } else if (tag instanceof InputTag) {
                // we check the input tag type for image
                if (ATT_IS_IMAGE.equalsIgnoreCase(tag.getAttribute(ATT_TYPE))) {
                    // then we need to download the binary
                    binUrlStr = tag.getAttribute(ATT_SRC);
View Full Code Here

                    ImageTag image= (ImageTag)node;
                    binUrlStr= image.getImageURL();
                }
                else if (node instanceof AppletTag)
                {
                    AppletTag applet= (AppletTag)node;
                    binUrlStr= applet.getAppletClass();
                }
                else if (node instanceof InputTag)
                {
                    InputTag input= (InputTag)node;
                    // we check the input tag type for image
View Full Code Here

TOP

Related Classes of org.htmlparser.tags.AppletTag

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.