EMMA Coverage Report (generated Mon Mar 20 21:34:30 PST 2006)
[all classes][com.moesol.bindings.platform_sdk.windows_api]

COVERAGE SUMMARY FOR SOURCE FILE [HFONT.java]

nameclass, %method, %block, %line, %
HFONT.java100% (1/1)100% (3/3)81%  (22/27)88%  (7/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class HFONT100% (1/1)100% (3/3)81%  (22/27)88%  (7/8)
createFontIndirect (LOGFONT): HFONT 100% (1/1)72%  (13/18)75%  (3/4)
HFONT (long): void 100% (1/1)100% (4/4)100% (2/2)
HFONT (long, boolean): void 100% (1/1)100% (5/5)100% (2/2)

1/*
2 * $Id: HFONT.java,v 1.2 2005/12/01 06:10:00 hastings Exp $
3 *
4 * (c) Copyright, Moebius Solutions, Inc., 2004
5 *
6 *                       All Rights Reserved
7 *
8 * This material may be reproduced by or for the U. S. Government
9 * pursuant to the copyright license under the clause at
10 * DFARS 252.227-7014 (OCT 2001).
11 */
12 
13package com.moesol.bindings.platform_sdk.windows_api;
14 
15/**
16 * Holds a Win32 HFONT.
17 */
18public class HFONT extends HGDIOBJ {
19    HFONT(long font, boolean temporary) {
20        super(font, temporary);
21    }
22    HFONT(long font) {
23        super(font);
24    }
25    /**
26     * Create a font using CreateFontIndirect.
27     * @param logfont
28     * @return the HFONT that was created.
29     */
30    public static HFONT createFontIndirect(LOGFONT logfont) {
31            long r = jni_createFontIndirect(logfont._getStructureBytes());
32            if (r == 0) { 
33                    throw new RuntimeException("createFontIndirect failed");
34            }
35            return new HFONT(r);
36    }
37    
38        public static final byte ANSI_CHARSET = 0;
39        public static final byte DEFAULT_CHARSET = 1;
40        public static final byte SYMBOL_CHARSET = 2;
41        public static final byte OEM_CHARSET = -1;
42        
43    private static native long jni_createFontIndirect(byte[] logfont_bytes);
44}

[all classes][com.moesol.bindings.platform_sdk.windows_api]
EMMA 2.0.5312 (C) Vladimir Roubtsov