use of com.exalttech.trex.ui.dialog.DialogWindow in project trex-stateless-gui by cisco-system-traffic-generator.
the class MainViewController method openPreferencesWindow.
/**
* Open preferences window
*/
private void openPreferencesWindow() {
try {
DialogWindow statsWindow = new DialogWindow("Preferences.fxml", "Preferences", 100, 50, false, TrexApp.getPrimaryStage());
statsWindow.show(true);
} catch (IOException ex) {
LOG.error("Error opening preferences window", ex);
}
}
use of com.exalttech.trex.ui.dialog.DialogWindow in project trex-stateless-gui by cisco-system-traffic-generator.
the class MainViewController method openStateDialog.
/**
* Open statistic dashboard view
*/
private void openStateDialog() {
try {
if (DialogManager.getInstance().getNumberOfOpenedDialog() < 4) {
DialogWindow statsWindow = new DialogWindow("Dashboard/Dashboard.fxml", "Dashboard", 50, 10, true, TrexApp.getPrimaryStage());
statsWindow.setMinSize(1210, 740);
statsWindow.show(false);
}
} catch (IOException ex) {
LOG.error("Error opening dashboard view", ex);
}
}
use of com.exalttech.trex.ui.dialog.DialogWindow in project trex-stateless-gui by cisco-system-traffic-generator.
the class MainViewController method handleAboutTreeItemClicked.
/**
* Handle About tree item clicked
*
* @param event
* @throws java.lang.Exception
*/
@FXML
public void handleAboutTreeItemClicked(ActionEvent event) throws Exception {
DialogWindow statsWindow = new DialogWindow("AboutWindowView.fxml", "TRex", 200, 100, false, TrexApp.getPrimaryStage());
statsWindow.show(true);
}
use of com.exalttech.trex.ui.dialog.DialogWindow 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.dialog.DialogWindow in project trex-stateless-gui by cisco-system-traffic-generator.
the class PacketTableView method openStreamDialog.
/**
* open stream properties
*/
private void openStreamDialog(StreamBuilderType type) {
try {
TableProfileStream data = streamPacketTableView.getSelectionModel().getSelectedItem();
if ("0".equals(data.getLength()) && !Util.isConfirmed("Problem reading file, Do you want to continue anyway ?")) {
return;
}
setStreamEditingWindowOpen(true);
Stage currentStage = (Stage) streamPacketTableView.getScene().getWindow();
String windowTitle = "Edit Stream (" + data.getName() + ")";
DialogWindow srteamWindow = new DialogWindow("PacketBuilderHome.fxml", windowTitle, 40, 30, false, currentStage);
PacketBuilderHomeController controller = (PacketBuilderHomeController) srteamWindow.getController();
boolean streaminited = false;
switch(type) {
case EDIT_STREAM:
streaminited = controller.initStreamBuilder(data.getPcapBinary(), tabledata.getProfiles(), streamPacketTableView.getSelectionModel().getSelectedIndex(), tabledata.getYamlFileName(), StreamBuilderType.EDIT_STREAM);
break;
case ADD_STREAM:
streaminited = controller.initStreamBuilder(null, tabledata.getProfiles(), streamPacketTableView.getSelectionModel().getSelectedIndex(), tabledata.getYamlFileName(), StreamBuilderType.ADD_STREAM);
break;
case BUILD_STREAM:
streaminited = controller.initStreamBuilder(null, tabledata.getProfiles(), streamPacketTableView.getSelectionModel().getSelectedIndex(), tabledata.getYamlFileName(), StreamBuilderType.BUILD_STREAM);
break;
default:
break;
}
if (streaminited) {
srteamWindow.show(true);
} else {
LOG.error("Error while initing editor dialog");
}
} catch (IOException ex) {
LOG.error("Error opening file", ex);
}
}
Aggregations