EMMA Coverage Report (generated Tue Feb 12 22:23:49 ICT 2008)
[all classes][net.sourceforge.hivegui.component]

COVERAGE SUMMARY FOR SOURCE FILE [CursorInfo.java]

nameclass, %method, %block, %line, %
CursorInfo.java0%   (0/1)0%   (0/6)0%   (0/52)0%   (0/17)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CursorInfo0%   (0/1)0%   (0/6)0%   (0/52)0%   (0/17)
CursorInfo (Cursor): void 0%   (0/1)0%   (0/15)0%   (0/6)
CursorInfo (ImageIcon, Point, Dimension): void 0%   (0/1)0%   (0/12)0%   (0/5)
getCursor (): Cursor 0%   (0/1)0%   (0/16)0%   (0/3)
getHotspot (): Point 0%   (0/1)0%   (0/3)0%   (0/1)
getIcon (): ImageIcon 0%   (0/1)0%   (0/3)0%   (0/1)
getSize (): Dimension 0%   (0/1)0%   (0/3)0%   (0/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.hivegui.component;
16 
17import java.awt.Cursor;
18import java.awt.Dimension;
19import java.awt.Point;
20import java.awt.Toolkit;
21 
22import javax.swing.ImageIcon;
23 
24/**
25 * @author Jean-Francois Poilpret
26 */
27public class CursorInfo
28{
29        public CursorInfo(Cursor cursor)
30        {
31                _icon = null;
32                _hotspot = null;
33                _size = null;
34                _cursor = cursor;
35        }
36        
37        public CursorInfo(ImageIcon icon, Point hotspot, Dimension size)
38        {
39                _icon = icon;
40                _hotspot = hotspot;
41                _size = size;
42        }
43        
44        public ImageIcon        getIcon()
45        {
46                return _icon;
47        }
48 
49        public Point                getHotspot()
50        {
51                return _hotspot;
52        }
53 
54        public Dimension        getSize()
55        {
56                return _size;
57        }
58        
59        public Cursor                getCursor()
60        {
61                if (_cursor == null)
62                {
63                        _cursor = Toolkit.getDefaultToolkit().createCustomCursor(
64                                                                                        _icon.getImage(), _hotspot, "");
65                }
66                return _cursor;
67        }
68 
69        final private ImageIcon        _icon;
70        final private Point                _hotspot;
71        final private Dimension        _size;
72        private Cursor                        _cursor;
73}

[all classes][net.sourceforge.hivegui.component]
EMMA 2.0.5312 (C) Vladimir Roubtsov