Example usage for javafx.scene Parent getStylesheets

List of usage examples for javafx.scene Parent getStylesheets

Introduction

In this page you can find the example usage for javafx.scene Parent getStylesheets.

Prototype

public final ObservableList<String> getStylesheets() 

Source Link

Document

Gets an observable list of string URLs linking to the stylesheets to use with this Parent's contents.

Usage

From source file:com.ucu.seguridad.views.AbstractFxmlView.java

void addCSSIfAvailable(Parent parent) {

    URL uri = getClass().getResource(getStyleSheetName());
    if (uri == null) {
        return;//from   ww w  . ja  v  a 2  s  .c om
    }

    String uriToCss = uri.toExternalForm();
    parent.getStylesheets().add(uriToCss);
}