Search in sources :

Example 11 with DetailsPanel

use of org.phoenicis.javafx.components.common.control.DetailsPanel 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)

Example 12 with DetailsPanel

use of org.phoenicis.javafx.components.common.control.DetailsPanel in project POL-POM-5 by PhoenicisOrg.

the class InstallationsFeaturePanelSkin method createInstallationDetailsPanel.

private DetailsPanel createInstallationDetailsPanel(Installation action) {
    final InstallationDTO installation = action.getInstallation();
    final DetailsPanel detailsPanel = new DetailsPanel();
    detailsPanel.setTitle(installation.getName());
    detailsPanel.setContent(installation.getNode());
    detailsPanel.setOnClose(getControl()::closeDetailsPanel);
    detailsPanel.prefWidthProperty().bind(getControl().widthProperty().divide(3));
    return detailsPanel;
}
Also used : InstallationDTO(org.phoenicis.javafx.views.mainwindow.installations.dto.InstallationDTO) OpenDetailsPanel(org.phoenicis.javafx.components.common.panelstates.OpenDetailsPanel) DetailsPanel(org.phoenicis.javafx.components.common.control.DetailsPanel)

Example 13 with DetailsPanel

use of org.phoenicis.javafx.components.common.control.DetailsPanel in project POL-POM-5 by PhoenicisOrg.

the class ContainersFeaturePanelSkin method createContainerInformationDetailsPanel.

private DetailsPanel createContainerInformationDetailsPanel(ContainerInformation action) {
    final ContainerDTO container = action.getContainer();
    final ContainerInformationPanel containerInformationPanel = new ContainerInformationPanel();
    containerInformationPanel.setContainer(container);
    containerInformationPanel.enginesManagerProperty().bind(getControl().enginesManagerProperty());
    containerInformationPanel.verbsManagerProperty().bind(getControl().verbsManagerProperty());
    containerInformationPanel.engineToolsManagerProperty().bind(getControl().engineToolsManagerProperty());
    containerInformationPanel.setOnDeleteContainer(getControl()::deleteContainer);
    containerInformationPanel.setOnChangeEngineVersion(getControl()::changeEngineVersion);
    containerInformationPanel.setOnOpenFileBrowser(getControl()::openFileBrowser);
    getControl().getEngineSettings().addListener((Observable invalidation) -> updateEngineSettings(containerInformationPanel));
    getControl().getVerbs().addListener((Observable invalidation) -> updateVerbs(containerInformationPanel));
    getControl().getEngineTools().addListener((Observable invalidation) -> updateEngineTools(containerInformationPanel));
    updateEngineSettings(containerInformationPanel);
    updateVerbs(containerInformationPanel);
    updateEngineTools(containerInformationPanel);
    final DetailsPanel containerDetailsPanel = new DetailsPanel();
    containerDetailsPanel.setTitle(container.getName());
    containerDetailsPanel.setContent(containerInformationPanel);
    containerDetailsPanel.setOnClose(getControl()::closeDetailsPanel);
    containerDetailsPanel.prefWidthProperty().bind(getControl().widthProperty().divide(3));
    return containerDetailsPanel;
}
Also used : ContainerInformationPanel(org.phoenicis.javafx.components.container.control.ContainerInformationPanel) ContainerDTO(org.phoenicis.containers.dto.ContainerDTO) OpenDetailsPanel(org.phoenicis.javafx.components.common.panelstates.OpenDetailsPanel) DetailsPanel(org.phoenicis.javafx.components.common.control.DetailsPanel) Observable(javafx.beans.Observable)

Example 14 with DetailsPanel

use of org.phoenicis.javafx.components.common.control.DetailsPanel in project POL-POM-5 by PhoenicisOrg.

the class LibraryFeaturePanelSkin method createShortcutCreationDetailsPanel.

private DetailsPanel createShortcutCreationDetailsPanel() {
    final ShortcutCreationPanel shortcutCreationPanel = new ShortcutCreationPanel();
    shortcutCreationPanel.setOnCreateShortcut(getControl()::createShortcut);
    shortcutCreationPanel.containersPathProperty().bind(getControl().containersPathProperty());
    final DetailsPanel detailsPanel = new DetailsPanel();
    detailsPanel.setTitle(tr("Create a new shortcut"));
    detailsPanel.setContent(shortcutCreationPanel);
    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)

Aggregations

DetailsPanel (org.phoenicis.javafx.components.common.control.DetailsPanel)14 OpenDetailsPanel (org.phoenicis.javafx.components.common.panelstates.OpenDetailsPanel)12 Observable (javafx.beans.Observable)8 Bindings (javafx.beans.binding.Bindings)6 ObjectProperty (javafx.beans.property.ObjectProperty)6 SimpleObjectProperty (javafx.beans.property.SimpleObjectProperty)6 ObservableList (javafx.collections.ObservableList)6 FilteredList (javafx.collections.transformation.FilteredList)6 Tab (javafx.scene.control.Tab)6 TabPane (javafx.scene.control.TabPane)6 Localisation.tr (org.phoenicis.configuration.localisation.Localisation.tr)6 ConcatenatedList (org.phoenicis.javafx.collections.ConcatenatedList)6 MappedList (org.phoenicis.javafx.collections.MappedList)6 ListWidgetType (org.phoenicis.javafx.components.common.widgets.utils.ListWidgetType)6 JavaFxSettingsManager (org.phoenicis.javafx.settings.JavaFxSettingsManager)6 StringBindings (org.phoenicis.javafx.utils.StringBindings)6 Comparator (java.util.Comparator)4 Optional (java.util.Optional)4 ObjectExpression (javafx.beans.binding.ObjectExpression)4 SortedList (javafx.collections.transformation.SortedList)4