Search in sources :

Example 1 with TextFieldTableViewCell

use of com.exalttech.trex.ui.components.TextFieldTableViewCell in project trex-stateless-gui by cisco-system-traffic-generator.

the class ImportedPacketTableView method initTableRowsColumns.

/**
 * Initialize table rows and columns
 */
private void initTableRowsColumns() {
    selectedColumn.setCellValueFactory(new PropertyValueFactory<>("selected"));
    selectedColumn.setCellFactory(CheckBoxTableCell.forTableColumn(selectedColumn));
    selectAll = new CheckBox();
    selectAll.getStyleClass().add("selectAll");
    selectAll.setSelected(true);
    selectAll.selectedProperty().addListener((ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) -> {
        selectAllRows();
    });
    selectedColumn.setGraphic(selectAll);
    nameColumn.setCellValueFactory(new PropertyValueFactory<>("name"));
    nameColumn.setCellFactory(new TextFieldTableViewCell());
    packetNumColumn.setCellValueFactory(new PropertyValueFactory<>("index"));
    lengthColumn.setCellValueFactory(new PropertyValueFactory<>("length"));
    macSrcColumn.setCellValueFactory(new PropertyValueFactory<>("macSrc"));
    macDstColumn.setCellValueFactory(new PropertyValueFactory<>("macDst"));
    ipSrcColumn.setCellValueFactory(new PropertyValueFactory<>("ipSrc"));
    ipDstColumn.setCellValueFactory(new PropertyValueFactory<>("ipDst"));
    packetTypeColumn.setCellValueFactory(new PropertyValueFactory<>("packetType"));
    importedStreamTable.setRowFactory(highlightedRowFactory);
}
Also used : TextFieldTableViewCell(com.exalttech.trex.ui.components.TextFieldTableViewCell) ObservableValue(javafx.beans.value.ObservableValue)

Aggregations

TextFieldTableViewCell (com.exalttech.trex.ui.components.TextFieldTableViewCell)1 ObservableValue (javafx.beans.value.ObservableValue)1