Package org.w3c.dom.html

Examples of org.w3c.dom.html.HTMLElement


        }
    }

    public void reinsert()
    {
        HTMLElement newContainer = (HTMLElement)containerElem.cloneNode(true);

        Node parent = containerElem.getParentNode();
        parent.insertBefore(newContainer,containerElem);

        parent.removeChild(containerElem);
View Full Code Here


        }
    }

    public void reinsert()
    {
        HTMLElement newContainer = (HTMLElement)containerElem.cloneNode(true);

        Node parent = containerElem.getParentNode();
        parent.insertBefore(newContainer,containerElem);

        parent.removeChild(containerElem);
View Full Code Here

        int rows = ((Integer)itsNatDoc.getUserValue("rows")).intValue();

        Element elem = (Element)evt.getCurrentTarget();
        Document doc = elem.getOwnerDocument();
        Element pattern = doc.getElementById("row-pattern");
        HTMLElement newRow = (HTMLElement)pattern.cloneNode(true);
        newRow.setAttribute("id","row-" + rows);
        newRow.setAttribute("style","display:block;color:red;");

        HTMLInputElement inputElem = (HTMLInputElement)doc.getElementById("add-row-value");
        newRow.appendChild(doc.createTextNode(rows + " - " + inputElem.getValue()));
        rows++;
        itsNatDoc.setUserValue("rows",new Integer(rows));

        Element parent = doc.getElementById("rows");
        parent.appendChild(newRow);
View Full Code Here

 
    public HTMLElement insertCell( int index )
    {
        Node        child;
        HTMLElement    newCell;
       
        newCell = new HTMLTableCellElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TD" );
        child = getFirstChild();
        while ( child != null ) {
            if ( child instanceof HTMLTableCellElement ) {
View Full Code Here

    }


    public synchronized String getTitle()
    {
        HTMLElement head;
        NodeList    list;
        Node        title;

        // Get the HEAD element and look for the TITLE element within.
        // When found, make sure the TITLE is a direct child of HEAD,
        // and return the title's text (the Text node contained within).
        head = getHead();
        list = head.getElementsByTagName( "TITLE" );
        if ( list.getLength() > 0 ) {
            title = list.item( 0 );
            return ( (HTMLTitleElement) title ).getText();
        }
        // No TITLE found, return an empty string.
View Full Code Here

    }


    public synchronized void setTitle( String newTitle )
    {
        HTMLElement head;
        NodeList    list;
        Node        title;

        // Get the HEAD element and look for the TITLE element within.
        // When found, make sure the TITLE is a direct child of HEAD,
        // and set the title's text (the Text node contained within).
        head = getHead();
        list = head.getElementsByTagName( "TITLE" );
        if ( list.getLength() > 0 ) {
            title = list.item( 0 );
            if ( title.getParentNode() != head )
                head.appendChild( title );
            ( (HTMLTitleElement) title ).setText( newTitle );
        }
        else
        {
            // No TITLE found, create a new element and place it at the end
            // of the HEAD element.
            title = new HTMLTitleElementImpl( this, "TITLE" );
            ( (HTMLTitleElement) title ).setText( newTitle );
            head.appendChild( title );
        }
    }
View Full Code Here

    }
   
   
    public synchronized HTMLElement createCaption()
    {
        HTMLElement    section;
       
        section = getCaption();
        if ( section != null )
            return section;
        section = new HTMLTableCaptionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "CAPTION" );
View Full Code Here

    }
   
   
    public synchronized HTMLElement createTHead()
    {
        HTMLElement    section;
       
        section = getTHead();
        if ( section != null )
            return section;
        section = new HTMLTableSectionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "THEAD" );
View Full Code Here

    }
   
   
    public synchronized HTMLElement createTFoot()
    {
        HTMLElement    section;
       
        section = getTFoot();
        if ( section != null )
            return section;
        section = new HTMLTableSectionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TFOOT" );
View Full Code Here

 
    public HTMLElement insertCell( int index )
    {
        Node        child;
        HTMLElement    newCell;
       
        newCell = new HTMLTableCellElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TD" );
        child = getFirstChild();
        while ( child != null )
        {
View Full Code Here

TOP

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

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.