Example usage for javafx.scene.paint Color CYAN

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

Introduction

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

Prototype

Color CYAN

To view the source code for javafx.scene.paint Color CYAN.

Click Source Link

Document

The color cyan with an RGB value of #00FFFF

Usage

From source file:dpfmanager.shell.interfaces.gui.component.report.ReportsView.java

private void addHeaders() {
    TableColumn colDate = new TableColumn(bundle.getString("colDate"));
    setMinMaxWidth(colDate, 75);//from   w  w  w.  j ava 2  s. c  o m
    colDate.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("date"));

    TableColumn colTime = new TableColumn(bundle.getString("colTime"));
    setMinMaxWidth(colTime, 75);
    colTime.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("time"));

    TableColumn colN = new TableColumn(bundle.getString("colN"));
    setMinMaxWidth(colN, 70);
    colN.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("nfiles"));

    TableColumn colFile = new TableColumn(bundle.getString("colFile"));
    setMinMaxWidth(colFile, 160);
    colFile.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("input"));

    TableColumn colErrors = new TableColumn(bundle.getString("colErrors"));
    setMinMaxWidth(colErrors, 65);
    colErrors.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("errors"));

    TableColumn colWarnings = new TableColumn(bundle.getString("colWarnings"));
    setMinMaxWidth(colWarnings, 85);
    colWarnings.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("warnings"));

    TableColumn colPassed = new TableColumn(bundle.getString("colPassed"));
    setMinMaxWidth(colPassed, 65);
    colPassed.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("passed"));

    colScore = new TableColumn(bundle.getString("colScore"));
    setMinMaxWidth(colScore, 75);
    colScore.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("score"));

    colFormats = new TableColumn(bundle.getString("colFormats"));
    setMinMaxWidth(colFormats, 120);
    colFormats
            .setCellValueFactory(new PropertyValueFactory<ReportRow, ObservableMap<String, String>>("formats"));

    colDelete = new TableColumn(bundle.getString("colDelete"));
    setMinMaxWidth(colDelete, 30);
    colDelete.setVisible(true);
    colDelete.setCellValueFactory(new PropertyValueFactory<>("delete"));

    tabReports.skinProperty().addListener((obs, oldSkin, newSkin) -> {
        TableHeaderRow header = (TableHeaderRow) tabReports.lookup("TableHeaderRow");
        header.reorderingProperty().addListener((o, oldVal, newVal) -> header.setReordering(false));
    });

    tabReports.setPrefWidth(840.0);
    tabReports.setFixedCellSize(28.0);
    tabReports.getColumns().addAll(colDate, colTime, colN, colFile, colErrors, colWarnings, colPassed, colScore,
            colFormats, colDelete);
    tabReports.setCursor(Cursor.DEFAULT);
    tabReports.setEditable(false);
    tabReports.setMaxHeight(470.0);

    // Change column colors
    changeColumnTextColor(colDate, Color.LIGHTGRAY);
    changeColumnTextColor(colTime, Color.LIGHTGRAY);
    changeColumnTextColor(colFile, Color.LIGHTGRAY);
    changeColumnTextColor(colN, Color.CYAN);
    changeColumnTextColor(colErrors, Color.RED);
    changeColumnTextColor(colWarnings, Color.ORANGE);
    changeColumnTextColor(colPassed, Color.GREENYELLOW);
    changeColumnTextColor(colScore, Color.LIGHTGRAY);

    // Columns factories
    Bindings.size(tabReports.getItems()).addListener(new ChangeListener<Number>() {
        @Override
        public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
            resizeTable();
        }
    });
    addChartScore();
    addFormatIcons();
    addDeleteIcon();
}