Search in sources :

Example 6 with DetailsPanel

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

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)

Example 7 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 8 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 9 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)

Example 10 with DetailsPanel

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

the class LibraryFeaturePanelSkin method createShortcutInformationDetailsPanel.

private DetailsPanel createShortcutInformationDetailsPanel(ShortcutInformation action) {
    final ShortcutInformationPanel shortcutInformationPanel = new ShortcutInformationPanel();
    shortcutInformationPanel.javaFxSettingsManagerProperty().bind(getControl().javaFxSettingsManagerProperty());
    shortcutInformationPanel.setShortcut(action.getShortcut());
    shortcutInformationPanel.objectMapperProperty().bind(getControl().objectMapperProperty());
    shortcutInformationPanel.setOnShortcutRun(getControl()::runShortcut);
    shortcutInformationPanel.setOnShortcutStop(getControl()::stopShortcut);
    shortcutInformationPanel.setOnShortcutUninstall(getControl()::uninstallShortcut);
    shortcutInformationPanel.setOnShortcutEdit(shortcut -> getControl().setOpenedDetailsPanel(new ShortcutEditing(getControl().getSelectedShortcut())));
    final DetailsPanel detailsPanel = new DetailsPanel();
    detailsPanel.titleProperty().bind(StringBindings.map(getControl().selectedShortcutProperty(), shortcut -> shortcut.getInfo().getName()));
    detailsPanel.setContent(shortcutInformationPanel);
    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) ShortcutEditing(org.phoenicis.javafx.components.library.panelstates.ShortcutEditing) 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