Search in sources :

Example 1 with ApplicationInformationPanel

use of org.phoenicis.javafx.components.application.control.ApplicationInformationPanel in project POL-POM-5 by PlayOnLinux.

the class ApplicationsFeaturePanelSkin method createApplicationInformationDetailsPanel.

private DetailsPanel createApplicationInformationDetailsPanel(ApplicationInformation action) {
    final ApplicationInformationPanel applicationPanel = new ApplicationInformationPanel();
    applicationPanel.scriptInterpreterProperty().bind(getControl().scriptInterpreterProperty());
    applicationPanel.setApplication(action.getApplication());
    applicationPanel.operatingSystemProperty().bind(getControl().operatingSystemProperty());
    applicationPanel.containCommercialApplicationsProperty().bind(getControl().containCommercialApplicationsProperty());
    applicationPanel.containRequiresPatchApplicationsProperty().bind(getControl().containRequiresPatchApplicationsProperty());
    applicationPanel.containAllOSCompatibleApplicationsProperty().bind(getControl().containAllOSCompatibleApplicationsProperty());
    applicationPanel.containTestingApplicationsProperty().bind(getControl().containTestingApplicationsProperty());
    // TODO: change to a binding
    applicationPanel.setShowScriptSource(getControl().getJavaFxSettingsManager().isViewScriptSource());
    // TODO: change to an `ObjectBindings.flatMap` call
    applicationPanel.webEngineStylesheetProperty().bind(getControl().getThemeManager().webEngineStylesheetProperty());
    final DetailsPanel detailsPanel = new DetailsPanel();
    detailsPanel.titleProperty().bind(StringBindings.map(getControl().selectedApplicationProperty(), ApplicationDTO::getName));
    detailsPanel.setContent(applicationPanel);
    detailsPanel.setOnClose(getControl()::closeDetailsPanel);
    detailsPanel.prefWidthProperty().bind(getControl().widthProperty().divide(3));
    return detailsPanel;
}
Also used : OpenDetailsPanel(org.phoenicis.javafx.components.common.panelstates.OpenDetailsPanel) DetailsPanel(org.phoenicis.javafx.components.common.control.DetailsPanel) ApplicationInformationPanel(org.phoenicis.javafx.components.application.control.ApplicationInformationPanel)

Aggregations

ApplicationInformationPanel (org.phoenicis.javafx.components.application.control.ApplicationInformationPanel)1 DetailsPanel (org.phoenicis.javafx.components.common.control.DetailsPanel)1 OpenDetailsPanel (org.phoenicis.javafx.components.common.panelstates.OpenDetailsPanel)1