Search in sources :

Example 1 with ImportPcapWizardController

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

the class PacketTableView method hanldeImportPcap.

/**
     * Handle import pcap
     */
private void hanldeImportPcap() {
    try {
        // open import dialog
        setStreamEditingWindowOpen(true);
        Stage owner = (Stage) streamPacketTableView.getScene().getWindow();
        DialogWindow importPcapWindow = new DialogWindow("ImportPcapWizard.fxml", "   Import Pcap", 60, 80, false, owner);
        ImportPcapWizardController importController = (ImportPcapWizardController) importPcapWindow.getController();
        importController.initWizard(tabledata.getProfiles(), tabledata.getYamlFileName());
        importPcapWindow.show(true);
    } catch (Exception ex) {
        LOG.error("Error loading pcap file", ex);
    }
}
Also used : ImportPcapWizardController(com.exalttech.trex.ui.controllers.ImportPcapWizardController) Stage(javafx.stage.Stage) DialogWindow(com.exalttech.trex.ui.dialog.DialogWindow) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IOException(java.io.IOException) IllegalRawDataException(org.pcap4j.packet.IllegalRawDataException)

Aggregations

ImportPcapWizardController (com.exalttech.trex.ui.controllers.ImportPcapWizardController)1 DialogWindow (com.exalttech.trex.ui.dialog.DialogWindow)1 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 IOException (java.io.IOException)1 Stage (javafx.stage.Stage)1 IllegalRawDataException (org.pcap4j.packet.IllegalRawDataException)1