Class FXSimpleLinearGradientPicker

All Implemented Interfaces:
Drawable

public class FXSimpleLinearGradientPicker extends Composite
The FXSimpleLinearGradientPicker allows the selection of two colors from which a gradient is constructed.
  • Property Details

  • Field Details

  • Constructor Details

    • FXSimpleLinearGradientPicker

      public FXSimpleLinearGradientPicker(Composite parent, javafx.scene.paint.Color color1, javafx.scene.paint.Color color2)
      Parameters:
      parent - The parent Composite.
      color1 - The first color of the initial simple LinearGradient.
      color2 - The second color of the initial simple LinearGradient.
  • Method Details

    • createSimpleLinearGradient

      public static javafx.scene.paint.LinearGradient createSimpleLinearGradient(javafx.scene.paint.Color c1, javafx.scene.paint.Color c2)
      Creates a simple color gradient from the given start color to the given end color.
      Parameters:
      c1 - The start Color.
      c2 - The end Color.
      Returns:
      The resulting LinearGradient.
    • isSimpleLinearGradient

      public static boolean isSimpleLinearGradient(javafx.scene.paint.Paint paint)
      Returns true if the given Paint is a "simple" gradient, i.e. it has exactly 2 stops. Otherwise returns false.
      Parameters:
      paint - The Paint in question.
      Returns:
      true if the given Paint is a simple gradient, otherwise false.
    • getSimpleLinearGradient

      public javafx.scene.paint.LinearGradient getSimpleLinearGradient()
      Returns the currently selected simple gradient.
      Returns:
      The currently selected simple gradient.
    • setSimpleLinearGradient

      public void setSimpleLinearGradient(javafx.scene.paint.LinearGradient simpleLinearGradient)
      Changes the currently selected gradient to the given value.
      Parameters:
      simpleLinearGradient - The new simple LinearGradient to select.
    • simpleLinearGradientProperty

      public javafx.beans.property.Property<javafx.scene.paint.LinearGradient> simpleLinearGradientProperty()
      Returns a writable property for the simple linear gradient.
      See Also: