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

COVERAGE SUMMARY FOR SOURCE FILE [MiniGridPainter.java]

nameclass, %method, %block, %line, %
MiniGridPainter.java100% (1/1)100% (3/3)100% (124/124)100% (17/17)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class MiniGridPainter100% (1/1)100% (3/3)100% (124/124)100% (17/17)
MiniGridPainter (): void 100% (1/1)100% (3/3)100% (2/2)
drawGrid (Graphics): void 100% (1/1)100% (108/108)100% (13/13)
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 MINI type puzzles.
29 * @author <a href="http://sourceforge.net/users/stevensa">Andrew Stevens</a>
30 */
31public class MiniGridPainter extends AbstractGridPainter {
32    /**
33     * Creates a new instance of MiniGridPainter.
34     */
35    public MiniGridPainter() {
36    }
37 
38    public void drawGrid(Graphics g) {
39        fillBox(g, 0, 0, 6, 6, Color.WHITE);
40        drawBox(g, 0, 0, 6, 6, 3, Color.BLACK);
41        drawLine(g, 3, 0, 3, 6, 3, Color.BLACK);
42        drawLine(g, 0, 2, 6, 2, 3, Color.BLACK);
43        drawLine(g, 0, 4, 6, 4, 3, Color.BLACK);
44        drawLine(g, 1, 0, 1, 6, 1, Color.BLACK);
45        drawLine(g, 2, 0, 2, 6, 1, Color.BLACK);
46        drawLine(g, 4, 0, 4, 6, 1, Color.BLACK);
47        drawLine(g, 5, 0, 5, 6, 1, Color.BLACK);
48        drawLine(g, 0, 1, 6, 1, 1, Color.BLACK);
49        drawLine(g, 0, 3, 6, 3, 1, Color.BLACK);
50        drawLine(g, 0, 5, 6, 5, 1, Color.BLACK);
51    }
52 
53    public Dimension getPreferredSize() {
54        int x = (2 * BORDER) + (6 * size);
55        return new Dimension(x, x);
56    }
57 
58}

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