Integrate fxcomps into extension module

This commit is contained in:
Christopher Schnick 2022-11-30 19:50:04 +01:00
parent ca5dd74086
commit 959fd06c37
57 changed files with 179 additions and 294 deletions

View file

@ -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'
}
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -1,3 +0,0 @@
package io.xpipe.extension.comp;
public class MultiVariantComp {}

View file

@ -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;

View file

@ -1,4 +1,4 @@
package io.xpipe.fxcomps;
package io.xpipe.extension.fxcomps;
import javafx.scene.layout.Region;

View file

@ -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

View file

@ -1,4 +1,4 @@
package io.xpipe.fxcomps;
package io.xpipe.extension.fxcomps;
import javafx.scene.layout.Region;

View file

@ -1,4 +1,4 @@
package io.xpipe.fxcomps;
package io.xpipe.extension.fxcomps;
import javafx.scene.layout.Region;
import lombok.AllArgsConstructor;

View file

@ -0,0 +1,8 @@
package io.xpipe.extension.fxcomps.augment;
import io.xpipe.extension.fxcomps.CompStructure;
public interface Augment<S extends CompStructure<?>> {
void augment(S struc);
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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<CompStructure<VBox>> {
return new SimpleCompStructure<>(vbox);
}
public static record Entry(ObservableValue<String> name, Comp<?> comp) {}
public record Entry(ObservableValue<String> name, Comp<?> comp) {}
}

View file

