// 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; import java.awt.Rectangle; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import xaal.objects.graphical.GraphicalPrimitive; import xaal.objects.structures.DataStructure; import xaal.objects.structures.Structure; public class Group extends XaalObject implements AddStructure, AddGraphicalPrimitive { protected List gp; protected List str; private String name; public Group(Xaal xaalDoc, String name) { super(xaalDoc); this.name = name; gp = new LinkedList(); str = new LinkedList(); } public Rectangle getBounds() { // TODO Auto-generated method stub return null; } public void addStructure(Structure s) { str.add(s); } public void addStructure(DataStructure ds) { str.add(ds); } public void addGraphical(GraphicalPrimitive gp) { this.gp.add(gp); } public Iterator getGraphicals() { return gp.iterator(); } public void setGraphical(List l) { this.gp = l; } public Iterator getStructures() { return str.iterator(); } public String getName() { return name; } public void setName(String name) { this.name = name; } public List getGraphicalsList() { return new ArrayList(gp); } }