~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/ikvm/openjdk/sun/java2d/HeadlessGraphicsEnvironment.java

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (C) 2009 Volker Berlin (i-net software)
 
3
 
 
4
  This software is provided 'as-is', without any express or implied
 
5
  warranty.  In no event will the authors be held liable for any damages
 
6
  arising from the use of this software.
 
7
 
 
8
  Permission is granted to anyone to use this software for any purpose,
 
9
  including commercial applications, and to alter it and redistribute it
 
10
  freely, subject to the following restrictions:
 
11
 
 
12
  1. The origin of this software must not be misrepresented; you must not
 
13
     claim that you wrote the original software. If you use this software
 
14
     in a product, an acknowledgment in the product documentation would be
 
15
     appreciated but is not required.
 
16
  2. Altered source versions must be plainly marked as such, and must not be
 
17
     misrepresented as being the original software.
 
18
  3. This notice may not be removed or altered from any source distribution.
 
19
 
 
20
  Jeroen Frijters
 
21
  jeroen@frijters.net
 
22
  
 
23
 */
 
24
package sun.java2d;
 
25
 
 
26
import java.awt.Font;
 
27
import java.awt.Graphics2D;
 
28
import java.awt.GraphicsDevice;
 
29
import java.awt.GraphicsEnvironment;
 
30
import java.awt.HeadlessException;
 
31
import java.awt.Point;
 
32
import java.awt.Rectangle;
 
33
import java.awt.image.BufferedImage;
 
34
import java.util.Locale;
 
35
 
 
36
 
 
37
/**
 
38
 * Placeholder for not supported headless environment
 
39
 */
 
40
public class HeadlessGraphicsEnvironment extends GraphicsEnvironment{
 
41
 
 
42
    private final GraphicsEnvironment env;
 
43
    
 
44
 
 
45
    public HeadlessGraphicsEnvironment(GraphicsEnvironment env){
 
46
        this.env = env;
 
47
    }
 
48
    
 
49
    /**
 
50
     * {@inheritDoc}
 
51
     */
 
52
    @Override
 
53
    public Graphics2D createGraphics(BufferedImage img){
 
54
        return env.createGraphics(img);
 
55
    }
 
56
 
 
57
    /**
 
58
     * {@inheritDoc}
 
59
     */
 
60
    @Override
 
61
    public boolean equals(Object obj){
 
62
        return env.equals(obj);
 
63
    }
 
64
 
 
65
    /**
 
66
     * {@inheritDoc}
 
67
     */
 
68
    @Override
 
69
    public Font[] getAllFonts(){
 
70
        return env.getAllFonts();
 
71
    }
 
72
 
 
73
    /**
 
74
     * {@inheritDoc}
 
75
     */
 
76
    @Override
 
77
    public String[] getAvailableFontFamilyNames(){
 
78
        return env.getAvailableFontFamilyNames();
 
79
    }
 
80
 
 
81
    /**
 
82
     * {@inheritDoc}
 
83
     */
 
84
    @Override
 
85
    public String[] getAvailableFontFamilyNames(Locale l){
 
86
        return env.getAvailableFontFamilyNames(l);
 
87
    }
 
88
 
 
89
    /**
 
90
     * {@inheritDoc}
 
91
     */
 
92
    @Override
 
93
    public Point getCenterPoint() throws HeadlessException{
 
94
        return env.getCenterPoint();
 
95
    }
 
96
 
 
97
    /**
 
98
     * {@inheritDoc}
 
99
     */
 
100
    @Override
 
101
    public GraphicsDevice getDefaultScreenDevice() throws HeadlessException{
 
102
        return env.getDefaultScreenDevice();
 
103
    }
 
104
 
 
105
    /**
 
106
     * {@inheritDoc}
 
107
     */
 
108
    @Override
 
109
    public Rectangle getMaximumWindowBounds() throws HeadlessException{
 
110
        return env.getMaximumWindowBounds();
 
111
    }
 
112
 
 
113
    /**
 
114
     * {@inheritDoc}
 
115
     */
 
116
    @Override
 
117
    public GraphicsDevice[] getScreenDevices() throws HeadlessException{
 
118
        return env.getScreenDevices();
 
119
    }
 
120
 
 
121
    /**
 
122
     * {@inheritDoc}
 
123
     */
 
124
    @Override
 
125
    public int hashCode(){
 
126
        return env.hashCode();
 
127
    }
 
128
 
 
129
    /**
 
130
     * {@inheritDoc}
 
131
     */
 
132
    @Override
 
133
    public boolean isHeadlessInstance(){
 
134
        return env.isHeadlessInstance();
 
135
    }
 
136
 
 
137
    /**
 
138
     * {@inheritDoc}
 
139
     */
 
140
    @Override
 
141
    public void preferLocaleFonts(){
 
142
        env.preferLocaleFonts();
 
143
    }
 
144
 
 
145
    /**
 
146
     * {@inheritDoc}
 
147
     */
 
148
    @Override
 
149
    public void preferProportionalFonts(){
 
150
        env.preferProportionalFonts();
 
151
    }
 
152
 
 
153
    /**
 
154
     * {@inheritDoc}
 
155
     */
 
156
    @Override
 
157
    public boolean registerFont(Font font){
 
158
        return env.registerFont(font);
 
159
    }
 
160
 
 
161
    /**
 
162
     * {@inheritDoc}
 
163
     */
 
164
    @Override
 
165
    public String toString(){
 
166
        return env.toString();
 
167
    }    
 
168
}