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

COVERAGE SUMMARY FOR SOURCE FILE [ScreenTools.java]

nameclass, %method, %block, %line, %
ScreenTools.java0%   (0/1)0%   (0/7)0%   (0/80)0%   (0/14)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ScreenTools0%   (0/1)0%   (0/7)0%   (0/80)0%   (0/14)
ScreenTools (): void 0%   (0/1)0%   (0/3)0%   (0/2)
getMainScreenBounds (): Rectangle 0%   (0/1)0%   (0/10)0%   (0/2)
getMainScreenOrigin (): Point 0%   (0/1)0%   (0/3)0%   (0/1)
getMainScreenSize (): Dimension 0%   (0/1)0%   (0/3)0%   (0/1)
getMainScreenUsableBounds (): Rectangle 0%   (0/1)0%   (0/41)0%   (0/4)
getMainScreenUsableOrigin (): Point 0%   (0/1)0%   (0/10)0%   (0/2)
getMainScreenUsableSize (): Dimension 0%   (0/1)0%   (0/10)0%   (0/2)

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.util;
16 
17import java.awt.Dimension;
18import java.awt.GraphicsConfiguration;
19import java.awt.GraphicsEnvironment;
20import java.awt.Insets;
21import java.awt.Point;
22import java.awt.Rectangle;
23import java.awt.Toolkit;
24 
25public final class ScreenTools
26{
27        private ScreenTools()
28        {
29        }
30 
31        static public Rectangle        getMainScreenUsableBounds()
32        {
33                GraphicsConfiguration config = GraphicsEnvironment
34                                                                                .getLocalGraphicsEnvironment()
35                                                                                .getDefaultScreenDevice()
36                                                                                .getDefaultConfiguration();
37                Rectangle bounds = config.getBounds();
38                Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(config);
39                return new Rectangle(        bounds.x + insets.left,
40                                                                bounds.y + insets.top,
41                                                                bounds.width - insets.left - insets.right,
42                                                                bounds.height - insets.top - insets.bottom);
43        }
44 
45        static public Point                getMainScreenUsableOrigin()
46        {
47                Rectangle bounds = getMainScreenUsableBounds();
48                return new Point(bounds.x, bounds.y);
49        }
50 
51        static public Dimension        getMainScreenUsableSize()
52        {
53                Rectangle bounds = getMainScreenUsableBounds();
54                return new Dimension(bounds.width, bounds.height);
55        }
56 
57        static public Rectangle        getMainScreenBounds()
58        {
59                GraphicsConfiguration config = GraphicsEnvironment
60                                                                                .getLocalGraphicsEnvironment()
61                                                                                .getDefaultScreenDevice()
62                                                                                .getDefaultConfiguration();
63                return new Rectangle(config.getBounds());
64        }
65 
66        static public Dimension        getMainScreenSize()
67        {
68                return getMainScreenBounds().getSize();
69        }
70 
71        static public Point                getMainScreenOrigin()
72        {
73                return getMainScreenBounds().getLocation();
74        }
75}

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