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 @Override
43 public GraphicsDevice getDevice()
44 {
45 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getDevice()");
46 return this.htmlDevice;
47 }
48
49
50
51
52
53
54 public void setDevice(final HtmlDevice htmlDevice)
55 {
56 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.setDevice()");
57 this.htmlDevice = htmlDevice;
58 }
59
60 @Override
61 public ColorModel getColorModel()
62 {
63 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getColorModel()");
64 return ColorModel.getRGBdefault();
65 }
66
67 @Override
68 public ColorModel getColorModel(int transparency)
69 {
70 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getColorModel()");
71 return ColorModel.getRGBdefault();
72 }
73
74 @Override
75 public AffineTransform getDefaultTransform()
76 {
77 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getDefaultTransform()");
78 return this.identityTransform;
79 }
80
81 @Override
82 public AffineTransform getNormalizingTransform()
83 {
84 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getNormalizingTransform()");
85 return this.identityTransform;
86 }
87
88 @Override
89 public Rectangle getBounds()
90 {
91 CategoryLogger.filter(Cat.WEB).trace("HTMLGraphicsConfiguration.getBounds()");
92 return this.bounds;
93 }
94
95 }