001package Torello.Browser.BrowserAPI; 002 003import java.util.*; 004import javax.json.*; 005import javax.json.stream.*; 006import java.io.*; 007 008import java.lang.reflect.Method; 009import java.lang.reflect.Parameter; 010import java.util.function.Function; 011 012import Torello.Browser.BrowserEvent; 013import Torello.Browser.JavaScriptAPI.*; 014import Torello.Browser.helper.*; 015 016import Torello.Java.Additional.*; 017import Torello.Java.JSON.*; 018 019import static Torello.Java.JSON.JFlag.*; 020 021import Torello.Java.StrCmpr; 022import Torello.JavaDoc.StaticFunctional; 023import Torello.JavaDoc.JDHeaderBackgroundImg; 024import Torello.JavaDoc.Excuse; 025 026/** 027 * <SPAN CLASS=COPIEDJDK><B>This domain provides various functionality related to drawing atop the inspected page.</B></SPAN> 028 * 029 * <EMBED CLASS='external-html' DATA-FILE-ID=CODE_GEN_NOTE> 030 */ 031@StaticFunctional(Excused={"counter"}, Excuses={Excuse.CONFIGURATION}) 032@JDHeaderBackgroundImg(EmbedTagFileID="WOOD_PLANK_NOTE") 033public class Overlay 034{ 035 // ******************************************************************************************** 036 // ******************************************************************************************** 037 // Class Header Stuff 038 // ******************************************************************************************** 039 // ******************************************************************************************** 040 041 042 // No Pubic Constructors 043 private Overlay () { } 044 045 // These two Vector's are used by all the "Methods" exported by this class. java.lang.reflect 046 // is used to generate the JSON String's. It saves thousands of lines of Auto-Generated Code. 047 private static final Map<String, Vector<String>> parameterNames = new HashMap<>(); 048 private static final Map<String, Vector<Class<?>>> parameterTypes = new HashMap<>(); 049 050 // Some Methods do not take any parameters - for instance all the "enable()" and "disable()" 051 // I simply could not get ride of RAW-TYPES and UNCHECKED warnings... so there are now, 052 // offically, two empty-vectors. One for String's, and the other for Classes. 053 054 private static final Vector<String> EMPTY_VEC_STR = new Vector<>(); 055 private static final Vector<Class<?>> EMPTY_VEC_CLASS = new Vector<>(); 056 057 static 058 { 059 for (Method m : Overlay.class.getMethods()) 060 { 061 // This doesn't work! The parameter names are all "arg0" ... "argN" 062 // It works for java.lang.reflect.Field, BUT NOT java.lang.reflect.Parameter! 063 // 064 // Vector<String> parameterNamesList = new Vector<>(); -- NOPE! 065 066 Vector<Class<?>> parameterTypesList = new Vector<>(); 067 068 for (Parameter p : m.getParameters()) parameterTypesList.add(p.getType()); 069 070 parameterTypes.put( 071 m.getName(), 072 (parameterTypesList.size() > 0) ? parameterTypesList : EMPTY_VEC_CLASS 073 ); 074 } 075 } 076 077 static 078 { 079 Vector<String> v = null; 080 081 parameterNames.put("disable", EMPTY_VEC_STR); 082 083 parameterNames.put("enable", EMPTY_VEC_STR); 084 085 v = new Vector<String>(5); 086 parameterNames.put("getHighlightObjectForTest", v); 087 Collections.addAll(v, new String[] 088 { "nodeId", "includeDistance", "includeStyle", "colorFormat", "showAccessibilityInfo", }); 089 090 v = new Vector<String>(1); 091 parameterNames.put("getGridHighlightObjectsForTest", v); 092 Collections.addAll(v, new String[] 093 { "nodeIds", }); 094 095 v = new Vector<String>(1); 096 parameterNames.put("getSourceOrderHighlightObjectForTest", v); 097 Collections.addAll(v, new String[] 098 { "nodeId", }); 099 100 parameterNames.put("hideHighlight", EMPTY_VEC_STR); 101 102 v = new Vector<String>(3); 103 parameterNames.put("highlightFrame", v); 104 Collections.addAll(v, new String[] 105 { "frameId", "contentColor", "contentOutlineColor", }); 106 107 v = new Vector<String>(5); 108 parameterNames.put("highlightNode", v); 109 Collections.addAll(v, new String[] 110 { "highlightConfig", "nodeId", "backendNodeId", "objectId", "selector", }); 111 112 v = new Vector<String>(3); 113 parameterNames.put("highlightQuad", v); 114 Collections.addAll(v, new String[] 115 { "quad", "color", "outlineColor", }); 116 117 v = new Vector<String>(6); 118 parameterNames.put("highlightRect", v); 119 Collections.addAll(v, new String[] 120 { "x", "y", "width", "height", "color", "outlineColor", }); 121 122 v = new Vector<String>(4); 123 parameterNames.put("highlightSourceOrder", v); 124 Collections.addAll(v, new String[] 125 { "sourceOrderConfig", "nodeId", "backendNodeId", "objectId", }); 126 127 v = new Vector<String>(2); 128 parameterNames.put("setInspectMode", v); 129 Collections.addAll(v, new String[] 130 { "mode", "highlightConfig", }); 131 132 v = new Vector<String>(1); 133 parameterNames.put("setShowAdHighlights", v); 134 Collections.addAll(v, new String[] 135 { "show", }); 136 137 v = new Vector<String>(1); 138 parameterNames.put("setPausedInDebuggerMessage", v); 139 Collections.addAll(v, new String[] 140 { "message", }); 141 142 v = new Vector<String>(1); 143 parameterNames.put("setShowDebugBorders", v); 144 Collections.addAll(v, new String[] 145 { "show", }); 146 147 v = new Vector<String>(1); 148 parameterNames.put("setShowFPSCounter", v); 149 Collections.addAll(v, new String[] 150 { "show", }); 151 152 v = new Vector<String>(1); 153 parameterNames.put("setShowGridOverlays", v); 154 Collections.addAll(v, new String[] 155 { "gridNodeHighlightConfigs", }); 156 157 v = new Vector<String>(1); 158 parameterNames.put("setShowFlexOverlays", v); 159 Collections.addAll(v, new String[] 160 { "flexNodeHighlightConfigs", }); 161 162 v = new Vector<String>(1); 163 parameterNames.put("setShowScrollSnapOverlays", v); 164 Collections.addAll(v, new String[] 165 { "scrollSnapHighlightConfigs", }); 166 167 v = new Vector<String>(1); 168 parameterNames.put("setShowContainerQueryOverlays", v); 169 Collections.addAll(v, new String[] 170 { "containerQueryHighlightConfigs", }); 171 172 v = new Vector<String>(1); 173 parameterNames.put("setShowPaintRects", v); 174 Collections.addAll(v, new String[] 175 { "result", }); 176 177 v = new Vector<String>(1); 178 parameterNames.put("setShowLayoutShiftRegions", v); 179 Collections.addAll(v, new String[] 180 { "result", }); 181 182 v = new Vector<String>(1); 183 parameterNames.put("setShowScrollBottleneckRects", v); 184 Collections.addAll(v, new String[] 185 { "show", }); 186 187 v = new Vector<String>(1); 188 parameterNames.put("setShowHitTestBorders", v); 189 Collections.addAll(v, new String[] 190 { "show", }); 191 192 v = new Vector<String>(1); 193 parameterNames.put("setShowWebVitals", v); 194 Collections.addAll(v, new String[] 195 { "show", }); 196 197 v = new Vector<String>(1); 198 parameterNames.put("setShowViewportSizeOnResize", v); 199 Collections.addAll(v, new String[] 200 { "show", }); 201 202 v = new Vector<String>(1); 203 parameterNames.put("setShowHinge", v); 204 Collections.addAll(v, new String[] 205 { "hingeConfig", }); 206 207 v = new Vector<String>(1); 208 parameterNames.put("setShowIsolatedElements", v); 209 Collections.addAll(v, new String[] 210 { "isolatedElementHighlightConfigs", }); 211 212 v = new Vector<String>(1); 213 parameterNames.put("setShowWindowControlsOverlay", v); 214 Collections.addAll(v, new String[] 215 { "windowControlsOverlayConfig", }); 216 } 217 218 219 // ******************************************************************************************** 220 // ******************************************************************************************** 221 // Types - Static Inner Classes 222 // ******************************************************************************************** 223 // ******************************************************************************************** 224 225 /** <CODE>[No Description Provided by Google]</CODE> */ 226 public static final String[] ContrastAlgorithm = 227 { "aa", "aaa", "apca", }; 228 229 /** <CODE>[No Description Provided by Google]</CODE> */ 230 public static final String[] ColorFormat = 231 { "rgb", "hsl", "hwb", "hex", }; 232 233 /** <CODE>[No Description Provided by Google]</CODE> */ 234 public static final String[] InspectMode = 235 { "searchForNode", "searchForUAShadowDOM", "captureAreaScreenshot", "none", }; 236 237 /** Configuration data for drawing the source order of an elements children. */ 238 public static class SourceOrderConfig 239 extends BaseType 240 implements java.io.Serializable 241 { 242 /** For Object Serialization. java.io.Serializable */ 243 protected static final long serialVersionUID = 1; 244 245 public boolean[] optionals() 246 { return new boolean[] { false, false, }; } 247 248 /** the color to outline the given element in. */ 249 public final DOM.RGBA parentOutlineColor; 250 251 /** the color to outline the child elements in. */ 252 public final DOM.RGBA childOutlineColor; 253 254 /** 255 * Constructor 256 * 257 * @param parentOutlineColor the color to outline the given element in. 258 * 259 * @param childOutlineColor the color to outline the child elements in. 260 */ 261 public SourceOrderConfig(DOM.RGBA parentOutlineColor, DOM.RGBA childOutlineColor) 262 { 263 // Exception-Check(s) to ensure that if any parameters which are not declared as 264 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 265 266 if (parentOutlineColor == null) THROWS.throwNPE("parentOutlineColor"); 267 if (childOutlineColor == null) THROWS.throwNPE("childOutlineColor"); 268 269 this.parentOutlineColor = parentOutlineColor; 270 this.childOutlineColor = childOutlineColor; 271 } 272 273 /** 274 * JSON Object Constructor 275 * @param jo A Json-Object having data about an instance of {@code 'SourceOrderConfig'}. 276 */ 277 public SourceOrderConfig (JsonObject jo) 278 { 279 this.parentOutlineColor = ReadJSON.getObject(jo, "parentOutlineColor", DOM.RGBA.class, false, true); 280 this.childOutlineColor = ReadJSON.getObject(jo, "childOutlineColor", DOM.RGBA.class, false, true); 281 } 282 283 284 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 285 public boolean equals(Object other) 286 { 287 if (this == other) return true; 288 if (other == null) return false; 289 if (other.getClass() != this.getClass()) return false; 290 291 SourceOrderConfig o = (SourceOrderConfig) other; 292 293 return 294 Objects.equals(this.parentOutlineColor, o.parentOutlineColor) 295 && Objects.equals(this.childOutlineColor, o.childOutlineColor); 296 } 297 298 /** Generates a Hash-Code for {@code 'this'} instance */ 299 public int hashCode() 300 { 301 return 302 this.parentOutlineColor.hashCode() 303 + this.childOutlineColor.hashCode(); 304 } 305 } 306 307 /** Configuration data for the highlighting of Grid elements. */ 308 public static class GridHighlightConfig 309 extends BaseType 310 implements java.io.Serializable 311 { 312 /** For Object Serialization. java.io.Serializable */ 313 protected static final long serialVersionUID = 1; 314 315 public boolean[] optionals() 316 { return new boolean[] { true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, }; } 317 318 /** 319 * Whether the extension lines from grid cells to the rulers should be shown (default: false). 320 * <BR /><B CLASS=Opt>OPTIONAL</B> 321 */ 322 public final Boolean showGridExtensionLines; 323 324 /** 325 * Show Positive line number labels (default: false). 326 * <BR /><B CLASS=Opt>OPTIONAL</B> 327 */ 328 public final Boolean showPositiveLineNumbers; 329 330 /** 331 * Show Negative line number labels (default: false). 332 * <BR /><B CLASS=Opt>OPTIONAL</B> 333 */ 334 public final Boolean showNegativeLineNumbers; 335 336 /** 337 * Show area name labels (default: false). 338 * <BR /><B CLASS=Opt>OPTIONAL</B> 339 */ 340 public final Boolean showAreaNames; 341 342 /** 343 * Show line name labels (default: false). 344 * <BR /><B CLASS=Opt>OPTIONAL</B> 345 */ 346 public final Boolean showLineNames; 347 348 /** 349 * Show track size labels (default: false). 350 * <BR /><B CLASS=Opt>OPTIONAL</B> 351 */ 352 public final Boolean showTrackSizes; 353 354 /** 355 * The grid container border highlight color (default: transparent). 356 * <BR /><B CLASS=Opt>OPTIONAL</B> 357 */ 358 public final DOM.RGBA gridBorderColor; 359 360 /** 361 * The cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead. 362 * <BR /><B CLASS=Opt>OPTIONAL</B> 363 <B CLASS=Dep>DEPRECATED</B> 364 */ 365 public final DOM.RGBA cellBorderColor; 366 367 /** 368 * The row line color (default: transparent). 369 * <BR /><B CLASS=Opt>OPTIONAL</B> 370 */ 371 public final DOM.RGBA rowLineColor; 372 373 /** 374 * The column line color (default: transparent). 375 * <BR /><B CLASS=Opt>OPTIONAL</B> 376 */ 377 public final DOM.RGBA columnLineColor; 378 379 /** 380 * Whether the grid border is dashed (default: false). 381 * <BR /><B CLASS=Opt>OPTIONAL</B> 382 */ 383 public final Boolean gridBorderDash; 384 385 /** 386 * Whether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead. 387 * <BR /><B CLASS=Opt>OPTIONAL</B> 388 <B CLASS=Dep>DEPRECATED</B> 389 */ 390 public final Boolean cellBorderDash; 391 392 /** 393 * Whether row lines are dashed (default: false). 394 * <BR /><B CLASS=Opt>OPTIONAL</B> 395 */ 396 public final Boolean rowLineDash; 397 398 /** 399 * Whether column lines are dashed (default: false). 400 * <BR /><B CLASS=Opt>OPTIONAL</B> 401 */ 402 public final Boolean columnLineDash; 403 404 /** 405 * The row gap highlight fill color (default: transparent). 406 * <BR /><B CLASS=Opt>OPTIONAL</B> 407 */ 408 public final DOM.RGBA rowGapColor; 409 410 /** 411 * The row gap hatching fill color (default: transparent). 412 * <BR /><B CLASS=Opt>OPTIONAL</B> 413 */ 414 public final DOM.RGBA rowHatchColor; 415 416 /** 417 * The column gap highlight fill color (default: transparent). 418 * <BR /><B CLASS=Opt>OPTIONAL</B> 419 */ 420 public final DOM.RGBA columnGapColor; 421 422 /** 423 * The column gap hatching fill color (default: transparent). 424 * <BR /><B CLASS=Opt>OPTIONAL</B> 425 */ 426 public final DOM.RGBA columnHatchColor; 427 428 /** 429 * The named grid areas border color (Default: transparent). 430 * <BR /><B CLASS=Opt>OPTIONAL</B> 431 */ 432 public final DOM.RGBA areaBorderColor; 433 434 /** 435 * The grid container background color (Default: transparent). 436 * <BR /><B CLASS=Opt>OPTIONAL</B> 437 */ 438 public final DOM.RGBA gridBackgroundColor; 439 440 /** 441 * Constructor 442 * 443 * @param showGridExtensionLines Whether the extension lines from grid cells to the rulers should be shown (default: false). 444 * <BR /><B CLASS=Opt>OPTIONAL</B> 445 * 446 * @param showPositiveLineNumbers Show Positive line number labels (default: false). 447 * <BR /><B CLASS=Opt>OPTIONAL</B> 448 * 449 * @param showNegativeLineNumbers Show Negative line number labels (default: false). 450 * <BR /><B CLASS=Opt>OPTIONAL</B> 451 * 452 * @param showAreaNames Show area name labels (default: false). 453 * <BR /><B CLASS=Opt>OPTIONAL</B> 454 * 455 * @param showLineNames Show line name labels (default: false). 456 * <BR /><B CLASS=Opt>OPTIONAL</B> 457 * 458 * @param showTrackSizes Show track size labels (default: false). 459 * <BR /><B CLASS=Opt>OPTIONAL</B> 460 * 461 * @param gridBorderColor The grid container border highlight color (default: transparent). 462 * <BR /><B CLASS=Opt>OPTIONAL</B> 463 * 464 * @param cellBorderColor The cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead. 465 * <BR /><B CLASS=Opt>OPTIONAL</B><B CLASS=Dep>DEPRECATED</B> 466 * 467 * @param rowLineColor The row line color (default: transparent). 468 * <BR /><B CLASS=Opt>OPTIONAL</B> 469 * 470 * @param columnLineColor The column line color (default: transparent). 471 * <BR /><B CLASS=Opt>OPTIONAL</B> 472 * 473 * @param gridBorderDash Whether the grid border is dashed (default: false). 474 * <BR /><B CLASS=Opt>OPTIONAL</B> 475 * 476 * @param cellBorderDash Whether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead. 477 * <BR /><B CLASS=Opt>OPTIONAL</B><B CLASS=Dep>DEPRECATED</B> 478 * 479 * @param rowLineDash Whether row lines are dashed (default: false). 480 * <BR /><B CLASS=Opt>OPTIONAL</B> 481 * 482 * @param columnLineDash Whether column lines are dashed (default: false). 483 * <BR /><B CLASS=Opt>OPTIONAL</B> 484 * 485 * @param rowGapColor The row gap highlight fill color (default: transparent). 486 * <BR /><B CLASS=Opt>OPTIONAL</B> 487 * 488 * @param rowHatchColor The row gap hatching fill color (default: transparent). 489 * <BR /><B CLASS=Opt>OPTIONAL</B> 490 * 491 * @param columnGapColor The column gap highlight fill color (default: transparent). 492 * <BR /><B CLASS=Opt>OPTIONAL</B> 493 * 494 * @param columnHatchColor The column gap hatching fill color (default: transparent). 495 * <BR /><B CLASS=Opt>OPTIONAL</B> 496 * 497 * @param areaBorderColor The named grid areas border color (Default: transparent). 498 * <BR /><B CLASS=Opt>OPTIONAL</B> 499 * 500 * @param gridBackgroundColor The grid container background color (Default: transparent). 501 * <BR /><B CLASS=Opt>OPTIONAL</B> 502 */ 503 public GridHighlightConfig( 504 Boolean showGridExtensionLines, Boolean showPositiveLineNumbers, 505 Boolean showNegativeLineNumbers, Boolean showAreaNames, Boolean showLineNames, 506 Boolean showTrackSizes, DOM.RGBA gridBorderColor, DOM.RGBA cellBorderColor, 507 DOM.RGBA rowLineColor, DOM.RGBA columnLineColor, Boolean gridBorderDash, 508 Boolean cellBorderDash, Boolean rowLineDash, Boolean columnLineDash, 509 DOM.RGBA rowGapColor, DOM.RGBA rowHatchColor, DOM.RGBA columnGapColor, 510 DOM.RGBA columnHatchColor, DOM.RGBA areaBorderColor, DOM.RGBA gridBackgroundColor 511 ) 512 { 513 this.showGridExtensionLines = showGridExtensionLines; 514 this.showPositiveLineNumbers = showPositiveLineNumbers; 515 this.showNegativeLineNumbers = showNegativeLineNumbers; 516 this.showAreaNames = showAreaNames; 517 this.showLineNames = showLineNames; 518 this.showTrackSizes = showTrackSizes; 519 this.gridBorderColor = gridBorderColor; 520 this.cellBorderColor = cellBorderColor; 521 this.rowLineColor = rowLineColor; 522 this.columnLineColor = columnLineColor; 523 this.gridBorderDash = gridBorderDash; 524 this.cellBorderDash = cellBorderDash; 525 this.rowLineDash = rowLineDash; 526 this.columnLineDash = columnLineDash; 527 this.rowGapColor = rowGapColor; 528 this.rowHatchColor = rowHatchColor; 529 this.columnGapColor = columnGapColor; 530 this.columnHatchColor = columnHatchColor; 531 this.areaBorderColor = areaBorderColor; 532 this.gridBackgroundColor = gridBackgroundColor; 533 } 534 535 /** 536 * JSON Object Constructor 537 * @param jo A Json-Object having data about an instance of {@code 'GridHighlightConfig'}. 538 */ 539 public GridHighlightConfig (JsonObject jo) 540 { 541 this.showGridExtensionLines = ReadBoxedJSON.getBoolean(jo, "showGridExtensionLines", true); 542 this.showPositiveLineNumbers = ReadBoxedJSON.getBoolean(jo, "showPositiveLineNumbers", true); 543 this.showNegativeLineNumbers = ReadBoxedJSON.getBoolean(jo, "showNegativeLineNumbers", true); 544 this.showAreaNames = ReadBoxedJSON.getBoolean(jo, "showAreaNames", true); 545 this.showLineNames = ReadBoxedJSON.getBoolean(jo, "showLineNames", true); 546 this.showTrackSizes = ReadBoxedJSON.getBoolean(jo, "showTrackSizes", true); 547 this.gridBorderColor = ReadJSON.getObject(jo, "gridBorderColor", DOM.RGBA.class, true, false); 548 this.cellBorderColor = ReadJSON.getObject(jo, "cellBorderColor", DOM.RGBA.class, true, false); 549 this.rowLineColor = ReadJSON.getObject(jo, "rowLineColor", DOM.RGBA.class, true, false); 550 this.columnLineColor = ReadJSON.getObject(jo, "columnLineColor", DOM.RGBA.class, true, false); 551 this.gridBorderDash = ReadBoxedJSON.getBoolean(jo, "gridBorderDash", true); 552 this.cellBorderDash = ReadBoxedJSON.getBoolean(jo, "cellBorderDash", true); 553 this.rowLineDash = ReadBoxedJSON.getBoolean(jo, "rowLineDash", true); 554 this.columnLineDash = ReadBoxedJSON.getBoolean(jo, "columnLineDash", true); 555 this.rowGapColor = ReadJSON.getObject(jo, "rowGapColor", DOM.RGBA.class, true, false); 556 this.rowHatchColor = ReadJSON.getObject(jo, "rowHatchColor", DOM.RGBA.class, true, false); 557 this.columnGapColor = ReadJSON.getObject(jo, "columnGapColor", DOM.RGBA.class, true, false); 558 this.columnHatchColor = ReadJSON.getObject(jo, "columnHatchColor", DOM.RGBA.class, true, false); 559 this.areaBorderColor = ReadJSON.getObject(jo, "areaBorderColor", DOM.RGBA.class, true, false); 560 this.gridBackgroundColor = ReadJSON.getObject(jo, "gridBackgroundColor", DOM.RGBA.class, true, false); 561 } 562 563 564 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 565 public boolean equals(Object other) 566 { 567 if (this == other) return true; 568 if (other == null) return false; 569 if (other.getClass() != this.getClass()) return false; 570 571 GridHighlightConfig o = (GridHighlightConfig) other; 572 573 return 574 Objects.equals(this.showGridExtensionLines, o.showGridExtensionLines) 575 && Objects.equals(this.showPositiveLineNumbers, o.showPositiveLineNumbers) 576 && Objects.equals(this.showNegativeLineNumbers, o.showNegativeLineNumbers) 577 && Objects.equals(this.showAreaNames, o.showAreaNames) 578 && Objects.equals(this.showLineNames, o.showLineNames) 579 && Objects.equals(this.showTrackSizes, o.showTrackSizes) 580 && Objects.equals(this.gridBorderColor, o.gridBorderColor) 581 && Objects.equals(this.cellBorderColor, o.cellBorderColor) 582 && Objects.equals(this.rowLineColor, o.rowLineColor) 583 && Objects.equals(this.columnLineColor, o.columnLineColor) 584 && Objects.equals(this.gridBorderDash, o.gridBorderDash) 585 && Objects.equals(this.cellBorderDash, o.cellBorderDash) 586 && Objects.equals(this.rowLineDash, o.rowLineDash) 587 && Objects.equals(this.columnLineDash, o.columnLineDash) 588 && Objects.equals(this.rowGapColor, o.rowGapColor) 589 && Objects.equals(this.rowHatchColor, o.rowHatchColor) 590 && Objects.equals(this.columnGapColor, o.columnGapColor) 591 && Objects.equals(this.columnHatchColor, o.columnHatchColor) 592 && Objects.equals(this.areaBorderColor, o.areaBorderColor) 593 && Objects.equals(this.gridBackgroundColor, o.gridBackgroundColor); 594 } 595 596 /** Generates a Hash-Code for {@code 'this'} instance */ 597 public int hashCode() 598 { 599 return 600 Objects.hashCode(this.showGridExtensionLines) 601 + Objects.hashCode(this.showPositiveLineNumbers) 602 + Objects.hashCode(this.showNegativeLineNumbers) 603 + Objects.hashCode(this.showAreaNames) 604 + Objects.hashCode(this.showLineNames) 605 + Objects.hashCode(this.showTrackSizes) 606 + this.gridBorderColor.hashCode() 607 + this.cellBorderColor.hashCode() 608 + this.rowLineColor.hashCode() 609 + this.columnLineColor.hashCode() 610 + Objects.hashCode(this.gridBorderDash) 611 + Objects.hashCode(this.cellBorderDash) 612 + Objects.hashCode(this.rowLineDash) 613 + Objects.hashCode(this.columnLineDash) 614 + this.rowGapColor.hashCode() 615 + this.rowHatchColor.hashCode() 616 + this.columnGapColor.hashCode() 617 + this.columnHatchColor.hashCode() 618 + this.areaBorderColor.hashCode() 619 + this.gridBackgroundColor.hashCode(); 620 } 621 } 622 623 /** Configuration data for the highlighting of Flex container elements. */ 624 public static class FlexContainerHighlightConfig 625 extends BaseType 626 implements java.io.Serializable 627 { 628 /** For Object Serialization. java.io.Serializable */ 629 protected static final long serialVersionUID = 1; 630 631 public boolean[] optionals() 632 { return new boolean[] { true, true, true, true, true, true, true, true, }; } 633 634 /** 635 * The style of the container border 636 * <BR /><B CLASS=Opt>OPTIONAL</B> 637 */ 638 public final Overlay.LineStyle containerBorder; 639 640 /** 641 * The style of the separator between lines 642 * <BR /><B CLASS=Opt>OPTIONAL</B> 643 */ 644 public final Overlay.LineStyle lineSeparator; 645 646 /** 647 * The style of the separator between items 648 * <BR /><B CLASS=Opt>OPTIONAL</B> 649 */ 650 public final Overlay.LineStyle itemSeparator; 651 652 /** 653 * Style of content-distribution space on the main axis (justify-content). 654 * <BR /><B CLASS=Opt>OPTIONAL</B> 655 */ 656 public final Overlay.BoxStyle mainDistributedSpace; 657 658 /** 659 * Style of content-distribution space on the cross axis (align-content). 660 * <BR /><B CLASS=Opt>OPTIONAL</B> 661 */ 662 public final Overlay.BoxStyle crossDistributedSpace; 663 664 /** 665 * Style of empty space caused by row gaps (gap/row-gap). 666 * <BR /><B CLASS=Opt>OPTIONAL</B> 667 */ 668 public final Overlay.BoxStyle rowGapSpace; 669 670 /** 671 * Style of empty space caused by columns gaps (gap/column-gap). 672 * <BR /><B CLASS=Opt>OPTIONAL</B> 673 */ 674 public final Overlay.BoxStyle columnGapSpace; 675 676 /** 677 * Style of the self-alignment line (align-items). 678 * <BR /><B CLASS=Opt>OPTIONAL</B> 679 */ 680 public final Overlay.LineStyle crossAlignment; 681 682 /** 683 * Constructor 684 * 685 * @param containerBorder The style of the container border 686 * <BR /><B CLASS=Opt>OPTIONAL</B> 687 * 688 * @param lineSeparator The style of the separator between lines 689 * <BR /><B CLASS=Opt>OPTIONAL</B> 690 * 691 * @param itemSeparator The style of the separator between items 692 * <BR /><B CLASS=Opt>OPTIONAL</B> 693 * 694 * @param mainDistributedSpace Style of content-distribution space on the main axis (justify-content). 695 * <BR /><B CLASS=Opt>OPTIONAL</B> 696 * 697 * @param crossDistributedSpace Style of content-distribution space on the cross axis (align-content). 698 * <BR /><B CLASS=Opt>OPTIONAL</B> 699 * 700 * @param rowGapSpace Style of empty space caused by row gaps (gap/row-gap). 701 * <BR /><B CLASS=Opt>OPTIONAL</B> 702 * 703 * @param columnGapSpace Style of empty space caused by columns gaps (gap/column-gap). 704 * <BR /><B CLASS=Opt>OPTIONAL</B> 705 * 706 * @param crossAlignment Style of the self-alignment line (align-items). 707 * <BR /><B CLASS=Opt>OPTIONAL</B> 708 */ 709 public FlexContainerHighlightConfig( 710 Overlay.LineStyle containerBorder, Overlay.LineStyle lineSeparator, 711 Overlay.LineStyle itemSeparator, Overlay.BoxStyle mainDistributedSpace, 712 Overlay.BoxStyle crossDistributedSpace, Overlay.BoxStyle rowGapSpace, 713 Overlay.BoxStyle columnGapSpace, Overlay.LineStyle crossAlignment 714 ) 715 { 716 this.containerBorder = containerBorder; 717 this.lineSeparator = lineSeparator; 718 this.itemSeparator = itemSeparator; 719 this.mainDistributedSpace = mainDistributedSpace; 720 this.crossDistributedSpace = crossDistributedSpace; 721 this.rowGapSpace = rowGapSpace; 722 this.columnGapSpace = columnGapSpace; 723 this.crossAlignment = crossAlignment; 724 } 725 726 /** 727 * JSON Object Constructor 728 * @param jo A Json-Object having data about an instance of {@code 'FlexContainerHighlightConfig'}. 729 */ 730 public FlexContainerHighlightConfig (JsonObject jo) 731 { 732 this.containerBorder = ReadJSON.getObject(jo, "containerBorder", Overlay.LineStyle.class, true, false); 733 this.lineSeparator = ReadJSON.getObject(jo, "lineSeparator", Overlay.LineStyle.class, true, false); 734 this.itemSeparator = ReadJSON.getObject(jo, "itemSeparator", Overlay.LineStyle.class, true, false); 735 this.mainDistributedSpace = ReadJSON.getObject(jo, "mainDistributedSpace", Overlay.BoxStyle.class, true, false); 736 this.crossDistributedSpace = ReadJSON.getObject(jo, "crossDistributedSpace", Overlay.BoxStyle.class, true, false); 737 this.rowGapSpace = ReadJSON.getObject(jo, "rowGapSpace", Overlay.BoxStyle.class, true, false); 738 this.columnGapSpace = ReadJSON.getObject(jo, "columnGapSpace", Overlay.BoxStyle.class, true, false); 739 this.crossAlignment = ReadJSON.getObject(jo, "crossAlignment", Overlay.LineStyle.class, true, false); 740 } 741 742 743 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 744 public boolean equals(Object other) 745 { 746 if (this == other) return true; 747 if (other == null) return false; 748 if (other.getClass() != this.getClass()) return false; 749 750 FlexContainerHighlightConfig o = (FlexContainerHighlightConfig) other; 751 752 return 753 Objects.equals(this.containerBorder, o.containerBorder) 754 && Objects.equals(this.lineSeparator, o.lineSeparator) 755 && Objects.equals(this.itemSeparator, o.itemSeparator) 756 && Objects.equals(this.mainDistributedSpace, o.mainDistributedSpace) 757 && Objects.equals(this.crossDistributedSpace, o.crossDistributedSpace) 758 && Objects.equals(this.rowGapSpace, o.rowGapSpace) 759 && Objects.equals(this.columnGapSpace, o.columnGapSpace) 760 && Objects.equals(this.crossAlignment, o.crossAlignment); 761 } 762 763 /** Generates a Hash-Code for {@code 'this'} instance */ 764 public int hashCode() 765 { 766 return 767 this.containerBorder.hashCode() 768 + this.lineSeparator.hashCode() 769 + this.itemSeparator.hashCode() 770 + this.mainDistributedSpace.hashCode() 771 + this.crossDistributedSpace.hashCode() 772 + this.rowGapSpace.hashCode() 773 + this.columnGapSpace.hashCode() 774 + this.crossAlignment.hashCode(); 775 } 776 } 777 778 /** Configuration data for the highlighting of Flex item elements. */ 779 public static class FlexItemHighlightConfig 780 extends BaseType 781 implements java.io.Serializable 782 { 783 /** For Object Serialization. java.io.Serializable */ 784 protected static final long serialVersionUID = 1; 785 786 public boolean[] optionals() 787 { return new boolean[] { true, true, true, }; } 788 789 /** 790 * Style of the box representing the item's base size 791 * <BR /><B CLASS=Opt>OPTIONAL</B> 792 */ 793 public final Overlay.BoxStyle baseSizeBox; 794 795 /** 796 * Style of the border around the box representing the item's base size 797 * <BR /><B CLASS=Opt>OPTIONAL</B> 798 */ 799 public final Overlay.LineStyle baseSizeBorder; 800 801 /** 802 * Style of the arrow representing if the item grew or shrank 803 * <BR /><B CLASS=Opt>OPTIONAL</B> 804 */ 805 public final Overlay.LineStyle flexibilityArrow; 806 807 /** 808 * Constructor 809 * 810 * @param baseSizeBox Style of the box representing the item's base size 811 * <BR /><B CLASS=Opt>OPTIONAL</B> 812 * 813 * @param baseSizeBorder Style of the border around the box representing the item's base size 814 * <BR /><B CLASS=Opt>OPTIONAL</B> 815 * 816 * @param flexibilityArrow Style of the arrow representing if the item grew or shrank 817 * <BR /><B CLASS=Opt>OPTIONAL</B> 818 */ 819 public FlexItemHighlightConfig( 820 Overlay.BoxStyle baseSizeBox, Overlay.LineStyle baseSizeBorder, 821 Overlay.LineStyle flexibilityArrow 822 ) 823 { 824 this.baseSizeBox = baseSizeBox; 825 this.baseSizeBorder = baseSizeBorder; 826 this.flexibilityArrow = flexibilityArrow; 827 } 828 829 /** 830 * JSON Object Constructor 831 * @param jo A Json-Object having data about an instance of {@code 'FlexItemHighlightConfig'}. 832 */ 833 public FlexItemHighlightConfig (JsonObject jo) 834 { 835 this.baseSizeBox = ReadJSON.getObject(jo, "baseSizeBox", Overlay.BoxStyle.class, true, false); 836 this.baseSizeBorder = ReadJSON.getObject(jo, "baseSizeBorder", Overlay.LineStyle.class, true, false); 837 this.flexibilityArrow = ReadJSON.getObject(jo, "flexibilityArrow", Overlay.LineStyle.class, true, false); 838 } 839 840 841 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 842 public boolean equals(Object other) 843 { 844 if (this == other) return true; 845 if (other == null) return false; 846 if (other.getClass() != this.getClass()) return false; 847 848 FlexItemHighlightConfig o = (FlexItemHighlightConfig) other; 849 850 return 851 Objects.equals(this.baseSizeBox, o.baseSizeBox) 852 && Objects.equals(this.baseSizeBorder, o.baseSizeBorder) 853 && Objects.equals(this.flexibilityArrow, o.flexibilityArrow); 854 } 855 856 /** Generates a Hash-Code for {@code 'this'} instance */ 857 public int hashCode() 858 { 859 return 860 this.baseSizeBox.hashCode() 861 + this.baseSizeBorder.hashCode() 862 + this.flexibilityArrow.hashCode(); 863 } 864 } 865 866 /** Style information for drawing a line. */ 867 public static class LineStyle 868 extends BaseType 869 implements java.io.Serializable 870 { 871 /** For Object Serialization. java.io.Serializable */ 872 protected static final long serialVersionUID = 1; 873 874 public boolean[] optionals() 875 { return new boolean[] { true, true, }; } 876 877 /** 878 * The color of the line (default: transparent) 879 * <BR /><B CLASS=Opt>OPTIONAL</B> 880 */ 881 public final DOM.RGBA color; 882 883 /** 884 * The line pattern (default: solid) 885 * <BR /><B CLASS=Opt>OPTIONAL</B> 886 */ 887 public final String pattern; 888 889 /** 890 * Constructor 891 * 892 * @param color The color of the line (default: transparent) 893 * <BR /><B CLASS=Opt>OPTIONAL</B> 894 * 895 * @param pattern The line pattern (default: solid) 896 * <BR />Acceptable Values: ["dashed", "dotted"] 897 * <BR /><B CLASS=Opt>OPTIONAL</B> 898 */ 899 public LineStyle(DOM.RGBA color, String pattern) 900 { 901 // Exception-Check(s) to ensure that if any parameters which must adhere to a 902 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 903 904 THROWS.checkIAE( 905 "pattern", pattern, 906 "dashed", "dotted" 907 ); 908 909 this.color = color; 910 this.pattern = pattern; 911 } 912 913 /** 914 * JSON Object Constructor 915 * @param jo A Json-Object having data about an instance of {@code 'LineStyle'}. 916 */ 917 public LineStyle (JsonObject jo) 918 { 919 this.color = ReadJSON.getObject(jo, "color", DOM.RGBA.class, true, false); 920 this.pattern = ReadJSON.getString(jo, "pattern", true, false); 921 } 922 923 924 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 925 public boolean equals(Object other) 926 { 927 if (this == other) return true; 928 if (other == null) return false; 929 if (other.getClass() != this.getClass()) return false; 930 931 LineStyle o = (LineStyle) other; 932 933 return 934 Objects.equals(this.color, o.color) 935 && Objects.equals(this.pattern, o.pattern); 936 } 937 938 /** Generates a Hash-Code for {@code 'this'} instance */ 939 public int hashCode() 940 { 941 return 942 this.color.hashCode() 943 + Objects.hashCode(this.pattern); 944 } 945 } 946 947 /** Style information for drawing a box. */ 948 public static class BoxStyle 949 extends BaseType 950 implements java.io.Serializable 951 { 952 /** For Object Serialization. java.io.Serializable */ 953 protected static final long serialVersionUID = 1; 954 955 public boolean[] optionals() 956 { return new boolean[] { true, true, }; } 957 958 /** 959 * The background color for the box (default: transparent) 960 * <BR /><B CLASS=Opt>OPTIONAL</B> 961 */ 962 public final DOM.RGBA fillColor; 963 964 /** 965 * The hatching color for the box (default: transparent) 966 * <BR /><B CLASS=Opt>OPTIONAL</B> 967 */ 968 public final DOM.RGBA hatchColor; 969 970 /** 971 * Constructor 972 * 973 * @param fillColor The background color for the box (default: transparent) 974 * <BR /><B CLASS=Opt>OPTIONAL</B> 975 * 976 * @param hatchColor The hatching color for the box (default: transparent) 977 * <BR /><B CLASS=Opt>OPTIONAL</B> 978 */ 979 public BoxStyle(DOM.RGBA fillColor, DOM.RGBA hatchColor) 980 { 981 this.fillColor = fillColor; 982 this.hatchColor = hatchColor; 983 } 984 985 /** 986 * JSON Object Constructor 987 * @param jo A Json-Object having data about an instance of {@code 'BoxStyle'}. 988 */ 989 public BoxStyle (JsonObject jo) 990 { 991 this.fillColor = ReadJSON.getObject(jo, "fillColor", DOM.RGBA.class, true, false); 992 this.hatchColor = ReadJSON.getObject(jo, "hatchColor", DOM.RGBA.class, true, false); 993 } 994 995 996 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 997 public boolean equals(Object other) 998 { 999 if (this == other) return true; 1000 if (other == null) return false; 1001 if (other.getClass() != this.getClass()) return false; 1002 1003 BoxStyle o = (BoxStyle) other; 1004 1005 return 1006 Objects.equals(this.fillColor, o.fillColor) 1007 && Objects.equals(this.hatchColor, o.hatchColor); 1008 } 1009 1010 /** Generates a Hash-Code for {@code 'this'} instance */ 1011 public int hashCode() 1012 { 1013 return 1014 this.fillColor.hashCode() 1015 + this.hatchColor.hashCode(); 1016 } 1017 } 1018 1019 /** Configuration data for the highlighting of page elements. */ 1020 public static class HighlightConfig 1021 extends BaseType 1022 implements java.io.Serializable 1023 { 1024 /** For Object Serialization. java.io.Serializable */ 1025 protected static final long serialVersionUID = 1; 1026 1027 public boolean[] optionals() 1028 { return new boolean[] { true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, }; } 1029 1030 /** 1031 * Whether the node info tooltip should be shown (default: false). 1032 * <BR /><B CLASS=Opt>OPTIONAL</B> 1033 */ 1034 public final Boolean showInfo; 1035 1036 /** 1037 * Whether the node styles in the tooltip (default: false). 1038 * <BR /><B CLASS=Opt>OPTIONAL</B> 1039 */ 1040 public final Boolean showStyles; 1041 1042 /** 1043 * Whether the rulers should be shown (default: false). 1044 * <BR /><B CLASS=Opt>OPTIONAL</B> 1045 */ 1046 public final Boolean showRulers; 1047 1048 /** 1049 * Whether the a11y info should be shown (default: true). 1050 * <BR /><B CLASS=Opt>OPTIONAL</B> 1051 */ 1052 public final Boolean showAccessibilityInfo; 1053 1054 /** 1055 * Whether the extension lines from node to the rulers should be shown (default: false). 1056 * <BR /><B CLASS=Opt>OPTIONAL</B> 1057 */ 1058 public final Boolean showExtensionLines; 1059 1060 /** 1061 * The content box highlight fill color (default: transparent). 1062 * <BR /><B CLASS=Opt>OPTIONAL</B> 1063 */ 1064 public final DOM.RGBA contentColor; 1065 1066 /** 1067 * The padding highlight fill color (default: transparent). 1068 * <BR /><B CLASS=Opt>OPTIONAL</B> 1069 */ 1070 public final DOM.RGBA paddingColor; 1071 1072 /** 1073 * The border highlight fill color (default: transparent). 1074 * <BR /><B CLASS=Opt>OPTIONAL</B> 1075 */ 1076 public final DOM.RGBA borderColor; 1077 1078 /** 1079 * The margin highlight fill color (default: transparent). 1080 * <BR /><B CLASS=Opt>OPTIONAL</B> 1081 */ 1082 public final DOM.RGBA marginColor; 1083 1084 /** 1085 * The event target element highlight fill color (default: transparent). 1086 * <BR /><B CLASS=Opt>OPTIONAL</B> 1087 */ 1088 public final DOM.RGBA eventTargetColor; 1089 1090 /** 1091 * The shape outside fill color (default: transparent). 1092 * <BR /><B CLASS=Opt>OPTIONAL</B> 1093 */ 1094 public final DOM.RGBA shapeColor; 1095 1096 /** 1097 * The shape margin fill color (default: transparent). 1098 * <BR /><B CLASS=Opt>OPTIONAL</B> 1099 */ 1100 public final DOM.RGBA shapeMarginColor; 1101 1102 /** 1103 * The grid layout color (default: transparent). 1104 * <BR /><B CLASS=Opt>OPTIONAL</B> 1105 */ 1106 public final DOM.RGBA cssGridColor; 1107 1108 /** 1109 * The color format used to format color styles (default: hex). 1110 * <BR /><B CLASS=Opt>OPTIONAL</B> 1111 */ 1112 public final String colorFormat; 1113 1114 /** 1115 * The grid layout highlight configuration (default: all transparent). 1116 * <BR /><B CLASS=Opt>OPTIONAL</B> 1117 */ 1118 public final Overlay.GridHighlightConfig gridHighlightConfig; 1119 1120 /** 1121 * The flex container highlight configuration (default: all transparent). 1122 * <BR /><B CLASS=Opt>OPTIONAL</B> 1123 */ 1124 public final Overlay.FlexContainerHighlightConfig flexContainerHighlightConfig; 1125 1126 /** 1127 * The flex item highlight configuration (default: all transparent). 1128 * <BR /><B CLASS=Opt>OPTIONAL</B> 1129 */ 1130 public final Overlay.FlexItemHighlightConfig flexItemHighlightConfig; 1131 1132 /** 1133 * The contrast algorithm to use for the contrast ratio (default: aa). 1134 * <BR /><B CLASS=Opt>OPTIONAL</B> 1135 */ 1136 public final String contrastAlgorithm; 1137 1138 /** 1139 * The container query container highlight configuration (default: all transparent). 1140 * <BR /><B CLASS=Opt>OPTIONAL</B> 1141 */ 1142 public final Overlay.ContainerQueryContainerHighlightConfig containerQueryContainerHighlightConfig; 1143 1144 /** 1145 * Constructor 1146 * 1147 * @param showInfo Whether the node info tooltip should be shown (default: false). 1148 * <BR /><B CLASS=Opt>OPTIONAL</B> 1149 * 1150 * @param showStyles Whether the node styles in the tooltip (default: false). 1151 * <BR /><B CLASS=Opt>OPTIONAL</B> 1152 * 1153 * @param showRulers Whether the rulers should be shown (default: false). 1154 * <BR /><B CLASS=Opt>OPTIONAL</B> 1155 * 1156 * @param showAccessibilityInfo Whether the a11y info should be shown (default: true). 1157 * <BR /><B CLASS=Opt>OPTIONAL</B> 1158 * 1159 * @param showExtensionLines Whether the extension lines from node to the rulers should be shown (default: false). 1160 * <BR /><B CLASS=Opt>OPTIONAL</B> 1161 * 1162 * @param contentColor The content box highlight fill color (default: transparent). 1163 * <BR /><B CLASS=Opt>OPTIONAL</B> 1164 * 1165 * @param paddingColor The padding highlight fill color (default: transparent). 1166 * <BR /><B CLASS=Opt>OPTIONAL</B> 1167 * 1168 * @param borderColor The border highlight fill color (default: transparent). 1169 * <BR /><B CLASS=Opt>OPTIONAL</B> 1170 * 1171 * @param marginColor The margin highlight fill color (default: transparent). 1172 * <BR /><B CLASS=Opt>OPTIONAL</B> 1173 * 1174 * @param eventTargetColor The event target element highlight fill color (default: transparent). 1175 * <BR /><B CLASS=Opt>OPTIONAL</B> 1176 * 1177 * @param shapeColor The shape outside fill color (default: transparent). 1178 * <BR /><B CLASS=Opt>OPTIONAL</B> 1179 * 1180 * @param shapeMarginColor The shape margin fill color (default: transparent). 1181 * <BR /><B CLASS=Opt>OPTIONAL</B> 1182 * 1183 * @param cssGridColor The grid layout color (default: transparent). 1184 * <BR /><B CLASS=Opt>OPTIONAL</B> 1185 * 1186 * @param colorFormat The color format used to format color styles (default: hex). 1187 * <BR /><B CLASS=Opt>OPTIONAL</B> 1188 * 1189 * @param gridHighlightConfig The grid layout highlight configuration (default: all transparent). 1190 * <BR /><B CLASS=Opt>OPTIONAL</B> 1191 * 1192 * @param flexContainerHighlightConfig The flex container highlight configuration (default: all transparent). 1193 * <BR /><B CLASS=Opt>OPTIONAL</B> 1194 * 1195 * @param flexItemHighlightConfig The flex item highlight configuration (default: all transparent). 1196 * <BR /><B CLASS=Opt>OPTIONAL</B> 1197 * 1198 * @param contrastAlgorithm The contrast algorithm to use for the contrast ratio (default: aa). 1199 * <BR /><B CLASS=Opt>OPTIONAL</B> 1200 * 1201 * @param containerQueryContainerHighlightConfig The container query container highlight configuration (default: all transparent). 1202 * <BR /><B CLASS=Opt>OPTIONAL</B> 1203 */ 1204 public HighlightConfig( 1205 Boolean showInfo, Boolean showStyles, Boolean showRulers, 1206 Boolean showAccessibilityInfo, Boolean showExtensionLines, DOM.RGBA contentColor, 1207 DOM.RGBA paddingColor, DOM.RGBA borderColor, DOM.RGBA marginColor, 1208 DOM.RGBA eventTargetColor, DOM.RGBA shapeColor, DOM.RGBA shapeMarginColor, 1209 DOM.RGBA cssGridColor, String colorFormat, 1210 Overlay.GridHighlightConfig gridHighlightConfig, 1211 Overlay.FlexContainerHighlightConfig flexContainerHighlightConfig, 1212 Overlay.FlexItemHighlightConfig flexItemHighlightConfig, String contrastAlgorithm, 1213 Overlay.ContainerQueryContainerHighlightConfig containerQueryContainerHighlightConfig 1214 ) 1215 { 1216 // Exception-Check(s) to ensure that if any parameters which must adhere to a 1217 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 1218 1219 THROWS.checkIAE("colorFormat", colorFormat, "Overlay.ColorFormat", Overlay.ColorFormat); 1220 THROWS.checkIAE("contrastAlgorithm", contrastAlgorithm, "Overlay.ContrastAlgorithm", Overlay.ContrastAlgorithm); 1221 1222 this.showInfo = showInfo; 1223 this.showStyles = showStyles; 1224 this.showRulers = showRulers; 1225 this.showAccessibilityInfo = showAccessibilityInfo; 1226 this.showExtensionLines = showExtensionLines; 1227 this.contentColor = contentColor; 1228 this.paddingColor = paddingColor; 1229 this.borderColor = borderColor; 1230 this.marginColor = marginColor; 1231 this.eventTargetColor = eventTargetColor; 1232 this.shapeColor = shapeColor; 1233 this.shapeMarginColor = shapeMarginColor; 1234 this.cssGridColor = cssGridColor; 1235 this.colorFormat = colorFormat; 1236 this.gridHighlightConfig = gridHighlightConfig; 1237 this.flexContainerHighlightConfig = flexContainerHighlightConfig; 1238 this.flexItemHighlightConfig = flexItemHighlightConfig; 1239 this.contrastAlgorithm = contrastAlgorithm; 1240 this.containerQueryContainerHighlightConfig = containerQueryContainerHighlightConfig; 1241 } 1242 1243 /** 1244 * JSON Object Constructor 1245 * @param jo A Json-Object having data about an instance of {@code 'HighlightConfig'}. 1246 */ 1247 public HighlightConfig (JsonObject jo) 1248 { 1249 this.showInfo = ReadBoxedJSON.getBoolean(jo, "showInfo", true); 1250 this.showStyles = ReadBoxedJSON.getBoolean(jo, "showStyles", true); 1251 this.showRulers = ReadBoxedJSON.getBoolean(jo, "showRulers", true); 1252 this.showAccessibilityInfo = ReadBoxedJSON.getBoolean(jo, "showAccessibilityInfo", true); 1253 this.showExtensionLines = ReadBoxedJSON.getBoolean(jo, "showExtensionLines", true); 1254 this.contentColor = ReadJSON.getObject(jo, "contentColor", DOM.RGBA.class, true, false); 1255 this.paddingColor = ReadJSON.getObject(jo, "paddingColor", DOM.RGBA.class, true, false); 1256 this.borderColor = ReadJSON.getObject(jo, "borderColor", DOM.RGBA.class, true, false); 1257 this.marginColor = ReadJSON.getObject(jo, "marginColor", DOM.RGBA.class, true, false); 1258 this.eventTargetColor = ReadJSON.getObject(jo, "eventTargetColor", DOM.RGBA.class, true, false); 1259 this.shapeColor = ReadJSON.getObject(jo, "shapeColor", DOM.RGBA.class, true, false); 1260 this.shapeMarginColor = ReadJSON.getObject(jo, "shapeMarginColor", DOM.RGBA.class, true, false); 1261 this.cssGridColor = ReadJSON.getObject(jo, "cssGridColor", DOM.RGBA.class, true, false); 1262 this.colorFormat = ReadJSON.getString(jo, "colorFormat", true, false); 1263 this.gridHighlightConfig = ReadJSON.getObject(jo, "gridHighlightConfig", Overlay.GridHighlightConfig.class, true, false); 1264 this.flexContainerHighlightConfig = ReadJSON.getObject(jo, "flexContainerHighlightConfig", Overlay.FlexContainerHighlightConfig.class, true, false); 1265 this.flexItemHighlightConfig = ReadJSON.getObject(jo, "flexItemHighlightConfig", Overlay.FlexItemHighlightConfig.class, true, false); 1266 this.contrastAlgorithm = ReadJSON.getString(jo, "contrastAlgorithm", true, false); 1267 this.containerQueryContainerHighlightConfig = ReadJSON.getObject(jo, "containerQueryContainerHighlightConfig", Overlay.ContainerQueryContainerHighlightConfig.class, true, false); 1268 } 1269 1270 1271 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1272 public boolean equals(Object other) 1273 { 1274 if (this == other) return true; 1275 if (other == null) return false; 1276 if (other.getClass() != this.getClass()) return false; 1277 1278 HighlightConfig o = (HighlightConfig) other; 1279 1280 return 1281 Objects.equals(this.showInfo, o.showInfo) 1282 && Objects.equals(this.showStyles, o.showStyles) 1283 && Objects.equals(this.showRulers, o.showRulers) 1284 && Objects.equals(this.showAccessibilityInfo, o.showAccessibilityInfo) 1285 && Objects.equals(this.showExtensionLines, o.showExtensionLines) 1286 && Objects.equals(this.contentColor, o.contentColor) 1287 && Objects.equals(this.paddingColor, o.paddingColor) 1288 && Objects.equals(this.borderColor, o.borderColor) 1289 && Objects.equals(this.marginColor, o.marginColor) 1290 && Objects.equals(this.eventTargetColor, o.eventTargetColor) 1291 && Objects.equals(this.shapeColor, o.shapeColor) 1292 && Objects.equals(this.shapeMarginColor, o.shapeMarginColor) 1293 && Objects.equals(this.cssGridColor, o.cssGridColor) 1294 && Objects.equals(this.colorFormat, o.colorFormat) 1295 && Objects.equals(this.gridHighlightConfig, o.gridHighlightConfig) 1296 && Objects.equals(this.flexContainerHighlightConfig, o.flexContainerHighlightConfig) 1297 && Objects.equals(this.flexItemHighlightConfig, o.flexItemHighlightConfig) 1298 && Objects.equals(this.contrastAlgorithm, o.contrastAlgorithm) 1299 && Objects.equals(this.containerQueryContainerHighlightConfig, o.containerQueryContainerHighlightConfig); 1300 } 1301 1302 /** Generates a Hash-Code for {@code 'this'} instance */ 1303 public int hashCode() 1304 { 1305 return 1306 Objects.hashCode(this.showInfo) 1307 + Objects.hashCode(this.showStyles) 1308 + Objects.hashCode(this.showRulers) 1309 + Objects.hashCode(this.showAccessibilityInfo) 1310 + Objects.hashCode(this.showExtensionLines) 1311 + this.contentColor.hashCode() 1312 + this.paddingColor.hashCode() 1313 + this.borderColor.hashCode() 1314 + this.marginColor.hashCode() 1315 + this.eventTargetColor.hashCode() 1316 + this.shapeColor.hashCode() 1317 + this.shapeMarginColor.hashCode() 1318 + this.cssGridColor.hashCode() 1319 + Objects.hashCode(this.colorFormat) 1320 + this.gridHighlightConfig.hashCode() 1321 + this.flexContainerHighlightConfig.hashCode() 1322 + this.flexItemHighlightConfig.hashCode() 1323 + Objects.hashCode(this.contrastAlgorithm) 1324 + this.containerQueryContainerHighlightConfig.hashCode(); 1325 } 1326 } 1327 1328 /** Configurations for Persistent Grid Highlight */ 1329 public static class GridNodeHighlightConfig 1330 extends BaseType 1331 implements java.io.Serializable 1332 { 1333 /** For Object Serialization. java.io.Serializable */ 1334 protected static final long serialVersionUID = 1; 1335 1336 public boolean[] optionals() 1337 { return new boolean[] { false, false, }; } 1338 1339 /** A descriptor for the highlight appearance. */ 1340 public final Overlay.GridHighlightConfig gridHighlightConfig; 1341 1342 /** Identifier of the node to highlight. */ 1343 public final int nodeId; 1344 1345 /** 1346 * Constructor 1347 * 1348 * @param gridHighlightConfig A descriptor for the highlight appearance. 1349 * 1350 * @param nodeId Identifier of the node to highlight. 1351 */ 1352 public GridNodeHighlightConfig 1353 (Overlay.GridHighlightConfig gridHighlightConfig, int nodeId) 1354 { 1355 // Exception-Check(s) to ensure that if any parameters which are not declared as 1356 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1357 1358 if (gridHighlightConfig == null) THROWS.throwNPE("gridHighlightConfig"); 1359 1360 this.gridHighlightConfig = gridHighlightConfig; 1361 this.nodeId = nodeId; 1362 } 1363 1364 /** 1365 * JSON Object Constructor 1366 * @param jo A Json-Object having data about an instance of {@code 'GridNodeHighlightConfig'}. 1367 */ 1368 public GridNodeHighlightConfig (JsonObject jo) 1369 { 1370 this.gridHighlightConfig = ReadJSON.getObject(jo, "gridHighlightConfig", Overlay.GridHighlightConfig.class, false, true); 1371 this.nodeId = ReadPrimJSON.getInt(jo, "nodeId"); 1372 } 1373 1374 1375 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1376 public boolean equals(Object other) 1377 { 1378 if (this == other) return true; 1379 if (other == null) return false; 1380 if (other.getClass() != this.getClass()) return false; 1381 1382 GridNodeHighlightConfig o = (GridNodeHighlightConfig) other; 1383 1384 return 1385 Objects.equals(this.gridHighlightConfig, o.gridHighlightConfig) 1386 && Objects.equals(this.nodeId, o.nodeId); 1387 } 1388 1389 /** Generates a Hash-Code for {@code 'this'} instance */ 1390 public int hashCode() 1391 { 1392 return 1393 this.gridHighlightConfig.hashCode() 1394 + this.nodeId; 1395 } 1396 } 1397 1398 /** <CODE>[No Description Provided by Google]</CODE> */ 1399 public static class FlexNodeHighlightConfig 1400 extends BaseType 1401 implements java.io.Serializable 1402 { 1403 /** For Object Serialization. java.io.Serializable */ 1404 protected static final long serialVersionUID = 1; 1405 1406 public boolean[] optionals() 1407 { return new boolean[] { false, false, }; } 1408 1409 /** A descriptor for the highlight appearance of flex containers. */ 1410 public final Overlay.FlexContainerHighlightConfig flexContainerHighlightConfig; 1411 1412 /** Identifier of the node to highlight. */ 1413 public final int nodeId; 1414 1415 /** 1416 * Constructor 1417 * 1418 * @param flexContainerHighlightConfig A descriptor for the highlight appearance of flex containers. 1419 * 1420 * @param nodeId Identifier of the node to highlight. 1421 */ 1422 public FlexNodeHighlightConfig 1423 (Overlay.FlexContainerHighlightConfig flexContainerHighlightConfig, int nodeId) 1424 { 1425 // Exception-Check(s) to ensure that if any parameters which are not declared as 1426 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1427 1428 if (flexContainerHighlightConfig == null) THROWS.throwNPE("flexContainerHighlightConfig"); 1429 1430 this.flexContainerHighlightConfig = flexContainerHighlightConfig; 1431 this.nodeId = nodeId; 1432 } 1433 1434 /** 1435 * JSON Object Constructor 1436 * @param jo A Json-Object having data about an instance of {@code 'FlexNodeHighlightConfig'}. 1437 */ 1438 public FlexNodeHighlightConfig (JsonObject jo) 1439 { 1440 this.flexContainerHighlightConfig = ReadJSON.getObject(jo, "flexContainerHighlightConfig", Overlay.FlexContainerHighlightConfig.class, false, true); 1441 this.nodeId = ReadPrimJSON.getInt(jo, "nodeId"); 1442 } 1443 1444 1445 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1446 public boolean equals(Object other) 1447 { 1448 if (this == other) return true; 1449 if (other == null) return false; 1450 if (other.getClass() != this.getClass()) return false; 1451 1452 FlexNodeHighlightConfig o = (FlexNodeHighlightConfig) other; 1453 1454 return 1455 Objects.equals(this.flexContainerHighlightConfig, o.flexContainerHighlightConfig) 1456 && Objects.equals(this.nodeId, o.nodeId); 1457 } 1458 1459 /** Generates a Hash-Code for {@code 'this'} instance */ 1460 public int hashCode() 1461 { 1462 return 1463 this.flexContainerHighlightConfig.hashCode() 1464 + this.nodeId; 1465 } 1466 } 1467 1468 /** <CODE>[No Description Provided by Google]</CODE> */ 1469 public static class ScrollSnapContainerHighlightConfig 1470 extends BaseType 1471 implements java.io.Serializable 1472 { 1473 /** For Object Serialization. java.io.Serializable */ 1474 protected static final long serialVersionUID = 1; 1475 1476 public boolean[] optionals() 1477 { return new boolean[] { true, true, true, true, }; } 1478 1479 /** 1480 * The style of the snapport border (default: transparent) 1481 * <BR /><B CLASS=Opt>OPTIONAL</B> 1482 */ 1483 public final Overlay.LineStyle snapportBorder; 1484 1485 /** 1486 * The style of the snap area border (default: transparent) 1487 * <BR /><B CLASS=Opt>OPTIONAL</B> 1488 */ 1489 public final Overlay.LineStyle snapAreaBorder; 1490 1491 /** 1492 * The margin highlight fill color (default: transparent). 1493 * <BR /><B CLASS=Opt>OPTIONAL</B> 1494 */ 1495 public final DOM.RGBA scrollMarginColor; 1496 1497 /** 1498 * The padding highlight fill color (default: transparent). 1499 * <BR /><B CLASS=Opt>OPTIONAL</B> 1500 */ 1501 public final DOM.RGBA scrollPaddingColor; 1502 1503 /** 1504 * Constructor 1505 * 1506 * @param snapportBorder The style of the snapport border (default: transparent) 1507 * <BR /><B CLASS=Opt>OPTIONAL</B> 1508 * 1509 * @param snapAreaBorder The style of the snap area border (default: transparent) 1510 * <BR /><B CLASS=Opt>OPTIONAL</B> 1511 * 1512 * @param scrollMarginColor The margin highlight fill color (default: transparent). 1513 * <BR /><B CLASS=Opt>OPTIONAL</B> 1514 * 1515 * @param scrollPaddingColor The padding highlight fill color (default: transparent). 1516 * <BR /><B CLASS=Opt>OPTIONAL</B> 1517 */ 1518 public ScrollSnapContainerHighlightConfig( 1519 Overlay.LineStyle snapportBorder, Overlay.LineStyle snapAreaBorder, 1520 DOM.RGBA scrollMarginColor, DOM.RGBA scrollPaddingColor 1521 ) 1522 { 1523 this.snapportBorder = snapportBorder; 1524 this.snapAreaBorder = snapAreaBorder; 1525 this.scrollMarginColor = scrollMarginColor; 1526 this.scrollPaddingColor = scrollPaddingColor; 1527 } 1528 1529 /** 1530 * JSON Object Constructor 1531 * @param jo A Json-Object having data about an instance of {@code 'ScrollSnapContainerHighlightConfig'}. 1532 */ 1533 public ScrollSnapContainerHighlightConfig (JsonObject jo) 1534 { 1535 this.snapportBorder = ReadJSON.getObject(jo, "snapportBorder", Overlay.LineStyle.class, true, false); 1536 this.snapAreaBorder = ReadJSON.getObject(jo, "snapAreaBorder", Overlay.LineStyle.class, true, false); 1537 this.scrollMarginColor = ReadJSON.getObject(jo, "scrollMarginColor", DOM.RGBA.class, true, false); 1538 this.scrollPaddingColor = ReadJSON.getObject(jo, "scrollPaddingColor", DOM.RGBA.class, true, false); 1539 } 1540 1541 1542 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1543 public boolean equals(Object other) 1544 { 1545 if (this == other) return true; 1546 if (other == null) return false; 1547 if (other.getClass() != this.getClass()) return false; 1548 1549 ScrollSnapContainerHighlightConfig o = (ScrollSnapContainerHighlightConfig) other; 1550 1551 return 1552 Objects.equals(this.snapportBorder, o.snapportBorder) 1553 && Objects.equals(this.snapAreaBorder, o.snapAreaBorder) 1554 && Objects.equals(this.scrollMarginColor, o.scrollMarginColor) 1555 && Objects.equals(this.scrollPaddingColor, o.scrollPaddingColor); 1556 } 1557 1558 /** Generates a Hash-Code for {@code 'this'} instance */ 1559 public int hashCode() 1560 { 1561 return 1562 this.snapportBorder.hashCode() 1563 + this.snapAreaBorder.hashCode() 1564 + this.scrollMarginColor.hashCode() 1565 + this.scrollPaddingColor.hashCode(); 1566 } 1567 } 1568 1569 /** <CODE>[No Description Provided by Google]</CODE> */ 1570 public static class ScrollSnapHighlightConfig 1571 extends BaseType 1572 implements java.io.Serializable 1573 { 1574 /** For Object Serialization. java.io.Serializable */ 1575 protected static final long serialVersionUID = 1; 1576 1577 public boolean[] optionals() 1578 { return new boolean[] { false, false, }; } 1579 1580 /** A descriptor for the highlight appearance of scroll snap containers. */ 1581 public final Overlay.ScrollSnapContainerHighlightConfig scrollSnapContainerHighlightConfig; 1582 1583 /** Identifier of the node to highlight. */ 1584 public final int nodeId; 1585 1586 /** 1587 * Constructor 1588 * 1589 * @param scrollSnapContainerHighlightConfig A descriptor for the highlight appearance of scroll snap containers. 1590 * 1591 * @param nodeId Identifier of the node to highlight. 1592 */ 1593 public ScrollSnapHighlightConfig( 1594 Overlay.ScrollSnapContainerHighlightConfig scrollSnapContainerHighlightConfig, 1595 int nodeId 1596 ) 1597 { 1598 // Exception-Check(s) to ensure that if any parameters which are not declared as 1599 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1600 1601 if (scrollSnapContainerHighlightConfig == null) THROWS.throwNPE("scrollSnapContainerHighlightConfig"); 1602 1603 this.scrollSnapContainerHighlightConfig = scrollSnapContainerHighlightConfig; 1604 this.nodeId = nodeId; 1605 } 1606 1607 /** 1608 * JSON Object Constructor 1609 * @param jo A Json-Object having data about an instance of {@code 'ScrollSnapHighlightConfig'}. 1610 */ 1611 public ScrollSnapHighlightConfig (JsonObject jo) 1612 { 1613 this.scrollSnapContainerHighlightConfig = ReadJSON.getObject(jo, "scrollSnapContainerHighlightConfig", Overlay.ScrollSnapContainerHighlightConfig.class, false, true); 1614 this.nodeId = ReadPrimJSON.getInt(jo, "nodeId"); 1615 } 1616 1617 1618 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1619 public boolean equals(Object other) 1620 { 1621 if (this == other) return true; 1622 if (other == null) return false; 1623 if (other.getClass() != this.getClass()) return false; 1624 1625 ScrollSnapHighlightConfig o = (ScrollSnapHighlightConfig) other; 1626 1627 return 1628 Objects.equals(this.scrollSnapContainerHighlightConfig, o.scrollSnapContainerHighlightConfig) 1629 && Objects.equals(this.nodeId, o.nodeId); 1630 } 1631 1632 /** Generates a Hash-Code for {@code 'this'} instance */ 1633 public int hashCode() 1634 { 1635 return 1636 this.scrollSnapContainerHighlightConfig.hashCode() 1637 + this.nodeId; 1638 } 1639 } 1640 1641 /** Configuration for dual screen hinge */ 1642 public static class HingeConfig 1643 extends BaseType 1644 implements java.io.Serializable 1645 { 1646 /** For Object Serialization. java.io.Serializable */ 1647 protected static final long serialVersionUID = 1; 1648 1649 public boolean[] optionals() 1650 { return new boolean[] { false, true, true, }; } 1651 1652 /** A rectangle represent hinge */ 1653 public final DOM.Rect rect; 1654 1655 /** 1656 * The content box highlight fill color (default: a dark color). 1657 * <BR /><B CLASS=Opt>OPTIONAL</B> 1658 */ 1659 public final DOM.RGBA contentColor; 1660 1661 /** 1662 * The content box highlight outline color (default: transparent). 1663 * <BR /><B CLASS=Opt>OPTIONAL</B> 1664 */ 1665 public final DOM.RGBA outlineColor; 1666 1667 /** 1668 * Constructor 1669 * 1670 * @param rect A rectangle represent hinge 1671 * 1672 * @param contentColor The content box highlight fill color (default: a dark color). 1673 * <BR /><B CLASS=Opt>OPTIONAL</B> 1674 * 1675 * @param outlineColor The content box highlight outline color (default: transparent). 1676 * <BR /><B CLASS=Opt>OPTIONAL</B> 1677 */ 1678 public HingeConfig(DOM.Rect rect, DOM.RGBA contentColor, DOM.RGBA outlineColor) 1679 { 1680 // Exception-Check(s) to ensure that if any parameters which are not declared as 1681 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1682 1683 if (rect == null) THROWS.throwNPE("rect"); 1684 1685 this.rect = rect; 1686 this.contentColor = contentColor; 1687 this.outlineColor = outlineColor; 1688 } 1689 1690 /** 1691 * JSON Object Constructor 1692 * @param jo A Json-Object having data about an instance of {@code 'HingeConfig'}. 1693 */ 1694 public HingeConfig (JsonObject jo) 1695 { 1696 this.rect = ReadJSON.getObject(jo, "rect", DOM.Rect.class, false, true); 1697 this.contentColor = ReadJSON.getObject(jo, "contentColor", DOM.RGBA.class, true, false); 1698 this.outlineColor = ReadJSON.getObject(jo, "outlineColor", DOM.RGBA.class, true, false); 1699 } 1700 1701 1702 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1703 public boolean equals(Object other) 1704 { 1705 if (this == other) return true; 1706 if (other == null) return false; 1707 if (other.getClass() != this.getClass()) return false; 1708 1709 HingeConfig o = (HingeConfig) other; 1710 1711 return 1712 Objects.equals(this.rect, o.rect) 1713 && Objects.equals(this.contentColor, o.contentColor) 1714 && Objects.equals(this.outlineColor, o.outlineColor); 1715 } 1716 1717 /** Generates a Hash-Code for {@code 'this'} instance */ 1718 public int hashCode() 1719 { 1720 return 1721 this.rect.hashCode() 1722 + this.contentColor.hashCode() 1723 + this.outlineColor.hashCode(); 1724 } 1725 } 1726 1727 /** Configuration for Window Controls Overlay */ 1728 public static class WindowControlsOverlayConfig 1729 extends BaseType 1730 implements java.io.Serializable 1731 { 1732 /** For Object Serialization. java.io.Serializable */ 1733 protected static final long serialVersionUID = 1; 1734 1735 public boolean[] optionals() 1736 { return new boolean[] { false, false, false, }; } 1737 1738 /** Whether the title bar CSS should be shown when emulating the Window Controls Overlay. */ 1739 public final boolean showCSS; 1740 1741 /** Selected platforms to show the overlay. */ 1742 public final String selectedPlatform; 1743 1744 /** The theme color defined in app manifest. */ 1745 public final String themeColor; 1746 1747 /** 1748 * Constructor 1749 * 1750 * @param showCSS Whether the title bar CSS should be shown when emulating the Window Controls Overlay. 1751 * 1752 * @param selectedPlatform Selected platforms to show the overlay. 1753 * 1754 * @param themeColor The theme color defined in app manifest. 1755 */ 1756 public WindowControlsOverlayConfig 1757 (boolean showCSS, String selectedPlatform, String themeColor) 1758 { 1759 // Exception-Check(s) to ensure that if any parameters which are not declared as 1760 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1761 1762 if (selectedPlatform == null) THROWS.throwNPE("selectedPlatform"); 1763 if (themeColor == null) THROWS.throwNPE("themeColor"); 1764 1765 this.showCSS = showCSS; 1766 this.selectedPlatform = selectedPlatform; 1767 this.themeColor = themeColor; 1768 } 1769 1770 /** 1771 * JSON Object Constructor 1772 * @param jo A Json-Object having data about an instance of {@code 'WindowControlsOverlayConfig'}. 1773 */ 1774 public WindowControlsOverlayConfig (JsonObject jo) 1775 { 1776 this.showCSS = ReadPrimJSON.getBoolean(jo, "showCSS"); 1777 this.selectedPlatform = ReadJSON.getString(jo, "selectedPlatform", false, true); 1778 this.themeColor = ReadJSON.getString(jo, "themeColor", false, true); 1779 } 1780 1781 1782 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1783 public boolean equals(Object other) 1784 { 1785 if (this == other) return true; 1786 if (other == null) return false; 1787 if (other.getClass() != this.getClass()) return false; 1788 1789 WindowControlsOverlayConfig o = (WindowControlsOverlayConfig) other; 1790 1791 return 1792 (this.showCSS == o.showCSS) 1793 && Objects.equals(this.selectedPlatform, o.selectedPlatform) 1794 && Objects.equals(this.themeColor, o.themeColor); 1795 } 1796 1797 /** Generates a Hash-Code for {@code 'this'} instance */ 1798 public int hashCode() 1799 { 1800 return 1801 (this.showCSS ? 1 : 0) 1802 + Objects.hashCode(this.selectedPlatform) 1803 + Objects.hashCode(this.themeColor); 1804 } 1805 } 1806 1807 /** <CODE>[No Description Provided by Google]</CODE> */ 1808 public static class ContainerQueryHighlightConfig 1809 extends BaseType 1810 implements java.io.Serializable 1811 { 1812 /** For Object Serialization. java.io.Serializable */ 1813 protected static final long serialVersionUID = 1; 1814 1815 public boolean[] optionals() 1816 { return new boolean[] { false, false, }; } 1817 1818 /** A descriptor for the highlight appearance of container query containers. */ 1819 public final Overlay.ContainerQueryContainerHighlightConfig containerQueryContainerHighlightConfig; 1820 1821 /** Identifier of the container node to highlight. */ 1822 public final int nodeId; 1823 1824 /** 1825 * Constructor 1826 * 1827 * @param containerQueryContainerHighlightConfig A descriptor for the highlight appearance of container query containers. 1828 * 1829 * @param nodeId Identifier of the container node to highlight. 1830 */ 1831 public ContainerQueryHighlightConfig( 1832 1833 Overlay.ContainerQueryContainerHighlightConfig containerQueryContainerHighlightConfig, 1834 int nodeId 1835 ) 1836 { 1837 // Exception-Check(s) to ensure that if any parameters which are not declared as 1838 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1839 1840 if (containerQueryContainerHighlightConfig == null) THROWS.throwNPE("containerQueryContainerHighlightConfig"); 1841 1842 this.containerQueryContainerHighlightConfig = containerQueryContainerHighlightConfig; 1843 this.nodeId = nodeId; 1844 } 1845 1846 /** 1847 * JSON Object Constructor 1848 * @param jo A Json-Object having data about an instance of {@code 'ContainerQueryHighlightConfig'}. 1849 */ 1850 public ContainerQueryHighlightConfig (JsonObject jo) 1851 { 1852 this.containerQueryContainerHighlightConfig = ReadJSON.getObject(jo, "containerQueryContainerHighlightConfig", Overlay.ContainerQueryContainerHighlightConfig.class, false, true); 1853 this.nodeId = ReadPrimJSON.getInt(jo, "nodeId"); 1854 } 1855 1856 1857 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1858 public boolean equals(Object other) 1859 { 1860 if (this == other) return true; 1861 if (other == null) return false; 1862 if (other.getClass() != this.getClass()) return false; 1863 1864 ContainerQueryHighlightConfig o = (ContainerQueryHighlightConfig) other; 1865 1866 return 1867 Objects.equals(this.containerQueryContainerHighlightConfig, o.containerQueryContainerHighlightConfig) 1868 && Objects.equals(this.nodeId, o.nodeId); 1869 } 1870 1871 /** Generates a Hash-Code for {@code 'this'} instance */ 1872 public int hashCode() 1873 { 1874 return 1875 this.containerQueryContainerHighlightConfig.hashCode() 1876 + this.nodeId; 1877 } 1878 } 1879 1880 /** <CODE>[No Description Provided by Google]</CODE> */ 1881 public static class ContainerQueryContainerHighlightConfig 1882 extends BaseType 1883 implements java.io.Serializable 1884 { 1885 /** For Object Serialization. java.io.Serializable */ 1886 protected static final long serialVersionUID = 1; 1887 1888 public boolean[] optionals() 1889 { return new boolean[] { true, true, }; } 1890 1891 /** 1892 * The style of the container border. 1893 * <BR /><B CLASS=Opt>OPTIONAL</B> 1894 */ 1895 public final Overlay.LineStyle containerBorder; 1896 1897 /** 1898 * The style of the descendants' borders. 1899 * <BR /><B CLASS=Opt>OPTIONAL</B> 1900 */ 1901 public final Overlay.LineStyle descendantBorder; 1902 1903 /** 1904 * Constructor 1905 * 1906 * @param containerBorder The style of the container border. 1907 * <BR /><B CLASS=Opt>OPTIONAL</B> 1908 * 1909 * @param descendantBorder The style of the descendants' borders. 1910 * <BR /><B CLASS=Opt>OPTIONAL</B> 1911 */ 1912 public ContainerQueryContainerHighlightConfig 1913 (Overlay.LineStyle containerBorder, Overlay.LineStyle descendantBorder) 1914 { 1915 this.containerBorder = containerBorder; 1916 this.descendantBorder = descendantBorder; 1917 } 1918 1919 /** 1920 * JSON Object Constructor 1921 * @param jo A Json-Object having data about an instance of {@code 'ContainerQueryContainerHighlightConfig'}. 1922 */ 1923 public ContainerQueryContainerHighlightConfig (JsonObject jo) 1924 { 1925 this.containerBorder = ReadJSON.getObject(jo, "containerBorder", Overlay.LineStyle.class, true, false); 1926 this.descendantBorder = ReadJSON.getObject(jo, "descendantBorder", Overlay.LineStyle.class, true, false); 1927 } 1928 1929 1930 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1931 public boolean equals(Object other) 1932 { 1933 if (this == other) return true; 1934 if (other == null) return false; 1935 if (other.getClass() != this.getClass()) return false; 1936 1937 ContainerQueryContainerHighlightConfig o = (ContainerQueryContainerHighlightConfig) other; 1938 1939 return 1940 Objects.equals(this.containerBorder, o.containerBorder) 1941 && Objects.equals(this.descendantBorder, o.descendantBorder); 1942 } 1943 1944 /** Generates a Hash-Code for {@code 'this'} instance */ 1945 public int hashCode() 1946 { 1947 return 1948 this.containerBorder.hashCode() 1949 + this.descendantBorder.hashCode(); 1950 } 1951 } 1952 1953 /** <CODE>[No Description Provided by Google]</CODE> */ 1954 public static class IsolatedElementHighlightConfig 1955 extends BaseType 1956 implements java.io.Serializable 1957 { 1958 /** For Object Serialization. java.io.Serializable */ 1959 protected static final long serialVersionUID = 1; 1960 1961 public boolean[] optionals() 1962 { return new boolean[] { false, false, }; } 1963 1964 /** A descriptor for the highlight appearance of an element in isolation mode. */ 1965 public final Overlay.IsolationModeHighlightConfig isolationModeHighlightConfig; 1966 1967 /** Identifier of the isolated element to highlight. */ 1968 public final int nodeId; 1969 1970 /** 1971 * Constructor 1972 * 1973 * @param isolationModeHighlightConfig A descriptor for the highlight appearance of an element in isolation mode. 1974 * 1975 * @param nodeId Identifier of the isolated element to highlight. 1976 */ 1977 public IsolatedElementHighlightConfig 1978 (Overlay.IsolationModeHighlightConfig isolationModeHighlightConfig, int nodeId) 1979 { 1980 // Exception-Check(s) to ensure that if any parameters which are not declared as 1981 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1982 1983 if (isolationModeHighlightConfig == null) THROWS.throwNPE("isolationModeHighlightConfig"); 1984 1985 this.isolationModeHighlightConfig = isolationModeHighlightConfig; 1986 this.nodeId = nodeId; 1987 } 1988 1989 /** 1990 * JSON Object Constructor 1991 * @param jo A Json-Object having data about an instance of {@code 'IsolatedElementHighlightConfig'}. 1992 */ 1993 public IsolatedElementHighlightConfig (JsonObject jo) 1994 { 1995 this.isolationModeHighlightConfig = ReadJSON.getObject(jo, "isolationModeHighlightConfig", Overlay.IsolationModeHighlightConfig.class, false, true); 1996 this.nodeId = ReadPrimJSON.getInt(jo, "nodeId"); 1997 } 1998 1999 2000 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2001 public boolean equals(Object other) 2002 { 2003 if (this == other) return true; 2004 if (other == null) return false; 2005 if (other.getClass() != this.getClass()) return false; 2006 2007 IsolatedElementHighlightConfig o = (IsolatedElementHighlightConfig) other; 2008 2009 return 2010 Objects.equals(this.isolationModeHighlightConfig, o.isolationModeHighlightConfig) 2011 && Objects.equals(this.nodeId, o.nodeId); 2012 } 2013 2014 /** Generates a Hash-Code for {@code 'this'} instance */ 2015 public int hashCode() 2016 { 2017 return 2018 this.isolationModeHighlightConfig.hashCode() 2019 + this.nodeId; 2020 } 2021 } 2022 2023 /** <CODE>[No Description Provided by Google]</CODE> */ 2024 public static class IsolationModeHighlightConfig 2025 extends BaseType 2026 implements java.io.Serializable 2027 { 2028 /** For Object Serialization. java.io.Serializable */ 2029 protected static final long serialVersionUID = 1; 2030 2031 public boolean[] optionals() 2032 { return new boolean[] { true, true, true, }; } 2033 2034 /** 2035 * The fill color of the resizers (default: transparent). 2036 * <BR /><B CLASS=Opt>OPTIONAL</B> 2037 */ 2038 public final DOM.RGBA resizerColor; 2039 2040 /** 2041 * The fill color for resizer handles (default: transparent). 2042 * <BR /><B CLASS=Opt>OPTIONAL</B> 2043 */ 2044 public final DOM.RGBA resizerHandleColor; 2045 2046 /** 2047 * The fill color for the mask covering non-isolated elements (default: transparent). 2048 * <BR /><B CLASS=Opt>OPTIONAL</B> 2049 */ 2050 public final DOM.RGBA maskColor; 2051 2052 /** 2053 * Constructor 2054 * 2055 * @param resizerColor The fill color of the resizers (default: transparent). 2056 * <BR /><B CLASS=Opt>OPTIONAL</B> 2057 * 2058 * @param resizerHandleColor The fill color for resizer handles (default: transparent). 2059 * <BR /><B CLASS=Opt>OPTIONAL</B> 2060 * 2061 * @param maskColor The fill color for the mask covering non-isolated elements (default: transparent). 2062 * <BR /><B CLASS=Opt>OPTIONAL</B> 2063 */ 2064 public IsolationModeHighlightConfig 2065 (DOM.RGBA resizerColor, DOM.RGBA resizerHandleColor, DOM.RGBA maskColor) 2066 { 2067 this.resizerColor = resizerColor; 2068 this.resizerHandleColor = resizerHandleColor; 2069 this.maskColor = maskColor; 2070 } 2071 2072 /** 2073 * JSON Object Constructor 2074 * @param jo A Json-Object having data about an instance of {@code 'IsolationModeHighlightConfig'}. 2075 */ 2076 public IsolationModeHighlightConfig (JsonObject jo) 2077 { 2078 this.resizerColor = ReadJSON.getObject(jo, "resizerColor", DOM.RGBA.class, true, false); 2079 this.resizerHandleColor = ReadJSON.getObject(jo, "resizerHandleColor", DOM.RGBA.class, true, false); 2080 this.maskColor = ReadJSON.getObject(jo, "maskColor", DOM.RGBA.class, true, false); 2081 } 2082 2083 2084 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2085 public boolean equals(Object other) 2086 { 2087 if (this == other) return true; 2088 if (other == null) return false; 2089 if (other.getClass() != this.getClass()) return false; 2090 2091 IsolationModeHighlightConfig o = (IsolationModeHighlightConfig) other; 2092 2093 return 2094 Objects.equals(this.resizerColor, o.resizerColor) 2095 && Objects.equals(this.resizerHandleColor, o.resizerHandleColor) 2096 && Objects.equals(this.maskColor, o.maskColor); 2097 } 2098 2099 /** Generates a Hash-Code for {@code 'this'} instance */ 2100 public int hashCode() 2101 { 2102 return 2103 this.resizerColor.hashCode() 2104 + this.resizerHandleColor.hashCode() 2105 + this.maskColor.hashCode(); 2106 } 2107 } 2108 2109 /** 2110 * Fired when user cancels the inspect mode. 2111 * 2112 * <BR /><BR />This is Marker-Event. Marker-Event's are Events that do not posses 2113 * any data, fields or state. When they are fired, only the event name is supplied. 2114 */ 2115 public static class inspectModeCanceled 2116 extends BrowserEvent 2117 implements java.io.Serializable 2118 { 2119 /** For Object Serialization. java.io.Serializable */ 2120 protected static final long serialVersionUID = 1; 2121 2122 public boolean[] optionals() { return new boolean[0]; } 2123 2124 /** JSON Object Constructor */ 2125 public inspectModeCanceled(JsonObject jo) 2126 { super("Overlay", "inspectModeCanceled", 0); } 2127 2128 @Override 2129 public String toString() { return "Overlay.inspectModeCanceled Marker Event\n"; } 2130 } 2131 2132 /** 2133 * Fired when the node should be inspected. This happens after call to {@code setInspectMode} or when 2134 * user manually inspects an element. 2135 */ 2136 public static class inspectNodeRequested 2137 extends BrowserEvent 2138 implements java.io.Serializable 2139 { 2140 /** For Object Serialization. java.io.Serializable */ 2141 protected static final long serialVersionUID = 1; 2142 2143 public boolean[] optionals() 2144 { return new boolean[] { false, }; } 2145 2146 /** Id of the node to inspect. */ 2147 public final int backendNodeId; 2148 2149 /** 2150 * Constructor 2151 * 2152 * @param backendNodeId Id of the node to inspect. 2153 */ 2154 public inspectNodeRequested(int backendNodeId) 2155 { 2156 super("Overlay", "inspectNodeRequested", 1); 2157 2158 this.backendNodeId = backendNodeId; 2159 } 2160 2161 /** 2162 * JSON Object Constructor 2163 * @param jo A Json-Object having data about an instance of {@code 'inspectNodeRequested'}. 2164 */ 2165 public inspectNodeRequested (JsonObject jo) 2166 { 2167 super("Overlay", "inspectNodeRequested", 1); 2168 2169 this.backendNodeId = ReadPrimJSON.getInt(jo, "backendNodeId"); 2170 } 2171 2172 2173 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2174 public boolean equals(Object other) 2175 { 2176 if (this == other) return true; 2177 if (other == null) return false; 2178 if (other.getClass() != this.getClass()) return false; 2179 2180 inspectNodeRequested o = (inspectNodeRequested) other; 2181 2182 return 2183 Objects.equals(this.backendNodeId, o.backendNodeId); 2184 } 2185 2186 /** Generates a Hash-Code for {@code 'this'} instance */ 2187 public int hashCode() 2188 { 2189 return 2190 this.backendNodeId; 2191 } 2192 } 2193 2194 /** Fired when the node should be highlighted. This happens after call to {@code setInspectMode}. */ 2195 public static class nodeHighlightRequested 2196 extends BrowserEvent 2197 implements java.io.Serializable 2198 { 2199 /** For Object Serialization. java.io.Serializable */ 2200 protected static final long serialVersionUID = 1; 2201 2202 public boolean[] optionals() 2203 { return new boolean[] { false, }; } 2204 2205 /** <CODE>[No Description Provided by Google]</CODE> */ 2206 public final int nodeId; 2207 2208 /** 2209 * Constructor 2210 * 2211 * @param nodeId - 2212 */ 2213 public nodeHighlightRequested(int nodeId) 2214 { 2215 super("Overlay", "nodeHighlightRequested", 1); 2216 2217 this.nodeId = nodeId; 2218 } 2219 2220 /** 2221 * JSON Object Constructor 2222 * @param jo A Json-Object having data about an instance of {@code 'nodeHighlightRequested'}. 2223 */ 2224 public nodeHighlightRequested (JsonObject jo) 2225 { 2226 super("Overlay", "nodeHighlightRequested", 1); 2227 2228 this.nodeId = ReadPrimJSON.getInt(jo, "nodeId"); 2229 } 2230 2231 2232 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2233 public boolean equals(Object other) 2234 { 2235 if (this == other) return true; 2236 if (other == null) return false; 2237 if (other.getClass() != this.getClass()) return false; 2238 2239 nodeHighlightRequested o = (nodeHighlightRequested) other; 2240 2241 return 2242 Objects.equals(this.nodeId, o.nodeId); 2243 } 2244 2245 /** Generates a Hash-Code for {@code 'this'} instance */ 2246 public int hashCode() 2247 { 2248 return 2249 this.nodeId; 2250 } 2251 } 2252 2253 /** Fired when user asks to capture screenshot of some area on the page. */ 2254 public static class screenshotRequested 2255 extends BrowserEvent 2256 implements java.io.Serializable 2257 { 2258 /** For Object Serialization. java.io.Serializable */ 2259 protected static final long serialVersionUID = 1; 2260 2261 public boolean[] optionals() 2262 { return new boolean[] { false, }; } 2263 2264 /** Viewport to capture, in device independent pixels (dip). */ 2265 public final Page.Viewport viewport; 2266 2267 /** 2268 * Constructor 2269 * 2270 * @param viewport Viewport to capture, in device independent pixels (dip). 2271 */ 2272 public screenshotRequested(Page.Viewport viewport) 2273 { 2274 super("Overlay", "screenshotRequested", 1); 2275 2276 // Exception-Check(s) to ensure that if any parameters which are not declared as 2277 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2278 2279 if (viewport == null) THROWS.throwNPE("viewport"); 2280 2281 this.viewport = viewport; 2282 } 2283 2284 /** 2285 * JSON Object Constructor 2286 * @param jo A Json-Object having data about an instance of {@code 'screenshotRequested'}. 2287 */ 2288 public screenshotRequested (JsonObject jo) 2289 { 2290 super("Overlay", "screenshotRequested", 1); 2291 2292 this.viewport = ReadJSON.getObject(jo, "viewport", Page.Viewport.class, false, true); 2293 } 2294 2295 2296 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2297 public boolean equals(Object other) 2298 { 2299 if (this == other) return true; 2300 if (other == null) return false; 2301 if (other.getClass() != this.getClass()) return false; 2302 2303 screenshotRequested o = (screenshotRequested) other; 2304 2305 return 2306 Objects.equals(this.viewport, o.viewport); 2307 } 2308 2309 /** Generates a Hash-Code for {@code 'this'} instance */ 2310 public int hashCode() 2311 { 2312 return 2313 this.viewport.hashCode(); 2314 } 2315 } 2316 2317 2318 // Counter for keeping the WebSocket Request ID's distinct. 2319 private static int counter = 1; 2320 2321 /** 2322 * Disables domain notifications. 2323 * 2324 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2325 * {@link Ret0}></CODE> 2326 * 2327 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2328 * browser receives the invocation-request. 2329 * 2330 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2331 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2332 * {@code >} to ensure the Browser Function has run to completion. 2333 */ 2334 public static Script<String, JsonObject, Ret0> disable() 2335 { 2336 final int webSocketID = 34000000 + counter++; 2337 final boolean[] optionals = new boolean[0]; 2338 2339 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2340 String requestJSON = WriteJSON.get( 2341 parameterTypes.get("disable"), 2342 parameterNames.get("disable"), 2343 optionals, webSocketID, 2344 "Overlay.disable" 2345 ); 2346 2347 // This Remote Command does not have a Return-Value. 2348 return new Script<> 2349 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 2350 } 2351 2352 /** 2353 * Enables domain notifications. 2354 * 2355 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2356 * {@link Ret0}></CODE> 2357 * 2358 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2359 * browser receives the invocation-request. 2360 * 2361 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2362 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2363 * {@code >} to ensure the Browser Function has run to completion. 2364 */ 2365 public static Script<String, JsonObject, Ret0> enable() 2366 { 2367 final int webSocketID = 34001000 + counter++; 2368 final boolean[] optionals = new boolean[0]; 2369 2370 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2371 String requestJSON = WriteJSON.get( 2372 parameterTypes.get("enable"), 2373 parameterNames.get("enable"), 2374 optionals, webSocketID, 2375 "Overlay.enable" 2376 ); 2377 2378 // This Remote Command does not have a Return-Value. 2379 return new Script<> 2380 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 2381 } 2382 2383 /** 2384 * For testing. 2385 * 2386 * @param nodeId Id of the node to get highlight object for. 2387 * 2388 * @param includeDistance Whether to include distance info. 2389 * <BR /><B CLASS=Opt>OPTIONAL</B> 2390 * 2391 * @param includeStyle Whether to include style info. 2392 * <BR /><B CLASS=Opt>OPTIONAL</B> 2393 * 2394 * @param colorFormat The color format to get config with (default: hex). 2395 * <BR /><B CLASS=Opt>OPTIONAL</B> 2396 * 2397 * @param showAccessibilityInfo Whether to show accessibility info (default: true). 2398 * <BR /><B CLASS=Opt>OPTIONAL</B> 2399 * 2400 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2401 * JsonObject></CODE> 2402 * 2403 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 2404 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 2405 * JsonObject></CODE> will be returned. 2406 * 2407 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 2408 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 2409 * may be retrieved.</I> 2410 * 2411 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 2412 * <BR /><BR /><UL CLASS=JDUL> 2413 * <LI><CODE>JsonObject (<B>highlight</B></CODE>) 2414 * <BR />Highlight data for the node. 2415 * </LI> 2416 * </UL> */ 2417 public static Script<String, JsonObject, JsonObject> getHighlightObjectForTest( 2418 int nodeId, Boolean includeDistance, Boolean includeStyle, String colorFormat, 2419 Boolean showAccessibilityInfo 2420 ) 2421 { 2422 // Exception-Check(s) to ensure that if any parameters which must adhere to a 2423 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 2424 2425 THROWS.checkIAE("colorFormat", colorFormat, "Overlay.ColorFormat", Overlay.ColorFormat); 2426 2427 final int webSocketID = 34002000 + counter++; 2428 final boolean[] optionals = { false, true, true, true, true, }; 2429 2430 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2431 String requestJSON = WriteJSON.get( 2432 parameterTypes.get("getHighlightObjectForTest"), 2433 parameterNames.get("getHighlightObjectForTest"), 2434 optionals, webSocketID, 2435 "Overlay.getHighlightObjectForTest", 2436 nodeId, includeDistance, includeStyle, colorFormat, showAccessibilityInfo 2437 ); 2438 2439 // 'JSON Binding' ... Converts Browser Response-JSON to 'JsonObject' 2440 Function<JsonObject, JsonObject> responseProcessor = (JsonObject jo) -> 2441 jo.getJsonObject("highlight"); 2442 2443 return new Script<>(webSocketID, requestJSON, responseProcessor); 2444 } 2445 2446 /** 2447 * For Persistent Grid testing. 2448 * 2449 * @param nodeIds Ids of the node to get highlight object for. 2450 * 2451 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2452 * JsonObject></CODE> 2453 * 2454 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 2455 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 2456 * JsonObject></CODE> will be returned. 2457 * 2458 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 2459 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 2460 * may be retrieved.</I> 2461 * 2462 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 2463 * <BR /><BR /><UL CLASS=JDUL> 2464 * <LI><CODE>JsonObject (<B>highlights</B></CODE>) 2465 * <BR />Grid Highlight data for the node ids provided. 2466 * </LI> 2467 * </UL> */ 2468 public static Script<String, JsonObject, JsonObject> getGridHighlightObjectsForTest 2469 (int[] nodeIds) 2470 { 2471 // Exception-Check(s) to ensure that if any parameters which are not declared as 2472 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2473 2474 if (nodeIds == null) THROWS.throwNPE("nodeIds"); 2475 2476 final int webSocketID = 34003000 + counter++; 2477 final boolean[] optionals = { false, }; 2478 2479 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2480 String requestJSON = WriteJSON.get( 2481 parameterTypes.get("getGridHighlightObjectsForTest"), 2482 parameterNames.get("getGridHighlightObjectsForTest"), 2483 optionals, webSocketID, 2484 "Overlay.getGridHighlightObjectsForTest", 2485 (Object) nodeIds 2486 ); 2487 2488 // 'JSON Binding' ... Converts Browser Response-JSON to 'JsonObject' 2489 Function<JsonObject, JsonObject> responseProcessor = (JsonObject jo) -> 2490 jo.getJsonObject("highlights"); 2491 2492 return new Script<>(webSocketID, requestJSON, responseProcessor); 2493 } 2494 2495 /** 2496 * For Source Order Viewer testing. 2497 * 2498 * @param nodeId Id of the node to highlight. 2499 * 2500 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2501 * JsonObject></CODE> 2502 * 2503 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 2504 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 2505 * JsonObject></CODE> will be returned. 2506 * 2507 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 2508 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 2509 * may be retrieved.</I> 2510 * 2511 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 2512 * <BR /><BR /><UL CLASS=JDUL> 2513 * <LI><CODE>JsonObject (<B>highlight</B></CODE>) 2514 * <BR />Source order highlight data for the node id provided. 2515 * </LI> 2516 * </UL> */ 2517 public static Script<String, JsonObject, JsonObject> getSourceOrderHighlightObjectForTest 2518 (int nodeId) 2519 { 2520 final int webSocketID = 34004000 + counter++; 2521 final boolean[] optionals = { false, }; 2522 2523 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2524 String requestJSON = WriteJSON.get( 2525 parameterTypes.get("getSourceOrderHighlightObjectForTest"), 2526 parameterNames.get("getSourceOrderHighlightObjectForTest"), 2527 optionals, webSocketID, 2528 "Overlay.getSourceOrderHighlightObjectForTest", 2529 nodeId 2530 ); 2531 2532 // 'JSON Binding' ... Converts Browser Response-JSON to 'JsonObject' 2533 Function<JsonObject, JsonObject> responseProcessor = (JsonObject jo) -> 2534 jo.getJsonObject("highlight"); 2535 2536 return new Script<>(webSocketID, requestJSON, responseProcessor); 2537 } 2538 2539 /** 2540 * Hides any highlight. 2541 * 2542 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2543 * {@link Ret0}></CODE> 2544 * 2545 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2546 * browser receives the invocation-request. 2547 * 2548 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2549 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2550 * {@code >} to ensure the Browser Function has run to completion. 2551 */ 2552 public static Script<String, JsonObject, Ret0> hideHighlight() 2553 { 2554 final int webSocketID = 34005000 + counter++; 2555 final boolean[] optionals = new boolean[0]; 2556 2557 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2558 String requestJSON = WriteJSON.get( 2559 parameterTypes.get("hideHighlight"), 2560 parameterNames.get("hideHighlight"), 2561 optionals, webSocketID, 2562 "Overlay.hideHighlight" 2563 ); 2564 2565 // This Remote Command does not have a Return-Value. 2566 return new Script<> 2567 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 2568 } 2569 2570 /** 2571 * Highlights owner element of the frame with given id. 2572 * Deprecated: Doesn't work reliably and cannot be fixed due to process 2573 * separation (the owner node might be in a different process). Determine 2574 * the owner node in the client and use highlightNode. 2575 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 2576 * 2577 * @param frameId Identifier of the frame to highlight. 2578 * 2579 * @param contentColor The content box highlight fill color (default: transparent). 2580 * <BR /><B CLASS=Opt>OPTIONAL</B> 2581 * 2582 * @param contentOutlineColor The content box highlight outline color (default: transparent). 2583 * <BR /><B CLASS=Opt>OPTIONAL</B> 2584 * 2585 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2586 * {@link Ret0}></CODE> 2587 * 2588 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2589 * browser receives the invocation-request. 2590 * 2591 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2592 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2593 * {@code >} to ensure the Browser Function has run to completion. 2594 */ 2595 public static Script<String, JsonObject, Ret0> highlightFrame 2596 (String frameId, DOM.RGBA contentColor, DOM.RGBA contentOutlineColor) 2597 { 2598 // Exception-Check(s) to ensure that if any parameters which are not declared as 2599 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2600 2601 if (frameId == null) THROWS.throwNPE("frameId"); 2602 2603 final int webSocketID = 34006000 + counter++; 2604 final boolean[] optionals = { false, true, true, }; 2605 2606 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2607 String requestJSON = WriteJSON.get( 2608 parameterTypes.get("highlightFrame"), 2609 parameterNames.get("highlightFrame"), 2610 optionals, webSocketID, 2611 "Overlay.highlightFrame", 2612 frameId, contentColor, contentOutlineColor 2613 ); 2614 2615 // This Remote Command does not have a Return-Value. 2616 return new Script<> 2617 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 2618 } 2619 2620 /** 2621 * Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or 2622 * objectId must be specified. 2623 * 2624 * @param highlightConfig A descriptor for the highlight appearance. 2625 * 2626 * @param nodeId Identifier of the node to highlight. 2627 * <BR /><B CLASS=Opt>OPTIONAL</B> 2628 * 2629 * @param backendNodeId Identifier of the backend node to highlight. 2630 * <BR /><B CLASS=Opt>OPTIONAL</B> 2631 * 2632 * @param objectId JavaScript object id of the node to be highlighted. 2633 * <BR /><B CLASS=Opt>OPTIONAL</B> 2634 * 2635 * @param selector Selectors to highlight relevant nodes. 2636 * <BR /><B CLASS=Opt>OPTIONAL</B> 2637 * 2638 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2639 * {@link Ret0}></CODE> 2640 * 2641 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2642 * browser receives the invocation-request. 2643 * 2644 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2645 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2646 * {@code >} to ensure the Browser Function has run to completion. 2647 */ 2648 public static Script<String, JsonObject, Ret0> highlightNode( 2649 Overlay.HighlightConfig highlightConfig, Integer nodeId, Integer backendNodeId, 2650 String objectId, String selector 2651 ) 2652 { 2653 // Exception-Check(s) to ensure that if any parameters which are not declared as 2654 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2655 2656 if (highlightConfig == null) THROWS.throwNPE("highlightConfig"); 2657 2658 final int webSocketID = 34007000 + counter++; 2659 final boolean[] optionals = { false, true, true, true, true, }; 2660 2661 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2662 String requestJSON = WriteJSON.get( 2663 parameterTypes.get("highlightNode"), 2664 parameterNames.get("highlightNode"), 2665 optionals, webSocketID, 2666 "Overlay.highlightNode", 2667 highlightConfig, nodeId, backendNodeId, objectId, selector 2668 ); 2669 2670 // This Remote Command does not have a Return-Value. 2671 return new Script<> 2672 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 2673 } 2674 2675 /** 2676 * Highlights given quad. Coordinates are absolute with respect to the main frame viewport. 2677 * 2678 * @param quad Quad to highlight 2679 * 2680 * @param color The highlight fill color (default: transparent). 2681 * <BR /><B CLASS=Opt>OPTIONAL</B> 2682 * 2683 * @param outlineColor The highlight outline color (default: transparent). 2684 * <BR /><B CLASS=Opt>OPTIONAL</B> 2685 * 2686 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2687 * {@link Ret0}></CODE> 2688 * 2689 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2690 * browser receives the invocation-request. 2691 * 2692 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2693 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2694 * {@code >} to ensure the Browser Function has run to completion. 2695 */ 2696 public static Script<String, JsonObject, Ret0> highlightQuad 2697 (Number[] quad, DOM.RGBA color, DOM.RGBA outlineColor) 2698 { 2699 // Exception-Check(s) to ensure that if any parameters which are not declared as 2700 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2701 2702 if (quad == null) THROWS.throwNPE("quad"); 2703 2704 final int webSocketID = 34008000 + counter++; 2705 final boolean[] optionals = { false, true, true, }; 2706 2707 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2708 String requestJSON = WriteJSON.get( 2709 parameterTypes.get("highlightQuad"), 2710 parameterNames.get("highlightQuad"), 2711 optionals, webSocketID, 2712 "Overlay.highlightQuad", 2713 quad, color, outlineColor 2714 ); 2715 2716 // This Remote Command does not have a Return-Value. 2717 return new Script<> 2718 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 2719 } 2720 2721 /** 2722 * Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. 2723 * 2724 * @param x X coordinate 2725 * 2726 * @param y Y coordinate 2727 * 2728 * @param width Rectangle width 2729 * 2730 * @param height Rectangle height 2731 * 2732 * @param color The highlight fill color (default: transparent). 2733 * <BR /><B CLASS=Opt>OPTIONAL</B> 2734 * 2735 * @param outlineColor The highlight outline color (default: transparent). 2736 * <BR /><B CLASS=Opt>OPTIONAL</B> 2737 * 2738 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2739 * {@link Ret0}></CODE> 2740 * 2741 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2742 * browser receives the invocation-request. 2743 * 2744 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2745 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2746 * {@code >} to ensure the Browser Function has run to completion. 2747 */ 2748 public static Script<String, JsonObject, Ret0> highlightRect 2749 (int x, int y, int width, int height, DOM.RGBA color, DOM.RGBA outlineColor) 2750 { 2751 final int webSocketID = 34009000 + counter++; 2752 final boolean[] optionals = { false, false, false, false, true, true, }; 2753 2754 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2755 String requestJSON = WriteJSON.get( 2756 parameterTypes.get("highlightRect"), 2757 parameterNames.get("highlightRect"), 2758 optionals, webSocketID, 2759 "Overlay.highlightRect", 2760 x, y, width, height, color, outlineColor 2761 ); 2762 2763 // This Remote Command does not have a Return-Value. 2764 return new Script<> 2765 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 2766 } 2767 2768 /** 2769 * Highlights the source order of the children of the DOM node with given id or with the given 2770 * JavaScript object wrapper. Either nodeId or objectId must be specified. 2771 * 2772 * @param sourceOrderConfig A descriptor for the appearance of the overlay drawing. 2773 * 2774 * @param nodeId Identifier of the node to highlight. 2775 * <BR /><B CLASS=Opt>OPTIONAL</B> 2776 * 2777 * @param backendNodeId Identifier of the backend node to highlight. 2778 * <BR /><B CLASS=Opt>OPTIONAL</B> 2779 * 2780 * @param objectId JavaScript object id of the node to be highlighted. 2781 * <BR /><B CLASS=Opt>OPTIONAL</B> 2782 * 2783 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2784 * {@link Ret0}></CODE> 2785 * 2786 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2787 * browser receives the invocation-request. 2788 * 2789 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2790 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2791 * {@code >} to ensure the Browser Function has run to completion. 2792 */ 2793 public static Script<String, JsonObject, Ret0> highlightSourceOrder( 2794 Overlay.SourceOrderConfig sourceOrderConfig, Integer nodeId, Integer backendNodeId, 2795 String objectId 2796 ) 2797 { 2798 // Exception-Check(s) to ensure that if any parameters which are not declared as 2799 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2800 2801 if (sourceOrderConfig == null) THROWS.throwNPE("sourceOrderConfig"); 2802 2803 final int webSocketID = 34010000 + counter++; 2804 final boolean[] optionals = { false, true, true, true, }; 2805 2806 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2807 String requestJSON = WriteJSON.get( 2808 parameterTypes.get("highlightSourceOrder"), 2809 parameterNames.get("highlightSourceOrder"), 2810 optionals, webSocketID, 2811 "Overlay.highlightSourceOrder", 2812 sourceOrderConfig, nodeId, backendNodeId, objectId 2813 ); 2814 2815 // This Remote Command does not have a Return-Value. 2816 return new Script<> 2817 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 2818 } 2819 2820 /** 2821 * Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. 2822 * Backend then generates 'inspectNodeRequested' event upon element selection. 2823 * 2824 * @param mode Set an inspection mode. 2825 * 2826 * @param highlightConfig 2827 * A descriptor for the highlight appearance of hovered-over nodes. May be omitted if {@code enabled 2828 * == false}. 2829 * <BR /><B CLASS=Opt>OPTIONAL</B> 2830 * 2831 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2832 * {@link Ret0}></CODE> 2833 * 2834 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2835 * browser receives the invocation-request. 2836 * 2837 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2838 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2839 * {@code >} to ensure the Browser Function has run to completion. 2840 */ 2841 public static Script<String, JsonObject, Ret0> setInspectMode 2842 (String mode, Overlay.HighlightConfig highlightConfig) 2843 { 2844 // Exception-Check(s) to ensure that if any parameters which are not declared as 2845 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2846 2847 if (mode == null) THROWS.throwNPE("mode"); 2848 2849 // Exception-Check(s) to ensure that if any parameters which must adhere to a 2850 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 2851 2852 THROWS.checkIAE("mode", mode, "Overlay.InspectMode", Overlay.InspectMode); 2853 2854 final int webSocketID = 34011000 + counter++; 2855 final boolean[] optionals = { false, true, }; 2856 2857 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2858 String requestJSON = WriteJSON.get( 2859 parameterTypes.get("setInspectMode"), 2860 parameterNames.get("setInspectMode"), 2861 optionals, webSocketID, 2862 "Overlay.setInspectMode", 2863 mode, highlightConfig 2864 ); 2865 2866 // This Remote Command does not have a Return-Value. 2867 return new Script<> 2868 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 2869 } 2870 2871 /** 2872 * Highlights owner element of all frames detected to be ads. 2873 * 2874 * @param show True for showing ad highlights 2875 * 2876 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2877 * {@link Ret0}></CODE> 2878 * 2879 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2880 * browser receives the invocation-request. 2881 * 2882 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2883 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2884 * {@code >} to ensure the Browser Function has run to completion. 2885 */ 2886 public static Script<String, JsonObject, Ret0> setShowAdHighlights(boolean show) 2887 { 2888 final int webSocketID = 34012000 + counter++; 2889 final boolean[] optionals = { false, }; 2890 2891 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2892 String requestJSON = WriteJSON.get( 2893 parameterTypes.get("setShowAdHighlights"), 2894 parameterNames.get("setShowAdHighlights"), 2895 optionals, webSocketID, 2896 "Overlay.setShowAdHighlights", 2897 show 2898 ); 2899 2900 // This Remote Command does not have a Return-Value. 2901 return new Script<> 2902 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 2903 } 2904 2905 /** 2906 * <CODE>[No Description Provided by Google]</CODE> 2907 * 2908 * @param message The message to display, also triggers resume and step over controls. 2909 * <BR /><B CLASS=Opt>OPTIONAL</B> 2910 * 2911 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2912 * {@link Ret0}></CODE> 2913 * 2914 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2915 * browser receives the invocation-request. 2916 * 2917 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2918 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2919 * {@code >} to ensure the Browser Function has run to completion. 2920 */ 2921 public static Script<String, JsonObject, Ret0> setPausedInDebuggerMessage(String message) 2922 { 2923 final int webSocketID = 34013000 + counter++; 2924 final boolean[] optionals = { true, }; 2925 2926 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2927 String requestJSON = WriteJSON.get( 2928 parameterTypes.get("setPausedInDebuggerMessage"), 2929 parameterNames.get("setPausedInDebuggerMessage"), 2930 optionals, webSocketID, 2931 "Overlay.setPausedInDebuggerMessage", 2932 message 2933 ); 2934 2935 // This Remote Command does not have a Return-Value. 2936 return new Script<> 2937 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 2938 } 2939 2940 /** 2941 * Requests that backend shows debug borders on layers 2942 * 2943 * @param show True for showing debug borders 2944 * 2945 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2946 * {@link Ret0}></CODE> 2947 * 2948 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2949 * browser receives the invocation-request. 2950 * 2951 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2952 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2953 * {@code >} to ensure the Browser Function has run to completion. 2954 */ 2955 public static Script<String, JsonObject, Ret0> setShowDebugBorders(boolean show) 2956 { 2957 final int webSocketID = 34014000 + counter++; 2958 final boolean[] optionals = { false, }; 2959 2960 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2961 String requestJSON = WriteJSON.get( 2962 parameterTypes.get("setShowDebugBorders"), 2963 parameterNames.get("setShowDebugBorders"), 2964 optionals, webSocketID, 2965 "Overlay.setShowDebugBorders", 2966 show 2967 ); 2968 2969 // This Remote Command does not have a Return-Value. 2970 return new Script<> 2971 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 2972 } 2973 2974 /** 2975 * Requests that backend shows the FPS counter 2976 * 2977 * @param show True for showing the FPS counter 2978 * 2979 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 2980 * {@link Ret0}></CODE> 2981 * 2982 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2983 * browser receives the invocation-request. 2984 * 2985 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 2986 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 2987 * {@code >} to ensure the Browser Function has run to completion. 2988 */ 2989 public static Script<String, JsonObject, Ret0> setShowFPSCounter(boolean show) 2990 { 2991 final int webSocketID = 34015000 + counter++; 2992 final boolean[] optionals = { false, }; 2993 2994 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 2995 String requestJSON = WriteJSON.get( 2996 parameterTypes.get("setShowFPSCounter"), 2997 parameterNames.get("setShowFPSCounter"), 2998 optionals, webSocketID, 2999 "Overlay.setShowFPSCounter", 3000 show 3001 ); 3002 3003 // This Remote Command does not have a Return-Value. 3004 return new Script<> 3005 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3006 } 3007 3008 /** 3009 * Highlight multiple elements with the CSS Grid overlay. 3010 * 3011 * @param gridNodeHighlightConfigs An array of node identifiers and descriptors for the highlight appearance. 3012 * 3013 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3014 * {@link Ret0}></CODE> 3015 * 3016 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3017 * browser receives the invocation-request. 3018 * 3019 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3020 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3021 * {@code >} to ensure the Browser Function has run to completion. 3022 */ 3023 public static Script<String, JsonObject, Ret0> setShowGridOverlays 3024 (Overlay.GridNodeHighlightConfig[] gridNodeHighlightConfigs) 3025 { 3026 // Exception-Check(s) to ensure that if any parameters which are not declared as 3027 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3028 3029 if (gridNodeHighlightConfigs == null) THROWS.throwNPE("gridNodeHighlightConfigs"); 3030 3031 final int webSocketID = 34016000 + counter++; 3032 final boolean[] optionals = { false, }; 3033 3034 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3035 String requestJSON = WriteJSON.get( 3036 parameterTypes.get("setShowGridOverlays"), 3037 parameterNames.get("setShowGridOverlays"), 3038 optionals, webSocketID, 3039 "Overlay.setShowGridOverlays", 3040 (Object) gridNodeHighlightConfigs 3041 ); 3042 3043 // This Remote Command does not have a Return-Value. 3044 return new Script<> 3045 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3046 } 3047 3048 /** 3049 * <CODE>[No Description Provided by Google]</CODE> 3050 * 3051 * @param flexNodeHighlightConfigs An array of node identifiers and descriptors for the highlight appearance. 3052 * 3053 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3054 * {@link Ret0}></CODE> 3055 * 3056 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3057 * browser receives the invocation-request. 3058 * 3059 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3060 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3061 * {@code >} to ensure the Browser Function has run to completion. 3062 */ 3063 public static Script<String, JsonObject, Ret0> setShowFlexOverlays 3064 (Overlay.FlexNodeHighlightConfig[] flexNodeHighlightConfigs) 3065 { 3066 // Exception-Check(s) to ensure that if any parameters which are not declared as 3067 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3068 3069 if (flexNodeHighlightConfigs == null) THROWS.throwNPE("flexNodeHighlightConfigs"); 3070 3071 final int webSocketID = 34017000 + counter++; 3072 final boolean[] optionals = { false, }; 3073 3074 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3075 String requestJSON = WriteJSON.get( 3076 parameterTypes.get("setShowFlexOverlays"), 3077 parameterNames.get("setShowFlexOverlays"), 3078 optionals, webSocketID, 3079 "Overlay.setShowFlexOverlays", 3080 (Object) flexNodeHighlightConfigs 3081 ); 3082 3083 // This Remote Command does not have a Return-Value. 3084 return new Script<> 3085 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3086 } 3087 3088 /** 3089 * <CODE>[No Description Provided by Google]</CODE> 3090 * 3091 * @param scrollSnapHighlightConfigs An array of node identifiers and descriptors for the highlight appearance. 3092 * 3093 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3094 * {@link Ret0}></CODE> 3095 * 3096 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3097 * browser receives the invocation-request. 3098 * 3099 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3100 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3101 * {@code >} to ensure the Browser Function has run to completion. 3102 */ 3103 public static Script<String, JsonObject, Ret0> setShowScrollSnapOverlays 3104 (Overlay.ScrollSnapHighlightConfig[] scrollSnapHighlightConfigs) 3105 { 3106 // Exception-Check(s) to ensure that if any parameters which are not declared as 3107 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3108 3109 if (scrollSnapHighlightConfigs == null) THROWS.throwNPE("scrollSnapHighlightConfigs"); 3110 3111 final int webSocketID = 34018000 + counter++; 3112 final boolean[] optionals = { false, }; 3113 3114 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3115 String requestJSON = WriteJSON.get( 3116 parameterTypes.get("setShowScrollSnapOverlays"), 3117 parameterNames.get("setShowScrollSnapOverlays"), 3118 optionals, webSocketID, 3119 "Overlay.setShowScrollSnapOverlays", 3120 (Object) scrollSnapHighlightConfigs 3121 ); 3122 3123 // This Remote Command does not have a Return-Value. 3124 return new Script<> 3125 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3126 } 3127 3128 /** 3129 * <CODE>[No Description Provided by Google]</CODE> 3130 * 3131 * @param containerQueryHighlightConfigs An array of node identifiers and descriptors for the highlight appearance. 3132 * 3133 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3134 * {@link Ret0}></CODE> 3135 * 3136 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3137 * browser receives the invocation-request. 3138 * 3139 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3140 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3141 * {@code >} to ensure the Browser Function has run to completion. 3142 */ 3143 public static Script<String, JsonObject, Ret0> setShowContainerQueryOverlays 3144 (Overlay.ContainerQueryHighlightConfig[] containerQueryHighlightConfigs) 3145 { 3146 // Exception-Check(s) to ensure that if any parameters which are not declared as 3147 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3148 3149 if (containerQueryHighlightConfigs == null) THROWS.throwNPE("containerQueryHighlightConfigs"); 3150 3151 final int webSocketID = 34019000 + counter++; 3152 final boolean[] optionals = { false, }; 3153 3154 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3155 String requestJSON = WriteJSON.get( 3156 parameterTypes.get("setShowContainerQueryOverlays"), 3157 parameterNames.get("setShowContainerQueryOverlays"), 3158 optionals, webSocketID, 3159 "Overlay.setShowContainerQueryOverlays", 3160 (Object) containerQueryHighlightConfigs 3161 ); 3162 3163 // This Remote Command does not have a Return-Value. 3164 return new Script<> 3165 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3166 } 3167 3168 /** 3169 * Requests that backend shows paint rectangles 3170 * 3171 * @param result True for showing paint rectangles 3172 * 3173 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3174 * {@link Ret0}></CODE> 3175 * 3176 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3177 * browser receives the invocation-request. 3178 * 3179 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3180 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3181 * {@code >} to ensure the Browser Function has run to completion. 3182 */ 3183 public static Script<String, JsonObject, Ret0> setShowPaintRects(boolean result) 3184 { 3185 final int webSocketID = 34020000 + counter++; 3186 final boolean[] optionals = { false, }; 3187 3188 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3189 String requestJSON = WriteJSON.get( 3190 parameterTypes.get("setShowPaintRects"), 3191 parameterNames.get("setShowPaintRects"), 3192 optionals, webSocketID, 3193 "Overlay.setShowPaintRects", 3194 result 3195 ); 3196 3197 // This Remote Command does not have a Return-Value. 3198 return new Script<> 3199 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3200 } 3201 3202 /** 3203 * Requests that backend shows layout shift regions 3204 * 3205 * @param result True for showing layout shift regions 3206 * 3207 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3208 * {@link Ret0}></CODE> 3209 * 3210 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3211 * browser receives the invocation-request. 3212 * 3213 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3214 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3215 * {@code >} to ensure the Browser Function has run to completion. 3216 */ 3217 public static Script<String, JsonObject, Ret0> setShowLayoutShiftRegions(boolean result) 3218 { 3219 final int webSocketID = 34021000 + counter++; 3220 final boolean[] optionals = { false, }; 3221 3222 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3223 String requestJSON = WriteJSON.get( 3224 parameterTypes.get("setShowLayoutShiftRegions"), 3225 parameterNames.get("setShowLayoutShiftRegions"), 3226 optionals, webSocketID, 3227 "Overlay.setShowLayoutShiftRegions", 3228 result 3229 ); 3230 3231 // This Remote Command does not have a Return-Value. 3232 return new Script<> 3233 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3234 } 3235 3236 /** 3237 * Requests that backend shows scroll bottleneck rects 3238 * 3239 * @param show True for showing scroll bottleneck rects 3240 * 3241 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3242 * {@link Ret0}></CODE> 3243 * 3244 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3245 * browser receives the invocation-request. 3246 * 3247 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3248 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3249 * {@code >} to ensure the Browser Function has run to completion. 3250 */ 3251 public static Script<String, JsonObject, Ret0> setShowScrollBottleneckRects(boolean show) 3252 { 3253 final int webSocketID = 34022000 + counter++; 3254 final boolean[] optionals = { false, }; 3255 3256 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3257 String requestJSON = WriteJSON.get( 3258 parameterTypes.get("setShowScrollBottleneckRects"), 3259 parameterNames.get("setShowScrollBottleneckRects"), 3260 optionals, webSocketID, 3261 "Overlay.setShowScrollBottleneckRects", 3262 show 3263 ); 3264 3265 // This Remote Command does not have a Return-Value. 3266 return new Script<> 3267 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3268 } 3269 3270 /** 3271 * Deprecated, no longer has any effect. 3272 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 3273 * 3274 * @param show True for showing hit-test borders 3275 * 3276 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3277 * {@link Ret0}></CODE> 3278 * 3279 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3280 * browser receives the invocation-request. 3281 * 3282 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3283 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3284 * {@code >} to ensure the Browser Function has run to completion. 3285 */ 3286 public static Script<String, JsonObject, Ret0> setShowHitTestBorders(boolean show) 3287 { 3288 final int webSocketID = 34023000 + counter++; 3289 final boolean[] optionals = { false, }; 3290 3291 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3292 String requestJSON = WriteJSON.get( 3293 parameterTypes.get("setShowHitTestBorders"), 3294 parameterNames.get("setShowHitTestBorders"), 3295 optionals, webSocketID, 3296 "Overlay.setShowHitTestBorders", 3297 show 3298 ); 3299 3300 // This Remote Command does not have a Return-Value. 3301 return new Script<> 3302 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3303 } 3304 3305 /** 3306 * Deprecated, no longer has any effect. 3307 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 3308 * 3309 * @param show - 3310 * 3311 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3312 * {@link Ret0}></CODE> 3313 * 3314 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3315 * browser receives the invocation-request. 3316 * 3317 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3318 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3319 * {@code >} to ensure the Browser Function has run to completion. 3320 */ 3321 public static Script<String, JsonObject, Ret0> setShowWebVitals(boolean show) 3322 { 3323 final int webSocketID = 34024000 + counter++; 3324 final boolean[] optionals = { false, }; 3325 3326 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3327 String requestJSON = WriteJSON.get( 3328 parameterTypes.get("setShowWebVitals"), 3329 parameterNames.get("setShowWebVitals"), 3330 optionals, webSocketID, 3331 "Overlay.setShowWebVitals", 3332 show 3333 ); 3334 3335 // This Remote Command does not have a Return-Value. 3336 return new Script<> 3337 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3338 } 3339 3340 /** 3341 * Paints viewport size upon main frame resize. 3342 * 3343 * @param show Whether to paint size or not. 3344 * 3345 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3346 * {@link Ret0}></CODE> 3347 * 3348 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3349 * browser receives the invocation-request. 3350 * 3351 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3352 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3353 * {@code >} to ensure the Browser Function has run to completion. 3354 */ 3355 public static Script<String, JsonObject, Ret0> setShowViewportSizeOnResize(boolean show) 3356 { 3357 final int webSocketID = 34025000 + counter++; 3358 final boolean[] optionals = { false, }; 3359 3360 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3361 String requestJSON = WriteJSON.get( 3362 parameterTypes.get("setShowViewportSizeOnResize"), 3363 parameterNames.get("setShowViewportSizeOnResize"), 3364 optionals, webSocketID, 3365 "Overlay.setShowViewportSizeOnResize", 3366 show 3367 ); 3368 3369 // This Remote Command does not have a Return-Value. 3370 return new Script<> 3371 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3372 } 3373 3374 /** 3375 * Add a dual screen device hinge 3376 * 3377 * @param hingeConfig hinge data, null means hideHinge 3378 * <BR /><B CLASS=Opt>OPTIONAL</B> 3379 * 3380 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3381 * {@link Ret0}></CODE> 3382 * 3383 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3384 * browser receives the invocation-request. 3385 * 3386 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3387 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3388 * {@code >} to ensure the Browser Function has run to completion. 3389 */ 3390 public static Script<String, JsonObject, Ret0> setShowHinge(Overlay.HingeConfig hingeConfig) 3391 { 3392 final int webSocketID = 34026000 + counter++; 3393 final boolean[] optionals = { true, }; 3394 3395 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3396 String requestJSON = WriteJSON.get( 3397 parameterTypes.get("setShowHinge"), 3398 parameterNames.get("setShowHinge"), 3399 optionals, webSocketID, 3400 "Overlay.setShowHinge", 3401 hingeConfig 3402 ); 3403 3404 // This Remote Command does not have a Return-Value. 3405 return new Script<> 3406 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3407 } 3408 3409 /** 3410 * Show elements in isolation mode with overlays. 3411 * 3412 * @param isolatedElementHighlightConfigs An array of node identifiers and descriptors for the highlight appearance. 3413 * 3414 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3415 * {@link Ret0}></CODE> 3416 * 3417 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3418 * browser receives the invocation-request. 3419 * 3420 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3421 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3422 * {@code >} to ensure the Browser Function has run to completion. 3423 */ 3424 public static Script<String, JsonObject, Ret0> setShowIsolatedElements 3425 (Overlay.IsolatedElementHighlightConfig[] isolatedElementHighlightConfigs) 3426 { 3427 // Exception-Check(s) to ensure that if any parameters which are not declared as 3428 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3429 3430 if (isolatedElementHighlightConfigs == null) THROWS.throwNPE("isolatedElementHighlightConfigs"); 3431 3432 final int webSocketID = 34027000 + counter++; 3433 final boolean[] optionals = { false, }; 3434 3435 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3436 String requestJSON = WriteJSON.get( 3437 parameterTypes.get("setShowIsolatedElements"), 3438 parameterNames.get("setShowIsolatedElements"), 3439 optionals, webSocketID, 3440 "Overlay.setShowIsolatedElements", 3441 (Object) isolatedElementHighlightConfigs 3442 ); 3443 3444 // This Remote Command does not have a Return-Value. 3445 return new Script<> 3446 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3447 } 3448 3449 /** 3450 * Show Window Controls Overlay for PWA 3451 * 3452 * @param windowControlsOverlayConfig Window Controls Overlay data, null means hide Window Controls Overlay 3453 * <BR /><B CLASS=Opt>OPTIONAL</B> 3454 * 3455 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 3456 * {@link Ret0}></CODE> 3457 * 3458 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 3459 * browser receives the invocation-request. 3460 * 3461 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 3462 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 3463 * {@code >} to ensure the Browser Function has run to completion. 3464 */ 3465 public static Script<String, JsonObject, Ret0> setShowWindowControlsOverlay 3466 (Overlay.WindowControlsOverlayConfig windowControlsOverlayConfig) 3467 { 3468 final int webSocketID = 34028000 + counter++; 3469 final boolean[] optionals = { true, }; 3470 3471 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 3472 String requestJSON = WriteJSON.get( 3473 parameterTypes.get("setShowWindowControlsOverlay"), 3474 parameterNames.get("setShowWindowControlsOverlay"), 3475 optionals, webSocketID, 3476 "Overlay.setShowWindowControlsOverlay", 3477 windowControlsOverlayConfig 3478 ); 3479 3480 // This Remote Command does not have a Return-Value. 3481 return new Script<> 3482 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 3483 } 3484 3485}