Top Description Inners Fields Constructors Methods
javafx.scene.effect

public abstract Class Effect

extends Object
Class Inheritance
Known Direct Subclasses
javafx.scene.effect.GaussianBlur, javafx.scene.effect.Glow, javafx.scene.effect.ImageInput, javafx.scene.effect.InnerShadow, javafx.scene.effect.Lighting, javafx.scene.effect.MotionBlur, javafx.scene.effect.PerspectiveTransform, javafx.scene.effect.Reflection, javafx.scene.effect.SepiaTone, javafx.scene.effect.Shadow, javafx.scene.effect.Blend, javafx.scene.effect.Bloom, javafx.scene.effect.BoxBlur, javafx.scene.effect.ColorAdjust, javafx.scene.effect.ColorInput, javafx.scene.effect.DisplacementMap, javafx.scene.effect.DropShadow
Imports
javafx.beans.Observable, javafx.beans.property.IntegerProperty, .ObjectPropertyBase, .SimpleIntegerProperty, javafx.scene.Node, com.sun.javafx.effect.EffectDirtyBits, com.sun.javafx.geom.BaseBounds, .RectBounds, com.sun.javafx.geom.transform.BaseTransform, com.sun.javafx.scene.BoundsAccessor, com.sun.scenario.effect.EffectHelper

The abstract base class for all effect implementations. An effect is a graphical algorithm that produces an image, typically as a modification of a source image. An effect can be associated with a scene graph Node by setting the Node.effect attribute. Some effects change the color properties of the source pixels (such as ColorAdjust), others combine multiple images together (such as Blend), while still others warp or move the pixels of the source image around (such as DisplacementMap or PerspectiveTransform). All effects have at least one input defined and the input can be set to another effect to chain the effects together and combine their results, or it can be left unspecified in which case the effect will operate on a graphical rendering of the node it is attached to.

Note

this is a conditional feature. See ConditionalFeature.EFFECT for more information.

Since
JavaFX 2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class

Field Summary

Modifier and TypeField and Description
private IntegerProperty
private Effect

Constructor Summary

AccessConstructor and Description
protected
Effect()

Creates a new Effect.

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract boolean
private void
clearEffectDirty(EffectDirtyBits dirtyBit)

Clear the specified dirty bit

pack-priv boolean
pack-priv abstract Effect
copy()

pack-priv abstract Effect
pack-priv void
private final IntegerProperty
pack-priv abstract BaseBounds
getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)

Returns bounds of given node with applied effect.

pack-priv static BaseBounds
getInputBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor, Effect input)

pack-priv static int
getKernelSize(float fsize, int iterations)

pack-priv Effect
pack-priv static BaseBounds
getShadowBounds(BaseBounds bounds, BaseTransform tx, float width, float height, BlurType blurType)

private final boolean
private boolean
isEffectDirty(EffectDirtyBits dirtyBit)

Test the specified dirty bit

pack-priv final void
markDirty(EffectDirtyBits dirtyBit)

Set the specified dirty bit

private void
setEffectDirty(int value)

pack-priv final void
sync()

private void
toggleDirty(EffectDirtyBits dirtyBit)

Toggle the specified dirty bit

pack-priv static BaseBounds
pack-priv abstract void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

effectDirtyback to summary
private IntegerProperty effectDirty
peerback to summary
private Effect peer

Constructor Detail

Effectback to summary
protected Effect()

Creates a new Effect.

Method Detail

checkChainContainsback to summary
pack-priv abstract boolean checkChainContains(Effect e)
clearEffectDirtyback to summary
private void clearEffectDirty(EffectDirtyBits dirtyBit)

Clear the specified dirty bit

containsCyclesback to summary
pack-priv boolean containsCycles(Effect value)
copyback to summary
pack-priv abstract Effect copy()
createPeerback to summary
pack-priv abstract Effect createPeer()
effectBoundsChangedback to summary
pack-priv void effectBoundsChanged()
effectDirtyPropertyback to summary
private final IntegerProperty effectDirtyProperty()
getBoundsback to summary
pack-priv abstract BaseBounds getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)

Returns bounds of given node with applied effect. We *never* pass null in as a bounds. This method will NOT take a null bounds object. The returned value may be the same bounds object passed in, or it may be a new object.

