EMMA Coverage Report (generated Wed Feb 13 07:49:24 ICT 2008)
[all classes][net.sourceforge.hiveboard.drawing]

COVERAGE SUMMARY FOR SOURCE FILE [AbstractGraphicsDrawingAction.java]

nameclass, %method, %block, %line, %
AbstractGraphicsDrawingAction.java100% (1/1)100% (6/6)100% (30/30)100% (13/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AbstractGraphicsDrawingAction100% (1/1)100% (6/6)100% (30/30)100% (13/13)
AbstractGraphicsDrawingAction (): void 100% (1/1)100% (6/6)100% (2/2)
getActionArea (): Rectangle 100% (1/1)100% (3/3)100% (1/1)
internalDraw (Graphics2D): void 100% (1/1)100% (10/10)100% (4/4)
perform (BufferedImage): void 100% (1/1)100% (9/9)100% (4/4)
postDraw (Graphics2D): void 100% (1/1)100% (1/1)100% (1/1)
preDraw (Graphics2D): void 100% (1/1)100% (1/1)100% (1/1)

1//  Copyright 2004-2007 Jean-Francois Poilpret
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14 
15package net.sourceforge.hiveboard.drawing;
16 
17import java.awt.Graphics2D;
18import java.awt.Rectangle;
19import java.awt.image.BufferedImage;
20 
21public abstract class AbstractGraphicsDrawingAction implements DrawingAction
22{
23        final public void        perform(BufferedImage image)
24        {
25                Graphics2D graf = image.createGraphics();
26                internalDraw(graf);
27                graf.dispose();
28        }
29        
30        protected void        internalDraw(Graphics2D graf)
31        {
32                preDraw(graf);
33                draw(graf);
34                postDraw(graf);
35        }
36 
37        protected void        preDraw(Graphics2D graf)
38        {
39        }
40        
41        abstract protected void        draw(Graphics2D graf);
42        
43        protected void        postDraw(Graphics2D graf)
44        {
45        }
46 
47        public Rectangle        getActionArea()
48        {
49                return _area;
50        }
51        
52        protected Rectangle                _area = null;
53}

[all classes][net.sourceforge.hiveboard.drawing]
EMMA 2.0.5312 (C) Vladimir Roubtsov