1 38 package com.gargoylesoftware.htmlunit.javascript.host; 39 40 import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable; 41 42 55 public class Screen extends SimpleScriptable { 56 57 private static final long serialVersionUID = 7775024295042666245L; 58 59 private int left_; 60 private int top_; 61 private int width_; 62 private int height_; 63 private int colorDepth_; 64 private int bufferDepth_; 65 private int dpi_; 66 private boolean fontSmoothingEnabled_; 67 private int updateInterval_; 68 69 72 public Screen() { 73 left_ = 0; 74 top_ = 0; 75 width_ = 800; 76 height_ = 600; 77 colorDepth_ = 24; 78 bufferDepth_ = 24; 79 dpi_ = 96; 80 fontSmoothingEnabled_ = true; 81 updateInterval_ = 0; 82 } 83 84 88 public int jsxGet_availHeight() { 89 return height_; 90 } 91 92 96 public int jsxGet_availLeft() { 97 return left_; 98 } 99 100 104 public int jsxGet_availTop() { 105 return top_; 106 } 107 108 112 public int jsxGet_availWidth() { 113 return width_; 114 } 115 116 120 public int jsxGet_bufferDepth() { 121 return bufferDepth_; 122 } 123 124 128 public void jsxSet_bufferDepth(final int bufferDepth) { 129 bufferDepth_ = bufferDepth; 130 } 131 132 136 public int jsxGet_colorDepth() { 137 return colorDepth_; 138 } 139 140 144 public int jsxGet_deviceXDPI() { 145 return dpi_; 146 } 147 148 152 public int jsxGet_deviceYDPI() { 153 return dpi_; 154 } 155 156 160 public boolean jsxGet_fontSmoothingEnabled() { 161 return fontSmoothingEnabled_; 162 } 163 164 168 public int jsxGet_height() { 169 return height_; 170 } 171 172 176 public int jsxGet_left() { 177 return left_; 178 } 179 180 184 public void jsxSet_left(final int left) { 185 left_ = left; 186 } 187 188 192 public int jsxGet_logicalXDPI() { 193 return dpi_; 194 } 195 196 200 public int jsxGet_logicalYDPI() { 201 return dpi_; 202 } 203 204 208 public int jsxGet_pixelDepth() { 209 return colorDepth_; 210 } 211 212 216 public int jsxGet_top() { 217 return top_; 218 } 219 220 224 public void jsxSet_top(final int top) { 225 top_ = top; 226 } 227 228 232 public int jsxGet_updateInterval() { 233 return updateInterval_; 234 } 235 236 240 public void jsxSet_updateInterval(final int updateInterval) { 241 updateInterval_ = updateInterval; 242 } 243 244 248 public int jsxGet_width() { 249 return width_; 250 } 251 } 252 | Popular Tags |