getInputBoundsback to summary
pack-priv static BaseBounds getInputBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor, Effect input)
getKernelSizeback to summary
pack-priv static int getKernelSize(float fsize, int iterations)
getPeerback to summary
pack-priv Effect getPeer()
getShadowBoundsback to summary
pack-priv static BaseBounds getShadowBounds(BaseBounds bounds, BaseTransform tx, float width, float height, BlurType blurType)
isEffectDirtyback to summary
private final boolean isEffectDirty()
isEffectDirtyback to summary
private boolean isEffectDirty(EffectDirtyBits dirtyBit)

Test the specified dirty bit

markDirtyback to summary
pack-priv final void markDirty(EffectDirtyBits dirtyBit)

Set the specified dirty bit

setEffectDirtyback to summary
private void setEffectDirty(int value)
syncback to summary
pack-priv final void sync()
toggleDirtyback to summary
private void toggleDirty(EffectDirtyBits dirtyBit)

Toggle the specified dirty bit

transformBoundsback to summary
pack-priv static BaseBounds transformBounds(BaseTransform tx, BaseBounds r)
updateback to summary
pack-priv abstract void update()
javafx.scene.effect back to summary

pack-priv Class Effect.EffectInputChangeListener

extends EffectChangeListener
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
Inherited from javafx.scene.effect.EffectChangeListener:
registredOn

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
invalidated(Observable
The Observable that became invalid
valueModel
)

Implements javafx.beans.InvalidationListener.invalidated.

This method needs to be provided by an implementation of InvalidationListener.

public void
Inherited from javafx.scene.effect.EffectChangeListener:
register

Field Detail

oldBitsback to summary
private int oldBits

Constructor Detail

EffectInputChangeListenerback to summary
pack-priv EffectInputChangeListener()

Method Detail

invalidatedback to summary
public void invalidated(Observable valueModel)

Implements javafx.beans.InvalidationListener.invalidated.

Doc from javafx.beans.InvalidationListener.invalidated.

This method needs to be provided by an implementation of InvalidationListener. It is called if an Observable becomes invalid.

In general, it is considered bad practice to modify the observed value in this method.

Parameters
valueModel:Observable

The Observable that became invalid

Annotations
@Override
registerback to summary
public void register(Effect value)
javafx.scene.effect back to summary

pack-priv Class Effect.EffectInputProperty

extends ObjectPropertyBase<Effect>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Effect.EffectInputChangeListener
private final String
private Effect

Constructor Summary

AccessConstructor and Description
public
EffectInputProperty(final String propertyName)

Method Summary

Modifier and TypeMethod and Description
public Object
getBean()

Implements javafx.beans.property.ReadOnlyProperty.getBean.

Returns the Object that contains this property.

public String
getName()

Implements javafx.beans.property.ReadOnlyProperty.getName.

Returns the name of this property.

public void
invalidated()

Overrides javafx.beans.property.ObjectPropertyBase.invalidated.

The method invalidated() can be overridden to receive invalidation notifications.

Inherited from javafx.beans.property.ObjectPropertyBase:
addListeneraddListenerbindfireValueChangedEventgetisBoundremoveListenerremoveListenersettoStringunbind

Field Detail

effectChangeListenerback to summary
private final Effect.EffectInputChangeListener effectChangeListener
propertyNameback to summary
private final String propertyName
validInputback to summary
private Effect validInput

Constructor Detail

EffectInputPropertyback to summary
public EffectInputProperty(final String propertyName)

Method Detail

getBeanback to summary
public Object getBean()

Implements javafx.beans.property.ReadOnlyProperty.getBean.

Doc from javafx.beans.property.ReadOnlyProperty.getBean.

Returns the Object that contains this property. If this property is not contained in an Object, null is returned.

Returns:Object

the containing Object or null

Annotations
@Override
getNameback to summary
public String getName()

Implements javafx.beans.property.ReadOnlyProperty.getName.

Doc from javafx.beans.property.ReadOnlyProperty.getName.

Returns the name of this property. If the property does not have a name, this method returns an empty String.

Returns:String

the name or an empty String

Annotations
@Override
invalidatedback to summary
public void invalidated()

Overrides javafx.beans.property.ObjectPropertyBase.invalidated.

Doc from javafx.beans.property.ObjectPropertyBase.invalidated.

The method invalidated() can be overridden to receive invalidation notifications. This is the preferred option in Objects defining the property, because it requires less memory. The default implementation is empty.

Annotations
@Override