Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: DropShadow

[13:7] extends: FxObj

Wraps JavaFX DropShadow, an effect that renders a shadow beneath a node, with configurable color, blur radius, X and Y offset, and spread. The radius controls how soft the shadow edges are, the offset shifts the shadow position relative to the node, and spread controls how much of the radius is filled with solid color before blurring. Apply it to any node via the node's setEffect() method.

Methods

  • DropShadow ()

    Creates a new DropShadow effect with default settings.

  • setRadius (double R)

    Sets the blur radius of the shadow, controlling how soft the shadow edges appear.

    • @p R is a double with the radius in pixels; larger values produce softer edges.
    • @r this object
  • setOffsetX (double X)

    Sets the horizontal offset of the shadow relative to the source node.

    • @p X is a double with the X offset in pixels; positive shifts the shadow right.
    • @r this object
  • setOffsetY (double Y)

    Sets the vertical offset of the shadow relative to the source node.

    • @p Y is a double with the Y offset in pixels; positive shifts the shadow down.
    • @r this object
  • setColor (object ColorObj)

    Sets the color of the shadow.

    • @p ColorObj is a Color object specifying the shadow color.
    • @r this object
  • setSpread (double S)

    Sets the spread of the shadow, controlling how much of the radius is filled with solid color.

    • @p S is a double in the range 0.0 to 1.0; higher values produce a harder shadow edge.
    • @r this object