use of javafx.scene.control.TabPane in project aic-praise by aic-sri-international.
the class QueryController method displayQueryAnswer.
private void displayQueryAnswer(String query, Expression result, ParsedHOGModel parsedModel, long millisecondsToCompute) {
String answer = "P(" + query + " | ... ) = " + result;
String title = "Query" + duration(" took ", millisecondsToCompute) + " to compute '" + answer + "'";
HOGMCodeArea resultCodeArea = new HOGMCodeArea(false);
resultCodeArea.setText(answer);
resultCodeArea.setEditable(false);
Node resultContent = null;
if (SGSolverDemoController.isInDebugMode()) {
HOGMCodeArea parsedModelArea = createParsedModelView(parsedModel);
TabPane resultTabs = new TabPane();
resultTabs.getTabs().add(new Tab("Answer", resultCodeArea));
resultTabs.getTabs().add(new Tab("Parsed As", parsedModelArea));
resultContent = resultTabs;
} else {
resultContent = resultCodeArea;
}
TitledPane resultPane = new TitledPane(title, resultContent);
FXUtil.setTitledPaneIcon(resultPane, FontAwesomeIcons.CHECK);
showResultPane(resultPane);
}
use of javafx.scene.control.TabPane in project aic-praise by aic-sri-international.
the class QueryController method displayQueryErrors.
private void displayQueryErrors(String query, List<HOGMQueryError> queryErrors, ParsedHOGModel parsedModel, long millisecondsToCompute) {
String title = "Query '" + query + "' encountered " + queryErrors.size() + " error(s) when attempting to compute answer (" + duration("took ", millisecondsToCompute) + ")";
ListView<HOGMQueryError> errors = new ListView<>(FXCollections.observableList(queryErrors));
//errors.setFixedCellSize(24);
errors.setPrefHeight(24 * 5);
errors.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
errors.getSelectionModel().selectedIndexProperty().addListener((obs, oldValue, newValue) -> {
if (newValue.intValue() >= 0) {
HOGMQueryError qError = errors.getItems().get(newValue.intValue());
if (qError.getContext() == HOGMQueryError.Context.MODEL) {
modelPageEditor.highlight(qError.getStartContextIndex(), qError.getEndContextIndex());
} else if (qError.getContext() == HOGMQueryError.Context.QUERY) {
queryComboBox.getEditor().selectAll();
}
}
});
Node resultContent = null;
if (SGSolverDemoController.isInDebugMode()) {
HOGMCodeArea parsedModelArea = createParsedModelView(parsedModel);
TabPane resultTabs = new TabPane();
resultTabs.getTabs().add(new Tab("Errors", errors));
resultTabs.getTabs().add(new Tab("Parsed As", parsedModelArea));
resultContent = resultTabs;
} else {
resultContent = errors;
}
TitledPane resultPane = new TitledPane(title, resultContent);
FXUtil.setTitledPaneIcon(resultPane, FontAwesomeIcons.TIMES);
showResultPane(resultPane);
errors.getSelectionModel().selectFirst();
}
use of javafx.scene.control.TabPane in project Gargoyle by callakrsos.
the class ScmCommitCompositeExam method start.
/* (non-Javadoc)
* @see javafx.application.Application#start(javafx.stage.Stage)
*/
@Override
public void start(Stage primaryStage) throws Exception {
Properties properties = new Properties();
properties.put(JavaSVNManager.SVN_URL, "svn://10.40.41.49");
// properties.put(JavaSVNManager.SVN_USER_ID, "kyjun.kim");
// properties.put(JavaSVNManager.SVN_USER_PASS, "kyjun.kim");
FxSVNHistoryDataSupplier svnDataSupplier = new FxSVNHistoryDataSupplier(new JavaSVNManager(properties));
SvnChagnedCodeComposite svnChagnedCodeComposite = new SvnChagnedCodeComposite(svnDataSupplier);
ScmCommitComposite scmCommitComposite = new ScmCommitComposite(svnDataSupplier);
TabPane tabPane = new TabPane();
tabPane.getTabs().addAll(new Tab("Chagned Codes.", svnChagnedCodeComposite), new Tab("Commit Hist.", scmCommitComposite));
primaryStage.setScene(new Scene(tabPane));
primaryStage.show();
}
use of javafx.scene.control.TabPane in project Gargoyle by callakrsos.
the class SVNTreeView method menuSVNGraphOnAction.
/**
* SVN Graph
*
* @작성자 : KYJ
* @작성일 : 2016. 7. 21.
* @param e
* @throws Exception
*/
public void menuSVNGraphOnAction(ActionEvent e) {
final int selectedIndex = getSelectionModel().getSelectedIndex();
ObservableList<TreeItem<SVNItem>> children = getRoot().getChildren();
TreeItem<SVNItem> selectedItem = children.get(selectedIndex);
if (selectedItem != null) {
SVNItem value = selectedItem.getValue();
if (value != null && value instanceof SVNRepository) {
SVNRepository repo = (SVNRepository) value;
TabPane createSVNGraph = null;
try {
createSVNGraph = FxUtil.createSVNGraph(repo.getManager());
} catch (Exception e1) {
LOGGER.error(ValueUtil.toString(e1));
}
if (createSVNGraph != null) {
setSvnGraphProperty(createSVNGraph);
}
}
}
}
use of javafx.scene.control.TabPane in project POL-POM-5 by PlayOnLinux.
the class ViewEngines method initWineVersions.
private void initWineVersions() {
availableEngines = new TabPane();
availableEngines.getStyleClass().add("rightPane");
availableEngines.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);
}
Aggregations