diff --git a/extension/build.gradle b/extension/build.gradle index df8aaafd6..bf4205b56 100644 --- a/extension/build.gradle +++ b/extension/build.gradle @@ -31,12 +31,6 @@ dependencies { compileOnly 'com.jfoenix:jfoenix:9.0.10' compileOnly 'org.controlsfx:controlsfx:11.1.2' compileOnly 'org.apache.commons:commons-lang3:3.12.0' - - if (findProject(':fxcomps') != null) { - compileOnly project(':fxcomps') - } else { - compileOnly 'io.xpipe:fxcomps:0.3.3' - } } diff --git a/extension/src/main/java/io/xpipe/extension/DataSourceProviders.java b/extension/src/main/java/io/xpipe/extension/DataSourceProviders.java index a1e2e566c..da6426ee3 100644 --- a/extension/src/main/java/io/xpipe/extension/DataSourceProviders.java +++ b/extension/src/main/java/io/xpipe/extension/DataSourceProviders.java @@ -1,8 +1,8 @@ package io.xpipe.extension; +import io.xpipe.core.impl.FileStore; import io.xpipe.core.source.*; import io.xpipe.core.store.DataStore; -import io.xpipe.core.impl.FileStore; import io.xpipe.extension.event.ErrorEvent; import lombok.SneakyThrows; diff --git a/extension/src/main/java/io/xpipe/extension/GuiDialog.java b/extension/src/main/java/io/xpipe/extension/GuiDialog.java index 289115660..67648b116 100644 --- a/extension/src/main/java/io/xpipe/extension/GuiDialog.java +++ b/extension/src/main/java/io/xpipe/extension/GuiDialog.java @@ -1,8 +1,8 @@ package io.xpipe.extension; +import io.xpipe.extension.fxcomps.Comp; import io.xpipe.extension.util.SimpleValidator; import io.xpipe.extension.util.Validator; -import io.xpipe.fxcomps.Comp; import lombok.AllArgsConstructor; import lombok.Value; diff --git a/extension/src/main/java/io/xpipe/extension/XPipeServiceProviders.java b/extension/src/main/java/io/xpipe/extension/XPipeServiceProviders.java index 42ec3dd3f..ac832916c 100644 --- a/extension/src/main/java/io/xpipe/extension/XPipeServiceProviders.java +++ b/extension/src/main/java/io/xpipe/extension/XPipeServiceProviders.java @@ -1,9 +1,9 @@ package io.xpipe.extension; import com.fasterxml.jackson.databind.jsontype.NamedType; -import io.xpipe.core.util.ProxyFunction; import io.xpipe.core.impl.LocalProcessControlProvider; import io.xpipe.core.util.JacksonMapper; +import io.xpipe.core.util.ProxyFunction; import io.xpipe.extension.event.TrackEvent; import io.xpipe.extension.prefs.PrefsProviders; diff --git a/extension/src/main/java/io/xpipe/extension/comp/MultiVariantComp.java b/extension/src/main/java/io/xpipe/extension/comp/MultiVariantComp.java deleted file mode 100644 index 6788490f1..000000000 --- a/extension/src/main/java/io/xpipe/extension/comp/MultiVariantComp.java +++ /dev/null @@ -1,3 +0,0 @@ -package io.xpipe.extension.comp; - -public class MultiVariantComp {} diff --git a/fxcomps/src/main/java/io/xpipe/fxcomps/Comp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/Comp.java similarity index 90% rename from fxcomps/src/main/java/io/xpipe/fxcomps/Comp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/Comp.java index 1892ca978..a659b1d22 100644 --- a/fxcomps/src/main/java/io/xpipe/fxcomps/Comp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/Comp.java @@ -1,10 +1,10 @@ -package io.xpipe.fxcomps; +package io.xpipe.extension.fxcomps; -import io.xpipe.fxcomps.augment.Augment; -import io.xpipe.fxcomps.augment.GrowAugment; -import io.xpipe.fxcomps.comp.WrapperComp; -import io.xpipe.fxcomps.util.Shortcuts; -import io.xpipe.fxcomps.util.SimpleChangeListener; +import io.xpipe.extension.fxcomps.augment.Augment; +import io.xpipe.extension.fxcomps.augment.GrowAugment; +import io.xpipe.extension.fxcomps.impl.WrapperComp; +import io.xpipe.extension.fxcomps.util.Shortcuts; +import io.xpipe.extension.fxcomps.util.SimpleChangeListener; import javafx.beans.value.ObservableValue; import javafx.scene.control.ButtonBase; import javafx.scene.control.Tooltip; diff --git a/fxcomps/src/main/java/io/xpipe/fxcomps/CompStructure.java b/extension/src/main/java/io/xpipe/extension/fxcomps/CompStructure.java similarity index 74% rename from fxcomps/src/main/java/io/xpipe/fxcomps/CompStructure.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/CompStructure.java index 9f1d15d66..2d8ad2716 100644 --- a/fxcomps/src/main/java/io/xpipe/fxcomps/CompStructure.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/CompStructure.java @@ -1,4 +1,4 @@ -package io.xpipe.fxcomps; +package io.xpipe.extension.fxcomps; import javafx.scene.layout.Region; diff --git a/fxcomps/README.md b/extension/src/main/java/io/xpipe/extension/fxcomps/README.md similarity index 93% rename from fxcomps/README.md rename to extension/src/main/java/io/xpipe/extension/fxcomps/README.md index 17e427a41..0ce92917a 100644 --- a/fxcomps/README.md +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/README.md @@ -1,7 +1,3 @@ -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.xpipe/fxcomps/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.xpipe/fxcomps) -[![javadoc](https://javadoc.io/badge2/io.xpipe/fxcomps/javadoc.svg)](https://javadoc.io/doc/io.xpipe/fxcomps) -[![Build Status](https://github.com/xpipe-io/fxcomps/actions/workflows/publish.yml/badge.svg)](https://github.com/xpipe-io/fxcomps/actions/workflows/publish.yml) - # FxComps - Compound Components for JavaFX The FxComps library provides a new approach to creating JavaFX interfaces and diff --git a/fxcomps/src/main/java/io/xpipe/fxcomps/SimpleComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/SimpleComp.java similarity index 88% rename from fxcomps/src/main/java/io/xpipe/fxcomps/SimpleComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/SimpleComp.java index 6a84613b5..707df2531 100644 --- a/fxcomps/src/main/java/io/xpipe/fxcomps/SimpleComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/SimpleComp.java @@ -1,4 +1,4 @@ -package io.xpipe.fxcomps; +package io.xpipe.extension.fxcomps; import javafx.scene.layout.Region; diff --git a/fxcomps/src/main/java/io/xpipe/fxcomps/SimpleCompStructure.java b/extension/src/main/java/io/xpipe/extension/fxcomps/SimpleCompStructure.java similarity index 88% rename from fxcomps/src/main/java/io/xpipe/fxcomps/SimpleCompStructure.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/SimpleCompStructure.java index 615410e6f..a308690e8 100644 --- a/fxcomps/src/main/java/io/xpipe/fxcomps/SimpleCompStructure.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/SimpleCompStructure.java @@ -1,4 +1,4 @@ -package io.xpipe.fxcomps; +package io.xpipe.extension.fxcomps; import javafx.scene.layout.Region; import lombok.AllArgsConstructor; diff --git a/extension/src/main/java/io/xpipe/extension/fxcomps/augment/Augment.java b/extension/src/main/java/io/xpipe/extension/fxcomps/augment/Augment.java new file mode 100644 index 000000000..9fea1d605 --- /dev/null +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/augment/Augment.java @@ -0,0 +1,8 @@ +package io.xpipe.extension.fxcomps.augment; + +import io.xpipe.extension.fxcomps.CompStructure; + +public interface Augment> { + + void augment(S struc); +} diff --git a/fxcomps/src/main/java/io/xpipe/fxcomps/augment/GrowAugment.java b/extension/src/main/java/io/xpipe/extension/fxcomps/augment/GrowAugment.java similarity index 95% rename from fxcomps/src/main/java/io/xpipe/fxcomps/augment/GrowAugment.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/augment/GrowAugment.java index d3bd79fee..ff9212b2e 100644 --- a/fxcomps/src/main/java/io/xpipe/fxcomps/augment/GrowAugment.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/augment/GrowAugment.java @@ -1,6 +1,6 @@ -package io.xpipe.fxcomps.augment; +package io.xpipe.extension.fxcomps.augment; -import io.xpipe.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.CompStructure; import javafx.beans.binding.Bindings; import javafx.scene.Node; import javafx.scene.layout.Region; diff --git a/fxcomps/src/main/java/io/xpipe/fxcomps/augment/PopupMenuAugment.java b/extension/src/main/java/io/xpipe/extension/fxcomps/augment/PopupMenuAugment.java similarity index 90% rename from fxcomps/src/main/java/io/xpipe/fxcomps/augment/PopupMenuAugment.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/augment/PopupMenuAugment.java index 5a8b9cdf1..608121e88 100644 --- a/fxcomps/src/main/java/io/xpipe/fxcomps/augment/PopupMenuAugment.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/augment/PopupMenuAugment.java @@ -1,6 +1,6 @@ -package io.xpipe.fxcomps.augment; +package io.xpipe.extension.fxcomps.augment; -import io.xpipe.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.CompStructure; import javafx.scene.control.ContextMenu; import javafx.scene.input.MouseButton; diff --git a/extension/src/main/java/io/xpipe/extension/comp/CharChoiceComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/CharChoiceComp.java similarity index 88% rename from extension/src/main/java/io/xpipe/extension/comp/CharChoiceComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/CharChoiceComp.java index 1a626af77..b2fa1b529 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/CharChoiceComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/CharChoiceComp.java @@ -1,8 +1,8 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; import javafx.beans.property.Property; import javafx.beans.value.ObservableValue; import javafx.geometry.Pos; diff --git a/extension/src/main/java/io/xpipe/extension/comp/CharComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/CharComp.java similarity index 79% rename from extension/src/main/java/io/xpipe/extension/comp/CharComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/CharComp.java index e765c663a..1acaa88bb 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/CharComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/CharComp.java @@ -1,9 +1,9 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; -import io.xpipe.fxcomps.util.PlatformThread; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.util.PlatformThread; import javafx.beans.property.Property; import javafx.scene.control.TextField; diff --git a/extension/src/main/java/io/xpipe/extension/comp/CharsetChoiceComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/CharsetChoiceComp.java similarity index 94% rename from extension/src/main/java/io/xpipe/extension/comp/CharsetChoiceComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/CharsetChoiceComp.java index c54efbb8c..bf56029f7 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/CharsetChoiceComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/CharsetChoiceComp.java @@ -1,9 +1,9 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; import io.xpipe.core.charsetter.StreamCharset; import io.xpipe.extension.I18n; +import io.xpipe.extension.fxcomps.SimpleComp; import io.xpipe.extension.util.CustomComboBoxBuilder; -import io.xpipe.fxcomps.SimpleComp; import javafx.beans.property.Property; import javafx.scene.control.Label; import javafx.scene.layout.Region; diff --git a/extension/src/main/java/io/xpipe/extension/comp/ChoiceComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/ChoiceComp.java similarity index 87% rename from extension/src/main/java/io/xpipe/extension/comp/ChoiceComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/ChoiceComp.java index f6ae1bb56..e8c232541 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/ChoiceComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/ChoiceComp.java @@ -1,12 +1,12 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; import io.xpipe.extension.I18n; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; -import io.xpipe.fxcomps.util.BindingsHelper; -import io.xpipe.fxcomps.util.PlatformThread; -import io.xpipe.fxcomps.util.SimpleChangeListener; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.util.BindingsHelper; +import io.xpipe.extension.fxcomps.util.PlatformThread; +import io.xpipe.extension.fxcomps.util.SimpleChangeListener; import javafx.beans.property.Property; import javafx.beans.property.SimpleObjectProperty; import javafx.beans.value.ObservableValue; diff --git a/extension/src/main/java/io/xpipe/extension/comp/ChoicePaneComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/ChoicePaneComp.java similarity index 86% rename from extension/src/main/java/io/xpipe/extension/comp/ChoicePaneComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/ChoicePaneComp.java index 40b9035be..8b4a592d2 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/ChoicePaneComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/ChoicePaneComp.java @@ -1,11 +1,11 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; import io.xpipe.extension.I18n; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; -import io.xpipe.fxcomps.util.PlatformThread; -import io.xpipe.fxcomps.util.SimpleChangeListener; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.util.PlatformThread; +import io.xpipe.extension.fxcomps.util.SimpleChangeListener; import javafx.beans.property.Property; import javafx.beans.value.ObservableValue; import javafx.collections.FXCollections; @@ -75,5 +75,5 @@ public class ChoicePaneComp extends Comp> { return new SimpleCompStructure<>(vbox); } - public static record Entry(ObservableValue name, Comp comp) {} + public record Entry(ObservableValue name, Comp comp) {} } diff --git a/extension/src/main/java/io/xpipe/extension/comp/CodeSnippet.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/CodeSnippet.java similarity index 87% rename from extension/src/main/java/io/xpipe/extension/comp/CodeSnippet.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/CodeSnippet.java index e99e0ace9..791e18331 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/CodeSnippet.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/CodeSnippet.java @@ -1,4 +1,4 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; import javafx.scene.paint.Color; @@ -29,7 +29,7 @@ public record CodeSnippet(List lines) { .collect(Collectors.joining(System.lineSeparator())); } - public static interface Element { + public interface Element { String text(); @@ -38,9 +38,9 @@ public record CodeSnippet(List lines) { public static class Builder { - private ColorScheme scheme; - private List lines; - private List currentLine; + private final ColorScheme scheme; + private final List lines; + private final List currentLine; public Builder(ColorScheme scheme) { this.scheme = scheme; @@ -112,7 +112,7 @@ public record CodeSnippet(List lines) { } } - public static record StaticElement(String value, Color color) implements Element { + public record StaticElement(String value, Color color) implements Element { @Override public String text() { @@ -120,7 +120,7 @@ public record CodeSnippet(List lines) { } } - public static record Line(List elements) {} + public record Line(List elements) {} - public static record ColorScheme(Color keyword, Color identifier, Color type, Color string) {} + public record ColorScheme(Color keyword, Color identifier, Color type, Color string) {} } diff --git a/extension/src/main/java/io/xpipe/extension/comp/CodeSnippetComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/CodeSnippetComp.java similarity index 94% rename from extension/src/main/java/io/xpipe/extension/comp/CodeSnippetComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/CodeSnippetComp.java index 11c8c6663..2fe8f5b77 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/CodeSnippetComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/CodeSnippetComp.java @@ -1,9 +1,9 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; -import io.xpipe.fxcomps.util.PlatformThread; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.util.PlatformThread; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.value.ObservableValue; import javafx.scene.control.Button; diff --git a/extension/src/main/java/io/xpipe/extension/comp/DataStoreFlowChoiceComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/DataStoreFlowChoiceComp.java similarity index 94% rename from extension/src/main/java/io/xpipe/extension/comp/DataStoreFlowChoiceComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/DataStoreFlowChoiceComp.java index f754d81e5..22aef85cb 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/DataStoreFlowChoiceComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/DataStoreFlowChoiceComp.java @@ -1,8 +1,8 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; import io.xpipe.core.store.DataFlow; import io.xpipe.extension.I18n; -import io.xpipe.fxcomps.SimpleComp; +import io.xpipe.extension.fxcomps.SimpleComp; import javafx.beans.property.Property; import javafx.beans.property.SimpleObjectProperty; import javafx.beans.value.ObservableValue; diff --git a/extension/src/main/java/io/xpipe/extension/comp/DynamicOptionsComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/DynamicOptionsComp.java similarity index 93% rename from extension/src/main/java/io/xpipe/extension/comp/DynamicOptionsComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/DynamicOptionsComp.java index b3ceb7948..0b3b03e54 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/DynamicOptionsComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/DynamicOptionsComp.java @@ -1,8 +1,8 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; import javafx.beans.Observable; import javafx.beans.binding.Bindings; import javafx.beans.value.ObservableValue; @@ -108,5 +108,5 @@ public class DynamicOptionsComp extends Comp> { return entries; } - public static record Entry(ObservableValue name, Comp comp) {} + public record Entry(ObservableValue name, Comp comp) {} } diff --git a/extension/src/main/java/io/xpipe/extension/comp/FancyTooltipAugment.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/FancyTooltipAugment.java similarity index 88% rename from extension/src/main/java/io/xpipe/extension/comp/FancyTooltipAugment.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/FancyTooltipAugment.java index 21f46b838..01d7a20a5 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/FancyTooltipAugment.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/FancyTooltipAugment.java @@ -1,11 +1,11 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; import com.jfoenix.controls.JFXTooltip; import io.xpipe.extension.I18n; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.augment.Augment; -import io.xpipe.fxcomps.util.PlatformThread; -import io.xpipe.fxcomps.util.Shortcuts; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.augment.Augment; +import io.xpipe.extension.fxcomps.util.PlatformThread; +import io.xpipe.extension.fxcomps.util.Shortcuts; import javafx.animation.KeyFrame; import javafx.animation.Timeline; import javafx.beans.value.ObservableValue; @@ -25,10 +25,10 @@ public class FancyTooltipAugment> implements Augment< private static class TooltipBehavior { - private static String TOOLTIP_PROP = "jfoenix-tooltip"; - private Timeline hoverTimer = new Timeline(); - private Timeline visibleTimer = new Timeline(); - private Timeline leftTimer = new Timeline(); + private static final String TOOLTIP_PROP = "jfoenix-tooltip"; + private final Timeline hoverTimer = new Timeline(); + private final Timeline visibleTimer = new Timeline(); + private final Timeline leftTimer = new Timeline(); /** * the currently hovered node */ @@ -88,7 +88,7 @@ public class FancyTooltipAugment> implements Augment< tooltip.show(hoveredNode, -1, -1); } - private EventHandler moveHandler = (MouseEvent event) -> { + private final EventHandler moveHandler = (MouseEvent event) -> { // if tool tip is already showing, do nothing if (visibleTimer.getStatus() == Timeline.Status.RUNNING) { return; @@ -123,9 +123,9 @@ public class FancyTooltipAugment> implements Augment< uninstall(hoveredNode); } }; - private WeakEventHandler weakMoveHandler = new WeakEventHandler<>(moveHandler); + private final WeakEventHandler weakMoveHandler = new WeakEventHandler<>(moveHandler); - private EventHandler exitHandler = (MouseEvent event) -> { + private final EventHandler exitHandler = (MouseEvent event) -> { // stop running hover timer as the mouse exited the node if (hoverTimer.getStatus() == Timeline.Status.RUNNING) { hoverTimer.stop(); @@ -138,10 +138,10 @@ public class FancyTooltipAugment> implements Augment< hoveredNode = null; nextTooltip = null; }; - private WeakEventHandler weakExitHandler = new WeakEventHandler<>(exitHandler); + private final WeakEventHandler weakExitHandler = new WeakEventHandler<>(exitHandler); // if mouse is pressed then stop all timers / clear all fields - private EventHandler pressedHandler = (MouseEvent event) -> { + private final EventHandler pressedHandler = (MouseEvent event) -> { // stop timers hoverTimer.stop(); visibleTimer.stop(); @@ -155,7 +155,7 @@ public class FancyTooltipAugment> implements Augment< currentTooltip = null; nextTooltip = null; }; - private WeakEventHandler weakPressedHandler = new WeakEventHandler<>(pressedHandler); + private final WeakEventHandler weakPressedHandler = new WeakEventHandler<>(pressedHandler); private void install(Node node, JFXTooltip tooltip) { if (node == null) { diff --git a/extension/src/main/java/io/xpipe/extension/comp/FilterComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/FilterComp.java similarity index 88% rename from extension/src/main/java/io/xpipe/extension/comp/FilterComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/FilterComp.java index fae0df43e..e3a237a40 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/FilterComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/FilterComp.java @@ -1,9 +1,9 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.util.PlatformThread; -import io.xpipe.fxcomps.util.SimpleChangeListener; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.util.PlatformThread; +import io.xpipe.extension.fxcomps.util.SimpleChangeListener; import javafx.beans.binding.Bindings; import javafx.beans.property.Property; import javafx.scene.Node; diff --git a/fxcomps/src/main/java/io/xpipe/fxcomps/comp/HorizontalComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/HorizontalComp.java similarity index 76% rename from fxcomps/src/main/java/io/xpipe/fxcomps/comp/HorizontalComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/HorizontalComp.java index 7241c32ad..2f31de454 100644 --- a/fxcomps/src/main/java/io/xpipe/fxcomps/comp/HorizontalComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/HorizontalComp.java @@ -1,8 +1,8 @@ -package io.xpipe.fxcomps.comp; +package io.xpipe.extension.fxcomps.impl; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; import javafx.geometry.Pos; import javafx.scene.layout.HBox; diff --git a/extension/src/main/java/io/xpipe/extension/comp/IntFieldComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/IntFieldComp.java similarity index 91% rename from extension/src/main/java/io/xpipe/extension/comp/IntFieldComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/IntFieldComp.java index 9618e24de..50e22231c 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/IntFieldComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/IntFieldComp.java @@ -1,9 +1,9 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; -import io.xpipe.fxcomps.util.PlatformThread; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.util.PlatformThread; import javafx.beans.property.Property; import javafx.beans.value.ChangeListener; import javafx.scene.control.TextField; diff --git a/fxcomps/src/main/java/io/xpipe/fxcomps/comp/LabelComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/LabelComp.java similarity index 74% rename from fxcomps/src/main/java/io/xpipe/fxcomps/comp/LabelComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/LabelComp.java index 30b465c70..d81ffebea 100644 --- a/fxcomps/src/main/java/io/xpipe/fxcomps/comp/LabelComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/LabelComp.java @@ -1,9 +1,9 @@ -package io.xpipe.fxcomps.comp; +package io.xpipe.extension.fxcomps.impl; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; -import io.xpipe.fxcomps.util.PlatformThread; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.util.PlatformThread; import javafx.beans.property.SimpleStringProperty; import javafx.beans.value.ObservableValue; import javafx.geometry.Pos; diff --git a/extension/src/main/java/io/xpipe/extension/comp/PrettyImageComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/PrettyImageComp.java similarity index 96% rename from extension/src/main/java/io/xpipe/extension/comp/PrettyImageComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/PrettyImageComp.java index 52705c2a3..0fa1ceb48 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/PrettyImageComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/PrettyImageComp.java @@ -1,8 +1,8 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; +import io.xpipe.extension.fxcomps.SimpleComp; +import io.xpipe.extension.fxcomps.util.PlatformThread; import io.xpipe.extension.util.XPipeDaemon; -import io.xpipe.fxcomps.SimpleComp; -import io.xpipe.fxcomps.util.PlatformThread; import javafx.beans.binding.Bindings; import javafx.beans.property.SimpleDoubleProperty; import javafx.beans.value.ObservableValue; @@ -79,7 +79,6 @@ public class PrettyImageComp extends SimpleComp { return image; }, PlatformThread.sync(value))); - ; storeIcon.fitWidthProperty().bind(widthProperty); storeIcon.fitHeightProperty().bind(heightProperty); storeIcon.setSmooth(true); diff --git a/extension/src/main/java/io/xpipe/extension/comp/ProxyChoiceComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/ProxyChoiceComp.java similarity index 92% rename from extension/src/main/java/io/xpipe/extension/comp/ProxyChoiceComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/ProxyChoiceComp.java index 4b9416929..932d04f72 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/ProxyChoiceComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/ProxyChoiceComp.java @@ -1,11 +1,11 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; import io.xpipe.core.store.ShellStore; import io.xpipe.extension.XPipeProxy; +import io.xpipe.extension.fxcomps.SimpleComp; import io.xpipe.extension.util.SimpleValidator; import io.xpipe.extension.util.Validatable; import io.xpipe.extension.util.Validator; -import io.xpipe.fxcomps.SimpleComp; import javafx.beans.property.Property; import javafx.scene.layout.Region; import net.synedra.validatorfx.Check; diff --git a/extension/src/main/java/io/xpipe/extension/comp/SecretFieldComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/SecretFieldComp.java similarity index 80% rename from extension/src/main/java/io/xpipe/extension/comp/SecretFieldComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/SecretFieldComp.java index c1fec6e57..f271a9d63 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/SecretFieldComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/SecretFieldComp.java @@ -1,10 +1,10 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; import io.xpipe.core.util.SecretValue; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; -import io.xpipe.fxcomps.util.PlatformThread; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.util.PlatformThread; import javafx.beans.property.Property; import javafx.scene.control.PasswordField; import javafx.scene.control.TextField; diff --git a/extension/src/main/java/io/xpipe/extension/comp/ShellStoreChoiceComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/ShellStoreChoiceComp.java similarity index 97% rename from extension/src/main/java/io/xpipe/extension/comp/ShellStoreChoiceComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/ShellStoreChoiceComp.java index 54a54c5a9..4c5af3dee 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/ShellStoreChoiceComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/ShellStoreChoiceComp.java @@ -1,13 +1,13 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; import io.xpipe.core.impl.LocalStore; import io.xpipe.core.store.ShellStore; import io.xpipe.extension.DataStoreProviders; import io.xpipe.extension.I18n; import io.xpipe.extension.event.ErrorEvent; +import io.xpipe.extension.fxcomps.SimpleComp; import io.xpipe.extension.util.CustomComboBoxBuilder; import io.xpipe.extension.util.XPipeDaemon; -import io.xpipe.fxcomps.SimpleComp; import javafx.beans.property.Property; import javafx.beans.property.SimpleStringProperty; import javafx.scene.Node; diff --git a/fxcomps/src/main/java/io/xpipe/fxcomps/comp/StackComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/StackComp.java similarity index 76% rename from fxcomps/src/main/java/io/xpipe/fxcomps/comp/StackComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/StackComp.java index a62b6de93..32c3c0fea 100644 --- a/fxcomps/src/main/java/io/xpipe/fxcomps/comp/StackComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/StackComp.java @@ -1,8 +1,8 @@ -package io.xpipe.fxcomps.comp; +package io.xpipe.extension.fxcomps.impl; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; import javafx.geometry.Pos; import javafx.scene.layout.StackPane; diff --git a/extension/src/main/java/io/xpipe/extension/comp/SvgComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/SvgComp.java similarity index 95% rename from extension/src/main/java/io/xpipe/extension/comp/SvgComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/SvgComp.java index 917f8d6bc..5044a4d1e 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/SvgComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/SvgComp.java @@ -1,8 +1,8 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.util.PlatformThread; -import io.xpipe.fxcomps.util.SimpleChangeListener; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.util.PlatformThread; +import io.xpipe.extension.fxcomps.util.SimpleChangeListener; import javafx.beans.binding.Bindings; import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.value.ObservableValue; diff --git a/extension/src/main/java/io/xpipe/extension/comp/TabPaneComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/TabPaneComp.java similarity index 85% rename from extension/src/main/java/io/xpipe/extension/comp/TabPaneComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/TabPaneComp.java index 80f4a1caa..4e1c9393a 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/TabPaneComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/TabPaneComp.java @@ -1,10 +1,10 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; import com.jfoenix.controls.JFXTabPane; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; -import io.xpipe.fxcomps.util.PlatformThread; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.util.PlatformThread; import javafx.beans.property.Property; import javafx.beans.value.ObservableValue; import javafx.geometry.Pos; @@ -59,5 +59,5 @@ public class TabPaneComp extends Comp> { return new SimpleCompStructure<>(tabPane); } - public static record Entry(ObservableValue name, String graphic, Comp comp) {} + public record Entry(ObservableValue name, String graphic, Comp comp) {} } diff --git a/extension/src/main/java/io/xpipe/extension/comp/TextAreaComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/TextAreaComp.java similarity index 83% rename from extension/src/main/java/io/xpipe/extension/comp/TextAreaComp.java rename to extension/src/main/java/io/xpipe/extension/fxcomps/impl/TextAreaComp.java index db6076327..b51f57fea 100644 --- a/extension/src/main/java/io/xpipe/extension/comp/TextAreaComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/TextAreaComp.java @@ -1,9 +1,9 @@ -package io.xpipe.extension.comp; +package io.xpipe.extension.fxcomps.impl; -import io.xpipe.fxcomps.Comp; -import io.xpipe.fxcomps.CompStructure; -import io.xpipe.fxcomps.SimpleCompStructure; -import io.xpipe.fxcomps.util.PlatformThread; +import io.xpipe.extension.fxcomps.Comp; +import io.xpipe.extension.fxcomps.CompStructure; +import io.xpipe.extension.fxcomps.SimpleCompStructure; +import io.xpipe.extension.fxcomps.util.PlatformThread; import javafx.beans.property.Property; import javafx.beans.property.SimpleStringProperty; import javafx.scene.control.TextArea; @@ -28,7 +28,7 @@ public class TextAreaComp extends Comp> { @Override public CompStructure