1 package nl.tudelft.simulation.dsol.web.animation;
2
3 import java.awt.GraphicsConfiguration;
4 import java.awt.GraphicsDevice;
5 import java.awt.Rectangle;
6 import java.awt.geom.AffineTransform;
7 import java.awt.image.ColorModel;
8
9 import org.djutils.logger.CategoryLogger;
10
11 import nl.tudelft.simulation.dsol.logger.Cat;
12
13
14
15
16
17
18
19
20
21
22
23
24 public class HTMLGraphicsConfiguration extends GraphicsConfiguration
25 {
26
27 HTMLDevice htmlDevice;
28
29
30 AffineTransform identityTransform = new AffineTransform();
31
32
33 Rectangle bounds = new Rectangle(0, 0, 1920, 1080);
34
35
36
37
38 public HTMLGraphicsConfiguration()
39 {
40 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.<init>");
41 }
42
43
44 @Override
45 public GraphicsDevice getDevice()
46 {
47 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getDevice()");
48 return this.htmlDevice;
49 }
50
51
52
53
54
55
56 public void setDevice(final HTMLDevice htmlDevice)
57 {
58 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.setDevice()");
59 this.htmlDevice = htmlDevice;
60 }
61
62
63 @Override
64 public ColorModel getColorModel()
65 {
66 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getColorModel()");
67 return ColorModel.getRGBdefault();
68 }
69
70
71 @Override
72 public ColorModel getColorModel(int transparency)
73 {
74 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getColorModel()");
75 return ColorModel.getRGBdefault();
76 }
77
78
79 @Override
80 public AffineTransform getDefaultTransform()
81 {
82 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getDefaultTransform()");
83 return this.identityTransform;
84 }
85
86
87 @Override
88 public AffineTransform getNormalizingTransform()
89 {
90 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getNormalizingTransform()");
91 return this.identityTransform;
92 }
93
94
95 @Override
96 public Rectangle getBounds()
97 {
98 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getBounds()");
99 return this.bounds;
100 }
101
102 }