Coverage details for net.sourceforge.demetrix.graph.ResourceCellView

LineHitsSource
1 /*******************************************************************************
2  
3  * Demetrix process modelling system
4  
5  *
6  
7  * Copyright (c) 2003, 2004 Dimitri A. Pissarenko
8  
9  *
10  
11  * This file is part of Demetrix.
12  
13  *
14  
15  * Demetrix is free software; you can redistribute it and/or modify
16  
17  * it under the terms of the GNU General Public License as published by
18  
19  * the Free Software Foundation; either version 2.1 of the License, or
20  
21  * (at your option) any later version.
22  
23  *
24  
25  * Demetrix is distributed in the hope that it will be useful,
26  
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28  
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30  
31  * GNU General Public License for more details.
32  
33  *
34  
35  * You should have received a copy of the GNU General Public License
36  
37  * along with Demetrix; if not, write to the Free Software
38  
39  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
40  
41  *
42  
43  * For further information you may
44  
45  *
46  
47  * - send an e-mail in Russian, German or English to dimitri.pissarenko@gmx.net
48  
49  * - look at http://sourceforge.net/projects/demetrix/
50  
51  * - look at http://demetrix.sourceforge.net/
52  
53  * - look at http://members.inode.at/d.pissarenko/
54  
55  *
56  
57  *****************************************************************************/
58  
59  
60  
61 package net.sourceforge.demetrix.graph;
62  
63  
64  
65 import java.awt.Color;
66  
67 import java.awt.Dimension;
68  
69 import java.awt.Font;
70  
71 import java.awt.Rectangle;
72  
73 import java.util.Map;
74  
75  
76  
77 import org.jgraph.JGraph;
78  
79 import org.jgraph.graph.CellMapper;
80  
81 import org.jgraph.graph.DefaultPort;
82  
83 import org.jgraph.graph.GraphCell;
84  
85 import org.jgraph.graph.GraphConstants;
86  
87 import org.jgraph.pad.EllipseView;
88  
89  
90  
91 /**
92  
93  * @author Dimitri Pissarenko
94  
95  *
96  
97  */
98  
99 public class ResourceCellView extends EllipseView {
100  
101     public ResourceCellView(
102  
103         GraphCell cell,
104  
105         JGraph graph,
106  
107         CellMapper cellMapper) {
108  
1095        super(cell, graph, cellMapper);
110  
111  
112  
113         
114  
1155        Map attributeMap = null;
116  
1175        Map map = null;
118  
1195        Rectangle bounds = null;
120  
1215        DefaultPort port = null;
122  
123  
124  
125  
126  
127         //map = GraphConstants.createMap();
128  
1295        map = cell.getAttributes();
130  
131  
132  
1335        map.put(GraphConstants.BORDERCOLOR, Color.BLACK);
134  
1355        map.put(GraphConstants.FONT, new Font("Arial", Font.BOLD, 12));
136  
1375        map.put(GraphConstants.MOVEABLE, Boolean.TRUE);
138  
1395        GraphConstants.setSize(map, new Dimension(150, 50));
140  
141  
142  
143         //cell.changeAttributes(map);
144  
1455        cell.setAttributes(map);
146  
147  
148  
1495    }
150  
151     
152  
153 }
154  

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.