001    /*
002     * Stop.java
003     *
004     *
005     *  The Salamander Project - 2D and 3D graphics libraries in Java
006     *  Copyright (C) 2004 Mark McKay
007     *
008     *  This library is free software; you can redistribute it and/or
009     *  modify it under the terms of the GNU Lesser General Public
010     *  License as published by the Free Software Foundation; either
011     *  version 2.1 of the License, or (at your option) any later version.
012     *
013     *  This library is distributed in the hope that it will be useful,
014     *  but WITHOUT ANY WARRANTY; without even the implied warranty of
015     *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
016     *  Lesser General Public License for more details.
017     *
018     *  You should have received a copy of the GNU Lesser General Public
019     *  License along with this library; if not, write to the Free Software
020     *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
021     *
022     *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
023     *  projects can be found at http://www.kitfox.com
024     *
025     * Created on January 26, 2004, 1:56 AM
026     */
027    
028    package com.kitfox.svg;
029    
030    import java.awt.*;
031    import java.awt.geom.*;
032    import java.util.*;
033    
034    import com.kitfox.svg.xml.*;
035    import org.xml.sax.*;
036    
037    /**
038     * @author Mark McKay
039     * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
040     */
041    public class Defs extends TransformableElement
042    {
043    
044        /** Creates a new instance of Stop */
045        public Defs() {
046        }
047    
048        /**
049         * Called after the start element but before the end element to indicate
050         * each child tag that has been processed
051         */
052        public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
053        {
054                    super.loaderAddChild(helper, child);
055    
056    //        members.add(child);
057        }
058    
059        public boolean updateTime(double curTime) throws SVGException
060        {
061            boolean stateChange = false;
062            for (Iterator it = children.iterator(); it.hasNext();)
063            {
064                SVGElement ele = (SVGElement)it.next();
065                stateChange = stateChange || ele.updateTime(curTime);
066            }
067            
068            return super.updateTime(curTime) || stateChange;
069        }
070    }