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 public class HtmlGraphicsConfiguration extends GraphicsConfiguration
24 {
25
26 HtmlDevice htmlDevice;
27
28
29 AffineTransform identityTransform = new AffineTransform();
30
31
32 Rectangle bounds = new Rectangle(0, 0, 1920, 1080);
33
34
35
36
37 public HtmlGraphicsConfiguration()
38 {
39 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.<init>");
40 }
41
42
43 @Override
44 public GraphicsDevice getDevice()
45 {
46 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getDevice()");
47 return this.htmlDevice;
48 }
49
50
51
52
53
54
55 public void setDevice(final HtmlDevice htmlDevice)
56 {
57 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.setDevice()");
58 this.htmlDevice = htmlDevice;
59 }
60
61
62 @Override
63 public ColorModel getColorModel()
64 {
65 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getColorModel()");
66 return ColorModel.getRGBdefault();
67 }
68
69
70 @Override
71 public ColorModel getColorModel(int transparency)
72 {
73 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getColorModel()");
74 return ColorModel.getRGBdefault();
75 }
76
77
78 @Override
79 public AffineTransform getDefaultTransform()
80 {
81 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getDefaultTransform()");
82 return this.identityTransform;
83 }
84
85
86 @Override
87 public AffineTransform getNormalizingTransform()
88 {
89 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getNormalizingTransform()");
90 return this.identityTransform;
91 }
92
93
94 @Override
95 public Rectangle getBounds()
96 {
97 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getBounds()");
98 return this.bounds;
99 }
100
101 }