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