Search in sources :

Example 1 with TabPane

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);
}
Also used : TitledPane(javafx.scene.control.TitledPane) TabPane(javafx.scene.control.TabPane) HOGMCodeArea(com.sri.ai.praise.sgsolver.demo.editor.HOGMCodeArea) Tab(javafx.scene.control.Tab) Node(javafx.scene.Node)

Example 2 with TabPane

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();
}
Also used : TitledPane(javafx.scene.control.TitledPane) TabPane(javafx.scene.control.TabPane) ListView(javafx.scene.control.ListView) HOGMCodeArea(com.sri.ai.praise.sgsolver.demo.editor.HOGMCodeArea) Tab(javafx.scene.control.Tab) HOGMQueryError(com.sri.ai.praise.sgsolver.solver.HOGMQueryError) Node(javafx.scene.Node)

Example 3 with TabPane

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();
}
Also used : JavaSVNManager(com.kyj.scm.manager.svn.java.JavaSVNManager) TabPane(javafx.scene.control.TabPane) Tab(javafx.scene.control.Tab) ScmCommitComposite(com.kyj.fx.voeditor.visual.component.scm.ScmCommitComposite) SvnChagnedCodeComposite(com.kyj.fx.voeditor.visual.component.scm.SvnChagnedCodeComposite) FxSVNHistoryDataSupplier(com.kyj.fx.voeditor.visual.component.scm.FxSVNHistoryDataSupplier) Properties(java.util.Properties) Scene(javafx.scene.Scene)

Example 4 with TabPane

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);
            }
        }
    }
}
Also used : TabPane(javafx.scene.control.TabPane) TreeItem(javafx.scene.control.TreeItem) SVNException(org.tmatesoft.svn.core.SVNException) IOException(java.io.IOException)

Example 5 with TabPane

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);
}
Also used : TabPane(javafx.scene.control.TabPane)

Aggregations

TabPane (javafx.scene.control.TabPane)8 Tab (javafx.scene.control.Tab)6 FxSVNHistoryDataSupplier (com.kyj.fx.voeditor.visual.component.scm.FxSVNHistoryDataSupplier)2 ScmCommitComposite (com.kyj.fx.voeditor.visual.component.scm.ScmCommitComposite)2 SvnChagnedCodeComposite (com.kyj.fx.voeditor.visual.component.scm.SvnChagnedCodeComposite)2 HOGMCodeArea (com.sri.ai.praise.sgsolver.demo.editor.HOGMCodeArea)2 Node (javafx.scene.Node)2 TitledPane (javafx.scene.control.TitledPane)2 JavaSVNManager (com.kyj.scm.manager.svn.java.JavaSVNManager)1 HOGMQueryError (com.sri.ai.praise.sgsolver.solver.HOGMQueryError)1 ActivatableView (io.bitsquare.gui.common.view.ActivatableView)1 View (io.bitsquare.gui.common.view.View)1 MainView (io.bitsquare.gui.main.MainView)1 CreateOfferView (io.bitsquare.gui.main.offer.createoffer.CreateOfferView)1 OfferBookView (io.bitsquare.gui.main.offer.offerbook.OfferBookView)1 TakeOfferView (io.bitsquare.gui.main.offer.takeoffer.TakeOfferView)1 Popup (io.bitsquare.gui.main.overlays.popups.Popup)1 TradeCurrency (io.bitsquare.locale.TradeCurrency)1 Offer (io.bitsquare.trade.offer.Offer)1 IOException (java.io.IOException)1