Package org.apache.tools.ant.gui.xml.dtd

Examples of org.apache.tools.ant.gui.xml.dtd.DOMAttributes


     *     the PropertyEditor should create a new object to hold any
     *     modified value.
     */
    public void setValue(Object value) {
        if(value == null) {
            value = new DOMAttributes();
        }

        if(!(value instanceof DOMAttributes)) {
            throw new IllegalArgumentException(
                value.getClass().getName() +
View Full Code Here


         * the Node interface.
   *
   * @return Name-value mappings.
   */
    public DOMAttributes getNamedValues() {
        DOMAttributes retval =
            new DOMAttributes(getDtdElement());

        NamedDOMNodeMap attribs = getAttributes();
        for(int i = 0, len = attribs.getLength(); i < len; i++) {
            DOMNode n = attribs.item(i);
            retval.setProperty(n.getNodeName(), n.getNodeValue());
        }
        return retval;
    }
View Full Code Here

        // simplistic approach to this and brute force removing the existing
        // set and replacing it with a brand new set. If this becomes a
        // performance concern (which I doubt it will) it can be optimized
        // later.

        DOMAttributes old = (DOMAttributes) getNamedValues();

        Enumeration en = old.propertyNames();
        while(en.hasMoreElements()) {
            String name = (String) en.nextElement();
            removeAttribute(name);
        }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.gui.xml.dtd.DOMAttributes

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.