Package Torello.Browser
Class LayerTree.Layer
- java.lang.Object
-
- Torello.Java.JSON.BaseType
-
- Torello.Browser.LayerTree.Layer
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- LayerTree
public static class LayerTree.Layer extends BaseType implements java.io.Serializable
Information about a compositing layer.- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/LayerTree.java
- Open New Browser-Tab: Torello/Browser/LayerTree.java
File Size: 10,966 Bytes Line Count: 259 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field protected static long
serialVersionUID
For Object Serialization.Type Properties Modifier and Type Field Number
anchorX
Transform anchor point X, absent if no transform specified
OPTIONALNumber
anchorY
Transform anchor point Y, absent if no transform specified
OPTIONALNumber
anchorZ
Transform anchor point Z, absent if no transform specified
OPTIONALInteger
backendNodeId
The backend id for the node associated with this layer.boolean
drawsContent
Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.Number
height
Layer height.Boolean
invisible
Set if layer is not visible.String
layerId
The unique id for this layer.Number
offsetX
Offset from parent layer, X coordinate.Number
offsetY
Offset from parent layer, Y coordinate.int
paintCount
Indicates how many time this layer has painted.String
parentLayerId
The id of parent (not present for root).LayerTree.ScrollRect[]
scrollRects
Rectangles scrolling on main thread only.LayerTree.StickyPositionConstraint
stickyPositionConstraint
Sticky position constraint information
OPTIONALNumber[]
transform
Transformation matrix for layer, default is identity matrix
OPTIONALNumber
width
Layer width.
-
Constructor Summary
Constructors Constructor Description Layer(String layerId, String parentLayerId, Integer backendNodeId, Number offsetX, Number offsetY, Number width, Number height, Number[] transform, Number anchorX, Number anchorY, Number anchorZ, int paintCount, boolean drawsContent, Boolean invisible, LayerTree.ScrollRect[] scrollRects, LayerTree.StickyPositionConstraint stickyPositionConstraint)
ConstructorLayer(JsonObject jo)
JSON Object Constructor
-
Method Summary
Generate Array that Indicates which Parameter are Optional Modifier and Type Method boolean[]
optionals()
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null.Methods: class java.lang.Object Modifier and Type Method boolean
equals(Object other)
Checks whether'this'
equals an input Java-Object
int
hashCode()
Generates a Hash-Code for'this'
instance
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
For Object Serialization. java.io.Serializable- See Also:
- Constant Field Values
-
layerId
public final java.lang.String layerId
The unique id for this layer.
-
parentLayerId
public final java.lang.String parentLayerId
The id of parent (not present for root).
OPTIONAL
-
backendNodeId
public final java.lang.Integer backendNodeId
The backend id for the node associated with this layer.
OPTIONAL
-
offsetX
public final java.lang.Number offsetX
Offset from parent layer, X coordinate.
-
offsetY
public final java.lang.Number offsetY
Offset from parent layer, Y coordinate.
-
width
public final java.lang.Number width
Layer width.
-
height
public final java.lang.Number height
Layer height.
-
transform
public final java.lang.Number[] transform
Transformation matrix for layer, default is identity matrix
OPTIONAL
-
anchorX
public final java.lang.Number anchorX
Transform anchor point X, absent if no transform specified
OPTIONAL
-
anchorY
public final java.lang.Number anchorY
Transform anchor point Y, absent if no transform specified
OPTIONAL
-
anchorZ
public final java.lang.Number anchorZ
Transform anchor point Z, absent if no transform specified
OPTIONAL
-
paintCount
public final int paintCount
Indicates how many time this layer has painted.
-
drawsContent
public final boolean drawsContent
Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.
-
invisible
public final java.lang.Boolean invisible
Set if layer is not visible.
OPTIONAL
-
scrollRects
public final LayerTree.ScrollRect[] scrollRects
Rectangles scrolling on main thread only.
OPTIONAL
-
stickyPositionConstraint
public final LayerTree.StickyPositionConstraint stickyPositionConstraint
Sticky position constraint information
OPTIONAL
-
-
Constructor Detail
-
Layer
public Layer(java.lang.String layerId, java.lang.String parentLayerId, java.lang.Integer backendNodeId, java.lang.Number offsetX, java.lang.Number offsetY, java.lang.Number width, java.lang.Number height, java.lang.Number[] transform, java.lang.Number anchorX, java.lang.Number anchorY, java.lang.Number anchorZ, int paintCount, boolean drawsContent, java.lang.Boolean invisible, LayerTree.ScrollRect[] scrollRects, LayerTree.StickyPositionConstraint stickyPositionConstraint)
Constructor- Parameters:
layerId
- The unique id for this layer.parentLayerId
- The id of parent (not present for root).
OPTIONALbackendNodeId
- The backend id for the node associated with this layer.
OPTIONALoffsetX
- Offset from parent layer, X coordinate.offsetY
- Offset from parent layer, Y coordinate.width
- Layer width.height
- Layer height.transform
- Transformation matrix for layer, default is identity matrix
OPTIONALanchorX
- Transform anchor point X, absent if no transform specified
OPTIONALanchorY
- Transform anchor point Y, absent if no transform specified
OPTIONALanchorZ
- Transform anchor point Z, absent if no transform specified
OPTIONALpaintCount
- Indicates how many time this layer has painted.drawsContent
- Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.invisible
- Set if layer is not visible.
OPTIONALscrollRects
- Rectangles scrolling on main thread only.
OPTIONALstickyPositionConstraint
- Sticky position constraint information
OPTIONAL
-
Layer
public Layer(JsonObject jo)
JSON Object Constructor- Parameters:
jo
- A Json-Object having data about an instance of'Layer'
.
-
-
Method Detail
-
optionals
public boolean[] optionals()
Description copied from class:BaseType
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null. When binding aJsonObject
to a Java-Object, if some of the expected fields for the Java-Object map to Properties which might be left-out or omitted, then that may be indicated by setting that fields array positionTRUE
.
NOTE: This array should have a length equal to the number of fields contained by the Java Object. The first boolean in the array should specify whether the first Object Field may by absent. The second boolean should specify whether the second Object Field is optional in the JSON - and so on and so forth...
-
equals
public boolean equals(java.lang.Object other)
Checks whether'this'
equals an input Java-Object
- Overrides:
equals
in classjava.lang.Object
- Code:
- Exact Method Body:
if (other == null) return false; if (other.getClass() != this.getClass()) return false; Layer o = (Layer) other; return Objects.equals(this.layerId, o.layerId) && Objects.equals(this.parentLayerId, o.parentLayerId) && Objects.equals(this.backendNodeId, o.backendNodeId) && Objects.equals(this.offsetX, o.offsetX) && Objects.equals(this.offsetY, o.offsetY) && Objects.equals(this.width, o.width) && Objects.equals(this.height, o.height) && Arrays.deepEquals(this.transform, o.transform) && Objects.equals(this.anchorX, o.anchorX) && Objects.equals(this.anchorY, o.anchorY) && Objects.equals(this.anchorZ, o.anchorZ) && (this.paintCount == o.paintCount) && (this.drawsContent == o.drawsContent) && Objects.equals(this.invisible, o.invisible) && Arrays.deepEquals(this.scrollRects, o.scrollRects) && Objects.equals(this.stickyPositionConstraint, o.stickyPositionConstraint);
-
hashCode
public int hashCode()
Generates a Hash-Code for'this'
instance- Overrides:
hashCode
in classjava.lang.Object
- Code:
- Exact Method Body:
return Objects.hashCode(this.layerId) + Objects.hashCode(this.parentLayerId) + Objects.hashCode(this.backendNodeId) + Objects.hashCode(this.offsetX) + Objects.hashCode(this.offsetY) + Objects.hashCode(this.width) + Objects.hashCode(this.height) + Arrays.deepHashCode(this.transform) + Objects.hashCode(this.anchorX) + Objects.hashCode(this.anchorY) + Objects.hashCode(this.anchorZ) + this.paintCount + (this.drawsContent ? 1 : 0) + Objects.hashCode(this.invisible) + Arrays.deepHashCode(this.scrollRects) + this.stickyPositionConstraint.hashCode();
-
-