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