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

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


     *
     * @return Name-value mappings.
     */
    public DOMAttributes getNamedValues() {
        Map m = ACSFactory.getInstance().getClassInfo(getTagName(), (this instanceof ACSTargetElement))._attributes;
        DOMAttributes d = new DOMAttributes(m);

        NamedDOMNodeMap attribs = getAttributes();
        for(int i = 0, len = attribs.getLength(); i < len; i++) {
            DOMNode n = attribs.item(i);
            d.setProperty(n.getNodeName(), n.getNodeValue());
        }
        return d;
    }
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

     * Overridden to handle the default Attributes
     *
     * @return Name-value mappings.
     */
    public DOMAttributes getNamedValues() {
        DOMAttributes d = super.getNamedValues();

        d.remove("file"); d.remove("value"); d.remove("name");
       
        String a[] = d.getAttributes();
        String b[] = new String[a.length-3];
        int j = 0;
        for (int i=0; i<a.length;i++) {
            if (!(a[i].equals("file") || a[i].equals("value") || a[i].equals("name"))) {
                b[j] = a[i];
                j++;
            }
        }
        d.setAttributes(b);
       
        return d;
    }
View Full Code Here

     *     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

TOP

Related Classes of org.apache.tools.ant.gui.xml.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.