use of javafx.fxml.FXML in project trex-stateless-gui by cisco-system-traffic-generator.
the class PacketBuilderHomeController method handleCloseDialog.
@FXML
public void handleCloseDialog(final MouseEvent event) {
Node node = (Node) event.getSource();
Stage stage = (Stage) node.getScene().getWindow();
stage.hide();
}
use of javafx.fxml.FXML in project trex-stateless-gui by cisco-system-traffic-generator.
the class PacketBuilderHomeController method saveProfileBtnClicked.
@FXML
public void saveProfileBtnClicked(ActionEvent event) {
if (saveStream()) {
// close the dialog
Node node = (Node) event.getSource();
Stage stage = (Stage) node.getScene().getWindow();
stage.hide();
}
}
use of javafx.fxml.FXML 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 javafx.fxml.FXML in project trex-stateless-gui by cisco-system-traffic-generator.
the class ConnectDialogController method handleConnectButton.
/**
* Handle connect button clicking
*
* @param event
*/
@FXML
public void handleConnectButton(ActionEvent event) {
Node node = (Node) event.getSource();
Stage stage = (Stage) node.getScene().getWindow();
doConnect(stage);
}
use of javafx.fxml.FXML in project Gargoyle by callakrsos.
the class AntRunConfigView method initialize.
@FXML
public void initialize() {
c = new AntJavaCompiler(this.buildFile.getParentFile(), this.buildFile) {
@Override
protected BuildListener getBuildListener() {
return progressListener;
}
};
c.parse();
this.txtBuildFileLocation.setText(this.buildFile.getAbsolutePath());
this.txtProjectName.setText(c.getProjectName());
// tcTargetName.setCellFactory(value);
tcChkTarget.setCellFactory(CheckBoxTableCell.forTableColumn(tcChkTarget));
tcChkTarget.setCellValueFactory(param -> param.getValue().chkProperty());
tcTargetName.setCellFactory(TextFieldTableCell.forTableColumn());
tcTargetName.setCellValueFactory(param -> param.getValue().targetNameProperty());
tcTargetDesc.setCellFactory(TextFieldTableCell.forTableColumn());
tcTargetDesc.setCellValueFactory(param -> param.getValue().targetDescProperty());
List<AntRunConfigItem> collect = c.getTargets().entrySet().stream().map(ent -> {
String key = ent.getKey();
if (ValueUtil.isEmpty(key))
return null;
String desc = ent.getValue().getDescription() == null ? "" : ent.getValue().getDescription();
AntRunConfigItem item = new AntRunConfigItem(key, desc);
item.chkProperty().addListener(new ChangeListenerImpl(item));
boolean equals = key.equals(c.getDefaultTarget());
item.setChk(equals);
if (equals)
item.setTargetDesc("[default] ".concat(desc));
return item;
}).filter(v -> v != null).collect(Collectors.toList());
tbTargets.getItems().addAll(collect);
tbTargets.setEditable(true);
tcChkTarget.setEditable(true);
tcTargetName.setEditable(false);
tcTargetDesc.setEditable(false);
// Platform.runLater(()->{
//
// });
}
Aggregations