Search in sources :

Example 1 with DetailsPanel

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

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 2 with DetailsPanel

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

the class EnginesView method createEngineDetailsPanel.

private DetailsPanel createEngineDetailsPanel() {
    final EngineInformationPanel engineInformationPanel = new EngineInformationPanel();
    engineInformationPanel.engineDTOProperty().bind(engineDTO);
    engineInformationPanel.engineProperty().bind(engine);
    engineInformationPanel.setOnEngineInstall(this::installEngine);
    engineInformationPanel.setOnEngineDelete(this::deleteEngine);
    final DetailsPanel detailsPanel = new DetailsPanel();
    detailsPanel.titleProperty().bind(StringBindings.map(engineDTO, engine -> engine.getCategory() + " " + engine.getSubCategory()));
    detailsPanel.setContent(engineInformationPanel);
    detailsPanel.setOnClose(this::closeDetailsView);
    detailsPanel.prefWidthProperty().bind(content.widthProperty().divide(3));
    return detailsPanel;
}
Also used : EngineSidebar(org.phoenicis.javafx.components.engine.control.EngineSidebar) java.util(java.util) EngineSubCategoryPanel(org.phoenicis.javafx.components.engine.control.EngineSubCategoryPanel) StringBindings(org.phoenicis.javafx.utils.StringBindings) MappedList(org.phoenicis.javafx.collections.MappedList) FXCollections(javafx.collections.FXCollections) Engine(org.phoenicis.engines.Engine) Bindings(javafx.beans.binding.Bindings) TabPane(javafx.scene.control.TabPane) EngineCategoryDTO(org.phoenicis.engines.dto.EngineCategoryDTO) ListWidgetType(org.phoenicis.javafx.components.common.widgets.utils.ListWidgetType) ObjectProperty(javafx.beans.property.ObjectProperty) FilteredList(javafx.collections.transformation.FilteredList) Localisation.tr(org.phoenicis.configuration.localisation.Localisation.tr) Observable(javafx.beans.Observable) Collectors(java.util.stream.Collectors) Platform(javafx.application.Platform) Consumer(java.util.function.Consumer) EngineDTO(org.phoenicis.engines.dto.EngineDTO) JavaFxSettingsManager(org.phoenicis.javafx.settings.JavaFxSettingsManager) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) Tab(javafx.scene.control.Tab) DetailsPanel(org.phoenicis.javafx.components.common.control.DetailsPanel) ThemeManager(org.phoenicis.javafx.themes.ThemeManager) MainWindowView(org.phoenicis.javafx.views.mainwindow.ui.MainWindowView) ObservableList(javafx.collections.ObservableList) ConcatenatedList(org.phoenicis.javafx.collections.ConcatenatedList) EngineInformationPanel(org.phoenicis.javafx.components.engine.control.EngineInformationPanel) EngineSubCategoryDTO(org.phoenicis.engines.dto.EngineSubCategoryDTO) EngineInformationPanel(org.phoenicis.javafx.components.engine.control.EngineInformationPanel) DetailsPanel(org.phoenicis.javafx.components.common.control.DetailsPanel)

Example 3 with DetailsPanel

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

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 4 with DetailsPanel

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

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)

Example 5 with DetailsPanel

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

the class LibraryFeaturePanelSkin method createShortcutEditingDetailsPanel.

