EMMA Coverage Report (generated Sat Apr 29 12:52:00 BST 2006)
[all classes][net.sourceforge.pseudoq.gui]

COVERAGE SUMMARY FOR SOURCE FILE [TinyGridPainter.java]

nameclass, %method, %block, %line, %
TinyGridPainter.java100% (1/1)100% (3/3)100% (88/88)100% (13/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TinyGridPainter100% (1/1)100% (3/3)100% (88/88)100% (13/13)
TinyGridPainter (): void 100% (1/1)100% (3/3)100% (2/2)
drawGrid (Graphics): void 100% (1/1)100% (72/72)100% (9/9)
getPreferredSize (): Dimension 100% (1/1)100% (13/13)100% (2/2)

1/*
2 * Copyright (c) 2005 The PseudoQ Project.
3 *
4 * This file is part of PseudoQ.
5 *
6 * PseudoQ is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
10 *
11 * PseudoQ is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with PseudoQ; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19 */
20 
21package net.sourceforge.pseudoq.gui;
22 
23import java.awt.Color;
24import java.awt.Dimension;
25import java.awt.Graphics;
26 
27/**
28 * GridPainter for TINY type puzzles.
29 * @author <a href="http://sourceforge.net/users/stevensa">Andrew Stevens</a>
30 */
31public class TinyGridPainter extends AbstractGridPainter {
32    /**
33     * Creates a new instance of TinyGridPainter.
34     */
35    public TinyGridPainter() {
36    }
37 
38    public void drawGrid(Graphics g) {
39        fillBox(g, 0, 0, 4, 4, Color.WHITE);
40        drawBox(g, 0, 0, 4, 4, 3, Color.BLACK);
41        drawLine(g, 2, 0, 2, 4, 3, Color.BLACK);
42        drawLine(g, 0, 2, 4, 2, 3, Color.BLACK);
43        drawLine(g, 1, 0, 1, 4, 1, Color.BLACK);
44        drawLine(g, 3, 0, 3, 4, 1, Color.BLACK);
45        drawLine(g, 0, 1, 4, 1, 1, Color.BLACK);
46        drawLine(g, 0, 3, 4, 3, 1, Color.BLACK);
47    }
48 
49    public Dimension getPreferredSize() {
50        int x = (2 * BORDER) + (4 * size);
51        return new Dimension(x, x);
52    }
53 
54}

[all classes][net.sourceforge.pseudoq.gui]
EMMA 2.0.5312 (C) Vladimir Roubtsov