Search in sources :

Example 1 with ShortcutEditing

use of org.phoenicis.javafx.components.library.panelstates.ShortcutEditing in project POL-POM-5 by PhoenicisOrg.

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)

Example 2 with ShortcutEditing

use of org.phoenicis.javafx.components.library.panelstates.ShortcutEditing 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 3 with ShortcutEditing

use of org.phoenicis.javafx.components.library.panelstates.ShortcutEditing 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 4 with ShortcutEditing

use of org.phoenicis.javafx.components.library.panelstates.ShortcutEditing 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

Comparator (java.util.Comparator)4 Optional (java.util.Optional)4 Observable (javafx.beans.Observable)4 Bindings (javafx.beans.binding.Bindings)4 ObjectExpression (javafx.beans.binding.ObjectExpression)4 ObjectProperty (javafx.beans.property.ObjectProperty)4 SimpleObjectProperty (javafx.beans.property.SimpleObjectProperty)4 ObservableList (javafx.collections.ObservableList)4 FilteredList (javafx.collections.transformation.FilteredList)4 SortedList (javafx.collections.transformation.SortedList)4 Node (javafx.scene.Node)4 Tab (javafx.scene.control.Tab)4 TabPane (javafx.scene.control.TabPane)4 MouseEvent (javafx.scene.input.MouseEvent)4 Localisation.tr (org.phoenicis.configuration.localisation.Localisation.tr)4 ConcatenatedList (org.phoenicis.javafx.collections.ConcatenatedList)4 MappedList (org.phoenicis.javafx.collections.MappedList)4 DetailsPanel (org.phoenicis.javafx.components.common.control.DetailsPanel)4 SidebarBase (org.phoenicis.javafx.components.common.control.SidebarBase)4 None (org.phoenicis.javafx.components.common.panelstates.None)4