@ -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<CodeSnippet.Line> lines) {
.collect(Collectors.joining(System.lineSeparator()));
}
public static interface Element {
public interface Element {
String text();
@ -38,9 +38,9 @@ public record CodeSnippet(List<CodeSnippet.Line> lines) {
public static class Builder {
private ColorScheme scheme;
private List<Line> lines;
private List<Element> currentLine;
private final ColorScheme scheme;
private final List<Line> lines;
private final List<Element> currentLine;
public Builder(ColorScheme scheme) {
this.scheme = scheme;
@ -112,7 +112,7 @@ public record CodeSnippet(List<CodeSnippet.Line> 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<CodeSnippet.Line> lines) {
}
}
public static record Line(List<CodeSnippet.Element> elements) {}
public record Line(List<CodeSnippet.Element> elements) {}
public static record ColorScheme(Color keyword, Color identifier, Color type, Color string) {}
public record ColorScheme(Color keyword, Color identifier, Color type, Color string) {}
}

View file

@ -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;

View file

@ -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;

View file

@ -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<CompStructure<FlowPane>> {
return entries;
}
public static record Entry(ObservableValue<String> name, Comp<?> comp) {}
public record Entry(ObservableValue<String> name, Comp<?> comp) {}
}

View file

@ -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<S extends CompStructure<?>> 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<S extends CompStructure<?>> implements Augment<
tooltip.show(hoveredNode, -1, -1);
}
private EventHandler<MouseEvent> moveHandler = (MouseEvent event) -> {
private final EventHandler<MouseEvent> 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<S extends CompStructure<?>> implements Augment<
uninstall(hoveredNode);
}
};
private WeakEventHandler<MouseEvent> weakMoveHandler = new WeakEventHandler<>(moveHandler);
private final WeakEventHandler<MouseEvent> weakMoveHandler = new WeakEventHandler<>(moveHandler);
private EventHandler<MouseEvent> exitHandler = (MouseEvent event) -> {
private final EventHandler<MouseEvent> 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<S extends CompStructure<?>> implements Augment<
hoveredNode = null;
nextTooltip = null;
};
private WeakEventHandler<MouseEvent> weakExitHandler = new WeakEventHandler<>(exitHandler);
private final WeakEventHandler<MouseEvent> weakExitHandler = new WeakEventHandler<>(exitHandler);
// if mouse is pressed then stop all timers / clear all fields
private EventHandler<MouseEvent> pressedHandler = (MouseEvent event) -> {
private final EventHandler<MouseEvent> pressedHandler = (MouseEvent event) -> {
// stop timers
hoverTimer.stop();
visibleTimer.stop();
@ -155,7 +155,7 @@ public class FancyTooltipAugment<S extends CompStructure<?>> implements Augment<
currentTooltip = null;
nextTooltip = null;
};
private WeakEventHandler<MouseEvent> weakPressedHandler = new WeakEventHandler<>(pressedHandler);
private final WeakEventHandler<MouseEvent> weakPressedHandler = new WeakEventHandler<>(pressedHandler);
private void install(Node node, JFXTooltip tooltip) {
if (node == null) {

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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<CompStructure<JFXTabPane>> {
return new SimpleCompStructure<>(tabPane);
}
public static record Entry(ObservableValue<String> name, String graphic, Comp<?> comp) {}
public record Entry(ObservableValue<String> name, String graphic, Comp<?> comp) {}
}

View file

@ -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<CompStructure<TextArea>> {
@Override
public CompStructure<TextArea> createBase() {
var text = new TextArea(value.getValue() != null ? value.getValue().toString() : null);
var text = new TextArea(value.getValue() != null ? value.getValue() : null);
text.textProperty().addListener((c, o, n) -> {
lazyValue.setValue(n != null && n.length() > 0 ? n : null);
});

View file

@ -1,10 +1,10 @@
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.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.property.SimpleStringProperty;
import javafx.event.EventHandler;
@ -36,7 +36,7 @@ public class TextFieldComp extends Comp<CompStructure<TextField>> {
@Override
public CompStructure<TextField> createBase() {
var text = new TextField(
currentValue.getValue() != null ? currentValue.getValue().toString() : null);
currentValue.getValue() != null ? currentValue.getValue() : null);
text.textProperty().addListener((c, o, n) -> {
currentValue.setValue(n != null && n.length() > 0 ? n : null);
});

View file

@ -1,10 +1,10 @@
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.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.scene.control.ToggleButton;

View file

@ -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.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;

View file

@ -1,7 +1,7 @@
package io.xpipe.fxcomps.comp;
package io.xpipe.extension.fxcomps.impl;
import io.xpipe.fxcomps.Comp;
import io.xpipe.fxcomps.CompStructure;
import io.xpipe.extension.fxcomps.Comp;
import io.xpipe.extension.fxcomps.CompStructure;
import java.util.function.Supplier;

View file

@ -1,12 +1,12 @@
package io.xpipe.extension.comp;
package io.xpipe.extension.fxcomps.impl;
import io.xpipe.core.source.WriteMode;
import io.xpipe.extension.I18n;
import io.xpipe.extension.fxcomps.SimpleComp;
import io.xpipe.extension.fxcomps.util.PlatformThread;
import io.xpipe.extension.util.SimpleValidator;
import io.xpipe.extension.util.Validatable;
import io.xpipe.extension.util.Validator;
import io.xpipe.fxcomps.SimpleComp;
import io.xpipe.fxcomps.util.PlatformThread;
import javafx.beans.property.Property;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.value.ObservableValue;

View file

@ -1,4 +1,4 @@
package io.xpipe.fxcomps.util;
package io.xpipe.extension.fxcomps.util;
import javafx.beans.binding.Binding;
import javafx.beans.value.ObservableValue;

View file

@ -1,4 +1,4 @@
package io.xpipe.fxcomps.util;
package io.xpipe.extension.fxcomps.util;
import javafx.application.Platform;
import javafx.beans.InvalidationListener;

View file

@ -1,4 +1,4 @@
package io.xpipe.fxcomps.util;
package io.xpipe.extension.fxcomps.util;
import javafx.event.EventHandler;
import javafx.scene.Scene;

View file

@ -1,4 +1,4 @@
package io.xpipe.fxcomps.util;
package io.xpipe.extension.fxcomps.util;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;

View file

@ -1,7 +1,7 @@
package io.xpipe.extension.util;
import io.xpipe.extension.comp.FilterComp;
import io.xpipe.fxcomps.util.SimpleChangeListener;
import io.xpipe.extension.fxcomps.impl.FilterComp;
import io.xpipe.extension.fxcomps.util.SimpleChangeListener;
import javafx.application.Platform;
import javafx.beans.property.Property;
import javafx.beans.property.SimpleStringProperty;

View file

@ -6,7 +6,10 @@ import io.xpipe.core.dialog.Dialog;
import io.xpipe.core.dialog.QueryConverter;
import io.xpipe.core.impl.LocalStore;
import io.xpipe.core.source.DataSource;
import io.xpipe.core.store.*;
import io.xpipe.core.store.DataFlow;
import io.xpipe.core.store.DataStore;
import io.xpipe.core.store.FileSystemStore;
import io.xpipe.core.store.ShellStore;
import io.xpipe.core.util.SecretValue;
import lombok.Value;

View file

@ -4,9 +4,9 @@ import io.xpipe.core.charsetter.NewLine;
import io.xpipe.core.charsetter.StreamCharset;
import io.xpipe.core.util.SecretValue;
import io.xpipe.extension.I18n;
import io.xpipe.extension.comp.*;
import io.xpipe.fxcomps.Comp;
import io.xpipe.fxcomps.CompStructure;
import io.xpipe.extension.fxcomps.Comp;
import io.xpipe.extension.fxcomps.CompStructure;
import io.xpipe.extension.fxcomps.impl.*;
import javafx.beans.property.Property;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.value.ObservableValue;

View file

@ -1,7 +1,7 @@
package io.xpipe.extension.util;
import io.xpipe.core.store.DataStore;
import io.xpipe.core.impl.FileStore;
import io.xpipe.core.store.DataStore;
import lombok.SneakyThrows;
import java.nio.file.Path;

View file

@ -1,7 +1,7 @@
package io.xpipe.extension.util;
import io.xpipe.core.store.DataStore;
import io.xpipe.core.impl.LocalStore;
import io.xpipe.core.store.DataStore;
import io.xpipe.core.store.ShellStore;
import io.xpipe.extension.I18n;

View file

@ -6,7 +6,7 @@ import io.xpipe.core.source.DataSourceType;
import io.xpipe.core.store.DataStore;
import io.xpipe.extension.DataSourceProvider;
import io.xpipe.extension.DataStoreProvider;
import io.xpipe.fxcomps.Comp;
import io.xpipe.extension.fxcomps.Comp;
import javafx.beans.property.Property;
import javafx.beans.value.ObservableValue;
import javafx.scene.image.Image;

View file

@ -6,10 +6,13 @@ import io.xpipe.extension.util.XPipeDaemon;
open module io.xpipe.extension {
exports io.xpipe.extension;
exports io.xpipe.extension.comp;
exports io.xpipe.extension.event;
exports io.xpipe.extension.prefs;
exports io.xpipe.extension.util;
exports io.xpipe.extension.fxcomps;
exports io.xpipe.extension.fxcomps.impl;
exports io.xpipe.extension.fxcomps.util;
exports io.xpipe.extension.fxcomps.augment;
requires transitive io.xpipe.core;
requires io.xpipe.beacon;
@ -21,7 +24,6 @@ open module io.xpipe.extension {
requires static javafx.graphics;
requires static javafx.controls;
requires static javafx.web;
requires static io.xpipe.fxcomps;
requires static lombok;
requires static org.controlsfx.controls;
requires static java.desktop;

View file

@ -1,21 +0,0 @@
### MIT License
Copyright (c) 2021 Christopher Schnick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,39 +0,0 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
version = file('../misc/version').text
group = 'io.xpipe'
archivesBaseName = 'xpipe-fxcomps'
repositories {
mavenCentral()
}
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
def currentOS = DefaultNativePlatform.currentOperatingSystem;
def platform
if (currentOS.isWindows()) {
platform = 'win'
} else if (currentOS.isLinux()) {
platform = 'linux'
} else if (currentOS.isMacOsX()) {
platform = 'mac'
}
dependencies {
compileOnly "org.openjfx:javafx-base:18:${platform}"
compileOnly "org.openjfx:javafx-controls:18:${platform}"
compileOnly "org.openjfx:javafx-graphics:18:${platform}"
compileOnly "org.openjfx:javafx-media:18:${platform}"
compileOnly "org.openjfx:javafx-web:18:${platform}"
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
}
apply from: 'publish.gradle'
apply from: "$projectDir/../deps/publish-base.gradle"

View file

@ -1,33 +0,0 @@
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = project.archivesBaseName
from components.java
pom {
name = 'FxComps'
description = 'The FxComps library provides a new approach to creating JavaFX interfaces and offers a quicker and more robust user interface development workflow.'
url = 'https://github.com/xpipe-io/xpipe_java/fxcomps'
licenses {
license {
name = 'The MIT License (MIT)'
url = 'https://github.com/xpipe-io/xpipe_java/LICENSE.md'
}
}
developers {
developer {
id = 'crschnick'
name = 'Christopher Schnick'
email = 'crschnick@xpipe.io'
}
}
scm {
connection = 'scm:git:git://github.com/xpipe-io/xpipe_java.git'
developerConnection = 'scm:git:ssh://github.com/xpipe-io/xpipe_java.git'
url = 'https://github.com/xpipe-io/xpipe_java'
}
}
}
}
}

View file

@ -1,8 +0,0 @@
package io.xpipe.fxcomps.augment;
import io.xpipe.fxcomps.CompStructure;
public interface Augment<S extends CompStructure<?>> {
void augment(S struc);
}

View file

@ -1,12 +0,0 @@
open module io.xpipe.fxcomps {
exports io.xpipe.fxcomps;
exports io.xpipe.fxcomps.comp;
exports io.xpipe.fxcomps.augment;
exports io.xpipe.fxcomps.util;
requires static javafx.base;
requires static javafx.controls;
requires static java.desktop;
requires static javafx.web;
requires static lombok;
}

View file

@ -4,7 +4,6 @@ include 'api'
include 'core'
include 'beacon'
include 'extension'
include 'fxcomps'
buildscript {
repositories {