Package org.w3c.dom.html

Examples of org.w3c.dom.html.HTMLDocument


     * @return New HTML document
     */
    public final HTMLDocument createHTMLDocument( String title )
        throws DOMException
    {
  HTMLDocument doc;

  if ( title == null )
      throw new NullPointerException( "HTM014 Argument 'title' is null." );
  doc = new HTMLDocumentImpl();
  doc.setTitle( title );
  return doc;
    }
View Full Code Here


     * @return New HTML document
     */
    public final HTMLDocument createHTMLDocument( String title )
        throws DOMException
    {
  HTMLDocument doc;

  if ( title == null )
      throw new NullPointerException( "HTM014 Argument 'title' is null." );
  doc = new HTMLDocumentImpl();
  doc.setTitle( title );
  return doc;
    }
View Full Code Here

      doTest("<html 9='id'></html>", "<HTML/>");
    }

    private void doTest(final String html, final String expected) throws Exception {
        DOMFragmentParser parser = new DOMFragmentParser();
        HTMLDocument document = new HTMLDocumentImpl();

        DocumentFragment fragment = document.createDocumentFragment();
        InputSource source = new InputSource(new StringReader(html));
        parser.parse(source, fragment);
//        final OutputFormat of = new OutputFormat();
//        of.setOmitXMLDeclaration(true);
//        XMLSerializer s = new XMLSerializer(of);
View Full Code Here

        }
        else if (currTarget == reinsertElem)
        {
            selectCircle(null);

            HTMLDocument doc = (HTMLDocument)itsNatDoc.getDocument();
            Element newSVGElem = (Element)svgElem.cloneNode(true);
            Node parent = doc.getBody();
            Node sibling = svgElem.getNextSibling();
            parent.removeChild(svgElem);
            parent.insertBefore(newSVGElem,sibling);
            // Note: In this case we remove FIRST the already inserted
            // SVG node because in this example the new SVG node and the current
View Full Code Here

    }

    public void startExamplePanel()
    {
        ItsNatDocument itsNatDoc = getItsNatDocument();
        HTMLDocument doc = (HTMLDocument)itsNatDoc.getDocument();

        ItsNatServlet servlet = itsNatDoc.getItsNatDocumentTemplate().getItsNatServlet();
        ItsNatHTMLDocFragmentTemplate docFragTemplate =
                (ItsNatHTMLDocFragmentTemplate)servlet.getItsNatDocFragmentTemplate("feashow.core.otherns.svgInHTMLMime.ex");
        DocumentFragment headFrag = docFragTemplate.loadDocumentFragmentHead(itsNatDoc);
        this.styleElem = (HTMLStyleElement)ItsNatTreeWalker.getFirstChildElement(headFrag);
        HTMLHeadElement headElem =
                (HTMLHeadElement)ItsNatTreeWalker.getFirstChildElement(doc.getDocumentElement());
        headElem.appendChild(styleElem);

        Element listParentElem = doc.getElementById("circleListId");
        ElementGroupManager factory = itsNatDoc.getElementGroupManager();
        this.circleList = factory.createElementList(listParentElem,true);

        this.buttonChangeColor = doc.getElementById("changeColorId");
        ((EventTarget)buttonChangeColor).addEventListener("click",this,false);

        this.buttonBigger = doc.getElementById("biggerCircleId");
        ((EventTarget)buttonBigger).addEventListener("click",this,false);

        this.buttonAdd = doc.getElementById("addCircleId");
        ((EventTarget)buttonAdd).addEventListener("click",this,false);

        this.buttonRemove = doc.getElementById("removeCircleId");
        ((EventTarget)buttonRemove).addEventListener("click",this,false);

        this.circleElem = doc.getElementById("circleId");
        ((EventTarget)circleElem).addEventListener("click",this,false);
    }
View Full Code Here

    }

    public void endExamplePanel()
    {
        ItsNatDocument itsNatDoc = getItsNatDocument();
        HTMLDocument doc = (HTMLDocument)itsNatDoc.getDocument();
        doc.getBody().removeAttribute("class");

        styleElem.getParentNode().removeChild(styleElem);
        this.styleElem = null;

        this.circleList = null;
View Full Code Here

        ElementRemover remover = new ElementRemover();
        XMLDocumentFilter[] filters = { remover };
        parser.setProperty(
            "http://cyberneko.org/html/properties/filters",
            filters);
        HTMLDocument document = new HTMLDocumentImpl();
        DocumentFragment fragment = document.createDocumentFragment();

        InputSource inputSource = new InputSource(new StringReader(html));
        parser.parse(inputSource, fragment);
        StringWriter writer = new StringWriter();
        OutputFormat format = new OutputFormat();
View Full Code Here

     * @return New HTML document
     */
    public final HTMLDocument createHTMLDocument( String title )
        throws DOMException
    {
  HTMLDocument doc;

  if ( title == null )
      throw new NullPointerException( "HTM014 Argument 'title' is null." );
  doc = new HTMLDocumentImpl();
  doc.setTitle( title );
  return doc;
    }
View Full Code Here

     * @return New HTML document
     */
    public final HTMLDocument createHTMLDocument( String title )
        throws DOMException
    {
  HTMLDocument doc;

  if ( title == null )
      throw new NullPointerException( "HTM014 Argument 'title' is null." );
  doc = new HTMLDocumentImpl();
  doc.setTitle( title );
  return doc;
    }
View Full Code Here

   
    public SPITutStateDetail(SPITutMainDocument spiTutDoc)
    {
        super(spiTutDoc);

        HTMLDocument doc = getItsNatHTMLDocument().getHTMLDocument();
        this.detailMoreLink = doc.getElementById("detailMoreId");
        ((EventTarget)detailMoreLink).addEventListener("click",this,false);
    }
View Full Code Here

TOP

Related Classes of org.w3c.dom.html.HTMLDocument

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.