Example usage for javafx.scene.paint Color isOpaque

List of usage examples for javafx.scene.paint Color isOpaque

Introduction

In this page you can find the example usage for javafx.scene.paint Color isOpaque.

Prototype

@Override
public final boolean isOpaque() 

Source Link

Usage

From source file:Main.java

public static java.awt.Color toAwt(final Color color) {
    if (null == color) {
        return null;
    }/*from   www.ja  v a  2  s  .com*/
    if (color.isOpaque() || color.getOpacity() >= 1d) {
        return new java.awt.Color((float) color.getRed(), (float) color.getGreen(), (float) color.getBlue());
    } else {
        return new java.awt.Color((float) color.getRed(), (float) color.getGreen(), (float) color.getBlue(),
                (float) color.getOpacity());
    }
}