Java Code Examples for javafx.scene.layout.BackgroundFill#getFill()

The following examples show how to use javafx.scene.layout.BackgroundFill#getFill() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JFXBackgroundProperty.java    From tuxguitar with GNU Lesser General Public License v2.1 5 votes vote down vote up
public UIColor get() {
	Background background = this.target.get();
	if( background != null && background.getFills() != null ) {
		for(BackgroundFill fill : background.getFills()) {
			if( fill.getFill() instanceof Color ) {
				return new JFXColor((Color) fill.getFill());
			}
		}
	}
	return null;
}
 
Example 2
Source File: FullPropertiesDetailPaneInfo.java    From scenic-view with GNU General Public License v3.0 4 votes vote down vote up
private static String backgroundFillToString(BackgroundFill backgroundFill) {
    return "paint=" + backgroundFill.getFill() 
        + " insets=" + backgroundFill.getInsets()
        + " radii=" + backgroundFill.getRadii();
}