use of com.exalttech.trex.ui.controllers.ProfileStreamNameDialogController in project trex-stateless-gui by cisco-system-traffic-generator.
the class PacketTableView method viewStreamNameWindow.
/**
* View stream name window
*
* @param type
*/
private void viewStreamNameWindow(StreamBuilderType type) {
try {
Stage currentStage = (Stage) streamPacketTableView.getScene().getWindow();
DialogWindow profileNameWindow = new DialogWindow("ProfileStreamNameDialog.fxml", "Add Stream", 150, 100, false, currentStage);
ProfileStreamNameDialogController controller = (ProfileStreamNameDialogController) profileNameWindow.getController();
controller.setProfileList(tabledata.getProfiles());
controller.setProfileWindow(false);
profileNameWindow.show(true);
if (controller.isDataAvailable()) {
String streamName = controller.getName();
handleAddPacket(streamName, type);
}
} catch (IOException ex) {
LOG.error("Error adding new stream", ex);
}
}
use of com.exalttech.trex.ui.controllers.ProfileStreamNameDialogController in project trex-stateless-gui by cisco-system-traffic-generator.
the class ProfileManager method createNewProfile.
/**
*
* @param currentStage
* @return
* @throws IOException
*/
public String createNewProfile(Stage currentStage) throws IOException {
String profileName = "";
DialogWindow profileNameWindow = new DialogWindow("ProfileStreamNameDialog.fxml", "Create Profile", 150, 100, false, currentStage);
ProfileStreamNameDialogController controller = (ProfileStreamNameDialogController) profileNameWindow.getController();
controller.setProfileWindow(true);
profileNameWindow.show(true);
if (controller.isDataAvailable()) {
profileName = controller.getName() + ".yaml";
File newFile = FileManager.createNewFile(profileName);
updateProfilesList(newFile, true);
}
return profileName;
}
Aggregations