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