Package org.w3c.dom.html

Examples of org.w3c.dom.html.HTMLAnchorElement


            TreePath path = tree.getTreePathForRow(row);
            DefaultMutableTreeNode dataNode = (DefaultMutableTreeNode)path.getLastPathComponent();
            FeatureTreeNode feature = (FeatureTreeNode)dataNode.getUserObject();
            String featureName = feature.getFeatureName();

            HTMLAnchorElement permalink = (HTMLAnchorElement)ItsNatTreeWalker.getNextSiblingElement(treeNodeLabelElem);
            permalink.setHref("?itsnat_doc_name=" + mainTempName + "&feature=" + featureName + ".default");
        }

        delegate.renderTreeCell(tree,row,value,isSelected,isExpanded,isLeaf,hasFocus,treeNodeLabelElem,isNew);
    }
View Full Code Here


        }
    }

    protected void addLinkAsParent(Node node)
    {
        HTMLAnchorElement link = createLink();
        Node parentNode = node.getParentNode();
        parentNode.replaceChild(link, node);
        if (node instanceof HTMLImageElement)
            ((HTMLImageElement)node).setBorder("0");
        link.appendChild(node);
    }
View Full Code Here

        }
    }

    protected void replaceElemWithLink(Element elem)
    {
        HTMLAnchorElement link = createLink();
        replaceElemWithAnother(elem,link);
    }
View Full Code Here

                Node node = children.item(i);
                if (node instanceof HTMLImageElement)
                    ((HTMLImageElement)node).setBorder("0");
            }
        }
        HTMLAnchorElement link = createLink();
        link.appendChild(content);
        elem.appendChild(link);
    }
View Full Code Here

    }

    public HTMLAnchorElement createLink()
    {
        HTMLDocument doc = itsNatDoc.getHTMLDocument();
        HTMLAnchorElement link = (HTMLAnchorElement)doc.createElement("a");
        link.setHref("javascript:;");
        link.setAttribute("style","text-decoration:none; color:inherit;");
        return link;
    }
View Full Code Here

        list = doc.getElementsByTagName("a");
        len = list.getLength();
        for(int i = 0; i < len; i++)
        {
            HTMLAnchorElement elem = (HTMLAnchorElement)list.item(i);
            String href = elem.getHref();
            if (!href.startsWith("http:"))
                elem.setHref("http://www.google.com" + href);
        }

        list = doc.getElementsByTagName("img");
        len = list.getLength();
        for(int i = 0; i < len; i++)
        {
            HTMLImageElement elem = (HTMLImageElement)list.item(i);
            String src = elem.getSrc();
            if (!src.startsWith("http:"))
                elem.setSrc("http://www.google.com" + src);
        }
    }
View Full Code Here

        list = doc.getElementsByTagName("a");
        len = list.getLength();
        for(int i = 0; i < len; i++)
        {
            HTMLAnchorElement elem = (HTMLAnchorElement)list.item(i);
            elem.setHref("javascript:alert('Hey!! This is not interesting! :)');");
        }

        link = (HTMLAnchorElement)doc.createElement("a");
        link.setHref("javascript:;");
        link.setAttribute("style","font-size:25px;");
View Full Code Here

    public void init(String id)
    {
        Document doc = itsNatDoc.getDocument();
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        HTMLAnchorElement elem = (HTMLAnchorElement)doc.getElementById(id);
        this.button = (ItsNatHTMLAnchor)componentMgr.findItsNatComponent(elem);
        DefaultButtonModel dataModel = new DefaultButtonModel();
        button.setButtonModel(dataModel);

        button.addEventListener("click",this);
View Full Code Here

        DocumentFragment frag = itsNatDoc.toDOM(code);
        final Element elem = (Element)frag.getFirstChild();
        doc.getBody().appendChild(elem);

        NodeList links = elem.getElementsByTagName("a");
        final HTMLAnchorElement linkExit = (HTMLAnchorElement)links.item(0);
        final HTMLAnchorElement linkCheckServ = (HTMLAnchorElement)links.item(1);

        // Link simplemente para actualizar el cliente con cambios en el servidor
        final EventListener listenerNothing = new EventListenerSerial()
        {
            public void handleEvent(Event evt)
View Full Code Here

        DocumentFragment frag = itsNatDoc.toDOM(code);
        final Element elem = (Element)frag.getFirstChild();
        doc.getBody().appendChild(elem);

        NodeList links = elem.getElementsByTagName("a");
        final HTMLAnchorElement linkExit = (HTMLAnchorElement)links.item(0);

        final HTMLSelectElement select = (HTMLSelectElement)elem.getElementsByTagName("select").item(0);
        final ItsNatHTMLSelectComboBox selectComp = (ItsNatHTMLSelectComboBox)compMgr.createItsNatComponent(select);
        DefaultComboBoxModel model = (DefaultComboBoxModel)selectComp.getComboBoxModel();
        model.addElement("One");
View Full Code Here

TOP

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

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.