use of com.kyj.fx.voeditor.visual.component.config.model.AntRunConfigItem 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