// XAAL toolkit // Copyright (C) 2009 Ville Karavirta // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . package xaal.objects.animation; import java.util.Iterator; import java.util.LinkedList; import xaal.objects.AddStructure; import xaal.objects.Xaal; import xaal.objects.structures.DataStructure; import xaal.objects.structures.Structure; /** * @author vkaravir * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */ public class InsertOperation extends CDTOperation implements AddStructure { private Structure target; private Structure source; private LinkedList structures; /** * */ public InsertOperation(Xaal xaalDoc, Structure target) { this(xaalDoc); this.target = target; } public InsertOperation(Xaal xaalDoc) { super(xaalDoc); structures = new LinkedList(); } /* * (non-Javadoc) * * @see xaal.parser.AddStructure#addStructure(xaal.parser.structures.Structure) */ public void addStructure(Structure s) { structures.add(s); } /** * @return Returns the target. */ public Structure getTarget() { return target; } /** * @param target * The target to set. */ public void setTarget(Structure target) { this.target = target; } /** * @return Returns the source. */ public Structure getSource() { return source; } /** * @param source * The source to set. */ public void setSource(Structure source) { this.source = source; } /** * @return */ public Iterator getStructures() { return structures.iterator(); } /* * (non-Javadoc) * * @see xaal.parser.AddDataStructure#addStructure(xaal.parser.structures.DataStructure) */ public void addStructure(DataStructure ds) { addStructure((Structure) ds); } }