Line | Hits | Source |
---|---|---|
1 | /******************************************************************************* | |
2 | * Demetrix process modelling system | |
3 | * | |
4 | * Copyright (c) 2003, 2004 Dimitri A. Pissarenko | |
5 | * | |
6 | * This file is part of Demetrix. | |
7 | * | |
8 | * Demetrix is free software; you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License as published by | |
10 | * the Free Software Foundation; either version 2.1 of the License, or | |
11 | * (at your option) any later version. | |
12 | * | |
13 | * Demetrix is distributed in the hope that it will be useful, | |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with Demetrix; if not, write to the Free Software | |
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 | * | |
22 | * For further information you may | |
23 | * | |
24 | * - send an e-mail in Russian, German or English to dimitri.pissarenko@gmx.net | |
25 | * - look at http://sourceforge.net/projects/demetrix/ | |
26 | * - look at http://demetrix.sourceforge.net/ | |
27 | * - look at http://members.inode.at/d.pissarenko/ | |
28 | * | |
29 | *****************************************************************************/ | |
30 | ||
31 | package net.sourceforge.demetrix.ui.balancesheets; | |
32 | ||
33 | import java.util.ArrayList; | |
34 | ||
35 | import java.util.Vector; | |
36 | ||
37 | import net.sourceforge.demetrix.model.ProcessChain; | |
38 | import net.sourceforge.demetrix.model.Task; | |
39 | ||
40 | import net.sourceforge.demetrix.ui.CurrentProcessChainSingleton; | |
41 | ||
42 | /** | |
43 | * @author Dimitri Pissarenko | |
44 | * | |
45 | */ | |
46 | ||
47 | public class SwixMLTaskBalanceSheetRenderer | |
48 | extends SwixMLBalanceSheetRenderer | |
49 | implements TaskBalanceSheetRenderer { | |
50 | ||
51 | private Task task; | |
52 | ||
53 | public SwixMLTaskBalanceSheetRenderer() { | |
54 | ||
55 | 3 | super(); |
56 | ||
57 | 3 | } |
58 | ||
59 | /* (non-Javadoc) | |
60 | * @see net.sourceforge.demetrix.ui.balancesheets.TaskBalanceSheetRenderer#render() | |
61 | */ | |
62 | ||
63 | public void render() { | |
64 | ||
65 | 0 | Vector inputsOrOutputs = null; |
66 | ||
67 | 0 | ArrayList tempInputs = null; |
68 | ||
69 | 0 | ArrayList tempOutputs = null; |
70 | ||
71 | 0 | tempInputs = new ArrayList(); |
72 | ||
73 | ||
74 | 0 | inputsOrOutputs=((ProcessChain)CurrentProcessChainSingleton.getInstance().getCurrentGraphParent().getSubGraph()).getInputs(this.task.getProperty("name").getValue().toString()); |
75 | ||
76 | 0 | if (inputsOrOutputs != null) { |
77 | ||
78 | 0 | tempInputs.addAll(inputsOrOutputs); |
79 | ||
80 | } | |
81 | ||
82 | 0 | this.setInputs(tempInputs); |
83 | ||
84 | 0 | tempOutputs = new ArrayList(); |
85 | ||
86 | 0 | inputsOrOutputs=((ProcessChain)CurrentProcessChainSingleton.getInstance().getCurrentGraphParent().getSubGraph()).getOutputs(this.task.getProperty("name").getValue().toString()); |
87 | 0 | if (inputsOrOutputs != null) { |
88 | ||
89 | 0 | tempOutputs.addAll(inputsOrOutputs); |
90 | ||
91 | } | |
92 | ||
93 | 0 | this.setOutputs(tempOutputs); |
94 | ||
95 | 0 | super.render(); |
96 | ||
97 | 0 | } |
98 | ||
99 | /* (non-Javadoc) | |
100 | * @see net.sourceforge.demetrix.ui.balancesheets.TaskBalanceSheetRenderer#setTask(net.sourceforge.demetrix.model.Task) | |
101 | */ | |
102 | ||
103 | public void setTask(Task task) { | |
104 | ||
105 | 1 | this.task = task; |
106 | ||
107 | 1 | } |
108 | ||
109 | } |
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |