TransformNodeEffect
class TransformNodeEffect
Extends: NodeEffect<Node>
Package: dev.joid.lib.ui.node.effect.impl · Module: core · Source: TransformNodeEffect.java
Moves, rotates or scales the drawing of a node and its children without changing the layout.

Description
Section titled “Description”The effect applies a Transformation to the model-view matrix while the node and its children draw.
A rotation or a scale without a pivot of its own turns or scales around the center of the node.
Its priority is -100, the lowest of the built-in effects, so it moves the shadow, the mask and the pixel effects with the node.
The node still receives the mouse at its layout position.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
TransformNodeEffect | create(Transformation transformation) factory | Creates an effect that applies the operations of this transformation, in their order. |
| TransformNodeEffect(Transformation transformation) protected | Called by a subclass with the same argument as create. |
Properties
Section titled “Properties”| Property | Type | Default | Summary |
|---|---|---|---|
| transformation | Transformation | set at creation | Operations applied to the drawing of the node. |
Inherited from NodeEffect (2)
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | draw(Node node, Runnable body) | Saves the model-view matrix, applies the transformation around the center of the node, draws the node, then restores the matrix, even when the drawing throws. |
Inherited from NodeEffect (4)
Creation details
Section titled “Creation details”create
Section titled “create”TransformNodeEffect create(Transformation transformation) factory
Creates an effect that applies the operations of this transformation, in their order.
TransformNodeEffect
Section titled “TransformNodeEffect”TransformNodeEffect(Transformation transformation) protected
Called by a subclass with the same argument as create.
Property details
Section titled “Property details”transformation
Section titled “transformation”this transformation(Transformation transformation)fluentTransformation getTransformation()
Default: set at creation
Operations applied to the drawing of the node.
A rotation that reads a Supplier for its angle follows it, so an animation turns the node without replacing the transformation.
Method details
Section titled “Method details”void draw(Node node, Runnable body)
Saves the model-view matrix, applies the transformation around the center of the node, draws the node, then restores the matrix, even when the drawing throws.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