private DetailsPanel createShortcutEditingDetailsPanel(ShortcutEditing action) {
    final ShortcutEditingPanel shortcutEditingPanel = new ShortcutEditingPanel();
    shortcutEditingPanel.onShortcutChangedProperty().bind(ObjectBindings.map(getControl().shortcutManagerProperty(), shortcutManager -> shortcutManager::updateShortcut));
    shortcutEditingPanel.objectMapperProperty().bind(getControl().objectMapperProperty());
    shortcutEditingPanel.setShortcut(action.getShortcut());
    final DetailsPanel detailsPanel = new DetailsPanel();
    detailsPanel.titleProperty().bind(StringBindings.map(getControl().selectedShortcutProperty(), shortcut -> shortcut.getInfo().getName()));
    detailsPanel.setContent(shortcutEditingPanel);
    detailsPanel.setOnClose(getControl()::closeDetailsPanel);
    detailsPanel.prefWidthProperty().bind(getControl().widthProperty().divide(3));
    return detailsPanel;
}
Also used : CombinedListWidget(org.phoenicis.javafx.components.common.widgets.control.CombinedListWidget) ShortcutCategoryDTO(org.phoenicis.library.dto.ShortcutCategoryDTO) StringBindings(org.phoenicis.javafx.utils.StringBindings) ObjectExpression(javafx.beans.binding.ObjectExpression) MappedList(org.phoenicis.javafx.collections.MappedList) MouseEvent(javafx.scene.input.MouseEvent) ShortcutEditing(org.phoenicis.javafx.components.library.panelstates.ShortcutEditing) Bindings(javafx.beans.binding.Bindings) SidebarBase(org.phoenicis.javafx.components.common.control.SidebarBase) org.phoenicis.javafx.components.library.control(org.phoenicis.javafx.components.library.control) ListWidgetElement(org.phoenicis.javafx.components.common.widgets.utils.ListWidgetElement) ShortcutInformation(org.phoenicis.javafx.components.library.panelstates.ShortcutInformation) ShortcutCreation(org.phoenicis.javafx.components.library.panelstates.ShortcutCreation) TabPane(javafx.scene.control.TabPane) None(org.phoenicis.javafx.components.common.panelstates.None) FeaturePanelSkin(org.phoenicis.javafx.components.common.skin.FeaturePanelSkin) ShortcutDTO(org.phoenicis.library.dto.ShortcutDTO) SwitchBinding(org.phoenicis.javafx.utils.SwitchBinding) SortedList(javafx.collections.transformation.SortedList) ListWidgetType(org.phoenicis.javafx.components.common.widgets.utils.ListWidgetType) ObjectProperty(javafx.beans.property.ObjectProperty) Node(javafx.scene.Node) FilteredList(javafx.collections.transformation.FilteredList) Localisation.tr(org.phoenicis.configuration.localisation.Localisation.tr) Observable(javafx.beans.Observable) JavaFxSettingsManager(org.phoenicis.javafx.settings.JavaFxSettingsManager) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) Tab(javafx.scene.control.Tab) OpenDetailsPanel(org.phoenicis.javafx.components.common.panelstates.OpenDetailsPanel) DetailsPanel(org.phoenicis.javafx.components.common.control.DetailsPanel) Optional(java.util.Optional) ObjectBindings(org.phoenicis.javafx.utils.ObjectBindings) ObservableList(javafx.collections.ObservableList) ConcatenatedList(org.phoenicis.javafx.collections.ConcatenatedList) Comparator(java.util.Comparator) 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)7 OpenDetailsPanel (org.phoenicis.javafx.components.common.panelstates.OpenDetailsPanel)6 Observable (javafx.beans.Observable)4 Bindings (javafx.beans.binding.Bindings)3 ObjectProperty (javafx.beans.property.ObjectProperty)3 SimpleObjectProperty (javafx.beans.property.SimpleObjectProperty)3 ObservableList (javafx.collections.ObservableList)3 FilteredList (javafx.collections.transformation.FilteredList)3 Tab (javafx.scene.control.Tab)3 TabPane (javafx.scene.control.TabPane)3 Localisation.tr (org.phoenicis.configuration.localisation.Localisation.tr)3 ConcatenatedList (org.phoenicis.javafx.collections.ConcatenatedList)3 MappedList (org.phoenicis.javafx.collections.MappedList)3 ListWidgetType (org.phoenicis.javafx.components.common.widgets.utils.ListWidgetType)3 JavaFxSettingsManager (org.phoenicis.javafx.settings.JavaFxSettingsManager)3 StringBindings (org.phoenicis.javafx.utils.StringBindings)3 Comparator (java.util.Comparator)2 Optional (java.util.Optional)2 ObjectExpression (javafx.beans.binding.ObjectExpression)2 SortedList (javafx.collections.transformation.SortedList)2