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);
    }

Profile: desktop

Variable Summary

access name type Can Read Can Init Can Write Default Value description
public bumpInput Effect null

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  
public contentInput Effect null

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  
public diffuseConstant Number 1.0

The diffuse constant.

The diffuse constant.

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

1.0  
public light Light

The light source for this Lighting effect.

public specularConstant Number 0.3

The specular constant.

The specular constant.

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

0.3  
public specularExponent Number 20.0

The specular exponent.

The specular exponent.

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

20.0  
public surfaceScale Number 1.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.lang.Object) : 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 impl_add(node: Node) : Void
Parameters
node
 
public abstract impl_getImpl() : com.sun.scenario.effect.Effect
Returns
Effect
 
public impl_remove(node: Node) : Void
Parameters
node
 



Spec-Zone.ru - all specs in one place