All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.chrome.devtools.client.core.layertree.ScrollRect Maven / Gradle / Ivy

package com.hubspot.chrome.devtools.client.core.layertree;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hubspot.chrome.devtools.client.core.dom.Rect;

/**
 * Rectangle where scrolling happens on the main thread.
 */
public final class ScrollRect {
  private Rect rect;

  private String type;

  @JsonCreator
  public ScrollRect(@JsonProperty("rect") Rect rect, @JsonProperty("type") String type) {
    this.rect = rect;
    this.type = type;
  }

  public Rect getRect() {
    return rect;
  }

  public String getType() {
    return type;
  }

  public static ScrollRect.Builder builder() {
    return new ScrollRect.Builder();
  }

  public static final class Builder {
    private Rect rect;

    private String type;

    private Builder() {
    }

    public ScrollRect.Builder setRect(Rect rect) {
      this.rect = rect;
      return this;
    }

    public ScrollRect.Builder setType(String type) {
      this.type = type;
      return this;
    }

    public ScrollRect build() {
      return new ScrollRect(rect, type);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy