JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

Profile: desktop, common

Overview

An effect that simulates a light source shining on the given content, which can be used to give flat objects a more realistic, three-dimensional appearance.

the code:

import javafx.scene.*;
import javafx.scene.text.*;
import javafx.scene.paint.*;
import javafx.scene.effect.*;
import javafx.scene.effect.light.*;

Text {
    effect: Lighting {
        light: DistantLight { azimuth: -135 }
        surfaceScale: 5
    }
    textOrigin: TextOrigin.TOP
    x: 10 y: 10
    content: "JavaFX!"
    fill: Color.RED
    font: Font.font(null, FontWeight.BOLD, 90);
}

produces:

Profile: desktop

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicbumpInputEffectnull

The optional bump map input.

The optional bump map input. If not specified, a bump map will be automatically generated from the default input. If set to null, or left unspecified, a graphical image of the Node to which the Effect is attached will be used to generate a default bump map.

null  
publiccontentInputEffectnull

The content input for this Effect.

The content input for this Effect. If set to null, or left unspecified, a graphical image of the Node to which the Effect is attached will be used as the input.

null  
publicdiffuseConstantNumber1.0

The diffuse constant.

The diffuse constant.

       Min: 0.0
       Max: 2.0
   Default: 1.0
  Identity: n/a
 

1.0  
publiclightLight

The light source for this Lighting effect.

publicspecularConstantNumber0.3

The specular constant.

The specular constant.

       Min: 0.0
       Max: 2.0
   Default: 0.3
  Identity: n/a
 

0.3  
publicspecularExponentNumber20.0

The specular exponent.

The specular exponent.

       Min:  0.0
       Max: 40.0
   Default: 20.0
  Identity:  n/a
 

20.0  
publicsurfaceScaleNumber1.5

The surface scale factor.

The surface scale factor.

       Min:  0.0
       Max: 10.0
   Default:  1.5
  Identity:  n/a
 

1.5  

Inherited Variables

Function Summary

public impl_getImpl() : com.sun.scenario.effect.Effect
Returns
Effect
 

Inherited Functions

javafx.scene.effect.Effect

public getAccelType(config: java.awt.GraphicsConfiguration) : java.lang.String

Returns a String representing the type of hardware acceleration, if any, that is used when applying this Effect on the given GraphicsConfiguration.

Returns a String representing the type of hardware acceleration, if any, that is used when applying this Effect on the given GraphicsConfiguration. This method is intended for informational or debugging purposes only.

Parameters
config
Returns
String
 
public abstract impl_getImpl() : com.sun.scenario.effect.Effect
Returns
Effect
 



Spec-Zone.ru - all specs in one place