1
/* This notice must be untouched at all times.
4
The latest version is available at
5
http://www.openjacob.org
7
Copyright (c) 2006 Andreas Herz. All rights reserved.
8
Created 5. 11. 2006 by Andreas Herz (Web: http://www.freegroup.de )
12
This library is free software; you can redistribute it and/or
13
modify it under the terms of the GNU Lesser General Public
14
License (LGPL) as published by the Free Software Foundation; either
15
version 2.1 of the License, or (at your option) any later version.
17
This library is distributed in the hope that it will be useful,
18
but WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
Lesser General Public License for more details.
22
You should have received a copy of the GNU Lesser General Public
23
License along with this library; if not, write to the Free Software
24
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA,
25
or see http://www.gnu.org/copyleft/lesser.html
31
* @author Andreas Herz
34
draw2d.Document=function(/*:draw2d.Canvas*/ canvas)
42
* @type draw2d.ArrayList
44
draw2d.Document.prototype.getFigures=function()
46
var result = new draw2d.ArrayList();
48
var figures = this.canvas.figures;
49
var dialogs = this.canvas.dialogs;
50
for(var i=0;i<figures.getSize();i++)
52
var figure = figures.get(i);
53
// Return all root elements (not children of a compartment) and no windows/dialogs
54
if(dialogs.indexOf(figure)==-1 && figure.getParent()==null && !(figure instanceof draw2d.Window))
66
draw2d.Document.prototype.getFigure=function(/*:String*/ id)
68
return this.canvas.getFigure(id);
71
draw2d.Document.prototype.getLines=function()
73
return this.canvas.getLines();