List of usage examples for javafx.scene.control Label getStylesheets
public final ObservableList<String> getStylesheets()
From source file:caillou.company.clonemanager.gui.customComponent.location.LocationController.java
@Subscribe public void showErrors(ShowErrorsEvent showErrorsEvent) { final List<Error> errors = this.getModel().getErrors(); if (!errors.isEmpty()) { VBox vbox = new VBox(); vbox.setSpacing(5);// ww w. ja v a 2 s. com for (Error error : errors) { Label errorLabel = new Label(error.getMessage()); errorLabel.getStylesheets().add(StyleSheet.LOCATION_CSS); if (error.getSeverityLevel() .equals(caillou.company.clonemanager.gui.bean.error.Error.SEVERITY_LEVEL.ERROR)) { errorLabel.getStyleClass().add("error"); } else if (error.getSeverityLevel() .equals(caillou.company.clonemanager.gui.bean.error.Error.SEVERITY_LEVEL.WARNING)) { errorLabel.getStyleClass().add("warning"); } vbox.getChildren().add(new Label(error.getMessage())); } errorPopOver.setContentNode(vbox); errorPopOver.show(path); } else { errorPopOver.hide(); } }