Class Transform
- javafx.scene.transform.Transform
All Implemented Interfaces:
public abstract class Transform extends Object implements Cloneable, EventTarget
Example:
Rectangle rect = new Rectangle(50,50, Color.RED); rect.getTransforms().add(new Rotate(45,0,0)); //rotate by 45 degrees
Since:
JavaFX 2.0
-
Property Summary
All MethodsInstance MethodsConcrete Methods Type Property and Description ReadOnlyBooleanPropertyidentityDetermines if this is currently an identity transform.ObjectProperty<EventHandler<? super TransformChangedEvent>>onTransformChangedThe onTransformChanged event handler is called whenever the transform changes any of its parameters.ReadOnlyBooleanPropertytype2DDetermines if this is currently a 2D transform.
-
Constructor Summary
Constructors Constructor and Description Transform()
-
Method Summary
All MethodsStatic MethodsInstance MethodsConcrete Methods Modifier and Type Method and Description <T extends Event>
voidaddEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter)Registers an event filter to this transform.<T extends Event>
voidaddEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)Registers an event handler to this transform.static Affineaffine(double mxx, double myx, double mxy, double myy, double tx, double ty)Returns a newAffineobject from 12 number values representing the 6 specifiable entries of the 3x4 Affine transformation matrix.static Affineaffine(double mxx, double mxy, double mxz, double tx, double myx, double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz)Returns a newAffineobject from 12 number values representing the 12 specifiable entries of the 3x4 Affine transformation matrix.EventDispatchChainbuildEventDispatchChain(EventDispatchChain tail)Construct an event dispatch chain for this target.Transformclone()Returns a deep copy of this transform.double[]column(MatrixType type, int column)Returns an array containing a column of the transformation matrix.double[]column(MatrixType type, int column, double[] array)Returns an array containing a column of the transformation matrix.TransformcreateConcatenation(Transform transform)Returns the concatenation of this transform and the specified transform.TransformcreateInverse()Returns the inverse transform of this transform.Point2DdeltaTransform(double x, double y)Transforms the relative magnitude vector by this transform.Point3DdeltaTransform(double x, double y, double z)Transforms the relative magnitude vector by this transform.Point2DdeltaTransform(Point2D point)Transforms the relative magnitude vector represented by the specifiedPoint2Dinstance by this transform.Point3DdeltaTransform(Point3D point)Transforms the relative magnitude vector represented by the specifiedPoint3Dinstance by this transform.doubledeterminant()Computes determinant of the transformation matrix.doublegetElement(MatrixType type, int row, int column)Gets the specified element of the transformation matrix.doublegetMxx()Gets the X coordinate scaling element of the 3x4 matrix.doublegetMxy()Gets the XY coordinate element of the 3x4 matrix.doublegetMxz()Gets the XZ coordinate element of the 3x4 matrix.doublegetMyx()Gets the YX coordinate element of the 3x4 matrix.doublegetMyy()Gets the Y coordinate scaling element of the 3x4 matrix.doublegetMyz()Gets the YZ coordinate element of the 3x4 matrix.doublegetMzx()Gets the ZX coordinate element of the 3x4 matrix.doublegetMzy()Gets the ZY coordinate element of the 3x4 matrix.doublegetMzz()Gets the Z coordinate scaling element of the 3x4 matrix.EventHandler<? super TransformChangedEvent>getOnTransformChanged()Gets the onTransformChanged event handler.doublegetTx()Gets the X coordinate translation element of the 3x4 matrix.doublegetTy()Gets the Y coordinate translation element of the 3x4 matrix.doublegetTz()Gets the Z coordinate translation element of the 3x4 matrix.ReadOnlyBooleanPropertyidentityProperty()Determines if this is currently an identity transform.Point2DinverseDeltaTransform(double x, double y)Transforms the relative magnitude vector by the inverse of this transform.Point3DinverseDeltaTransform(double x, double y, double z)Transforms the relative magnitude vector by the inverse of this transform.Point2DinverseDeltaTransform(Point2D point)Transforms the relative magnitude vector represented by the specifiedPoint2Dinstance by the inverse of this transform.Point3DinverseDeltaTransform(Point3D point)Transforms the relative magnitude vector represented by the specifiedPoint3Dinstance by the inverse of this transform.BoundsinverseTransform(Bounds bounds)Transforms the specified bounds by the inverse of this transform.Point2DinverseTransform(double x, double y)Transforms the specified point by the inverse of this transform.Point3DinverseTransform(double x, double y, double z)Transforms the specified point by the inverse of this transform.Point2DinverseTransform(Point2D point)Transforms the specified point by the inverse of this transform.Point3DinverseTransform(Point3D point)Transforms the specified point by the inverse of this transform.voidinverseTransform2DPoints(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)Transforms an array of coordinates by the inverse of this transform.voidinverseTransform3DPoints(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)Transforms an array of floating point coordinates by the inverse of this transform.booleanisIdentity()Gets the value of the property identity.booleanisType2D()Gets the value of the property type2D.ObjectProperty<EventHandler<? super TransformChangedEvent>>onTransformChangedProperty()The onTransformChanged event handler is called whenever the transform changes any of its parameters.<T extends Event>
voidremoveEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter)Unregisters a previously registered event filter from this transform.<T extends Event>
voidremoveEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)Unregisters a previously registered event handler from this transform.static Rotaterotate(double angle, double pivotX, double pivotY)Returns aRotateobject that rotates coordinates around a pivot point.double[]row(MatrixType type, int row)Returns an array containing a row of the transformation matrix.double[]row(MatrixType type, int row, double[] array)Returns an array containing a row of the transformation matrix.static Scalescale(double x, double y)Returns aScaleobject representing a scaling transformation.static Scalescale(double x, double y, double pivotX, double pivotY)Returns aScaleobject representing a scaling transformation.voidsetOnTransformChanged(EventHandler<? super TransformChangedEvent> value)Sets the onTransformChanged event handler which is called whenever the transform changes any of its parameters.static Shearshear(double x, double y)Returns aShearobject representing a shearing transformation.static Shearshear(double x, double y, double pivotX, double pivotY)Returns aShearobject representing a shearing transformation.booleansimilarTo(Transform transform, Bounds range, double maxDelta)Checks if this transform is similar to the specified transform.double[]toArray(MatrixType type)Returns an array containing the flattened transformation matrix.double[]toArray(MatrixType type, double[] array)Returns an array containing the flattened transformation matrix.Boundstransform(Bounds bounds)Transforms the specified bounds by this transform.Point2Dtransform(double x, double y)Transforms the specified point by this transform.Point3Dtransform(double x, double y, double z)Transforms the specified point by this transform.Point2Dtransform(Point2D point)Transforms the specified point by this transform.Point3Dtransform(Point3D point)Transforms the specified point by this transform.voidtransform2DPoints(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)Transforms an array of coordinates by this transform.voidtransform3DPoints(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)Transforms an array of floating point coordinates by this transform.protected voidtransformChanged()This method must be called by all transforms whenever any of their parameters changes.static Translatetranslate(double x, double y)Returns aTranslateobject representing a translation transformation.ReadOnlyBooleanPropertytype2DProperty()Determines if this is currently a 2D transform.
-
Property Detail
-
type2D
public final ReadOnlyBooleanProperty type2DProperty
Determines if this is currently a 2D transform. Transform is 2D if it has no effect along the Z axis.Since:
JavaFX 8.0
See Also:
-
identity
public final ReadOnlyBooleanProperty identityProperty
Determines if this is currently an identity transform. Identity transform has no effect on the transformed nodes.Since:
JavaFX 8.0
See Also:
-
onTransformChanged
public final ObjectProperty<EventHandler<? super TransformChangedEvent>> onTransformChangedProperty
The onTransformChanged event handler is called whenever the transform changes any of its parameters.Since:
JavaFX 8.0
-
-
Constructor Detail
-
Transform
public Transform()
-
-
Method Detail
-
affine
public static Affine affine(double mxx, double myx, double mxy, double myy, double tx, double ty)Returns a newAffineobject from 12 number values representing the 6 specifiable entries of the 3x4 Affine transformation matrix.Parameters:
mxx- the X coordinate scaling element of the 3x4 matrixReturns:
a new
Affineobject derived from specified parameters
-
affine
public static Affine affine(double mxx, double mxy, double mxz, double tx, double myx, double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz)Returns a newAffineobject from 12 number values representing the 12 specifiable entries of the 3x4 Affine transformation matrix.Parameters:
mxx- the X coordinate scaling element of the 3x4 matrixReturns:
a new
Affineobject derived from specified parameters
-
translate
public static Translate translate(double x, double y)Returns aTranslateobject representing a translation transformation.This is equivalent to:
new Translate(x, y);
-
rotate
public static Rotate rotate(double angle, double pivotX, double pivotY)Returns aRotateobject that rotates coordinates around a pivot point.This is equivalent to:
new Rotate(angle, pivotX, pivotY);
-
scale
public static Scale scale(double x, double y)Returns aScaleobject representing a scaling transformation.This is equivalent to:
new Scale(x, y);
-
scale
public static Scale scale(double x, double y, double pivotX, double pivotY)Returns aScaleobject representing a scaling transformation. The returned scale operation will be about the given pivot point.This is equivalent to:
new Scale(x, y, pivotX, pivotY);
-
shear
public static Shear shear(double x, double y)Returns aShearobject representing a shearing transformation.This is equivalent to:
new Shear(x, y);
-
shear
public static Shear shear(double x, double y, double pivotX, double pivotY)Returns aShearobject representing a shearing transformation.This is equivalent to:
new Shear(x, y, pivotX, pivotY);
-
getMxx
public double getMxx()
Gets the X coordinate scaling element of the 3x4 matrix.Since:
JavaFX 2.2
-
getMxy
public double getMxy()
Gets the XY coordinate element of the 3x4 matrix.Since:
JavaFX 2.2
-
getMxz
public double getMxz()
Gets the XZ coordinate element of the 3x4 matrix.Since:
JavaFX 2.2
-
getTx
public double getTx()
Gets the X coordinate translation element of the 3x4 matrix.Since:
JavaFX 2.2
-
getMyx
public double getMyx()
Gets the YX coordinate element of the 3x4 matrix.Since:
JavaFX 2.2
-
getMyy
public double getMyy()
Gets the Y coordinate scaling element of the 3x4 matrix.Since:
JavaFX 2.2
-
getMyz
public double getMyz()
Gets the YZ coordinate element of the 3x4 matrix.Since:
JavaFX 2.2
-
getTy
public double getTy()
Gets the Y coordinate translation element of the 3x4 matrix.Since:
JavaFX 2.2
-
getMzx
public double getMzx()
Gets the ZX coordinate element of the 3x4 matrix.Since:
JavaFX 2.2
-
getMzy
public double getMzy()
Gets the ZY coordinate element of the 3x4 matrix.Since:
JavaFX 2.2
-
getMzz
public double getMzz()
Gets the Z coordinate scaling element of the 3x4 matrix.Since:
JavaFX 2.2
-
getTz
public double getTz()
Gets the Z coordinate translation element of the 3x4 matrix.Since:
JavaFX 2.2
-
getElement
public double getElement(MatrixType type, int row, int column)Gets the specified element of the transformation matrix.Parameters:
type- type of matrix to get the value fromReturns:
value of the specified transformation matrix element
Throws:
IllegalArgumentException- if a 2D matrix type is requested for a 3D transformSince:
JavaFX 8.0
-
determinant
public double determinant()
Computes determinant of the transformation matrix. Among other things, determinant can be used for testing this transform's invertibility - it is invertible if determinant is not equal to zero.Returns:
Determinant of the transformation matrix
Since:
JavaFX 8.0
-
isType2D
public final boolean isType2D()
Gets the value of the property type2D.Property description:
Determines if this is currently a 2D transform. Transform is 2D if it has no effect along the Z axis.
Since:
JavaFX 8.0
-
type2DProperty
public final ReadOnlyBooleanProperty type2DProperty()
Determines if this is currently a 2D transform. Transform is 2D if it has no effect along the Z axis.Since:
JavaFX 8.0
See Also:
-
isIdentity
public final boolean isIdentity()
Gets the value of the property identity.Property description:
Determines if this is currently an identity transform. Identity transform has no effect on the transformed nodes.
Since:
JavaFX 8.0
-
identityProperty
public final ReadOnlyBooleanProperty identityProperty()
Determines if this is currently an identity transform. Identity transform has no effect on the transformed nodes.Since:
JavaFX 8.0
See Also:
-
similarTo
public boolean similarTo(Transform transform, Bounds range, double maxDelta)Checks if this transform is similar to the specified transform. The two transforms are considered similar if any point fromrangeis transformed by them to points that are no farther thanmaxDeltafrom each other.Parameters:
transform- transform to be compared to this transformReturns:
true if the transforms are similar according to the specified criteria
Throws:
NullPointerException- if the specifiedtransformorrangeis nullSince:
JavaFX 8.0
-
toArray
public double[] toArray(MatrixType type, double[] array)Returns an array containing the flattened transformation matrix. If the requested matrix type fits in the specified array, it is returned therein. Otherwise, a new array is created.Parameters:
type- matrix type to be filled in the arrayReturns:
an array containing the elements of the requested matrix type representing this transform
Throws:
IllegalArgumentException- if a 2D matrix type is requested for a 3D transformSince:
JavaFX 8.0
-
toArray
public double[] toArray(MatrixType type)
Returns an array containing the flattened transformation matrix.Parameters:
type- matrix type to be filled in the arrayReturns:
an array containing the elements of the requested matrix type representing this transform
Throws:
IllegalArgumentException- if a 2D matrix type is requested for a 3D transformSince:
JavaFX 8.0
-
row
public double[] row(MatrixType type, int row, double[] array)Returns an array containing a row of the transformation matrix. If the row of the requested matrix type fits in the specified array, it is returned therein. Otherwise, a new array is created.Parameters:
type- matrix type whose row is to be filled in the arrayReturns:
an array containing the requested row of the requested matrix type representing this transform
Throws:
IllegalArgumentException- if a 2D matrix type is requested for a 3D transformSince:
JavaFX 8.0
-
row
public double[] row(MatrixType type, int row)Returns an array containing a row of the transformation matrix.Parameters:
type- matrix type whose row is to be filled in the arrayReturns:
an array containing the requested row of the requested matrix type representing this transform
Throws:
IllegalArgumentException- if a 2D matrix type is requested for a 3D transformSince:
JavaFX 8.0
-
column
public double[] column(MatrixType type, int column, double[] array)Returns an array containing a column of the transformation matrix. If the column of the requested matrix type fits in the specified array, it is returned therein. Otherwise, a new array is created.Parameters:
type- matrix type whose column is to be filled in the arrayReturns:
an array containing the requested column of the requested matrix type representing this transform
Throws:
IllegalArgumentException- if a 2D matrix type is requested for a 3D transformSince:
JavaFX 8.0
-
column
public double[] column(MatrixType type, int column)Returns an array containing a column of the transformation matrix.Parameters:
type- matrix type whose column is to be filled in the arrayReturns:
an array containing the requested column of the requested matrix type representing this transform
Throws:
IllegalArgumentException- if a 2D matrix type is requested for a 3D transformSince:
JavaFX 8.0
-
createConcatenation
public Transform createConcatenation(Transform transform)
Returns the concatenation of this transform and the specified transform. Applying the resulting transform to a node has the same effect as adding the two transforms to itsgetTransforms()list,thistransform first and the specifiedtransformsecond.Parameters:
transform- transform to be concatenated with this transformReturns:
The concatenated transform
Throws:
NullPointerException- if the specifiedtransformis nullSince:
JavaFX 8.0
-
createInverse
public Transform createInverse() throws NonInvertibleTransformExceptionReturns the inverse transform of this transform.Returns:
the inverse transform
Throws:
NonInvertibleTransformException- if this transform cannot be invertedSince:
JavaFX 8.0
-
clone
public Transform clone()
Returns a deep copy of this transform.
-
transform
public Point2D transform(double x, double y)Transforms the specified point by this transform. This method can be used only for 2D transforms.Parameters:
x- the X coordinate of the pointReturns:
the transformed point
Throws:
IllegalStateException- if this is a 3D transformSince:
JavaFX 8.0
-
transform
public Point2D transform(Point2D point)
Transforms the specified point by this transform. This method can be used only for 2D transforms.Parameters:
point- the point to be transformedReturns:
the transformed point
Throws:
IllegalStateException- if this is a 3D transformSince:
JavaFX 8.0
-
transform
public Point3D transform(double x, double y, double z)Transforms the specified point by this transform.Parameters:
x- the X coordinate of the pointReturns:
the transformed point
Since:
JavaFX 8.0
-
transform
public Point3D transform(Point3D point)
Transforms the specified point by this transform.Parameters:
point- the point to be transformedReturns:
the transformed point
Throws:
NullPointerException- if the specifiedpointis nullSince:
JavaFX 8.0
-
transform
public Bounds transform(Bounds bounds)
Transforms the specified bounds by this transform.Parameters:
bounds- the bounds to be transformedReturns:
the transformed bounds
Since:
JavaFX 8.0
-
transform2DPoints
public void transform2DPoints(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)Transforms an array of coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the specified offset in the order[x0, y0, x1, y1, ..., xn, yn]. This method can be used only for 2D transforms.Parameters:
srcPts- the array containing the source point coordinates. Each point is stored as a pair of x, y coordinates.Throws:
IllegalStateException- if this is a 3D transformSince:
JavaFX 8.0
-
transform3DPoints
public void transform3DPoints(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)Transforms an array of floating point coordinates by this transform. The three coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the specified offset in the order[x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].Parameters:
srcPts- the array containing the source point coordinates. Each point is stored as a tiplet of x, y, z coordinates.Throws:
NullPointerException- ifsrcPtsor (@code dstPts} is nullSince:
JavaFX 8.0
-
deltaTransform
public Point2D deltaTransform(double x, double y)Transforms the relative magnitude vector by this transform. The vector is transformed without applying the translation components of the affine transformation matrix. This method can be used only for a 2D transform.Parameters:
x- vector magnitude in the direction of the X axisReturns:
the transformed relative magnitude vector represented by a
Point2DinstanceThrows:
IllegalStateException- if this is a 3D transformSince:
JavaFX 8.0
-
deltaTransform
public Point2D deltaTransform(Point2D point)
Transforms the relative magnitude vector represented by the specifiedPoint2Dinstance by this transform. The vector is transformed without applying the translation components of the affine transformation matrix. This method can be used only for a 2D transform.Parameters:
point- the relative magnitude vectorReturns:
the transformed relative magnitude vector represented by a
Point2DinstanceThrows:
IllegalStateException- if this is a 3D transformSince:
JavaFX 8.0
-
deltaTransform
public Point3D deltaTransform(double x, double y, double z)Transforms the relative magnitude vector by this transform. The vector is transformed without applying the translation components of the affine transformation matrix.Parameters:
x- vector magnitude in the direction of the X axisReturns:
the transformed relative magnitude vector represented by a
Point3DinstanceSince:
JavaFX 8.0
-
deltaTransform
public Point3D deltaTransform(Point3D point)
Transforms the relative magnitude vector represented by the specifiedPoint3Dinstance by this transform. The vector is transformed without applying the translation components of the affine transformation matrix.Parameters:
point- the relative magnitude vectorReturns:
the transformed relative magnitude vector represented by a
Point3DinstanceThrows:
NullPointerException- if the specifiedpointis nullSince:
JavaFX 8.0
-
inverseTransform
public Point2D inverseTransform(double x, double y) throws NonInvertibleTransformExceptionTransforms the specified point by the inverse of this transform. This method can be used only for 2D transforms.Parameters:
x- the X coordinate of the pointReturns:
the inversely transformed point
Throws:
IllegalStateException- if this is a 3D transformSince:
JavaFX 8.0
-
inverseTransform
public Point2D inverseTransform(Point2D point) throws NonInvertibleTransformExceptionTransforms the specified point by the inverse of this transform. This method can be used only for 2D transforms.Parameters:
point- the point to be transformedReturns:
the inversely transformed point
Throws:
IllegalStateException- if this is a 3D transformSince:
JavaFX 8.0
-
inverseTransform
public Point3D inverseTransform(double x, double y, double z) throws NonInvertibleTransformExceptionTransforms the specified point by the inverse of this transform.Parameters:
x- the X coordinate of the pointReturns:
the inversely transformed point
Throws:
NonInvertibleTransformException- if this transform cannot be invertedSince:
JavaFX 8.0
-
inverseTransform
public Point3D inverseTransform(Point3D point) throws NonInvertibleTransformExceptionTransforms the specified point by the inverse of this transform.Parameters:
point- the point to be transformedReturns:
the inversely transformed point
Throws:
NonInvertibleTransformException- if this transform cannot be invertedSince:
JavaFX 8.0
-
inverseTransform
public Bounds inverseTransform(Bounds bounds) throws NonInvertibleTransformExceptionTransforms the specified bounds by the inverse of this transform.Parameters:
bounds- the bounds to be transformedReturns:
the inversely transformed bounds
Throws:
NonInvertibleTransformException- if this transform cannot be invertedSince:
JavaFX 8.0
-
inverseTransform2DPoints
public void inverseTransform2DPoints(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws NonInvertibleTransformExceptionTransforms an array of coordinates by the inverse of this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the specified offset in the order[x0, y0, x1, y1, ..., xn, yn]. This method can be used only for 2D transforms.Parameters:
srcPts- the array containing the source point coordinates. Each point is stored as a pair of x, y coordinates.Throws:
IllegalStateException- if this is a 3D transformSince:
JavaFX 8.0
-
inverseTransform3DPoints
public void inverseTransform3DPoints(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws NonInvertibleTransformExceptionTransforms an array of floating point coordinates by the inverse of this transform. The three coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the specified offset in the order[x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].Parameters:
srcPts- the array containing the source point coordinates. Each point is stored as a triplet of x, y, z coordinates.Throws:
NonInvertibleTransformException- if this transform cannot be invertedSince:
JavaFX 8.0
-
inverseDeltaTransform
public Point2D inverseDeltaTransform(double x, double y) throws NonInvertibleTransformExceptionTransforms the relative magnitude vector by the inverse of this transform. The vector is transformed without applying the translation components of the affine transformation matrix. This method can be used only for a 2D transform.Parameters:
x- vector magnitude in the direction of the X axisReturns:
the inversely transformed relative magnitude vector represented by a
Point2DinstanceThrows:
IllegalStateException- if this is a 3D transformSince:
JavaFX 8.0
-
inverseDeltaTransform
public Point2D inverseDeltaTransform(Point2D point) throws NonInvertibleTransformExceptionTransforms the relative magnitude vector represented by the specifiedPoint2Dinstance by the inverse of this transform. The vector is transformed without applying the translation components of the affine transformation matrix. This method can be used only for a 2D transform.Parameters:
point- the relative magnitude vectorReturns:
the inversely transformed relative magnitude vector represented by a
Point2DinstanceThrows:
IllegalStateException- if this is a 3D transformSince:
JavaFX 8.0
-
inverseDeltaTransform
public Point3D inverseDeltaTransform(double x, double y, double z) throws NonInvertibleTransformExceptionTransforms the relative magnitude vector by the inverse of this transform. The vector is transformed without applying the translation components of the affine transformation matrix.Parameters:
x- vector magnitude in the direction of the X axisReturns:
the inversely transformed relative magnitude vector represented by a
Point3DinstanceThrows:
NonInvertibleTransformException- if this transform cannot be invertedSince:
JavaFX 8.0
-
inverseDeltaTransform
public Point3D inverseDeltaTransform(Point3D point) throws NonInvertibleTransformExceptionTransforms the relative magnitude vector represented by the specifiedPoint3Dinstance by the inverse of this transform. The vector is transformed without applying the translation components of the affine transformation matrix.Parameters:
point- the relative magnitude vectorReturns:
the inversely transformed relative magnitude vector represented by a
Point3DinstanceThrows:
NonInvertibleTransformException- if this transform cannot be invertedSince:
JavaFX 8.0
-
buildEventDispatchChain
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail)
Description copied from interface:EventTargetConstruct an event dispatch chain for this target. The event dispatch chain contains event dispatchers which might be interested in processing of events targeted at thisEventTarget. This event target is not automatically added to the chain, so if it wants to process events, it needs to add anEventDispatcherfor itself to the chain.In the case the event target is part of some hierarchy, the chain for it is usually built from event dispatchers collected from the root of the hierarchy to the event target.
The event dispatch chain is constructed by modifications to the provided initial event dispatch chain. The returned chain should have the initial chain at its end so the dispatchers should be prepended to the initial chain.
The caller shouldn't assume that the initial chain remains unchanged nor that the returned value will reference a different chain.
Specified by:
buildEventDispatchChainin interfaceEventTargetParameters:
tail- the initial chain to build fromReturns:
the resulting event dispatch chain for this target
-
addEventHandler
public final <T extends Event> void addEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)Registers an event handler to this transform. Any event filters are first processed, then the specified onFoo event handlers, and finally any event handlers registered by this method.
Currently the only event delivered to a
Transformis theTransformChangedEventwith it's single typeTRANSFORM_CHANGED.Type Parameters:
T- the specific event class of the handlerParameters:
eventType- the type of the events to receive by the handlerThrows:
NullPointerException- if the event type or handler is nullSince:
JavaFX 8.0
-
removeEventHandler
public final <T extends Event> void removeEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)Unregisters a previously registered event handler from this transform. One handler might have been registered for different event types, so the caller needs to specify the particular event type from which to unregister the handler.Type Parameters:
T- the specific event class of the handlerParameters:
eventType- the event type from which to unregisterThrows:
NullPointerException- if the event type or handler is nullSince:
JavaFX 8.0
-
addEventFilter
public final <T extends Event> void addEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter)Registers an event filter to this transform. Registered event filters get an event before any associated event handlers.
Currently the only event delivered to a
Transformis theTransformChangedEventwith it's single typeTRANSFORM_CHANGED.Type Parameters:
T- the specific event class of the filterParameters:
eventType- the type of the events to receive by the filterThrows:
NullPointerException- if the event type or filter is nullSince:
JavaFX 8.0
-
removeEventFilter
public final <T extends Event> void removeEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter)Unregisters a previously registered event filter from this transform. One filter might have been registered for different event types, so the caller needs to specify the particular event type from which to unregister the filter.Type Parameters:
T- the specific event class of the filterParameters:
eventType- the event type from which to unregisterThrows:
NullPointerException- if the event type or filter is nullSince:
JavaFX 8.0
-
setOnTransformChanged
public final void setOnTransformChanged(EventHandler<? super TransformChangedEvent> value)
Sets the onTransformChanged event handler which is called whenever the transform changes any of its parameters.Parameters:
value- the event handler, can be null to clear itSince:
JavaFX 8.0
-
getOnTransformChanged
public final EventHandler<? super TransformChangedEvent> getOnTransformChanged()
Gets the onTransformChanged event handler.Returns:
the event handler previously set by
setOnTransformChangedmethod, null if the handler is not set.Since:
JavaFX 8.0
-
onTransformChangedProperty
public final ObjectProperty<EventHandler<? super TransformChangedEvent>> onTransformChangedProperty()
The onTransformChanged event handler is called whenever the transform changes any of its parameters.Since:
JavaFX 8.0
-
transformChanged
protected void transformChanged()
This method must be called by all transforms whenever any of their parameters changes. It is typically called when any of the transform's properties is invalidated (it is OK to skip the call if an invalid property is set).Since:
JavaFX 8.0
-
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.