1 package org.opentrafficsim.web.animation;
2
3 import java.awt.GraphicsConfiguration;
4 import java.awt.GraphicsDevice;
5
6 import org.opentrafficsim.base.logger.Logger;
7
8
9
10
11
12
13
14
15
16 public class HtmlDevice extends GraphicsDevice
17 {
18
19 private GraphicsConfiguration[] htmlGraphicsConfigurations;
20
21
22
23
24
25 public HtmlDevice(final GraphicsConfiguration htmlGraphicsConfiguration)
26 {
27 Logger.ots().trace("HTMLDevice.<init>");
28 this.htmlGraphicsConfigurations = new GraphicsConfiguration[] {htmlGraphicsConfiguration};
29 }
30
31 @Override
32 public int getType()
33 {
34 Logger.ots().trace("HTMLDevice.getType()");
35 return GraphicsDevice.TYPE_RASTER_SCREEN;
36 }
37
38 @Override
39 public String getIDstring()
40 {
41 Logger.ots().trace("HTMLDevice.getIDString()");
42 return "HTMLDevice";
43 }
44
45 @Override
46 public GraphicsConfiguration[] getConfigurations()
47 {
48 Logger.ots().trace("HTMLDevice.getConfiguration()");
49 return this.htmlGraphicsConfigurations;
50 }
51
52 @Override
53 public GraphicsConfiguration getDefaultConfiguration()
54 {
55 Logger.ots().trace("HTMLDevice.getDefaultConfiguration()");
56 return this.htmlGraphicsConfigurations[0];
57 }
58
59 }