diff --git a/.editorconfig b/.editorconfig index c4a61919b2..eb0b2c4d07 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,3 +8,6 @@ end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true + +[.idea/codeStyles/*.xml] +indent_size = 2 diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000000..b7f54e8465 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,162 @@ + + + + + + + + + + + + diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000000..79ee123c2b --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/doc/ui-development-notes.md b/doc/ui-development-notes.md index 47e132e913..d81b7406a1 100644 --- a/doc/ui-development-notes.md +++ b/doc/ui-development-notes.md @@ -11,7 +11,7 @@ That interpretation is also confirmed by the Java FX reference: "A controller is The described pattern is only applied yet to that package: -io.bisq.gui.main.offer.createoffer; +bisq.desktop.main.offer.createoffer; For prototyping the UI we stick first with a more rapid development style approach. diff --git a/package/linux/32bitBuild.sh b/package/linux/32bitBuild.sh index a0296eddbc..8cede5c50e 100644 --- a/package/linux/32bitBuild.sh +++ b/package/linux/32bitBuild.sh @@ -29,7 +29,7 @@ $JAVA_HOME/bin/javapackager \ -srcfiles "$dir/bcpg-jdk15on.jar" \ -srcfiles "$dir/bcprov-jdk15on.jar" \ -srcfiles package/linux/LICENSE \ - -appclass io.bisq.gui.app.BisqAppMain \ + -appclass bisq.desktop.app.BisqAppMain \ -BjvmOptions=-Xss1280k \ -outfile Bisq diff --git a/package/linux/64bitBuild.sh b/package/linux/64bitBuild.sh index ac7351d164..7745625c20 100644 --- a/package/linux/64bitBuild.sh +++ b/package/linux/64bitBuild.sh @@ -29,7 +29,7 @@ $JAVA_HOME/bin/javapackager \ -srcfiles "$dir/bcpg-jdk15on.jar" \ -srcfiles "$dir/bcprov-jdk15on.jar" \ -srcfiles package/linux/LICENSE \ - -appclass io.bisq.gui.app.BisqAppMain \ + -appclass bisq.desktop.app.BisqAppMain \ -BjvmOptions=-Xss1280k \ -outfile Bisq diff --git a/package/osx/Info.plist b/package/osx/Info.plist index 0f55ac3690..2b08350d8d 100644 --- a/package/osx/Info.plist +++ b/package/osx/Info.plist @@ -15,7 +15,7 @@ CFBundleName Bisq CFBundleIdentifier - io.bisq.Bisq + bisq.Bisq CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType @@ -36,7 +36,7 @@ JVMRuntime .. JVMMainClassName - io.bisq.app.core.BisqAppMain + bisq.desktop.app.BisqAppMain JVMAppClasspath JVMMainJarName @@ -49,6 +49,6 @@ JVMUserOptions - + diff --git a/package/osx/create_app.sh b/package/osx/create_app.sh index e28877dbd2..abcbfa763e 100755 --- a/package/osx/create_app.sh +++ b/package/osx/create_app.sh @@ -41,7 +41,7 @@ echo "Using JAVA_HOME: $JAVA_HOME" $JAVA_HOME/bin/javapackager \ -deploy \ -BappVersion=$version \ - -Bmac.CFBundleIdentifier=io.bisq \ + -Bmac.CFBundleIdentifier=bisq \ -Bmac.CFBundleName=Bisq \ -Bicon=package/osx/Bisq.icns \ -Bruntime="$JAVA_HOME/jre" \ @@ -53,7 +53,7 @@ $JAVA_HOME/bin/javapackager \ -srcfiles "deploy/Bisq-$version.jar" \ -srcfiles "target/lib/bcpg-jdk15on.jar" \ -srcfiles "target/lib/bcprov-jdk15on.jar" \ - -appclass io.bisq.gui.app.BisqAppMain \ + -appclass bisq.desktop.app.BisqAppMain \ -outfile Bisq diff --git a/package/windows/32bitBuild.bat b/package/windows/32bitBuild.bat index 120c638c86..083e12bd27 100644 --- a/package/windows/32bitBuild.bat +++ b/package/windows/32bitBuild.bat @@ -19,7 +19,7 @@ call "%JAVA_HOME%\bin\javapackager.exe" -deploy ^ -title Bisq ^ -vendor Bisq ^ -outdir %outdir% ^ --appclass io.bisq.gui.app.BisqAppMain ^ +-appclass bisq.desktop.app.BisqAppMain ^ -srcfiles %outdir%\Bisq.jar ^ -srcfiles %outdir%\bcpg-jdk15on.jar ^ -srcfiles %outdir%\bcprov-jdk15on.jar ^ diff --git a/package/windows/64bitBuild.bat b/package/windows/64bitBuild.bat index a79b8847ca..2ae1adf270 100644 --- a/package/windows/64bitBuild.bat +++ b/package/windows/64bitBuild.bat @@ -19,7 +19,7 @@ call "%JAVA_HOME%\bin\javapackager.exe" -deploy ^ -title Bisq ^ -vendor Bisq ^ -outdir %outdir% ^ --appclass io.bisq.gui.app.BisqAppMain ^ +-appclass bisq.desktop.app.BisqAppMain ^ -srcfiles %outdir%\Bisq.jar ^ -srcfiles %outdir%\bcpg-jdk15on.jar ^ -srcfiles %outdir%\bcprov-jdk15on.jar ^ diff --git a/pom.xml b/pom.xml index 72198b860f..0dd966c174 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - io.bisq + network.bisq bisq-desktop -SNAPSHOT @@ -111,7 +111,7 @@ - io.bisq.gui.app.BisqAppMain + bisq.desktop.app.BisqAppMain lib/bcpg-jdk15on.jar lib/bcprov-jdk15on.jar @@ -357,9 +357,9 @@ - io.bisq + network.bisq bisq-core - 975d446 + -SNAPSHOT diff --git a/src/main/java/io/bisq/gui/CandleStickChart.css b/src/main/java/bisq/desktop/CandleStickChart.css similarity index 100% rename from src/main/java/io/bisq/gui/CandleStickChart.css rename to src/main/java/bisq/desktop/CandleStickChart.css diff --git a/src/main/java/io/bisq/gui/GuiModule.java b/src/main/java/bisq/desktop/DesktopModule.java similarity index 68% rename from src/main/java/io/bisq/gui/GuiModule.java rename to src/main/java/bisq/desktop/DesktopModule.java index 5f4a78efa9..57bb3ac9b4 100644 --- a/src/main/java/io/bisq/gui/GuiModule.java +++ b/src/main/java/bisq/desktop/DesktopModule.java @@ -15,37 +15,42 @@ * along with Bisq. If not, see . */ -package io.bisq.gui; +package bisq.desktop; + +import bisq.desktop.common.fxml.FxmlViewLoader; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.ViewFactory; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.common.view.guice.InjectorViewFactory; +import bisq.desktop.main.funds.transactions.DisplayedTransactionsFactory; +import bisq.desktop.main.funds.transactions.TradableRepository; +import bisq.desktop.main.funds.transactions.TransactionAwareTradableFactory; +import bisq.desktop.main.funds.transactions.TransactionListItemFactory; +import bisq.desktop.main.offer.offerbook.OfferBook; +import bisq.desktop.main.overlays.windows.TorNetworkSettingsWindow; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.Transitions; + +import bisq.core.app.AppOptionKeys; + +import bisq.common.app.AppModule; +import bisq.common.locale.Res; + +import org.springframework.core.env.Environment; import com.google.inject.Singleton; import com.google.inject.name.Names; -import io.bisq.common.app.AppModule; -import io.bisq.common.locale.Res; -import io.bisq.core.app.AppOptionKeys; -import io.bisq.gui.common.fxml.FxmlViewLoader; -import io.bisq.gui.common.view.CachingViewLoader; -import io.bisq.gui.common.view.ViewFactory; -import io.bisq.gui.common.view.ViewLoader; -import io.bisq.gui.common.view.guice.InjectorViewFactory; -import io.bisq.gui.main.funds.transactions.DisplayedTransactionsFactory; -import io.bisq.gui.main.funds.transactions.TradableRepository; -import io.bisq.gui.main.funds.transactions.TransactionAwareTradableFactory; -import io.bisq.gui.main.funds.transactions.TransactionListItemFactory; -import io.bisq.gui.main.offer.offerbook.OfferBook; -import io.bisq.gui.main.overlays.windows.TorNetworkSettingsWindow; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.Transitions; + import javafx.stage.Stage; -import org.springframework.core.env.Environment; import java.util.ResourceBundle; -public class GuiModule extends AppModule { +public class DesktopModule extends AppModule { private final Stage primaryStage; - public GuiModule(Environment environment, Stage primaryStage) { + public DesktopModule(Environment environment, Stage primaryStage) { super(environment); this.primaryStage = primaryStage; } diff --git a/src/main/java/io/bisq/gui/Navigation.java b/src/main/java/bisq/desktop/Navigation.java similarity index 94% rename from src/main/java/io/bisq/gui/Navigation.java rename to src/main/java/bisq/desktop/Navigation.java index 64fabba0c0..6c811458b2 100644 --- a/src/main/java/io/bisq/gui/Navigation.java +++ b/src/main/java/bisq/desktop/Navigation.java @@ -15,25 +15,28 @@ * along with Bisq. If not, see . */ -package io.bisq.gui; +package bisq.desktop; + +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewPath; +import bisq.desktop.main.MainView; +import bisq.desktop.main.market.MarketView; + +import bisq.common.proto.persistable.NavigationPath; +import bisq.common.proto.persistable.PersistedDataHost; +import bisq.common.storage.Storage; import com.google.inject.Inject; -import io.bisq.common.proto.persistable.NavigationPath; -import io.bisq.common.proto.persistable.PersistedDataHost; -import io.bisq.common.storage.Storage; -import io.bisq.gui.common.view.View; -import io.bisq.gui.common.view.ViewPath; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.market.MarketView; -import lombok.Getter; -import lombok.Setter; -import lombok.extern.slf4j.Slf4j; import java.util.ArrayList; import java.util.List; import java.util.concurrent.CopyOnWriteArraySet; import java.util.stream.Collectors; +import lombok.Getter; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; + @Slf4j public final class Navigation implements PersistedDataHost { private static final ViewPath DEFAULT_VIEW_PATH = ViewPath.to(MainView.class, MarketView.class); diff --git a/src/main/java/io/bisq/gui/SystemTray.java b/src/main/java/bisq/desktop/SystemTray.java similarity index 92% rename from src/main/java/io/bisq/gui/SystemTray.java rename to src/main/java/bisq/desktop/SystemTray.java index cc707165b0..e9caf0a09d 100644 --- a/src/main/java/io/bisq/gui/SystemTray.java +++ b/src/main/java/bisq/desktop/SystemTray.java @@ -15,24 +15,35 @@ * along with Bisq. If not, see . */ -package io.bisq.gui; +package bisq.desktop; + +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.ImageUtil; + +import bisq.core.exceptions.BisqException; + +import bisq.common.UserThread; +import bisq.common.locale.Res; +import bisq.common.util.Utilities; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Utilities; -import io.bisq.core.exceptions.BisqException; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.ImageUtil; import javafx.application.Platform; + import javafx.stage.Stage; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import java.awt.AWTException; +import java.awt.Image; +import java.awt.MenuItem; +import java.awt.PopupMenu; +import java.awt.TrayIcon; +import java.awt.image.BufferedImage; import javax.imageio.ImageIO; -import java.awt.*; -import java.awt.image.BufferedImage; + import java.io.IOException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * There is no JavaFX support yet, so we need to use AWT. */ diff --git a/src/main/java/io/bisq/gui/app/BisqApp.java b/src/main/java/bisq/desktop/app/BisqApp.java similarity index 87% rename from src/main/java/io/bisq/gui/app/BisqApp.java rename to src/main/java/bisq/desktop/app/BisqApp.java index afb114b486..5412bcf2b2 100644 --- a/src/main/java/io/bisq/gui/app/BisqApp.java +++ b/src/main/java/bisq/desktop/app/BisqApp.java @@ -15,62 +15,84 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.app; +package bisq.desktop.app; + +import bisq.desktop.Navigation; +import bisq.desktop.SystemTray; +import bisq.desktop.common.UITimer; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.common.view.guice.InjectorViewFactory; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.main.MainView; +import bisq.desktop.main.debug.DebugView; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.overlays.windows.EmptyWalletWindow; +import bisq.desktop.main.overlays.windows.FilterWindow; +import bisq.desktop.main.overlays.windows.ManualPayoutTxWindow; +import bisq.desktop.main.overlays.windows.SendAlertMessageWindow; +import bisq.desktop.main.overlays.windows.ShowWalletDataWindow; +import bisq.desktop.util.ImageUtil; + +import bisq.core.alert.AlertManager; +import bisq.core.app.AppOptionKeys; +import bisq.core.app.BisqEnvironment; +import bisq.core.arbitration.ArbitratorManager; +import bisq.core.arbitration.DisputeManager; +import bisq.core.btc.AddressEntryList; +import bisq.core.btc.BaseCurrencyNetwork; +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.WalletService; +import bisq.core.btc.wallet.WalletsManager; +import bisq.core.btc.wallet.WalletsSetup; +import bisq.core.dao.DaoManager; +import bisq.core.dao.request.compensation.CompensationRequestManager; +import bisq.core.dao.vote.VotingManager; +import bisq.core.filter.FilterManager; +import bisq.core.offer.OpenOfferManager; +import bisq.core.trade.TradeManager; +import bisq.core.trade.closed.ClosedTradableManager; +import bisq.core.trade.failed.FailedTradesManager; +import bisq.core.user.Preferences; +import bisq.core.user.User; + +import bisq.network.p2p.P2PService; + +import bisq.common.CommonOptionKeys; +import bisq.common.UserThread; +import bisq.common.app.Capabilities; +import bisq.common.app.DevEnv; +import bisq.common.app.Log; +import bisq.common.app.Version; +import bisq.common.crypto.LimitedKeyStrengthException; +import bisq.common.handlers.ResultHandler; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.proto.persistable.PersistedDataHost; +import bisq.common.storage.Storage; +import bisq.common.util.Profiler; +import bisq.common.util.Utilities; + +import org.bitcoinj.store.BlockStoreException; -import ch.qos.logback.classic.Level; -import ch.qos.logback.classic.Logger; import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.name.Names; -import io.bisq.common.CommonOptionKeys; -import io.bisq.common.UserThread; -import io.bisq.common.app.Capabilities; -import io.bisq.common.app.DevEnv; -import io.bisq.common.app.Log; -import io.bisq.common.app.Version; -import io.bisq.common.crypto.LimitedKeyStrengthException; -import io.bisq.common.handlers.ResultHandler; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.proto.persistable.PersistedDataHost; -import io.bisq.common.storage.Storage; -import io.bisq.common.util.Profiler; -import io.bisq.common.util.Utilities; -import io.bisq.core.alert.AlertManager; -import io.bisq.core.app.AppOptionKeys; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.arbitration.ArbitratorManager; -import io.bisq.core.arbitration.DisputeManager; -import io.bisq.core.btc.AddressEntryList; -import io.bisq.core.btc.BaseCurrencyNetwork; -import io.bisq.core.btc.wallet.*; -import io.bisq.core.dao.DaoManager; -import io.bisq.core.dao.request.compensation.CompensationRequestManager; -import io.bisq.core.dao.vote.VotingManager; -import io.bisq.core.filter.FilterManager; -import io.bisq.core.offer.OpenOfferManager; -import io.bisq.core.trade.TradeManager; -import io.bisq.core.trade.closed.ClosedTradableManager; -import io.bisq.core.trade.failed.FailedTradesManager; -import io.bisq.core.user.Preferences; -import io.bisq.core.user.User; -import io.bisq.gui.Navigation; -import io.bisq.gui.SystemTray; -import io.bisq.gui.common.UITimer; -import io.bisq.gui.common.view.CachingViewLoader; -import io.bisq.gui.common.view.View; -import io.bisq.gui.common.view.ViewLoader; -import io.bisq.gui.common.view.guice.InjectorViewFactory; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.debug.DebugView; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.overlays.windows.*; -import io.bisq.gui.util.ImageUtil; -import io.bisq.network.p2p.P2PService; + +import org.apache.commons.lang3.exception.ExceptionUtils; + +import org.reactfx.EventStreams; + import javafx.application.Application; import javafx.application.Platform; + +import javafx.stage.Modality; +import javafx.stage.Stage; +import javafx.stage.StageStyle; + import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Label; @@ -79,26 +101,28 @@ import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; import javafx.scene.layout.Pane; import javafx.scene.layout.StackPane; -import javafx.stage.Modality; -import javafx.stage.Stage; -import javafx.stage.StageStyle; -import org.apache.commons.lang3.exception.ExceptionUtils; -import org.bitcoinj.store.BlockStoreException; -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.reactfx.EventStreams; -import org.slf4j.LoggerFactory; -import java.io.IOException; -import java.nio.file.Paths; +import org.bouncycastle.jce.provider.BouncyCastleProvider; + import java.security.NoSuchAlgorithmException; import java.security.Security; + +import java.nio.file.Paths; + +import java.io.IOException; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.concurrent.TimeUnit; -import static io.bisq.gui.util.Layout.INITIAL_SCENE_HEIGHT; -import static io.bisq.gui.util.Layout.INITIAL_SCENE_WIDTH; +import org.slf4j.LoggerFactory; + +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.Logger; + +import static bisq.desktop.util.Layout.INITIAL_SCENE_HEIGHT; +import static bisq.desktop.util.Layout.INITIAL_SCENE_WIDTH; public class BisqApp extends Application { private static final Logger log = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(BisqApp.class); @@ -240,9 +264,9 @@ public class BisqApp extends Application { scene = new Scene(mainView.getRoot(), INITIAL_SCENE_WIDTH, INITIAL_SCENE_HEIGHT); scene.getStylesheets().setAll( - "/io/bisq/gui/bisq.css", - "/io/bisq/gui/images.css", - "/io/bisq/gui/CandleStickChart.css"); + "/bisq/desktop/bisq.css", + "/bisq/desktop/images.css", + "/bisq/desktop/CandleStickChart.css"); // configure the system tray SystemTray.create(primaryStage, shutDownHandler); @@ -356,8 +380,8 @@ public class BisqApp extends Application { log.warn("Scene not available yet, we create a new scene. The bug might be caused by an exception in a constructor or by a circular dependency in guice. throwable=" + throwable.toString()); scene = new Scene(new StackPane(), 1000, 650); scene.getStylesheets().setAll( - "/io/bisq/gui/bisq.css", - "/io/bisq/gui/images.css"); + "/bisq/desktop/bisq.css", + "/bisq/desktop/images.css"); primaryStage.setScene(scene); primaryStage.show(); } diff --git a/src/main/java/io/bisq/gui/app/BisqAppMain.java b/src/main/java/bisq/desktop/app/BisqAppMain.java similarity index 89% rename from src/main/java/io/bisq/gui/app/BisqAppMain.java rename to src/main/java/bisq/desktop/app/BisqAppMain.java index bcfe401768..a0fa030918 100644 --- a/src/main/java/io/bisq/gui/app/BisqAppMain.java +++ b/src/main/java/bisq/desktop/app/BisqAppMain.java @@ -15,18 +15,20 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.app; +package bisq.desktop.app; + +import bisq.core.app.AppOptionKeys; +import bisq.core.app.BisqEnvironment; +import bisq.core.app.BisqExecutable; + +import bisq.common.util.Utilities; -import io.bisq.common.util.Utilities; -import io.bisq.core.app.AppOptionKeys; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.app.BisqExecutable; import joptsimple.OptionException; import joptsimple.OptionParser; import joptsimple.OptionSet; -import static io.bisq.core.app.BisqEnvironment.DEFAULT_APP_NAME; -import static io.bisq.core.app.BisqEnvironment.DEFAULT_USER_DATA_DIR; +import static bisq.core.app.BisqEnvironment.DEFAULT_APP_NAME; +import static bisq.core.app.BisqEnvironment.DEFAULT_USER_DATA_DIR; public class BisqAppMain extends BisqExecutable { diff --git a/src/main/java/io/bisq/gui/app/BisqAppModule.java b/src/main/java/bisq/desktop/app/BisqAppModule.java similarity index 74% rename from src/main/java/io/bisq/gui/app/BisqAppModule.java rename to src/main/java/bisq/desktop/app/BisqAppModule.java index 143ae78d91..131664254b 100644 --- a/src/main/java/io/bisq/gui/app/BisqAppModule.java +++ b/src/main/java/bisq/desktop/app/BisqAppModule.java @@ -15,41 +15,47 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.app; +package bisq.desktop.app; + +import bisq.desktop.DesktopModule; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.main.overlays.notifications.NotificationCenter; + +import bisq.core.alert.AlertModule; +import bisq.core.app.AppOptionKeys; +import bisq.core.app.BisqEnvironment; +import bisq.core.arbitration.ArbitratorModule; +import bisq.core.btc.BitcoinModule; +import bisq.core.dao.DaoModule; +import bisq.core.filter.FilterModule; +import bisq.core.network.p2p.seed.DefaultSeedNodeRepository; +import bisq.core.network.p2p.seed.SeedNodeAddressLookup; +import bisq.core.offer.OfferModule; +import bisq.core.proto.network.CoreNetworkProtoResolver; +import bisq.core.proto.persistable.CorePersistenceProtoResolver; +import bisq.core.trade.TradeModule; +import bisq.core.user.Preferences; +import bisq.core.user.User; + +import bisq.network.crypto.EncryptionServiceModule; +import bisq.network.p2p.P2PModule; +import bisq.network.p2p.network.BridgeAddressProvider; +import bisq.network.p2p.seed.SeedNodeRepository; + +import bisq.common.Clock; +import bisq.common.app.AppModule; +import bisq.common.crypto.KeyRing; +import bisq.common.crypto.KeyStorage; +import bisq.common.proto.network.NetworkProtoResolver; +import bisq.common.proto.persistable.PersistenceProtoResolver; +import bisq.common.storage.Storage; + +import org.springframework.core.env.Environment; import com.google.inject.Singleton; import com.google.inject.name.Names; -import io.bisq.common.Clock; -import io.bisq.common.app.AppModule; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.KeyStorage; -import io.bisq.common.proto.network.NetworkProtoResolver; -import io.bisq.common.proto.persistable.PersistenceProtoResolver; -import io.bisq.common.storage.Storage; -import io.bisq.core.alert.AlertModule; -import io.bisq.core.app.AppOptionKeys; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.arbitration.ArbitratorModule; -import io.bisq.core.btc.BitcoinModule; -import io.bisq.core.dao.DaoModule; -import io.bisq.core.filter.FilterModule; -import io.bisq.core.network.p2p.seed.DefaultSeedNodeRepository; -import io.bisq.core.network.p2p.seed.SeedNodeAddressLookup; -import io.bisq.core.offer.OfferModule; -import io.bisq.core.proto.network.CoreNetworkProtoResolver; -import io.bisq.core.proto.persistable.CorePersistenceProtoResolver; -import io.bisq.core.trade.TradeModule; -import io.bisq.core.user.Preferences; -import io.bisq.core.user.User; -import io.bisq.gui.GuiModule; -import io.bisq.gui.common.view.CachingViewLoader; -import io.bisq.gui.main.overlays.notifications.NotificationCenter; -import io.bisq.network.crypto.EncryptionServiceModule; -import io.bisq.network.p2p.P2PModule; -import io.bisq.network.p2p.network.BridgeAddressProvider; -import io.bisq.network.p2p.seed.SeedNodeRepository; + import javafx.stage.Stage; -import org.springframework.core.env.Environment; import java.io.File; @@ -144,7 +150,7 @@ public class BisqAppModule extends AppModule { return new DaoModule(environment); } - private GuiModule guiModule() { - return new GuiModule(environment, primaryStage); + private DesktopModule guiModule() { + return new DesktopModule(environment, primaryStage); } } diff --git a/src/main/java/io/bisq/gui/bisq.css b/src/main/java/bisq/desktop/bisq.css similarity index 100% rename from src/main/java/io/bisq/gui/bisq.css rename to src/main/java/bisq/desktop/bisq.css diff --git a/src/main/java/io/bisq/gui/common/UITimer.java b/src/main/java/bisq/desktop/common/UITimer.java similarity index 59% rename from src/main/java/io/bisq/gui/common/UITimer.java rename to src/main/java/bisq/desktop/common/UITimer.java index 375210e2d9..f1952bd12d 100644 --- a/src/main/java/io/bisq/gui/common/UITimer.java +++ b/src/main/java/bisq/desktop/common/UITimer.java @@ -1,12 +1,31 @@ -package io.bisq.gui.common; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.common; + +import bisq.common.Timer; -import io.bisq.common.Timer; import org.reactfx.util.FxTimer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.time.Duration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class UITimer implements Timer { private final Logger log = LoggerFactory.getLogger(UITimer.class); private org.reactfx.util.Timer timer; diff --git a/src/main/java/io/bisq/gui/common/ViewfxException.java b/src/main/java/bisq/desktop/common/ViewfxException.java similarity index 97% rename from src/main/java/io/bisq/gui/common/ViewfxException.java rename to src/main/java/bisq/desktop/common/ViewfxException.java index c9e2981511..a2012f1bf4 100644 --- a/src/main/java/io/bisq/gui/common/ViewfxException.java +++ b/src/main/java/bisq/desktop/common/ViewfxException.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common; +package bisq.desktop.common; import static java.lang.String.format; diff --git a/src/main/java/io/bisq/gui/common/fxml/FxmlViewLoader.java b/src/main/java/bisq/desktop/common/fxml/FxmlViewLoader.java similarity index 94% rename from src/main/java/io/bisq/gui/common/fxml/FxmlViewLoader.java rename to src/main/java/bisq/desktop/common/fxml/FxmlViewLoader.java index 95fb1de37d..8a1acb328a 100644 --- a/src/main/java/io/bisq/gui/common/fxml/FxmlViewLoader.java +++ b/src/main/java/bisq/desktop/common/fxml/FxmlViewLoader.java @@ -15,19 +15,24 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.fxml; +package bisq.desktop.common.fxml; + +import bisq.desktop.common.ViewfxException; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewFactory; +import bisq.desktop.common.view.ViewLoader; -import io.bisq.gui.common.ViewfxException; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.common.view.View; -import io.bisq.gui.common.view.ViewFactory; -import io.bisq.gui.common.view.ViewLoader; -import javafx.fxml.FXMLLoader; import org.springframework.core.annotation.AnnotationUtils; import javax.inject.Inject; + +import javafx.fxml.FXMLLoader; + import java.io.IOException; + import java.net.URL; + import java.util.ResourceBundle; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/src/main/java/io/bisq/gui/common/model/Activatable.java b/src/main/java/bisq/desktop/common/model/Activatable.java similarity index 96% rename from src/main/java/io/bisq/gui/common/model/Activatable.java rename to src/main/java/bisq/desktop/common/model/Activatable.java index 216f32a951..e21ff5ec9f 100644 --- a/src/main/java/io/bisq/gui/common/model/Activatable.java +++ b/src/main/java/bisq/desktop/common/model/Activatable.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.model; +package bisq.desktop.common.model; public interface Activatable { diff --git a/src/main/java/io/bisq/gui/common/model/ActivatableDataModel.java b/src/main/java/bisq/desktop/common/model/ActivatableDataModel.java similarity index 97% rename from src/main/java/io/bisq/gui/common/model/ActivatableDataModel.java rename to src/main/java/bisq/desktop/common/model/ActivatableDataModel.java index afa3793d3f..726a81ac32 100644 --- a/src/main/java/io/bisq/gui/common/model/ActivatableDataModel.java +++ b/src/main/java/bisq/desktop/common/model/ActivatableDataModel.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.model; +package bisq.desktop.common.model; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/common/model/ActivatableViewModel.java b/src/main/java/bisq/desktop/common/model/ActivatableViewModel.java similarity index 97% rename from src/main/java/io/bisq/gui/common/model/ActivatableViewModel.java rename to src/main/java/bisq/desktop/common/model/ActivatableViewModel.java index a048b73b81..86356c9330 100644 --- a/src/main/java/io/bisq/gui/common/model/ActivatableViewModel.java +++ b/src/main/java/bisq/desktop/common/model/ActivatableViewModel.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.model; +package bisq.desktop.common.model; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/common/model/ActivatableWithDataModel.java b/src/main/java/bisq/desktop/common/model/ActivatableWithDataModel.java similarity index 97% rename from src/main/java/io/bisq/gui/common/model/ActivatableWithDataModel.java rename to src/main/java/bisq/desktop/common/model/ActivatableWithDataModel.java index b17d411c3a..e6c9353c26 100644 --- a/src/main/java/io/bisq/gui/common/model/ActivatableWithDataModel.java +++ b/src/main/java/bisq/desktop/common/model/ActivatableWithDataModel.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.model; +package bisq.desktop.common.model; public class ActivatableWithDataModel extends WithDataModel implements Activatable { diff --git a/src/main/java/io/bisq/gui/common/model/DataModel.java b/src/main/java/bisq/desktop/common/model/DataModel.java similarity index 95% rename from src/main/java/io/bisq/gui/common/model/DataModel.java rename to src/main/java/bisq/desktop/common/model/DataModel.java index a2504b04d6..d1a0ae352f 100644 --- a/src/main/java/io/bisq/gui/common/model/DataModel.java +++ b/src/main/java/bisq/desktop/common/model/DataModel.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.model; +package bisq.desktop.common.model; public interface DataModel extends Model { } diff --git a/src/main/java/io/bisq/gui/common/model/Model.java b/src/main/java/bisq/desktop/common/model/Model.java similarity index 95% rename from src/main/java/io/bisq/gui/common/model/Model.java rename to src/main/java/bisq/desktop/common/model/Model.java index 3d8c9190dc..99f62a0d26 100644 --- a/src/main/java/io/bisq/gui/common/model/Model.java +++ b/src/main/java/bisq/desktop/common/model/Model.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.model; +package bisq.desktop.common.model; public interface Model { } diff --git a/src/main/java/io/bisq/gui/common/model/ViewModel.java b/src/main/java/bisq/desktop/common/model/ViewModel.java similarity index 95% rename from src/main/java/io/bisq/gui/common/model/ViewModel.java rename to src/main/java/bisq/desktop/common/model/ViewModel.java index d7bf8252b5..c27cbf2ae9 100644 --- a/src/main/java/io/bisq/gui/common/model/ViewModel.java +++ b/src/main/java/bisq/desktop/common/model/ViewModel.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.model; +package bisq.desktop.common.model; public interface ViewModel extends Model { } diff --git a/src/main/java/io/bisq/gui/common/model/WithDataModel.java b/src/main/java/bisq/desktop/common/model/WithDataModel.java similarity index 96% rename from src/main/java/io/bisq/gui/common/model/WithDataModel.java rename to src/main/java/bisq/desktop/common/model/WithDataModel.java index 4846993b30..652de90bb6 100644 --- a/src/main/java/io/bisq/gui/common/model/WithDataModel.java +++ b/src/main/java/bisq/desktop/common/model/WithDataModel.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.model; +package bisq.desktop.common.model; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/common/view/AbstractView.java b/src/main/java/bisq/desktop/common/view/AbstractView.java similarity index 97% rename from src/main/java/io/bisq/gui/common/view/AbstractView.java rename to src/main/java/bisq/desktop/common/view/AbstractView.java index 254a9be5b7..265a229a0e 100644 --- a/src/main/java/io/bisq/gui/common/view/AbstractView.java +++ b/src/main/java/bisq/desktop/common/view/AbstractView.java @@ -15,10 +15,12 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.view; +package bisq.desktop.common.view; import javafx.fxml.FXML; + import javafx.scene.Node; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/common/view/ActivatableView.java b/src/main/java/bisq/desktop/common/view/ActivatableView.java similarity index 97% rename from src/main/java/io/bisq/gui/common/view/ActivatableView.java rename to src/main/java/bisq/desktop/common/view/ActivatableView.java index 9384c7c056..a8ebe57bfa 100644 --- a/src/main/java/io/bisq/gui/common/view/ActivatableView.java +++ b/src/main/java/bisq/desktop/common/view/ActivatableView.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.view; +package bisq.desktop.common.view; import javafx.scene.Node; diff --git a/src/main/java/io/bisq/gui/common/view/ActivatableViewAndModel.java b/src/main/java/bisq/desktop/common/view/ActivatableViewAndModel.java similarity index 95% rename from src/main/java/io/bisq/gui/common/view/ActivatableViewAndModel.java rename to src/main/java/bisq/desktop/common/view/ActivatableViewAndModel.java index 98d7fd1ca6..e50d96e2dd 100644 --- a/src/main/java/io/bisq/gui/common/view/ActivatableViewAndModel.java +++ b/src/main/java/bisq/desktop/common/view/ActivatableViewAndModel.java @@ -15,9 +15,10 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.view; +package bisq.desktop.common.view; + +import bisq.desktop.common.model.Activatable; -import io.bisq.gui.common.model.Activatable; import javafx.scene.Node; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/src/main/java/io/bisq/gui/common/view/CachingViewLoader.java b/src/main/java/bisq/desktop/common/view/CachingViewLoader.java similarity index 97% rename from src/main/java/io/bisq/gui/common/view/CachingViewLoader.java rename to src/main/java/bisq/desktop/common/view/CachingViewLoader.java index bc88fc4751..f86df63cee 100644 --- a/src/main/java/io/bisq/gui/common/view/CachingViewLoader.java +++ b/src/main/java/bisq/desktop/common/view/CachingViewLoader.java @@ -15,9 +15,10 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.view; +package bisq.desktop.common.view; import javax.inject.Inject; + import java.util.HashMap; public class CachingViewLoader implements ViewLoader { diff --git a/src/main/java/io/bisq/gui/common/view/DefaultPathConvention.java b/src/main/java/bisq/desktop/common/view/DefaultPathConvention.java similarity index 96% rename from src/main/java/io/bisq/gui/common/view/DefaultPathConvention.java rename to src/main/java/bisq/desktop/common/view/DefaultPathConvention.java index 7c5c39e1f6..311bcb3e3e 100644 --- a/src/main/java/io/bisq/gui/common/view/DefaultPathConvention.java +++ b/src/main/java/bisq/desktop/common/view/DefaultPathConvention.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.view; +package bisq.desktop.common.view; import org.springframework.util.ClassUtils; diff --git a/src/main/java/io/bisq/gui/common/view/FxmlView.java b/src/main/java/bisq/desktop/common/view/FxmlView.java similarity index 97% rename from src/main/java/io/bisq/gui/common/view/FxmlView.java rename to src/main/java/bisq/desktop/common/view/FxmlView.java index a8917ed3a1..534991f1ac 100644 --- a/src/main/java/io/bisq/gui/common/view/FxmlView.java +++ b/src/main/java/bisq/desktop/common/view/FxmlView.java @@ -15,13 +15,14 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.view; +package bisq.desktop.common.view; + +import java.util.function.Function; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import java.util.function.Function; @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/io/bisq/gui/common/view/InitializableView.java b/src/main/java/bisq/desktop/common/view/InitializableView.java similarity index 97% rename from src/main/java/io/bisq/gui/common/view/InitializableView.java rename to src/main/java/bisq/desktop/common/view/InitializableView.java index a962f56400..3a3336396b 100644 --- a/src/main/java/io/bisq/gui/common/view/InitializableView.java +++ b/src/main/java/bisq/desktop/common/view/InitializableView.java @@ -15,12 +15,14 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.view; +package bisq.desktop.common.view; import javafx.fxml.Initializable; + import javafx.scene.Node; import java.net.URL; + import java.util.ResourceBundle; public abstract class InitializableView extends AbstractView implements Initializable { diff --git a/src/main/java/io/bisq/gui/common/view/View.java b/src/main/java/bisq/desktop/common/view/View.java similarity index 95% rename from src/main/java/io/bisq/gui/common/view/View.java rename to src/main/java/bisq/desktop/common/view/View.java index c1e1b327c6..a7d35ee90b 100644 --- a/src/main/java/io/bisq/gui/common/view/View.java +++ b/src/main/java/bisq/desktop/common/view/View.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.view; +package bisq.desktop.common.view; import javafx.scene.Node; diff --git a/src/main/java/io/bisq/gui/common/view/ViewFactory.java b/src/main/java/bisq/desktop/common/view/ViewFactory.java similarity index 95% rename from src/main/java/io/bisq/gui/common/view/ViewFactory.java rename to src/main/java/bisq/desktop/common/view/ViewFactory.java index 4470f04553..454c76b112 100644 --- a/src/main/java/io/bisq/gui/common/view/ViewFactory.java +++ b/src/main/java/bisq/desktop/common/view/ViewFactory.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.view; +package bisq.desktop.common.view; import javafx.util.Callback; diff --git a/src/main/java/io/bisq/gui/common/view/ViewLoader.java b/src/main/java/bisq/desktop/common/view/ViewLoader.java similarity index 95% rename from src/main/java/io/bisq/gui/common/view/ViewLoader.java rename to src/main/java/bisq/desktop/common/view/ViewLoader.java index f9e0768efb..1775889526 100644 --- a/src/main/java/io/bisq/gui/common/view/ViewLoader.java +++ b/src/main/java/bisq/desktop/common/view/ViewLoader.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.view; +package bisq.desktop.common.view; public interface ViewLoader { View load(Class viewClass); diff --git a/src/main/java/io/bisq/gui/common/view/ViewPath.java b/src/main/java/bisq/desktop/common/view/ViewPath.java similarity index 97% rename from src/main/java/io/bisq/gui/common/view/ViewPath.java rename to src/main/java/bisq/desktop/common/view/ViewPath.java index 7d6952929d..8b4a80146a 100644 --- a/src/main/java/io/bisq/gui/common/view/ViewPath.java +++ b/src/main/java/bisq/desktop/common/view/ViewPath.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.view; +package bisq.desktop.common.view; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/io/bisq/gui/common/view/guice/InjectorViewFactory.java b/src/main/java/bisq/desktop/common/view/guice/InjectorViewFactory.java similarity index 92% rename from src/main/java/io/bisq/gui/common/view/guice/InjectorViewFactory.java rename to src/main/java/bisq/desktop/common/view/guice/InjectorViewFactory.java index 5c19d427c8..4b41b56cf0 100644 --- a/src/main/java/io/bisq/gui/common/view/guice/InjectorViewFactory.java +++ b/src/main/java/bisq/desktop/common/view/guice/InjectorViewFactory.java @@ -15,11 +15,13 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.common.view.guice; +package bisq.desktop.common.view.guice; + +import bisq.desktop.common.view.ViewFactory; + +import com.google.inject.Injector; import com.google.common.base.Preconditions; -import com.google.inject.Injector; -import io.bisq.gui.common.view.ViewFactory; public class InjectorViewFactory implements ViewFactory { diff --git a/src/main/java/io/bisq/gui/components/AddressTextField.java b/src/main/java/bisq/desktop/components/AddressTextField.java similarity index 96% rename from src/main/java/io/bisq/gui/components/AddressTextField.java rename to src/main/java/bisq/desktop/components/AddressTextField.java index 6228154d61..7e55d1897e 100644 --- a/src/main/java/io/bisq/gui/components/AddressTextField.java +++ b/src/main/java/bisq/desktop/components/AddressTextField.java @@ -15,28 +15,34 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components; +package bisq.desktop.components; + +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.GUIUtil; + +import bisq.common.locale.Res; +import bisq.common.util.Utilities; + +import org.bitcoinj.core.Coin; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Utilities; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.GUIUtil; -import javafx.beans.property.ObjectProperty; -import javafx.beans.property.SimpleObjectProperty; -import javafx.beans.property.SimpleStringProperty; -import javafx.beans.property.StringProperty; + import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; import javafx.scene.layout.AnchorPane; -import org.bitcoinj.core.Coin; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleObjectProperty; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; import java.net.URI; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class AddressTextField extends AnchorPane { private static final Logger log = LoggerFactory.getLogger(AddressTextField.class); diff --git a/src/main/java/io/bisq/gui/components/AddressWithIconAndDirection.java b/src/main/java/bisq/desktop/components/AddressWithIconAndDirection.java similarity index 76% rename from src/main/java/io/bisq/gui/components/AddressWithIconAndDirection.java rename to src/main/java/bisq/desktop/components/AddressWithIconAndDirection.java index 603c9c97bb..d1f2219699 100644 --- a/src/main/java/io/bisq/gui/components/AddressWithIconAndDirection.java +++ b/src/main/java/bisq/desktop/components/AddressWithIconAndDirection.java @@ -1,16 +1,37 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import javafx.event.ActionEvent; -import javafx.event.EventHandler; -import javafx.geometry.Insets; + import javafx.scene.control.Hyperlink; import javafx.scene.control.Label; import javafx.scene.control.Tooltip; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; + +import javafx.geometry.Insets; + +import javafx.event.ActionEvent; +import javafx.event.EventHandler; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/components/AutoTooltipButton.java b/src/main/java/bisq/desktop/components/AutoTooltipButton.java similarity index 53% rename from src/main/java/io/bisq/gui/components/AutoTooltipButton.java rename to src/main/java/bisq/desktop/components/AutoTooltipButton.java index 4a8ba390a8..02c45ce6bf 100644 --- a/src/main/java/io/bisq/gui/components/AutoTooltipButton.java +++ b/src/main/java/bisq/desktop/components/AutoTooltipButton.java @@ -1,11 +1,29 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; -import com.sun.javafx.scene.control.skin.ButtonSkin; import javafx.scene.Node; import javafx.scene.control.Button; import javafx.scene.control.Skin; -import static io.bisq.gui.components.TooltipUtil.showTooltipIfTruncated; +import com.sun.javafx.scene.control.skin.ButtonSkin; + +import static bisq.desktop.components.TooltipUtil.showTooltipIfTruncated; public class AutoTooltipButton extends Button { diff --git a/src/main/java/io/bisq/gui/components/AutoTooltipCheckBox.java b/src/main/java/bisq/desktop/components/AutoTooltipCheckBox.java similarity index 50% rename from src/main/java/io/bisq/gui/components/AutoTooltipCheckBox.java rename to src/main/java/bisq/desktop/components/AutoTooltipCheckBox.java index 84fbc513aa..7a98097498 100644 --- a/src/main/java/io/bisq/gui/components/AutoTooltipCheckBox.java +++ b/src/main/java/bisq/desktop/components/AutoTooltipCheckBox.java @@ -1,10 +1,28 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; -import com.sun.javafx.scene.control.skin.CheckBoxSkin; import javafx.scene.control.CheckBox; import javafx.scene.control.Skin; -import static io.bisq.gui.components.TooltipUtil.showTooltipIfTruncated; +import com.sun.javafx.scene.control.skin.CheckBoxSkin; + +import static bisq.desktop.components.TooltipUtil.showTooltipIfTruncated; public class AutoTooltipCheckBox extends CheckBox { diff --git a/src/main/java/bisq/desktop/components/AutoTooltipLabel.java b/src/main/java/bisq/desktop/components/AutoTooltipLabel.java new file mode 100644 index 0000000000..1f939ac4cd --- /dev/null +++ b/src/main/java/bisq/desktop/components/AutoTooltipLabel.java @@ -0,0 +1,54 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; + +import javafx.scene.control.Label; +import javafx.scene.control.Skin; + +import com.sun.javafx.scene.control.skin.LabelSkin; + +import static bisq.desktop.components.TooltipUtil.showTooltipIfTruncated; + +public class AutoTooltipLabel extends Label { + + public AutoTooltipLabel() { + super(); + } + + public AutoTooltipLabel(String text) { + super(text); + } + + @Override + protected Skin createDefaultSkin() { + return new AutoTooltipLabelSkin(this); + } + + private class AutoTooltipLabelSkin extends LabelSkin { + + public AutoTooltipLabelSkin(Label label) { + super(label); + } + + @Override + protected void layoutChildren(double x, double y, double w, double h) { + super.layoutChildren(x, y, w, h); + showTooltipIfTruncated(this, getSkinnable()); + } + } +} diff --git a/src/main/java/io/bisq/gui/components/AutoTooltipRadioButton.java b/src/main/java/bisq/desktop/components/AutoTooltipRadioButton.java similarity index 51% rename from src/main/java/io/bisq/gui/components/AutoTooltipRadioButton.java rename to src/main/java/bisq/desktop/components/AutoTooltipRadioButton.java index e42361d268..1aeef854c3 100644 --- a/src/main/java/io/bisq/gui/components/AutoTooltipRadioButton.java +++ b/src/main/java/bisq/desktop/components/AutoTooltipRadioButton.java @@ -1,10 +1,28 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; -import com.sun.javafx.scene.control.skin.RadioButtonSkin; import javafx.scene.control.RadioButton; import javafx.scene.control.Skin; -import static io.bisq.gui.components.TooltipUtil.showTooltipIfTruncated; +import com.sun.javafx.scene.control.skin.RadioButtonSkin; + +import static bisq.desktop.components.TooltipUtil.showTooltipIfTruncated; public class AutoTooltipRadioButton extends RadioButton { diff --git a/src/main/java/bisq/desktop/components/AutoTooltipTableColumn.java b/src/main/java/bisq/desktop/components/AutoTooltipTableColumn.java new file mode 100644 index 0000000000..8772d1a480 --- /dev/null +++ b/src/main/java/bisq/desktop/components/AutoTooltipTableColumn.java @@ -0,0 +1,29 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; + +import javafx.scene.control.TableColumn; + +public class AutoTooltipTableColumn extends TableColumn { + + public AutoTooltipTableColumn(String text) { + super(); + + setGraphic(new AutoTooltipLabel(text)); + } +} diff --git a/src/main/java/io/bisq/gui/components/AutoTooltipToggleButton.java b/src/main/java/bisq/desktop/components/AutoTooltipToggleButton.java similarity index 55% rename from src/main/java/io/bisq/gui/components/AutoTooltipToggleButton.java rename to src/main/java/bisq/desktop/components/AutoTooltipToggleButton.java index 73306d6a29..6a16577370 100644 --- a/src/main/java/io/bisq/gui/components/AutoTooltipToggleButton.java +++ b/src/main/java/bisq/desktop/components/AutoTooltipToggleButton.java @@ -1,11 +1,29 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; -import com.sun.javafx.scene.control.skin.ToggleButtonSkin; import javafx.scene.Node; import javafx.scene.control.Skin; import javafx.scene.control.ToggleButton; -import static io.bisq.gui.components.TooltipUtil.showTooltipIfTruncated; +import com.sun.javafx.scene.control.skin.ToggleButtonSkin; + +import static bisq.desktop.components.TooltipUtil.showTooltipIfTruncated; public class AutoTooltipToggleButton extends ToggleButton { diff --git a/src/main/java/io/bisq/gui/components/BalanceTextField.java b/src/main/java/bisq/desktop/components/BalanceTextField.java similarity index 97% rename from src/main/java/io/bisq/gui/components/BalanceTextField.java rename to src/main/java/bisq/desktop/components/BalanceTextField.java index 75a9837ea1..0a75733cd0 100644 --- a/src/main/java/io/bisq/gui/components/BalanceTextField.java +++ b/src/main/java/bisq/desktop/components/BalanceTextField.java @@ -15,16 +15,19 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components; +package bisq.desktop.components; + +import bisq.desktop.util.BSFormatter; + +import org.bitcoinj.core.Coin; -import io.bisq.gui.util.BSFormatter; import javafx.scene.control.TextField; import javafx.scene.effect.BlurType; import javafx.scene.effect.DropShadow; import javafx.scene.effect.Effect; import javafx.scene.layout.AnchorPane; import javafx.scene.paint.Color; -import org.bitcoinj.core.Coin; + import javax.annotation.Nullable; public class BalanceTextField extends AnchorPane { diff --git a/src/main/java/io/bisq/gui/components/BalanceWithConfirmationTextField.java b/src/main/java/bisq/desktop/components/BalanceWithConfirmationTextField.java similarity index 93% rename from src/main/java/io/bisq/gui/components/BalanceWithConfirmationTextField.java rename to src/main/java/bisq/desktop/components/BalanceWithConfirmationTextField.java index cc800d36cc..7781ba30af 100644 --- a/src/main/java/io/bisq/gui/components/BalanceWithConfirmationTextField.java +++ b/src/main/java/bisq/desktop/components/BalanceWithConfirmationTextField.java @@ -15,14 +15,21 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components; +package bisq.desktop.components; + +import bisq.desktop.components.indicator.TxConfidenceIndicator; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.core.btc.listeners.AddressConfidenceListener; +import bisq.core.btc.listeners.BalanceListener; +import bisq.core.btc.wallet.BtcWalletService; + +import org.bitcoinj.core.Address; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionConfidence; -import io.bisq.core.btc.listeners.AddressConfidenceListener; -import io.bisq.core.btc.listeners.BalanceListener; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.gui.components.indicator.TxConfidenceIndicator; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; import javafx.scene.effect.BlurType; @@ -30,10 +37,6 @@ import javafx.scene.effect.DropShadow; import javafx.scene.effect.Effect; import javafx.scene.layout.AnchorPane; import javafx.scene.paint.Color; -import org.bitcoinj.core.Address; -import org.bitcoinj.core.Coin; -import org.bitcoinj.core.Transaction; -import org.bitcoinj.core.TransactionConfidence; public class BalanceWithConfirmationTextField extends AnchorPane { diff --git a/src/main/java/io/bisq/gui/components/BsqAddressTextField.java b/src/main/java/bisq/desktop/components/BsqAddressTextField.java similarity index 95% rename from src/main/java/io/bisq/gui/components/BsqAddressTextField.java rename to src/main/java/bisq/desktop/components/BsqAddressTextField.java index 1f0253a05c..bd36b5039c 100644 --- a/src/main/java/io/bisq/gui/components/BsqAddressTextField.java +++ b/src/main/java/bisq/desktop/components/BsqAddressTextField.java @@ -15,23 +15,28 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components; +package bisq.desktop.components; + +import bisq.desktop.main.overlays.notifications.Notification; +import bisq.desktop.util.GUIUtil; + +import bisq.common.locale.Res; +import bisq.common.util.Utilities; + +import org.bitcoinj.core.Coin; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Utilities; -import io.bisq.gui.main.overlays.notifications.Notification; -import io.bisq.gui.util.GUIUtil; -import javafx.beans.property.ObjectProperty; -import javafx.beans.property.SimpleObjectProperty; -import javafx.beans.property.SimpleStringProperty; -import javafx.beans.property.StringProperty; + import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; import javafx.scene.layout.AnchorPane; -import org.bitcoinj.core.Coin; + +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleObjectProperty; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; public class BsqAddressTextField extends AnchorPane { private final StringProperty address = new SimpleStringProperty(); diff --git a/src/main/java/io/bisq/gui/components/BusyAnimation.java b/src/main/java/bisq/desktop/components/BusyAnimation.java similarity index 71% rename from src/main/java/io/bisq/gui/components/BusyAnimation.java rename to src/main/java/bisq/desktop/components/BusyAnimation.java index f6b6bde576..be40232420 100644 --- a/src/main/java/io/bisq/gui/components/BusyAnimation.java +++ b/src/main/java/bisq/desktop/components/BusyAnimation.java @@ -1,10 +1,29 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; + +import bisq.common.Timer; +import bisq.common.UserThread; + +import javafx.scene.image.ImageView; -import io.bisq.common.Timer; -import io.bisq.common.UserThread; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; -import javafx.scene.image.ImageView; import java.util.concurrent.TimeUnit; @@ -81,4 +100,4 @@ public class BusyAnimation extends ImageView { setVisible(isRunning()); setManaged(isRunning()); } -} \ No newline at end of file +} diff --git a/src/main/java/io/bisq/gui/components/ColoredDecimalPlacesWithZerosText.java b/src/main/java/bisq/desktop/components/ColoredDecimalPlacesWithZerosText.java similarity index 67% rename from src/main/java/io/bisq/gui/components/ColoredDecimalPlacesWithZerosText.java rename to src/main/java/bisq/desktop/components/ColoredDecimalPlacesWithZerosText.java index 00f62cb887..56faa13433 100644 --- a/src/main/java/io/bisq/gui/components/ColoredDecimalPlacesWithZerosText.java +++ b/src/main/java/bisq/desktop/components/ColoredDecimalPlacesWithZerosText.java @@ -1,15 +1,31 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; + +import bisq.desktop.util.GUIUtil; + +import bisq.common.util.Tuple2; -import io.bisq.common.util.Tuple2; -import io.bisq.gui.util.GUIUtil; -import javafx.geometry.Insets; -import javafx.geometry.Pos; import javafx.scene.control.Label; import javafx.scene.layout.HBox; import javafx.scene.text.Text; -import javafx.scene.text.TextAlignment; -import javafx.scene.text.TextBoundsType; -import javafx.scene.text.TextFlow; + +import javafx.geometry.Pos; public class ColoredDecimalPlacesWithZerosText extends HBox { diff --git a/src/main/java/io/bisq/gui/components/FundsTextField.java b/src/main/java/bisq/desktop/components/FundsTextField.java similarity index 91% rename from src/main/java/io/bisq/gui/components/FundsTextField.java rename to src/main/java/bisq/desktop/components/FundsTextField.java index eacfee5e6c..a132f20ec1 100644 --- a/src/main/java/io/bisq/gui/components/FundsTextField.java +++ b/src/main/java/bisq/desktop/components/FundsTextField.java @@ -15,27 +15,25 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components; +package bisq.desktop.components; + +import bisq.common.locale.Res; +import bisq.common.util.Utilities; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Utilities; + +import javafx.scene.control.Label; +import javafx.scene.control.Tooltip; +import javafx.scene.layout.AnchorPane; + import javafx.beans.binding.Bindings; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; -import javafx.scene.Node; -import javafx.scene.control.Label; -import javafx.scene.control.TextField; -import javafx.scene.control.Tooltip; -import javafx.scene.layout.AnchorPane; -import org.controlsfx.control.PopOver; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.concurrent.TimeUnit; - public class FundsTextField extends InfoTextField { public static final Logger log = LoggerFactory.getLogger(FundsTextField.class); diff --git a/src/main/java/io/bisq/gui/components/HyperlinkWithIcon.java b/src/main/java/bisq/desktop/components/HyperlinkWithIcon.java similarity index 60% rename from src/main/java/io/bisq/gui/components/HyperlinkWithIcon.java rename to src/main/java/bisq/desktop/components/HyperlinkWithIcon.java index ba488654f9..2a6a1963b1 100644 --- a/src/main/java/io/bisq/gui/components/HyperlinkWithIcon.java +++ b/src/main/java/bisq/desktop/components/HyperlinkWithIcon.java @@ -1,12 +1,31 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import javafx.geometry.Insets; + import javafx.scene.control.ContentDisplay; import javafx.scene.control.Hyperlink; import javafx.scene.control.Label; +import javafx.geometry.Insets; + public class HyperlinkWithIcon extends Hyperlink { public HyperlinkWithIcon(String text) { diff --git a/src/main/java/io/bisq/gui/components/InfoDisplay.java b/src/main/java/bisq/desktop/components/InfoDisplay.java similarity index 95% rename from src/main/java/io/bisq/gui/components/InfoDisplay.java rename to src/main/java/bisq/desktop/components/InfoDisplay.java index b099ad1a21..31e2184d04 100644 --- a/src/main/java/io/bisq/gui/components/InfoDisplay.java +++ b/src/main/java/bisq/desktop/components/InfoDisplay.java @@ -15,18 +15,14 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components; +package bisq.desktop.components; + +import bisq.common.UserThread; +import bisq.common.locale.Res; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import javafx.beans.property.*; -import javafx.beans.value.ChangeListener; -import javafx.event.ActionEvent; -import javafx.event.EventHandler; -import javafx.geometry.Insets; -import javafx.geometry.VPos; + import javafx.scene.Parent; import javafx.scene.control.Hyperlink; import javafx.scene.control.Label; @@ -34,6 +30,20 @@ import javafx.scene.control.OverrunStyle; import javafx.scene.layout.GridPane; import javafx.scene.text.TextFlow; +import javafx.geometry.Insets; +import javafx.geometry.VPos; + +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.beans.property.SimpleObjectProperty; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; +import javafx.beans.value.ChangeListener; + +import javafx.event.ActionEvent; +import javafx.event.EventHandler; + /** * Convenience Component for info icon, info text and link display in a GridPane. * Only the properties needed are supported. diff --git a/src/main/java/io/bisq/gui/components/InfoTextField.java b/src/main/java/bisq/desktop/components/InfoTextField.java similarity index 81% rename from src/main/java/io/bisq/gui/components/InfoTextField.java rename to src/main/java/bisq/desktop/components/InfoTextField.java index 8e69770d59..27b00d7381 100644 --- a/src/main/java/io/bisq/gui/components/InfoTextField.java +++ b/src/main/java/bisq/desktop/components/InfoTextField.java @@ -1,21 +1,42 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; + +import bisq.common.UserThread; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import javafx.beans.property.SimpleStringProperty; -import javafx.beans.property.StringProperty; + +import org.controlsfx.control.PopOver; + import javafx.scene.Node; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.layout.AnchorPane; -import org.controlsfx.control.PopOver; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; import java.util.concurrent.TimeUnit; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class InfoTextField extends AnchorPane { public static final Logger log = LoggerFactory.getLogger(InfoTextField.class); diff --git a/src/main/java/io/bisq/gui/components/InputTextField.java b/src/main/java/bisq/desktop/components/InputTextField.java similarity index 98% rename from src/main/java/io/bisq/gui/components/InputTextField.java rename to src/main/java/bisq/desktop/components/InputTextField.java index af17e1e388..7fd96717b5 100644 --- a/src/main/java/io/bisq/gui/components/InputTextField.java +++ b/src/main/java/bisq/desktop/components/InputTextField.java @@ -15,14 +15,16 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components; +package bisq.desktop.components; + +import bisq.desktop.util.validation.InputValidator; + +import bisq.common.locale.Res; + +import org.controlsfx.control.PopOver; + +import javafx.stage.Window; -import io.bisq.common.locale.Res; -import io.bisq.gui.util.validation.InputValidator; -import javafx.beans.property.ObjectProperty; -import javafx.beans.property.SimpleObjectProperty; -import javafx.geometry.Insets; -import javafx.geometry.Point2D; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.effect.BlurType; @@ -30,8 +32,12 @@ import javafx.scene.effect.DropShadow; import javafx.scene.effect.Effect; import javafx.scene.layout.Region; import javafx.scene.paint.Color; -import javafx.stage.Window; -import org.controlsfx.control.PopOver; + +import javafx.geometry.Insets; +import javafx.geometry.Point2D; + +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleObjectProperty; /** * TextField with validation support. diff --git a/src/main/java/io/bisq/gui/components/PasswordTextField.java b/src/main/java/bisq/desktop/components/PasswordTextField.java similarity index 98% rename from src/main/java/io/bisq/gui/components/PasswordTextField.java rename to src/main/java/bisq/desktop/components/PasswordTextField.java index 3e43faae59..9c461afbe2 100644 --- a/src/main/java/io/bisq/gui/components/PasswordTextField.java +++ b/src/main/java/bisq/desktop/components/PasswordTextField.java @@ -15,14 +15,16 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components; +package bisq.desktop.components; + +import bisq.desktop.util.validation.InputValidator; + +import bisq.common.locale.Res; + +import org.controlsfx.control.PopOver; + +import javafx.stage.Window; -import io.bisq.common.locale.Res; -import io.bisq.gui.util.validation.InputValidator; -import javafx.beans.property.ObjectProperty; -import javafx.beans.property.SimpleObjectProperty; -import javafx.geometry.Insets; -import javafx.geometry.Point2D; import javafx.scene.control.Label; import javafx.scene.control.PasswordField; import javafx.scene.effect.BlurType; @@ -30,8 +32,12 @@ import javafx.scene.effect.DropShadow; import javafx.scene.effect.Effect; import javafx.scene.layout.Region; import javafx.scene.paint.Color; -import javafx.stage.Window; -import org.controlsfx.control.PopOver; + +import javafx.geometry.Insets; +import javafx.geometry.Point2D; + +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleObjectProperty; public class PasswordTextField extends PasswordField { diff --git a/src/main/java/io/bisq/gui/components/PeerInfoIcon.java b/src/main/java/bisq/desktop/components/PeerInfoIcon.java similarity index 86% rename from src/main/java/io/bisq/gui/components/PeerInfoIcon.java rename to src/main/java/bisq/desktop/components/PeerInfoIcon.java index 1e55698241..fd76c54193 100644 --- a/src/main/java/io/bisq/gui/components/PeerInfoIcon.java +++ b/src/main/java/bisq/desktop/components/PeerInfoIcon.java @@ -1,15 +1,35 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; + +import bisq.desktop.main.overlays.editor.PeerInfoWithTagEditor; +import bisq.desktop.util.BSFormatter; + +import bisq.core.alert.PrivateNotificationManager; +import bisq.core.offer.Offer; +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.user.Preferences; + +import bisq.network.p2p.NodeAddress; + +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.core.alert.PrivateNotificationManager; -import io.bisq.core.offer.Offer; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.user.Preferences; -import io.bisq.gui.main.overlays.editor.PeerInfoWithTagEditor; -import io.bisq.gui.util.BSFormatter; -import io.bisq.network.p2p.NodeAddress; -import javafx.geometry.Point2D; import javafx.scene.Group; import javafx.scene.canvas.Canvas; import javafx.scene.canvas.GraphicsContext; @@ -18,13 +38,17 @@ import javafx.scene.control.Tooltip; import javafx.scene.image.ImageView; import javafx.scene.layout.Pane; import javafx.scene.paint.Color; -import lombok.extern.slf4j.Slf4j; + +import javafx.geometry.Point2D; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; + import java.util.Date; import java.util.Map; +import lombok.extern.slf4j.Slf4j; + @Slf4j public class PeerInfoIcon extends Group { private final String tooltipText; diff --git a/src/main/java/io/bisq/gui/components/SearchComboBox.java b/src/main/java/bisq/desktop/components/SearchComboBox.java similarity index 65% rename from src/main/java/io/bisq/gui/components/SearchComboBox.java rename to src/main/java/bisq/desktop/components/SearchComboBox.java index e1852218bf..0038635dac 100644 --- a/src/main/java/io/bisq/gui/components/SearchComboBox.java +++ b/src/main/java/bisq/desktop/components/SearchComboBox.java @@ -1,10 +1,29 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; + +import bisq.common.UserThread; + +import javafx.scene.control.ComboBox; -import io.bisq.common.UserThread; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.collections.transformation.FilteredList; -import javafx.scene.control.ComboBox; public class SearchComboBox extends ComboBox { @SuppressWarnings("CanBeFinal") @@ -36,4 +55,4 @@ public class SearchComboBox extends ComboBox { } }); } -} \ No newline at end of file +} diff --git a/src/main/java/io/bisq/gui/components/SeparatedPhaseBars.java b/src/main/java/bisq/desktop/components/SeparatedPhaseBars.java similarity index 87% rename from src/main/java/io/bisq/gui/components/SeparatedPhaseBars.java rename to src/main/java/bisq/desktop/components/SeparatedPhaseBars.java index e2b5038e98..d6e28fed44 100644 --- a/src/main/java/io/bisq/gui/components/SeparatedPhaseBars.java +++ b/src/main/java/bisq/desktop/components/SeparatedPhaseBars.java @@ -1,25 +1,47 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; + +import bisq.core.dao.DaoPeriodService; + +import bisq.common.UserThread; +import bisq.common.locale.Res; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.core.dao.DaoPeriodService; -import javafx.beans.property.DoubleProperty; -import javafx.beans.property.IntegerProperty; -import javafx.beans.property.SimpleDoubleProperty; -import javafx.beans.property.SimpleIntegerProperty; -import javafx.geometry.Insets; -import javafx.geometry.Pos; import javafx.scene.control.Label; import javafx.scene.control.ProgressBar; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; + +import javafx.geometry.Insets; +import javafx.geometry.Pos; + +import javafx.beans.property.DoubleProperty; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.SimpleDoubleProperty; +import javafx.beans.property.SimpleIntegerProperty; + +import java.util.List; + import lombok.Getter; import lombok.Setter; import lombok.extern.slf4j.Slf4j; -import java.util.List; - @Slf4j public class SeparatedPhaseBars extends HBox { diff --git a/src/main/java/io/bisq/gui/components/TableGroupHeadline.java b/src/main/java/bisq/desktop/components/TableGroupHeadline.java similarity index 98% rename from src/main/java/io/bisq/gui/components/TableGroupHeadline.java rename to src/main/java/bisq/desktop/components/TableGroupHeadline.java index aed27fccd9..8baaf6f91e 100644 --- a/src/main/java/io/bisq/gui/components/TableGroupHeadline.java +++ b/src/main/java/bisq/desktop/components/TableGroupHeadline.java @@ -15,15 +15,18 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components; +package bisq.desktop.components; -import javafx.beans.property.SimpleStringProperty; -import javafx.beans.property.StringProperty; -import javafx.geometry.Insets; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; import javafx.scene.layout.Pane; import javafx.scene.layout.StackPane; + +import javafx.geometry.Insets; + +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; + import lombok.extern.slf4j.Slf4j; @Slf4j diff --git a/src/main/java/io/bisq/gui/components/TextFieldWithCopyIcon.java b/src/main/java/bisq/desktop/components/TextFieldWithCopyIcon.java similarity index 97% rename from src/main/java/io/bisq/gui/components/TextFieldWithCopyIcon.java rename to src/main/java/bisq/desktop/components/TextFieldWithCopyIcon.java index 41525d5695..d714d5b617 100644 --- a/src/main/java/io/bisq/gui/components/TextFieldWithCopyIcon.java +++ b/src/main/java/bisq/desktop/components/TextFieldWithCopyIcon.java @@ -15,19 +15,22 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components; +package bisq.desktop.components; + +import bisq.common.locale.Res; +import bisq.common.util.Utilities; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Utilities; -import javafx.beans.property.SimpleStringProperty; -import javafx.beans.property.StringProperty; + import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; import javafx.scene.layout.AnchorPane; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; + public class TextFieldWithCopyIcon extends AnchorPane { private final StringProperty text = new SimpleStringProperty(); diff --git a/src/main/java/io/bisq/gui/components/TitledGroupBg.java b/src/main/java/bisq/desktop/components/TitledGroupBg.java similarity index 98% rename from src/main/java/io/bisq/gui/components/TitledGroupBg.java rename to src/main/java/bisq/desktop/components/TitledGroupBg.java index bb19b9c85e..dc486001c4 100644 --- a/src/main/java/io/bisq/gui/components/TitledGroupBg.java +++ b/src/main/java/bisq/desktop/components/TitledGroupBg.java @@ -15,15 +15,17 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components; +package bisq.desktop.components; -import javafx.beans.property.SimpleStringProperty; -import javafx.beans.property.StringProperty; -import javafx.geometry.Insets; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; import javafx.scene.layout.Pane; +import javafx.geometry.Insets; + +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; + public class TitledGroupBg extends Pane { private final Label label; diff --git a/src/main/java/io/bisq/gui/components/TooltipUtil.java b/src/main/java/bisq/desktop/components/TooltipUtil.java similarity index 54% rename from src/main/java/io/bisq/gui/components/TooltipUtil.java rename to src/main/java/bisq/desktop/components/TooltipUtil.java index 496808bb39..31a243c04c 100644 --- a/src/main/java/io/bisq/gui/components/TooltipUtil.java +++ b/src/main/java/bisq/desktop/components/TooltipUtil.java @@ -1,4 +1,21 @@ -package io.bisq.gui.components; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components; import javafx.scene.control.Labeled; import javafx.scene.control.SkinBase; diff --git a/src/main/java/io/bisq/gui/components/TxIdTextField.java b/src/main/java/bisq/desktop/components/TxIdTextField.java similarity index 94% rename from src/main/java/io/bisq/gui/components/TxIdTextField.java rename to src/main/java/bisq/desktop/components/TxIdTextField.java index bc178cbed5..dc435068c1 100644 --- a/src/main/java/io/bisq/gui/components/TxIdTextField.java +++ b/src/main/java/bisq/desktop/components/TxIdTextField.java @@ -15,22 +15,28 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components; +package bisq.desktop.components; + +import bisq.desktop.components.indicator.TxConfidenceIndicator; +import bisq.desktop.util.GUIUtil; + +import bisq.core.btc.listeners.TxConfidenceListener; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.user.Preferences; + +import bisq.common.locale.Res; +import bisq.common.util.Utilities; + +import org.bitcoinj.core.TransactionConfidence; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Utilities; -import io.bisq.core.btc.listeners.TxConfidenceListener; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.user.Preferences; -import io.bisq.gui.components.indicator.TxConfidenceIndicator; -import io.bisq.gui.util.GUIUtil; + import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; import javafx.scene.layout.AnchorPane; -import org.bitcoinj.core.TransactionConfidence; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/components/indicator/TxConfidenceIndicator.java b/src/main/java/bisq/desktop/components/indicator/TxConfidenceIndicator.java similarity index 92% rename from src/main/java/io/bisq/gui/components/indicator/TxConfidenceIndicator.java rename to src/main/java/bisq/desktop/components/indicator/TxConfidenceIndicator.java index 45ad6f0ea7..94c7ee60d8 100644 --- a/src/main/java/io/bisq/gui/components/indicator/TxConfidenceIndicator.java +++ b/src/main/java/bisq/desktop/components/indicator/TxConfidenceIndicator.java @@ -1,3 +1,20 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -23,17 +40,20 @@ * questions. */ -package io.bisq.gui.components.indicator; +package bisq.desktop.components.indicator; + +import bisq.desktop.components.indicator.skin.StaticProgressIndicatorSkin; + +import javafx.scene.control.Control; +import javafx.scene.control.Skin; + +import javafx.css.PseudoClass; +import javafx.css.StyleableProperty; -import io.bisq.gui.components.indicator.skin.StaticProgressIndicatorSkin; import javafx.beans.property.DoubleProperty; import javafx.beans.property.DoublePropertyBase; import javafx.beans.property.ReadOnlyBooleanProperty; import javafx.beans.property.ReadOnlyBooleanWrapper; -import javafx.css.PseudoClass; -import javafx.css.StyleableProperty; -import javafx.scene.control.Control; -import javafx.scene.control.Skin; // TODO Copied form OpenJFX, check license issues and way how we integrated it // We changed behaviour which was not exposed via APIs diff --git a/src/main/java/io/bisq/gui/components/indicator/behavior/StaticProgressIndicatorBehavior.java b/src/main/java/bisq/desktop/components/indicator/behavior/StaticProgressIndicatorBehavior.java similarity index 71% rename from src/main/java/io/bisq/gui/components/indicator/behavior/StaticProgressIndicatorBehavior.java rename to src/main/java/bisq/desktop/components/indicator/behavior/StaticProgressIndicatorBehavior.java index 9380a882f8..cbd2c83d3f 100644 --- a/src/main/java/io/bisq/gui/components/indicator/behavior/StaticProgressIndicatorBehavior.java +++ b/src/main/java/bisq/desktop/components/indicator/behavior/StaticProgressIndicatorBehavior.java @@ -1,3 +1,20 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -23,10 +40,11 @@ * questions. */ -package io.bisq.gui.components.indicator.behavior; +package bisq.desktop.components.indicator.behavior; + +import bisq.desktop.components.indicator.TxConfidenceIndicator; import com.sun.javafx.scene.control.behavior.BehaviorBase; -import io.bisq.gui.components.indicator.TxConfidenceIndicator; import java.util.Collections; diff --git a/src/main/java/io/bisq/gui/components/indicator/skin/StaticProgressIndicatorSkin.java b/src/main/java/bisq/desktop/components/indicator/skin/StaticProgressIndicatorSkin.java similarity index 96% rename from src/main/java/io/bisq/gui/components/indicator/skin/StaticProgressIndicatorSkin.java rename to src/main/java/bisq/desktop/components/indicator/skin/StaticProgressIndicatorSkin.java index a9c421dcd8..373f00af9d 100644 --- a/src/main/java/io/bisq/gui/components/indicator/skin/StaticProgressIndicatorSkin.java +++ b/src/main/java/bisq/desktop/components/indicator/skin/StaticProgressIndicatorSkin.java @@ -1,3 +1,20 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -23,21 +40,11 @@ * questions. */ -package io.bisq.gui.components.indicator.skin; +package bisq.desktop.components.indicator.skin; + +import bisq.desktop.components.indicator.TxConfidenceIndicator; +import bisq.desktop.components.indicator.behavior.StaticProgressIndicatorBehavior; -import com.sun.javafx.css.converters.BooleanConverter; -import com.sun.javafx.css.converters.PaintConverter; -import com.sun.javafx.css.converters.SizeConverter; -import com.sun.javafx.scene.control.skin.BehaviorSkinBase; -import io.bisq.gui.components.indicator.TxConfidenceIndicator; -import io.bisq.gui.components.indicator.behavior.StaticProgressIndicatorBehavior; -import javafx.beans.InvalidationListener; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.IntegerProperty; -import javafx.beans.property.ObjectProperty; -import javafx.css.*; -import javafx.geometry.Insets; -import javafx.geometry.NodeOrientation; import javafx.scene.Node; import javafx.scene.control.SkinBase; import javafx.scene.layout.Pane; @@ -50,6 +57,28 @@ import javafx.scene.shape.ArcType; import javafx.scene.shape.Circle; import javafx.scene.transform.Scale; +import com.sun.javafx.scene.control.skin.BehaviorSkinBase; + +import javafx.css.CssMetaData; +import javafx.css.StyleOrigin; +import javafx.css.Styleable; +import javafx.css.StyleableBooleanProperty; +import javafx.css.StyleableIntegerProperty; +import javafx.css.StyleableObjectProperty; +import javafx.css.StyleableProperty; + +import com.sun.javafx.css.converters.BooleanConverter; +import com.sun.javafx.css.converters.PaintConverter; +import com.sun.javafx.css.converters.SizeConverter; + +import javafx.geometry.Insets; +import javafx.geometry.NodeOrientation; + +import javafx.beans.InvalidationListener; +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.ObjectProperty; + import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/AliPayForm.java b/src/main/java/bisq/desktop/components/paymentmethods/AliPayForm.java similarity index 84% rename from src/main/java/io/bisq/gui/components/paymentmethods/AliPayForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/AliPayForm.java index b159dd9548..2da41646d6 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/AliPayForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/AliPayForm.java @@ -15,27 +15,34 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.AliPayValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.AliPayAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.AliPayAccountPayload; +import bisq.core.payment.payload.PaymentAccountPayload; + +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.AliPayAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.AliPayAccountPayload; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.AliPayValidator; -import io.bisq.gui.util.validation.InputValidator; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; -import org.apache.commons.lang3.StringUtils; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static io.bisq.gui.util.FormBuilder.*; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class AliPayForm extends PaymentMethodForm { private static final Logger log = LoggerFactory.getLogger(AliPayForm.class); diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/BankForm.java b/src/main/java/bisq/desktop/components/paymentmethods/BankForm.java similarity index 96% rename from src/main/java/io/bisq/gui/components/paymentmethods/BankForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/BankForm.java index 175ed50cad..3523e49978 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/BankForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/BankForm.java @@ -15,36 +15,50 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.AccountNrValidator; +import bisq.desktop.util.validation.BankIdValidator; +import bisq.desktop.util.validation.BranchIdValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.CountryBasedPaymentAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.BankAccountPayload; +import bisq.core.payment.payload.PaymentAccountPayload; + +import bisq.common.locale.BankUtil; +import bisq.common.locale.Country; +import bisq.common.locale.CountryUtil; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.FiatCurrency; +import bisq.common.locale.Region; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; +import bisq.common.util.Tuple2; +import bisq.common.util.Tuple3; +import bisq.common.util.Tuple4; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.*; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Tuple3; -import io.bisq.common.util.Tuple4; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.CountryBasedPaymentAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.BankAccountPayload; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.AccountNrValidator; -import io.bisq.gui.util.validation.BankIdValidator; -import io.bisq.gui.util.validation.BranchIdValidator; -import io.bisq.gui.util.validation.InputValidator; -import javafx.collections.FXCollections; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; + +import javafx.collections.FXCollections; + import javafx.util.StringConverter; -import org.apache.commons.lang3.StringUtils; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static io.bisq.gui.util.FormBuilder.*; +import static bisq.desktop.util.FormBuilder.*; abstract class BankForm extends PaymentMethodForm { private static final Logger log = LoggerFactory.getLogger(BankForm.class); diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/CashAppForm.java b/src/main/java/bisq/desktop/components/paymentmethods/CashAppForm.java similarity index 83% rename from src/main/java/io/bisq/gui/components/paymentmethods/CashAppForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/CashAppForm.java index 3e3231b95a..6143385eaf 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/CashAppForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/CashAppForm.java @@ -15,25 +15,31 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.CashAppValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.CashAppAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.CashAppAccountPayload; +import bisq.core.payment.payload.PaymentAccountPayload; + +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.CashAppAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.CashAppAccountPayload; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.CashAppValidator; -import io.bisq.gui.util.validation.InputValidator; -import javafx.scene.control.TextField; -import javafx.scene.layout.GridPane; import org.apache.commons.lang3.StringUtils; -import static io.bisq.gui.util.FormBuilder.*; +import javafx.scene.control.TextField; +import javafx.scene.layout.GridPane; + +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class CashAppForm extends PaymentMethodForm { private final CashAppAccount account; diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/CashDepositForm.java b/src/main/java/bisq/desktop/components/paymentmethods/CashDepositForm.java similarity index 96% rename from src/main/java/io/bisq/gui/components/paymentmethods/CashDepositForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/CashDepositForm.java index 6542544a5a..528c979a37 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/CashDepositForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/CashDepositForm.java @@ -15,31 +15,49 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.AccountNrValidator; +import bisq.desktop.util.validation.BankIdValidator; +import bisq.desktop.util.validation.BranchIdValidator; +import bisq.desktop.util.validation.EmailValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.CountryBasedPaymentAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.CashDepositAccountPayload; +import bisq.core.payment.payload.PaymentAccountPayload; + +import bisq.common.locale.BankUtil; +import bisq.common.locale.Country; +import bisq.common.locale.CountryUtil; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.FiatCurrency; +import bisq.common.locale.Region; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; +import bisq.common.util.Tuple2; +import bisq.common.util.Tuple3; +import bisq.common.util.Tuple4; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.*; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Tuple3; -import io.bisq.common.util.Tuple4; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.CountryBasedPaymentAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.CashDepositAccountPayload; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.*; -import javafx.collections.FXCollections; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; + +import javafx.collections.FXCollections; + import javafx.util.StringConverter; -import org.apache.commons.lang3.StringUtils; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/ChaseQuickPayForm.java b/src/main/java/bisq/desktop/components/paymentmethods/ChaseQuickPayForm.java similarity index 89% rename from src/main/java/io/bisq/gui/components/paymentmethods/ChaseQuickPayForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/ChaseQuickPayForm.java index ab1a947971..b965ff89d2 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/ChaseQuickPayForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/ChaseQuickPayForm.java @@ -15,24 +15,29 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.ChaseQuickPayValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.ChaseQuickPayAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.ChaseQuickPayAccountPayload; +import bisq.core.payment.payload.PaymentAccountPayload; + +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.ChaseQuickPayAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.ChaseQuickPayAccountPayload; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.ChaseQuickPayValidator; -import io.bisq.gui.util.validation.InputValidator; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; -import org.apache.commons.lang3.StringUtils; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/ClearXchangeForm.java b/src/main/java/bisq/desktop/components/paymentmethods/ClearXchangeForm.java similarity index 89% rename from src/main/java/io/bisq/gui/components/paymentmethods/ClearXchangeForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/ClearXchangeForm.java index 1d42321e6f..62884bd1e4 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/ClearXchangeForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/ClearXchangeForm.java @@ -15,24 +15,28 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.ClearXchangeValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.ClearXchangeAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.ClearXchangeAccountPayload; +import bisq.core.payment.payload.PaymentAccountPayload; + +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.ClearXchangeAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.ClearXchangeAccountPayload; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.ClearXchangeValidator; -import io.bisq.gui.util.validation.InputValidator; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; -import org.apache.commons.lang3.StringUtils; public class ClearXchangeForm extends PaymentMethodForm { private final ClearXchangeAccount clearXchangeAccount; diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/CryptoCurrencyForm.java b/src/main/java/bisq/desktop/components/paymentmethods/CryptoCurrencyForm.java similarity index 88% rename from src/main/java/io/bisq/gui/components/paymentmethods/CryptoCurrencyForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/CryptoCurrencyForm.java index 52cf0953df..56c76d3109 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/CryptoCurrencyForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/CryptoCurrencyForm.java @@ -15,35 +15,45 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.AltCoinAddressValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.CryptoCurrencyAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.CryptoCurrencyAccountPayload; +import bisq.core.payment.payload.PaymentAccountPayload; + +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; +import bisq.common.util.Tuple2; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.common.util.Tuple2; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.CryptoCurrencyAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.CryptoCurrencyAccountPayload; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.AltCoinAddressValidator; -import io.bisq.gui.util.validation.InputValidator; -import javafx.collections.FXCollections; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; + +import javafx.collections.FXCollections; + import javafx.util.StringConverter; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.util.Optional; -import static io.bisq.gui.util.FormBuilder.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelSearchComboBox; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class CryptoCurrencyForm extends PaymentMethodForm { private static final Logger log = LoggerFactory.getLogger(CryptoCurrencyForm.class); diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/FasterPaymentsForm.java b/src/main/java/bisq/desktop/components/paymentmethods/FasterPaymentsForm.java similarity index 87% rename from src/main/java/io/bisq/gui/components/paymentmethods/FasterPaymentsForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/FasterPaymentsForm.java index f0449a9326..b72c2a1538 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/FasterPaymentsForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/FasterPaymentsForm.java @@ -15,29 +15,34 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.AccountNrValidator; +import bisq.desktop.util.validation.BranchIdValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.FasterPaymentsAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.FasterPaymentsAccountPayload; +import bisq.core.payment.payload.PaymentAccountPayload; + +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.FasterPaymentsAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.FasterPaymentsAccountPayload; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.AccountNrValidator; -import io.bisq.gui.util.validation.BranchIdValidator; -import io.bisq.gui.util.validation.InputValidator; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; -import org.apache.commons.lang3.StringUtils; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static io.bisq.gui.util.FormBuilder.addLabelInputTextField; -import static io.bisq.gui.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; public class FasterPaymentsForm extends PaymentMethodForm { private static final Logger log = LoggerFactory.getLogger(FasterPaymentsForm.class); diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/InteracETransferForm.java b/src/main/java/bisq/desktop/components/paymentmethods/InteracETransferForm.java similarity index 91% rename from src/main/java/io/bisq/gui/components/paymentmethods/InteracETransferForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/InteracETransferForm.java index 47ff1a6701..d47c31e0d1 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/InteracETransferForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/InteracETransferForm.java @@ -15,23 +15,28 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.InteracETransferValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.InteracETransferAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.InteracETransferAccountPayload; +import bisq.core.payment.payload.PaymentAccountPayload; + +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.InteracETransferAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.InteracETransferAccountPayload; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.InputValidator; -import io.bisq.gui.util.validation.InteracETransferValidator; -import javafx.scene.layout.GridPane; import org.apache.commons.lang3.StringUtils; + +import javafx.scene.layout.GridPane; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/MoneyBeamForm.java b/src/main/java/bisq/desktop/components/paymentmethods/MoneyBeamForm.java similarity index 83% rename from src/main/java/io/bisq/gui/components/paymentmethods/MoneyBeamForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/MoneyBeamForm.java index 86940fdc57..8554af87b3 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/MoneyBeamForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/MoneyBeamForm.java @@ -15,25 +15,31 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.MoneyBeamValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.MoneyBeamAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.MoneyBeamAccountPayload; +import bisq.core.payment.payload.PaymentAccountPayload; + +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.MoneyBeamAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.MoneyBeamAccountPayload; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.InputValidator; -import io.bisq.gui.util.validation.MoneyBeamValidator; -import javafx.scene.control.TextField; -import javafx.scene.layout.GridPane; import org.apache.commons.lang3.StringUtils; -import static io.bisq.gui.util.FormBuilder.*; +import javafx.scene.control.TextField; +import javafx.scene.layout.GridPane; + +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class MoneyBeamForm extends PaymentMethodForm { private final MoneyBeamAccount account; diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/NationalBankForm.java b/src/main/java/bisq/desktop/components/paymentmethods/NationalBankForm.java similarity index 82% rename from src/main/java/io/bisq/gui/components/paymentmethods/NationalBankForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/NationalBankForm.java index 18e7c93041..131d726c0b 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/NationalBankForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/NationalBankForm.java @@ -15,13 +15,15 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.validation.InputValidator; import javafx.scene.layout.GridPane; public class NationalBankForm extends BankForm { diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/OKPayForm.java b/src/main/java/bisq/desktop/components/paymentmethods/OKPayForm.java similarity index 86% rename from src/main/java/io/bisq/gui/components/paymentmethods/OKPayForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/OKPayForm.java index 04f3167c90..eb66e825c7 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/OKPayForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/OKPayForm.java @@ -15,34 +15,43 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.AutoTooltipCheckBox; +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.OKPayValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.OKPayAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.OKPayAccountPayload; +import bisq.core.payment.payload.PaymentAccountPayload; + +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.OKPayAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.OKPayAccountPayload; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.components.AutoTooltipCheckBox; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.InputValidator; -import io.bisq.gui.util.validation.OKPayValidator; -import javafx.geometry.Insets; -import javafx.geometry.VPos; import javafx.scene.control.CheckBox; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; import javafx.scene.layout.FlowPane; import javafx.scene.layout.GridPane; -import org.apache.commons.lang3.StringUtils; + +import javafx.geometry.Insets; +import javafx.geometry.VPos; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static io.bisq.gui.util.FormBuilder.*; +import static bisq.desktop.util.FormBuilder.addLabel; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class OKPayForm extends PaymentMethodForm { private static final Logger log = LoggerFactory.getLogger(OKPayForm.class); diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/PaymentMethodForm.java b/src/main/java/bisq/desktop/components/paymentmethods/PaymentMethodForm.java similarity index 92% rename from src/main/java/io/bisq/gui/components/paymentmethods/PaymentMethodForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/PaymentMethodForm.java index 09f22c44ee..90f3be9dda 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/PaymentMethodForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/PaymentMethodForm.java @@ -15,34 +15,42 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InfoTextField; +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.offer.Offer; +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.CryptoCurrencyAccount; +import bisq.core.payment.PaymentAccount; + +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; +import bisq.common.util.Tuple3; +import bisq.common.util.Utilities; + +import org.bitcoinj.core.Coin; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.common.util.Tuple3; -import io.bisq.common.util.Utilities; -import io.bisq.core.offer.Offer; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.CryptoCurrencyAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.gui.components.InfoTextField; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.validation.InputValidator; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.SimpleBooleanProperty; -import javafx.collections.FXCollections; import javafx.scene.control.CheckBox; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; -import javafx.util.StringConverter; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.Coin; -import static io.bisq.gui.util.FormBuilder.*; +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.SimpleBooleanProperty; + +import javafx.collections.FXCollections; + +import javafx.util.StringConverter; + +import lombok.extern.slf4j.Slf4j; + +import static bisq.desktop.util.FormBuilder.*; @Slf4j public abstract class PaymentMethodForm { diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/PerfectMoneyForm.java b/src/main/java/bisq/desktop/components/paymentmethods/PerfectMoneyForm.java similarity index 83% rename from src/main/java/io/bisq/gui/components/paymentmethods/PerfectMoneyForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/PerfectMoneyForm.java index 7fe0f0de7d..429fe4c758 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/PerfectMoneyForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/PerfectMoneyForm.java @@ -15,29 +15,37 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.PerfectMoneyValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.PerfectMoneyAccount; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.payment.payload.PerfectMoneyAccountPayload; + +import bisq.common.locale.FiatCurrency; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.FiatCurrency; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.PerfectMoneyAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.payload.PerfectMoneyAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.InputValidator; -import io.bisq.gui.util.validation.PerfectMoneyValidator; -import javafx.collections.FXCollections; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; -import org.apache.commons.lang3.StringUtils; + +import javafx.collections.FXCollections; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static io.bisq.gui.util.FormBuilder.*; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class PerfectMoneyForm extends PaymentMethodForm { private static final Logger log = LoggerFactory.getLogger(PerfectMoneyForm.class); diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/PopmoneyForm.java b/src/main/java/bisq/desktop/components/paymentmethods/PopmoneyForm.java similarity index 86% rename from src/main/java/io/bisq/gui/components/paymentmethods/PopmoneyForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/PopmoneyForm.java index 47867e6c13..c09ee3310f 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/PopmoneyForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/PopmoneyForm.java @@ -15,25 +15,31 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.PopmoneyValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.PopmoneyAccount; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.payment.payload.PopmoneyAccountPayload; + +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.PopmoneyAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.payload.PopmoneyAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.InputValidator; -import io.bisq.gui.util.validation.PopmoneyValidator; -import javafx.scene.control.TextField; -import javafx.scene.layout.GridPane; import org.apache.commons.lang3.StringUtils; -import static io.bisq.gui.util.FormBuilder.*; +import javafx.scene.control.TextField; +import javafx.scene.layout.GridPane; + +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class PopmoneyForm extends PaymentMethodForm { private final PopmoneyAccount account; diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/RevolutForm.java b/src/main/java/bisq/desktop/components/paymentmethods/RevolutForm.java similarity index 86% rename from src/main/java/io/bisq/gui/components/paymentmethods/RevolutForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/RevolutForm.java index 408be054aa..b3113b76d4 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/RevolutForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/RevolutForm.java @@ -15,31 +15,39 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.RevolutValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.RevolutAccount; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.payment.payload.RevolutAccountPayload; + +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.RevolutAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.payload.RevolutAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.InputValidator; -import io.bisq.gui.util.validation.RevolutValidator; -import javafx.geometry.Insets; -import javafx.geometry.VPos; import javafx.scene.control.CheckBox; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; import javafx.scene.layout.FlowPane; import javafx.scene.layout.GridPane; -import org.apache.commons.lang3.StringUtils; -import static io.bisq.gui.util.FormBuilder.*; +import javafx.geometry.Insets; +import javafx.geometry.VPos; + +import static bisq.desktop.util.FormBuilder.addLabel; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class RevolutForm extends PaymentMethodForm { private final RevolutAccount account; diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/SameBankForm.java b/src/main/java/bisq/desktop/components/paymentmethods/SameBankForm.java similarity index 84% rename from src/main/java/io/bisq/gui/components/paymentmethods/SameBankForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/SameBankForm.java index bda7505ea7..35822300b2 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/SameBankForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/SameBankForm.java @@ -15,26 +15,30 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.CountryBasedPaymentAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.PaymentAccountPayload; + +import bisq.common.locale.BankUtil; +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; -import io.bisq.common.locale.BankUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.CountryBasedPaymentAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.validation.InputValidator; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static io.bisq.gui.util.FormBuilder.addLabelInputTextField; -import static io.bisq.gui.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; public class SameBankForm extends BankForm { private static final Logger log = LoggerFactory.getLogger(SameBankForm.class); diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/SepaForm.java b/src/main/java/bisq/desktop/components/paymentmethods/SepaForm.java similarity index 92% rename from src/main/java/io/bisq/gui/components/paymentmethods/SepaForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/SepaForm.java index be1c7bf2e9..11a63c7da8 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/SepaForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/SepaForm.java @@ -15,39 +15,54 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; -import io.bisq.common.locale.*; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.CountryBasedPaymentAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.SepaAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.payload.SepaAccountPayload; -import io.bisq.gui.components.AutoTooltipCheckBox; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.BICValidator; -import io.bisq.gui.util.validation.IBANValidator; -import io.bisq.gui.util.validation.InputValidator; -import javafx.collections.FXCollections; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.geometry.VPos; -import javafx.scene.control.*; +import bisq.desktop.components.AutoTooltipCheckBox; +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.BICValidator; +import bisq.desktop.util.validation.IBANValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.CountryBasedPaymentAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.SepaAccount; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.payment.payload.SepaAccountPayload; + +import bisq.common.locale.Country; +import bisq.common.locale.CountryUtil; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; + +import org.apache.commons.lang3.StringUtils; + +import javafx.scene.control.CheckBox; +import javafx.scene.control.ComboBox; +import javafx.scene.control.Label; +import javafx.scene.control.TextField; +import javafx.scene.control.Tooltip; import javafx.scene.layout.FlowPane; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; import javafx.scene.text.TextAlignment; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.VPos; + +import javafx.collections.FXCollections; + import javafx.util.StringConverter; -import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; import java.util.List; -import static io.bisq.gui.util.FormBuilder.addLabelTextFieldWithCopyIcon; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class SepaForm extends PaymentMethodForm { public static int addFormForBuyer(GridPane gridPane, int gridRow, diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/SepaInstantForm.java b/src/main/java/bisq/desktop/components/paymentmethods/SepaInstantForm.java similarity index 93% rename from src/main/java/io/bisq/gui/components/paymentmethods/SepaInstantForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/SepaInstantForm.java index d6e2bcd863..c255df9760 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/SepaInstantForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/SepaInstantForm.java @@ -15,39 +15,54 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; -import io.bisq.common.locale.*; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.CountryBasedPaymentAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.SepaInstantAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.payload.SepaInstantAccountPayload; -import io.bisq.gui.components.AutoTooltipCheckBox; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.BICValidator; -import io.bisq.gui.util.validation.IBANValidator; -import io.bisq.gui.util.validation.InputValidator; -import javafx.collections.FXCollections; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.geometry.VPos; -import javafx.scene.control.*; +import bisq.desktop.components.AutoTooltipCheckBox; +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.BICValidator; +import bisq.desktop.util.validation.IBANValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.CountryBasedPaymentAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.SepaInstantAccount; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.payment.payload.SepaInstantAccountPayload; + +import bisq.common.locale.Country; +import bisq.common.locale.CountryUtil; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; + +import org.apache.commons.lang3.StringUtils; + +import javafx.scene.control.CheckBox; +import javafx.scene.control.ComboBox; +import javafx.scene.control.Label; +import javafx.scene.control.TextField; +import javafx.scene.control.Tooltip; import javafx.scene.layout.FlowPane; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; import javafx.scene.text.TextAlignment; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.VPos; + +import javafx.collections.FXCollections; + import javafx.util.StringConverter; -import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; import java.util.List; -import static io.bisq.gui.util.FormBuilder.addLabelTextFieldWithCopyIcon; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class SepaInstantForm extends PaymentMethodForm { public static int addFormForBuyer(GridPane gridPane, int gridRow, diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/SpecificBankForm.java b/src/main/java/bisq/desktop/components/paymentmethods/SpecificBankForm.java similarity index 87% rename from src/main/java/io/bisq/gui/components/paymentmethods/SpecificBankForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/SpecificBankForm.java index daefdfae45..313600cdfa 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/SpecificBankForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/SpecificBankForm.java @@ -15,26 +15,33 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.payment.payload.SpecificBanksAccountPayload; + +import bisq.common.locale.Res; +import bisq.common.util.Tuple3; import com.google.common.base.Joiner; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple3; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.payload.SpecificBanksAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.validation.InputValidator; -import javafx.beans.binding.Bindings; + import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; import javafx.scene.layout.GridPane; -import static io.bisq.gui.util.FormBuilder.*; +import javafx.beans.binding.Bindings; + +import static bisq.desktop.util.FormBuilder.addLabelInputTextFieldButton; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldButton; public class SpecificBankForm extends BankForm { private final SpecificBanksAccountPayload specificBanksAccountPayload; diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/SwishForm.java b/src/main/java/bisq/desktop/components/paymentmethods/SwishForm.java similarity index 87% rename from src/main/java/io/bisq/gui/components/paymentmethods/SwishForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/SwishForm.java index 5ffbc9b229..5c40fdd4ec 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/SwishForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/SwishForm.java @@ -15,28 +15,33 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.SwishValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.SwishAccount; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.payment.payload.SwishAccountPayload; + +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.SwishAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.payload.SwishAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.InputValidator; -import io.bisq.gui.util.validation.SwishValidator; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; -import org.apache.commons.lang3.StringUtils; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static io.bisq.gui.util.FormBuilder.addLabelInputTextField; -import static io.bisq.gui.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; public class SwishForm extends PaymentMethodForm { private static final Logger log = LoggerFactory.getLogger(SwishForm.class); diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/USPostalMoneyOrderForm.java b/src/main/java/bisq/desktop/components/paymentmethods/USPostalMoneyOrderForm.java similarity index 87% rename from src/main/java/io/bisq/gui/components/paymentmethods/USPostalMoneyOrderForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/USPostalMoneyOrderForm.java index f2d00a6d82..93a1ed778b 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/USPostalMoneyOrderForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/USPostalMoneyOrderForm.java @@ -15,27 +15,35 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.USPostalMoneyOrderValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.USPostalMoneyOrderAccount; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.payment.payload.USPostalMoneyOrderAccountPayload; + +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.USPostalMoneyOrderAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.payload.USPostalMoneyOrderAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.InputValidator; -import io.bisq.gui.util.validation.USPostalMoneyOrderValidator; import javafx.scene.control.TextArea; import javafx.scene.layout.GridPane; -import org.apache.commons.lang3.StringUtils; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static io.bisq.gui.util.FormBuilder.*; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextArea; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class USPostalMoneyOrderForm extends PaymentMethodForm { private static final Logger log = LoggerFactory.getLogger(USPostalMoneyOrderForm.class); diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/UpholdForm.java b/src/main/java/bisq/desktop/components/paymentmethods/UpholdForm.java similarity index 86% rename from src/main/java/io/bisq/gui/components/paymentmethods/UpholdForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/UpholdForm.java index eef97092ec..8787462bde 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/UpholdForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/UpholdForm.java @@ -15,31 +15,39 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.UpholdValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.UpholdAccount; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.payment.payload.UpholdAccountPayload; + +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.UpholdAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.payload.UpholdAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.InputValidator; -import io.bisq.gui.util.validation.UpholdValidator; -import javafx.geometry.Insets; -import javafx.geometry.VPos; import javafx.scene.control.CheckBox; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; import javafx.scene.layout.FlowPane; import javafx.scene.layout.GridPane; -import org.apache.commons.lang3.StringUtils; -import static io.bisq.gui.util.FormBuilder.*; +import javafx.geometry.Insets; +import javafx.geometry.VPos; + +import static bisq.desktop.util.FormBuilder.addLabel; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class UpholdForm extends PaymentMethodForm { private final UpholdAccount upholdAccount; diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/VenmoForm.java b/src/main/java/bisq/desktop/components/paymentmethods/VenmoForm.java similarity index 86% rename from src/main/java/io/bisq/gui/components/paymentmethods/VenmoForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/VenmoForm.java index 645ff8544c..f6227a5017 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/VenmoForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/VenmoForm.java @@ -15,25 +15,31 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.VenmoValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.VenmoAccount; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.payment.payload.VenmoAccountPayload; + +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.VenmoAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.payload.VenmoAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.InputValidator; -import io.bisq.gui.util.validation.VenmoValidator; -import javafx.scene.control.TextField; -import javafx.scene.layout.GridPane; import org.apache.commons.lang3.StringUtils; -import static io.bisq.gui.util.FormBuilder.*; +import javafx.scene.control.TextField; +import javafx.scene.layout.GridPane; + +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; public class VenmoForm extends PaymentMethodForm { private final VenmoAccount account; diff --git a/src/main/java/io/bisq/gui/components/paymentmethods/WesternUnionForm.java b/src/main/java/bisq/desktop/components/paymentmethods/WesternUnionForm.java similarity index 91% rename from src/main/java/io/bisq/gui/components/paymentmethods/WesternUnionForm.java rename to src/main/java/bisq/desktop/components/paymentmethods/WesternUnionForm.java index 0f64236f7e..da51be706d 100644 --- a/src/main/java/io/bisq/gui/components/paymentmethods/WesternUnionForm.java +++ b/src/main/java/bisq/desktop/components/paymentmethods/WesternUnionForm.java @@ -15,32 +15,46 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.components.paymentmethods; +package bisq.desktop.components.paymentmethods; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.EmailValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.CountryBasedPaymentAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.payment.payload.WesternUnionAccountPayload; + +import bisq.common.locale.BankUtil; +import bisq.common.locale.Country; +import bisq.common.locale.CountryUtil; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.FiatCurrency; +import bisq.common.locale.Region; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; +import bisq.common.util.Tuple2; +import bisq.common.util.Tuple3; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.locale.*; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Tuple3; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.CountryBasedPaymentAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.payload.WesternUnionAccountPayload; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.EmailValidator; -import io.bisq.gui.util.validation.InputValidator; -import javafx.collections.FXCollections; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; -import javafx.util.StringConverter; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import static io.bisq.gui.util.FormBuilder.addLabelTextFieldWithCopyIcon; +import javafx.collections.FXCollections; + +import javafx.util.StringConverter; + +import lombok.extern.slf4j.Slf4j; + +import static bisq.desktop.util.FormBuilder.addLabelTextFieldWithCopyIcon; @Slf4j public class WesternUnionForm extends PaymentMethodForm { diff --git a/src/main/java/bisq/desktop/images.css b/src/main/java/bisq/desktop/images.css new file mode 100644 index 0000000000..8bce3607d8 --- /dev/null +++ b/src/main/java/bisq/desktop/images.css @@ -0,0 +1,303 @@ +/* splash screen */ +/*noinspection CssUnknownTarget*/ +#image-splash-logo { + -fx-image: url("../../images/logo_splash.png"); +} + +/* shared*/ +#image-info { + -fx-image: url("../../images/info.png"); +} + +#light_close { + -fx-image: url("../../images/light_close.png"); +} + +#image-alert-round { + -fx-image: url("../../images/alert_round.png"); +} + +#image-green_circle { + -fx-image: url("../../images/green_circle.png"); +} + +#image-blue_circle { + -fx-image: url("../../images/blue_circle.png"); +} + +#image-remove { + -fx-image: url("../../images/remove.png"); +} + +#image-buy { + -fx-image: url("../../images/buy.png"); +} + +#image-buy-white { + -fx-image: url("../../images/buy_white.png"); +} + +#image-sell { + -fx-image: url("../../images/sell.png"); +} + +#image-sell-white { + -fx-image: url("../../images/sell_white.png"); +} + +#image-expand { + -fx-image: url("../../images/expand.png"); +} + +#image-collapse { + -fx-image: url("../../images/collapse.png"); +} + +#image-buy-large { + -fx-image: url("../../images/buy_large.png"); +} + +#image-sell-large { + -fx-image: url("../../images/sell_large.png"); +} + +/* navigation buttons */ +#image-nav-market { + -fx-image: url("../../images/nav/market.png"); +} + +#image-nav-market-active { + -fx-image: url("../../images/nav/market_active.png"); +} + +#image-nav-buyoffer { + -fx-image: url("../../images/nav/buyoffer.png"); +} + +#image-nav-buyoffer-active { + -fx-image: url("../../images/nav/buyoffer_active.png"); +} + +#image-nav-selloffer { + -fx-image: url("../../images/nav/selloffer.png"); +} + +#image-nav-selloffer-active { + -fx-image: url("../../images/nav/selloffer_active.png"); +} + +#image-nav-portfolio { + -fx-image: url("../../images/nav/portfolio.png"); +} + +#image-nav-portfolio-active { + -fx-image: url("../../images/nav/portfolio_active.png"); +} + +#image-nav-funds { + -fx-image: url("../../images/nav/funds.png"); +} + +#image-nav-funds-active { + -fx-image: url("../../images/nav/funds_active.png"); +} + +#image-nav-disputes { + -fx-image: url("../../images/nav/disputes.png"); +} + +#image-nav-disputes-active { + -fx-image: url("../../images/nav/disputes_active.png"); +} + +#image-nav-settings { + -fx-image: url("../../images/nav/settings.png"); +} + +#image-nav-settings-active { + -fx-image: url("../../images/nav/settings_active.png"); +} + +#image-nav-account { + -fx-image: url("../../images/nav/account.png"); +} + +#image-nav-account-active { + -fx-image: url("../../images/nav/account_active.png"); +} + +#image-nav-dao { + -fx-image: url("../../images/nav/dao.png"); +} + +#image-nav-dao-active { + -fx-image: url("../../images/nav/dao_active.png"); +} + +/* account*/ +#image-tick { + -fx-image: url("../../images/tick.png"); +} + +#image-arrow-blue { + -fx-image: url("../../images/arrow_blue.png"); +} + +#image-arrow-grey { + -fx-image: url("../../images/arrow_grey.png"); +} + +/* connection state*/ +#image-connection-tor { + -fx-image: url("../../images/connection/tor.png"); +} + +#image-connection-direct { + -fx-image: url("../../images/connection/direct.png"); +} + +#image-connection-nat { + -fx-image: url("../../images/connection/nat.png"); +} + +#image-connection-relay { + -fx-image: url("../../images/connection/relay.png"); +} + +#image-connection-synced { + -fx-image: url("../../images/connection/synced.png"); +} + +/* software update*/ + +#image-update-in-progress { + -fx-image: url("../../images/update/update_in_progress.png"); +} + +#image-update-up-to-date { + -fx-image: url("../../images/update/update_up_to_date.png"); +} + +#image-update-available { + -fx-image: url("../../images/update/update_available.png"); +} + +#image-update-failed { + -fx-image: url("../../images/update/update_failed.png"); +} + +/* offer state */ +#image-offer_state_unknown { + -fx-image: url("../../images/offer/offer_state_unknown.png"); +} + +#image-offer_state_available { + -fx-image: url("../../images/offer/offer_state_available.png"); +} + +#image-offer_state_not_available { + -fx-image: url("../../images/offer/offer_state_not_available.png"); +} + +#image-attachment { + -fx-image: url("../../images/attachment.png"); +} + +#bubble_arrow_grey_left { + -fx-image: url("../../images/bubble_arrow_grey_left.png"); +} + +#bubble_arrow_blue_left { + -fx-image: url("../../images/bubble_arrow_blue_left.png"); +} + +#bubble_arrow_grey_right { + -fx-image: url("../../images/bubble_arrow_grey_right.png"); +} + +#bubble_arrow_blue_right { + -fx-image: url("../../images/bubble_arrow_blue_right.png"); +} + +#link { + -fx-image: url("../../images/link.png"); +} + +#invert { + -fx-image: url("../../images/invert.png"); +} + +#avatar_1 { + -fx-image: url("../../images/avatars/avatar_1.png"); +} + +#avatar_2 { + -fx-image: url("../../images/avatars/avatar_2.png"); +} + +#avatar_3 { + -fx-image: url("../../images/avatars/avatar_3.png"); +} + +#avatar_4 { + -fx-image: url("../../images/avatars/avatar_4.png"); +} + +#avatar_5 { + -fx-image: url("../../images/avatars/avatar_5.png"); +} + +#avatar_6 { + -fx-image: url("../../images/avatars/avatar_6.png"); +} + +#avatar_7 { + -fx-image: url("../../images/avatars/avatar_7.png"); +} + +#avatar_8 { + -fx-image: url("../../images/avatars/avatar_8.png"); +} + +#avatar_9 { + -fx-image: url("../../images/avatars/avatar_9.png"); +} + +#avatar_10 { + -fx-image: url("../../images/avatars/avatar_10.png"); +} + +#avatar_11 { + -fx-image: url("../../images/avatars/avatar_11.png"); +} + +#avatar_12 { + -fx-image: url("../../images/avatars/avatar_12.png"); +} + +#avatar_13 { + -fx-image: url("../../images/avatars/avatar_13.png"); +} + +#avatar_14 { + -fx-image: url("../../images/avatars/avatar_14.png"); +} + +#avatar_15 { + -fx-image: url("../../images/avatars/avatar_15.png"); +} + +#poloniex { + -fx-image: url("../../images/poloniex.png"); +} + +#btcaverage { + -fx-image: url("../../images/btcaverage.png"); +} + +#spinner { + -fx-image: url("../../images/spinner.png"); +} + + + diff --git a/src/main/java/io/bisq/gui/main/MainView.fxml b/src/main/java/bisq/desktop/main/MainView.fxml similarity index 92% rename from src/main/java/io/bisq/gui/main/MainView.fxml rename to src/main/java/bisq/desktop/main/MainView.fxml index 88dd98d20b..80f0ae4ae1 100644 --- a/src/main/java/io/bisq/gui/main/MainView.fxml +++ b/src/main/java/bisq/desktop/main/MainView.fxml @@ -17,6 +17,6 @@ --> - \ No newline at end of file diff --git a/src/main/java/io/bisq/gui/main/MainView.java b/src/main/java/bisq/desktop/main/MainView.java similarity index 93% rename from src/main/java/io/bisq/gui/main/MainView.java rename to src/main/java/bisq/desktop/main/MainView.java index 46d186fc4f..a8bf305e08 100644 --- a/src/main/java/io/bisq/gui/main/MainView.java +++ b/src/main/java/bisq/desktop/main/MainView.java @@ -15,53 +15,82 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main; +package bisq.desktop.main; -import io.bisq.common.Timer; -import io.bisq.common.UserThread; -import io.bisq.common.app.DevEnv; -import io.bisq.common.app.Version; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Utilities; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.exceptions.BisqException; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.*; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.AutoTooltipToggleButton; -import io.bisq.gui.components.BusyAnimation; -import io.bisq.gui.main.account.AccountView; -import io.bisq.gui.main.dao.DaoView; -import io.bisq.gui.main.disputes.DisputesView; -import io.bisq.gui.main.funds.FundsView; -import io.bisq.gui.main.market.MarketView; -import io.bisq.gui.main.offer.BuyOfferView; -import io.bisq.gui.main.offer.SellOfferView; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.portfolio.PortfolioView; -import io.bisq.gui.main.settings.SettingsView; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.Transitions; -import javafx.beans.value.ChangeListener; -import javafx.geometry.Insets; -import javafx.geometry.Pos; -import javafx.scene.control.*; +import bisq.desktop.Navigation; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.InitializableView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.AutoTooltipToggleButton; +import bisq.desktop.components.BusyAnimation; +import bisq.desktop.main.account.AccountView; +import bisq.desktop.main.dao.DaoView; +import bisq.desktop.main.disputes.DisputesView; +import bisq.desktop.main.funds.FundsView; +import bisq.desktop.main.market.MarketView; +import bisq.desktop.main.offer.BuyOfferView; +import bisq.desktop.main.offer.SellOfferView; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.portfolio.PortfolioView; +import bisq.desktop.main.settings.SettingsView; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Transitions; + +import bisq.core.app.BisqEnvironment; +import bisq.core.exceptions.BisqException; + +import bisq.common.Timer; +import bisq.common.UserThread; +import bisq.common.app.DevEnv; +import bisq.common.app.Version; +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; +import bisq.common.util.Utilities; + +import javax.inject.Inject; + +import javafx.scene.control.Button; +import javafx.scene.control.ComboBox; +import javafx.scene.control.ContentDisplay; +import javafx.scene.control.Label; +import javafx.scene.control.ListCell; +import javafx.scene.control.ProgressBar; +import javafx.scene.control.Separator; +import javafx.scene.control.TextField; +import javafx.scene.control.ToggleButton; +import javafx.scene.control.ToggleGroup; +import javafx.scene.control.Tooltip; import javafx.scene.effect.DropShadow; import javafx.scene.image.ImageView; import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; -import javafx.scene.layout.*; +import javafx.scene.layout.AnchorPane; +import javafx.scene.layout.BorderPane; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Pane; +import javafx.scene.layout.StackPane; +import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.text.TextAlignment; -import lombok.extern.slf4j.Slf4j; -import javax.inject.Inject; +import javafx.geometry.Insets; +import javafx.geometry.Pos; + +import javafx.beans.value.ChangeListener; + import java.util.List; -import static javafx.scene.layout.AnchorPane.*; +import lombok.extern.slf4j.Slf4j; + +import static javafx.scene.layout.AnchorPane.setBottomAnchor; +import static javafx.scene.layout.AnchorPane.setLeftAnchor; +import static javafx.scene.layout.AnchorPane.setRightAnchor; +import static javafx.scene.layout.AnchorPane.setTopAnchor; @FxmlView @Slf4j diff --git a/src/main/java/io/bisq/gui/main/MainViewModel.java b/src/main/java/bisq/desktop/main/MainViewModel.java similarity index 94% rename from src/main/java/io/bisq/gui/main/MainViewModel.java rename to src/main/java/bisq/desktop/main/MainViewModel.java index f29b78f6b8..5b495acb27 100644 --- a/src/main/java/io/bisq/gui/main/MainViewModel.java +++ b/src/main/java/bisq/desktop/main/MainViewModel.java @@ -15,105 +15,134 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main; +package bisq.desktop.main; + +import bisq.desktop.common.model.ViewModel; +import bisq.desktop.components.BalanceWithConfirmationTextField; +import bisq.desktop.components.TxIdTextField; +import bisq.desktop.main.overlays.notifications.NotificationCenter; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.overlays.windows.DisplayAlertMessageWindow; +import bisq.desktop.main.overlays.windows.TacWindow; +import bisq.desktop.main.overlays.windows.TorNetworkSettingsWindow; +import bisq.desktop.main.overlays.windows.WalletPasswordWindow; +import bisq.desktop.main.overlays.windows.downloadupdate.DisplayUpdateDownloadWindow; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.core.alert.Alert; +import bisq.core.alert.AlertManager; +import bisq.core.alert.PrivateNotificationManager; +import bisq.core.alert.PrivateNotificationPayload; +import bisq.core.app.AppOptionKeys; +import bisq.core.app.BisqEnvironment; +import bisq.core.app.SetupUtils; +import bisq.core.arbitration.ArbitratorManager; +import bisq.core.arbitration.Dispute; +import bisq.core.arbitration.DisputeManager; +import bisq.core.btc.AddressEntry; +import bisq.core.btc.listeners.BalanceListener; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.WalletsManager; +import bisq.core.btc.wallet.WalletsSetup; +import bisq.core.dao.DaoManager; +import bisq.core.filter.FilterManager; +import bisq.core.offer.OpenOffer; +import bisq.core.offer.OpenOfferManager; +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.CryptoCurrencyAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.PerfectMoneyAccount; +import bisq.core.payment.payload.PaymentMethod; +import bisq.core.provider.fee.FeeService; +import bisq.core.provider.price.MarketPrice; +import bisq.core.provider.price.PriceFeedService; +import bisq.core.trade.Trade; +import bisq.core.trade.TradeManager; +import bisq.core.trade.closed.ClosedTradableManager; +import bisq.core.trade.failed.FailedTradesManager; +import bisq.core.trade.statistics.TradeStatisticsManager; +import bisq.core.user.DontShowAgainLookup; +import bisq.core.user.Preferences; +import bisq.core.user.User; + +import bisq.network.crypto.DecryptedDataTuple; +import bisq.network.crypto.EncryptionService; +import bisq.network.p2p.BootstrapListener; +import bisq.network.p2p.P2PService; +import bisq.network.p2p.P2PServiceListener; +import bisq.network.p2p.network.CloseConnectionReason; +import bisq.network.p2p.network.Connection; +import bisq.network.p2p.network.ConnectionListener; +import bisq.network.p2p.peers.keepalive.messages.Ping; + +import bisq.common.Clock; +import bisq.common.GlobalSettings; +import bisq.common.Timer; +import bisq.common.UserThread; +import bisq.common.app.DevEnv; +import bisq.common.app.Version; +import bisq.common.crypto.CryptoException; +import bisq.common.crypto.KeyRing; +import bisq.common.crypto.SealedAndSigned; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; -import com.google.common.net.InetAddresses; -import com.google.inject.Inject; -import io.bisq.common.Clock; -import io.bisq.common.GlobalSettings; -import io.bisq.common.Timer; -import io.bisq.common.UserThread; -import io.bisq.common.app.DevEnv; -import io.bisq.common.app.Version; -import io.bisq.common.crypto.CryptoException; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.SealedAndSigned; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.alert.Alert; -import io.bisq.core.alert.AlertManager; -import io.bisq.core.alert.PrivateNotificationManager; -import io.bisq.core.alert.PrivateNotificationPayload; -import io.bisq.core.app.AppOptionKeys; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.app.SetupUtils; -import io.bisq.core.arbitration.ArbitratorManager; -import io.bisq.core.arbitration.Dispute; -import io.bisq.core.arbitration.DisputeManager; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.listeners.BalanceListener; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.WalletsManager; -import io.bisq.core.btc.wallet.WalletsSetup; -import io.bisq.core.dao.DaoManager; -import io.bisq.core.filter.FilterManager; -import io.bisq.core.offer.OpenOffer; -import io.bisq.core.offer.OpenOfferManager; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.CryptoCurrencyAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.PerfectMoneyAccount; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.core.provider.fee.FeeService; -import io.bisq.core.provider.price.MarketPrice; -import io.bisq.core.provider.price.PriceFeedService; -import io.bisq.core.trade.Trade; -import io.bisq.core.trade.TradeManager; -import io.bisq.core.trade.closed.ClosedTradableManager; -import io.bisq.core.trade.failed.FailedTradesManager; -import io.bisq.core.trade.statistics.TradeStatisticsManager; -import io.bisq.core.user.DontShowAgainLookup; -import io.bisq.core.user.Preferences; -import io.bisq.core.user.User; -import io.bisq.gui.common.model.ViewModel; -import io.bisq.gui.components.BalanceWithConfirmationTextField; -import io.bisq.gui.components.TxIdTextField; -import io.bisq.gui.main.overlays.notifications.NotificationCenter; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.overlays.windows.DisplayAlertMessageWindow; -import io.bisq.gui.main.overlays.windows.TacWindow; -import io.bisq.gui.main.overlays.windows.TorNetworkSettingsWindow; -import io.bisq.gui.main.overlays.windows.WalletPasswordWindow; -import io.bisq.gui.main.overlays.windows.downloadupdate.DisplayUpdateDownloadWindow; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.network.crypto.DecryptedDataTuple; -import io.bisq.network.crypto.EncryptionService; -import io.bisq.network.p2p.BootstrapListener; -import io.bisq.network.p2p.P2PService; -import io.bisq.network.p2p.P2PServiceListener; -import io.bisq.network.p2p.network.CloseConnectionReason; -import io.bisq.network.p2p.network.Connection; -import io.bisq.network.p2p.network.ConnectionListener; -import io.bisq.network.p2p.peers.keepalive.messages.Ping; -import javafx.beans.property.*; -import javafx.beans.value.ChangeListener; -import javafx.collections.FXCollections; -import javafx.collections.ListChangeListener; -import javafx.collections.ObservableList; -import javafx.collections.SetChangeListener; -import lombok.extern.slf4j.Slf4j; import org.bitcoinj.core.Address; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; import org.bitcoinj.store.BlockStoreException; import org.bitcoinj.store.ChainFileLockedException; + +import com.google.inject.Inject; + +import com.google.common.net.InetAddresses; + import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; import org.fxmisc.easybind.monadic.MonadicBinding; -import javax.annotation.Nullable; +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.DoubleProperty; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.property.SimpleDoubleProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.beans.property.SimpleObjectProperty; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; +import javafx.beans.value.ChangeListener; + +import javafx.collections.FXCollections; +import javafx.collections.ListChangeListener; +import javafx.collections.ObservableList; +import javafx.collections.SetChangeListener; + +import java.security.Security; + import java.io.IOException; + import java.net.InetSocketAddress; import java.net.Socket; -import java.security.Security; -import java.util.*; + +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Random; +import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; import java.util.stream.Stream; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; + @Slf4j public class MainViewModel implements ViewModel { private static final long STARTUP_TIMEOUT_MINUTES = 4; diff --git a/src/main/java/bisq/desktop/main/PriceFeedComboBoxItem.java b/src/main/java/bisq/desktop/main/PriceFeedComboBoxItem.java new file mode 100644 index 0000000000..36b34586b3 --- /dev/null +++ b/src/main/java/bisq/desktop/main/PriceFeedComboBoxItem.java @@ -0,0 +1,43 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.main; + +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; + +import lombok.Getter; +import lombok.Setter; + +public class PriceFeedComboBoxItem { + public final String currencyCode; + public final StringProperty displayStringProperty = new SimpleStringProperty(); + @Setter + @Getter + private boolean isPriceAvailable; + @Setter + @Getter + private boolean isExternallyProvidedPrice; + + public PriceFeedComboBoxItem(String currencyCode) { + this.currencyCode = currencyCode; + } + + public void setDisplayString(String displayString) { + this.displayStringProperty.set(displayString); + } +} diff --git a/src/main/java/io/bisq/gui/main/account/AccountView.fxml b/src/main/java/bisq/desktop/main/account/AccountView.fxml similarity index 93% rename from src/main/java/io/bisq/gui/main/account/AccountView.fxml rename to src/main/java/bisq/desktop/main/account/AccountView.fxml index 080bd01f6e..84cd499ebc 100644 --- a/src/main/java/io/bisq/gui/main/account/AccountView.fxml +++ b/src/main/java/bisq/desktop/main/account/AccountView.fxml @@ -20,7 +20,7 @@ -. */ -package io.bisq.gui.main.account; +package bisq.desktop.main.account; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.main.MainView; +import bisq.desktop.main.account.arbitratorregistration.ArbitratorRegistrationView; +import bisq.desktop.main.account.content.fiataccounts.FiatAccountsView; +import bisq.desktop.main.account.settings.AccountSettingsView; +import bisq.desktop.main.overlays.popups.Popup; + +import bisq.common.app.DevEnv; +import bisq.common.locale.Res; +import bisq.common.util.Utilities; + +import javax.inject.Inject; -import io.bisq.common.app.DevEnv; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Utilities; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.*; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.account.arbitratorregistration.ArbitratorRegistrationView; -import io.bisq.gui.main.account.content.fiataccounts.FiatAccountsView; -import io.bisq.gui.main.account.settings.AccountSettingsView; -import io.bisq.gui.main.overlays.popups.Popup; -import javafx.beans.value.ChangeListener; -import javafx.event.EventHandler; import javafx.fxml.FXML; + import javafx.scene.Scene; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; -import javax.inject.Inject; +import javafx.beans.value.ChangeListener; + +import javafx.event.EventHandler; @FxmlView public class AccountView extends ActivatableView { diff --git a/src/main/java/io/bisq/gui/main/account/AccountViewModel.java b/src/main/java/bisq/desktop/main/account/AccountViewModel.java similarity index 91% rename from src/main/java/io/bisq/gui/main/account/AccountViewModel.java rename to src/main/java/bisq/desktop/main/account/AccountViewModel.java index 03e21b32dc..84af84cde7 100644 --- a/src/main/java/io/bisq/gui/main/account/AccountViewModel.java +++ b/src/main/java/bisq/desktop/main/account/AccountViewModel.java @@ -15,10 +15,11 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.account; +package bisq.desktop.main.account; + +import bisq.desktop.common.model.ViewModel; import com.google.inject.Inject; -import io.bisq.gui.common.model.ViewModel; class AccountViewModel implements ViewModel { diff --git a/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.fxml b/src/main/java/bisq/desktop/main/account/arbitratorregistration/ArbitratorRegistrationView.fxml similarity index 89% rename from src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.fxml rename to src/main/java/bisq/desktop/main/account/arbitratorregistration/ArbitratorRegistrationView.fxml index 9465db5687..c78f240787 100644 --- a/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.fxml +++ b/src/main/java/bisq/desktop/main/account/arbitratorregistration/ArbitratorRegistrationView.fxml @@ -16,12 +16,12 @@ ~ along with Bisq. If not, see . --> - - + - \ No newline at end of file + diff --git a/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java b/src/main/java/bisq/desktop/main/account/arbitratorregistration/ArbitratorRegistrationView.java similarity index 89% rename from src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java rename to src/main/java/bisq/desktop/main/account/arbitratorregistration/ArbitratorRegistrationView.java index d39910f4ab..81a846864d 100644 --- a/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java +++ b/src/main/java/bisq/desktop/main/account/arbitratorregistration/ArbitratorRegistrationView.java @@ -15,39 +15,56 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.account.arbitratorregistration; +package bisq.desktop.main.account.arbitratorregistration; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.overlays.windows.UnlockArbitrationRegistrationWindow; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.ImageUtil; +import bisq.desktop.util.Layout; + +import bisq.core.app.AppOptionKeys; +import bisq.core.arbitration.Arbitrator; + +import bisq.common.UserThread; +import bisq.common.locale.LanguageUtil; +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; + import com.google.inject.name.Named; -import io.bisq.common.UserThread; -import io.bisq.common.locale.LanguageUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.core.app.AppOptionKeys; -import io.bisq.core.arbitration.Arbitrator; -import io.bisq.gui.common.view.ActivatableViewAndModel; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.overlays.windows.UnlockArbitrationRegistrationWindow; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.ImageUtil; -import io.bisq.gui.util.Layout; -import javafx.beans.value.ChangeListener; -import javafx.collections.ListChangeListener; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.geometry.VPos; -import javafx.scene.control.*; -import javafx.scene.image.ImageView; -import javafx.scene.layout.*; -import javafx.util.Callback; -import javafx.util.StringConverter; import javax.inject.Inject; -import static io.bisq.gui.util.FormBuilder.*; +import javafx.scene.control.Button; +import javafx.scene.control.ComboBox; +import javafx.scene.control.Label; +import javafx.scene.control.ListCell; +import javafx.scene.control.ListView; +import javafx.scene.control.TextField; +import javafx.scene.image.ImageView; +import javafx.scene.layout.AnchorPane; +import javafx.scene.layout.ColumnConstraints; +import javafx.scene.layout.GridPane; +import javafx.scene.layout.Priority; +import javafx.scene.layout.VBox; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.VPos; + +import javafx.beans.value.ChangeListener; + +import javafx.collections.ListChangeListener; + +import javafx.util.Callback; +import javafx.util.StringConverter; + +import static bisq.desktop.util.FormBuilder.*; @FxmlView public class ArbitratorRegistrationView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationViewModel.java b/src/main/java/bisq/desktop/main/account/arbitratorregistration/ArbitratorRegistrationViewModel.java similarity index 90% rename from src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationViewModel.java rename to src/main/java/bisq/desktop/main/account/arbitratorregistration/ArbitratorRegistrationViewModel.java index 0f45d34841..00e70e976d 100644 --- a/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationViewModel.java +++ b/src/main/java/bisq/desktop/main/account/arbitratorregistration/ArbitratorRegistrationViewModel.java @@ -15,27 +15,39 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.account.arbitratorregistration; +package bisq.desktop.main.account.arbitratorregistration; + +import bisq.desktop.common.model.ActivatableViewModel; + +import bisq.core.arbitration.Arbitrator; +import bisq.core.arbitration.ArbitratorManager; +import bisq.core.btc.AddressEntry; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.user.User; + +import bisq.network.p2p.NodeAddress; +import bisq.network.p2p.P2PService; + +import bisq.common.crypto.KeyRing; +import bisq.common.handlers.ErrorMessageHandler; +import bisq.common.handlers.ResultHandler; +import bisq.common.locale.LanguageUtil; + +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Utils; import com.google.inject.Inject; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.handlers.ErrorMessageHandler; -import io.bisq.common.handlers.ResultHandler; -import io.bisq.common.locale.LanguageUtil; -import io.bisq.core.arbitration.Arbitrator; -import io.bisq.core.arbitration.ArbitratorManager; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.user.User; -import io.bisq.gui.common.model.ActivatableViewModel; -import io.bisq.network.p2p.NodeAddress; -import io.bisq.network.p2p.P2PService; -import javafx.beans.property.*; + +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.property.SimpleObjectProperty; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; + import javafx.collections.FXCollections; import javafx.collections.MapChangeListener; import javafx.collections.ObservableList; -import org.bitcoinj.core.ECKey; -import org.bitcoinj.core.Utils; import java.util.ArrayList; import java.util.Date; diff --git a/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java b/src/main/java/bisq/desktop/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java similarity index 89% rename from src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java rename to src/main/java/bisq/desktop/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java index 3af333ff67..097134f542 100644 --- a/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java +++ b/src/main/java/bisq/desktop/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java @@ -15,27 +15,32 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.account.content.altcoinaccounts; +package bisq.desktop.main.account.content.altcoinaccounts; + +import bisq.desktop.common.model.ActivatableDataModel; +import bisq.desktop.util.GUIUtil; + +import bisq.core.offer.OpenOfferManager; +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.CryptoCurrencyAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.PaymentMethod; +import bisq.core.trade.TradeManager; +import bisq.core.user.Preferences; +import bisq.core.user.User; + +import bisq.common.locale.CryptoCurrency; +import bisq.common.locale.FiatCurrency; +import bisq.common.locale.TradeCurrency; +import bisq.common.proto.persistable.PersistenceProtoResolver; import com.google.inject.Inject; -import io.bisq.common.locale.CryptoCurrency; -import io.bisq.common.locale.FiatCurrency; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.common.proto.persistable.PersistenceProtoResolver; -import io.bisq.core.offer.OpenOfferManager; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.CryptoCurrencyAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.core.trade.TradeManager; -import io.bisq.core.user.Preferences; -import io.bisq.core.user.User; -import io.bisq.gui.common.model.ActivatableDataModel; -import io.bisq.gui.util.GUIUtil; + +import javafx.stage.Stage; + import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.collections.SetChangeListener; -import javafx.stage.Stage; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.fxml b/src/main/java/bisq/desktop/main/account/content/altcoinaccounts/AltCoinAccountsView.fxml similarity index 82% rename from src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.fxml rename to src/main/java/bisq/desktop/main/account/content/altcoinaccounts/AltCoinAccountsView.fxml index 7366f39236..63a083b7c3 100644 --- a/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.fxml +++ b/src/main/java/bisq/desktop/main/account/content/altcoinaccounts/AltCoinAccountsView.fxml @@ -18,8 +18,10 @@ --> - - + + +. */ -package io.bisq.gui.main.account.content.altcoinaccounts; +package bisq.desktop.main.account.content.altcoinaccounts; + +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.TitledGroupBg; +import bisq.desktop.components.paymentmethods.CryptoCurrencyForm; +import bisq.desktop.components.paymentmethods.PaymentMethodForm; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.ImageUtil; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.AltCoinAddressValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.PaymentAccountFactory; +import bisq.core.payment.payload.PaymentMethod; + +import bisq.common.UserThread; +import bisq.common.locale.CryptoCurrency; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; +import bisq.common.util.Tuple2; +import bisq.common.util.Tuple3; + +import javax.inject.Inject; -import io.bisq.common.UserThread; -import io.bisq.common.locale.CryptoCurrency; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Tuple3; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.PaymentAccountFactory; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.gui.common.view.ActivatableViewAndModel; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.TitledGroupBg; -import io.bisq.gui.components.paymentmethods.CryptoCurrencyForm; -import io.bisq.gui.components.paymentmethods.PaymentMethodForm; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.ImageUtil; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.AltCoinAddressValidator; -import io.bisq.gui.util.validation.InputValidator; -import javafx.beans.value.ChangeListener; -import javafx.geometry.VPos; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.ListCell; @@ -50,12 +53,19 @@ import javafx.scene.control.ListView; import javafx.scene.image.ImageView; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.GridPane; + +import javafx.geometry.VPos; + +import javafx.beans.value.ChangeListener; + import javafx.util.Callback; -import javax.inject.Inject; import java.util.concurrent.TimeUnit; -import static io.bisq.gui.util.FormBuilder.*; +import static bisq.desktop.util.FormBuilder.add2ButtonsAfterGroup; +import static bisq.desktop.util.FormBuilder.add3ButtonsAfterGroup; +import static bisq.desktop.util.FormBuilder.addLabelListView; +import static bisq.desktop.util.FormBuilder.addTitledGroupBg; @FxmlView public class AltCoinAccountsView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsViewModel.java b/src/main/java/bisq/desktop/main/account/content/altcoinaccounts/AltCoinAccountsViewModel.java similarity index 90% rename from src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsViewModel.java rename to src/main/java/bisq/desktop/main/account/content/altcoinaccounts/AltCoinAccountsViewModel.java index e515d2fa31..dbcea1df01 100644 --- a/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsViewModel.java +++ b/src/main/java/bisq/desktop/main/account/content/altcoinaccounts/AltCoinAccountsViewModel.java @@ -15,12 +15,15 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.account.content.altcoinaccounts; +package bisq.desktop.main.account.content.altcoinaccounts; + +import bisq.desktop.common.model.ActivatableWithDataModel; +import bisq.desktop.common.model.ViewModel; + +import bisq.core.payment.PaymentAccount; import com.google.inject.Inject; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.gui.common.model.ActivatableWithDataModel; -import io.bisq.gui.common.model.ViewModel; + import javafx.collections.ObservableList; class AltCoinAccountsViewModel extends ActivatableWithDataModel implements ViewModel { diff --git a/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorListItem.java b/src/main/java/bisq/desktop/main/account/content/arbitratorselection/ArbitratorListItem.java similarity index 93% rename from src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorListItem.java rename to src/main/java/bisq/desktop/main/account/content/arbitratorselection/ArbitratorListItem.java index 13ee90a1e7..d84c200861 100644 --- a/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorListItem.java +++ b/src/main/java/bisq/desktop/main/account/content/arbitratorselection/ArbitratorListItem.java @@ -15,10 +15,12 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.account.content.arbitratorselection; +package bisq.desktop.main.account.content.arbitratorselection; + +import bisq.desktop.util.BSFormatter; + +import bisq.core.arbitration.Arbitrator; -import io.bisq.core.arbitration.Arbitrator; -import io.bisq.gui.util.BSFormatter; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; diff --git a/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionView.fxml b/src/main/java/bisq/desktop/main/account/content/arbitratorselection/ArbitratorSelectionView.fxml similarity index 82% rename from src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionView.fxml rename to src/main/java/bisq/desktop/main/account/content/arbitratorselection/ArbitratorSelectionView.fxml index 5fc92a93c8..1cd64e9105 100644 --- a/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionView.fxml +++ b/src/main/java/bisq/desktop/main/account/content/arbitratorselection/ArbitratorSelectionView.fxml @@ -17,8 +17,10 @@ ~ along with Bisq. If not, see . --> - - + + +. */ -package io.bisq.gui.main.account.content.arbitratorselection; +package bisq.desktop.main.account.content.arbitratorselection; -import io.bisq.common.UserThread; -import io.bisq.common.locale.LanguageUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.gui.common.view.ActivatableViewAndModel; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.*; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.ImageUtil; -import io.bisq.gui.util.Layout; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.beans.value.ChangeListener; -import javafx.collections.ListChangeListener; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.geometry.VPos; -import javafx.scene.control.*; -import javafx.scene.image.ImageView; -import javafx.scene.layout.AnchorPane; -import javafx.scene.layout.GridPane; -import javafx.util.Callback; -import javafx.util.StringConverter; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipCheckBox; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.AutoTooltipTableColumn; +import bisq.desktop.components.TableGroupHeadline; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.ImageUtil; +import bisq.desktop.util.Layout; + +import bisq.common.UserThread; +import bisq.common.locale.LanguageUtil; +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; import javax.inject.Inject; -import static io.bisq.gui.util.FormBuilder.*; +import javafx.scene.control.Button; +import javafx.scene.control.CheckBox; +import javafx.scene.control.ComboBox; +import javafx.scene.control.Label; +import javafx.scene.control.ListCell; +import javafx.scene.control.ListView; +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableRow; +import javafx.scene.control.TableView; +import javafx.scene.control.Tooltip; +import javafx.scene.image.ImageView; +import javafx.scene.layout.AnchorPane; +import javafx.scene.layout.GridPane; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.VPos; + +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.ReadOnlyObjectWrapper; +import javafx.beans.value.ChangeListener; + +import javafx.collections.ListChangeListener; + +import javafx.util.Callback; +import javafx.util.StringConverter; + +import static bisq.desktop.util.FormBuilder.addCheckBox; +import static bisq.desktop.util.FormBuilder.addLabelComboBox; +import static bisq.desktop.util.FormBuilder.addLabelListView; +import static bisq.desktop.util.FormBuilder.addTitledGroupBg; @FxmlView public class ArbitratorSelectionView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java b/src/main/java/bisq/desktop/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java similarity index 93% rename from src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java rename to src/main/java/bisq/desktop/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java index a7c4bc5542..ce4bb38ace 100644 --- a/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java +++ b/src/main/java/bisq/desktop/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java @@ -15,18 +15,23 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.account.content.arbitratorselection; +package bisq.desktop.main.account.content.arbitratorselection; + +import bisq.desktop.common.model.ActivatableDataModel; +import bisq.desktop.util.BSFormatter; + +import bisq.core.arbitration.Arbitrator; +import bisq.core.arbitration.ArbitratorManager; +import bisq.core.user.Preferences; +import bisq.core.user.User; + +import bisq.network.p2p.NodeAddress; + +import bisq.common.crypto.KeyRing; +import bisq.common.locale.LanguageUtil; import com.google.inject.Inject; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.locale.LanguageUtil; -import io.bisq.core.arbitration.Arbitrator; -import io.bisq.core.arbitration.ArbitratorManager; -import io.bisq.core.user.Preferences; -import io.bisq.core.user.User; -import io.bisq.gui.common.model.ActivatableDataModel; -import io.bisq.gui.util.BSFormatter; -import io.bisq.network.p2p.NodeAddress; + import javafx.collections.FXCollections; import javafx.collections.MapChangeListener; import javafx.collections.ObservableList; diff --git a/src/main/java/io/bisq/gui/main/account/content/backup/BackupView.fxml b/src/main/java/bisq/desktop/main/account/content/backup/BackupView.fxml similarity index 83% rename from src/main/java/io/bisq/gui/main/account/content/backup/BackupView.fxml rename to src/main/java/bisq/desktop/main/account/content/backup/BackupView.fxml index 92d9bac7e1..5dee6c7545 100644 --- a/src/main/java/io/bisq/gui/main/account/content/backup/BackupView.fxml +++ b/src/main/java/bisq/desktop/main/account/content/backup/BackupView.fxml @@ -17,8 +17,10 @@ ~ along with Bisq. If not, see . --> - - + + +. */ -package io.bisq.gui.main.account.content.backup; +package bisq.desktop.main.account.content.backup; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.Layout; + +import bisq.core.app.AppOptionKeys; +import bisq.core.app.BisqEnvironment; +import bisq.core.user.Preferences; + +import bisq.common.locale.Res; +import bisq.common.storage.FileUtil; +import bisq.common.util.Tuple2; +import bisq.common.util.Utilities; + +import javax.inject.Inject; + +import javafx.stage.DirectoryChooser; +import javafx.stage.Stage; -import io.bisq.common.locale.Res; -import io.bisq.common.storage.FileUtil; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Utilities; -import io.bisq.core.app.AppOptionKeys; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.user.Preferences; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.Layout; -import javafx.beans.value.ChangeListener; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; -import javafx.stage.DirectoryChooser; -import javafx.stage.Stage; -import javax.annotation.Nullable; -import javax.inject.Inject; +import javafx.beans.value.ChangeListener; + +import java.nio.file.Paths; + import java.io.File; import java.io.IOException; -import java.nio.file.Paths; + import java.text.SimpleDateFormat; + import java.util.Date; +import javax.annotation.Nullable; + @FxmlView public class BackupView extends ActivatableView { private final File dataDir, logFile; diff --git a/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsDataModel.java b/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsDataModel.java similarity index 89% rename from src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsDataModel.java rename to src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsDataModel.java index 2d0f0d22f9..c8f3b1d6e5 100644 --- a/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsDataModel.java +++ b/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsDataModel.java @@ -15,28 +15,33 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.account.content.fiataccounts; +package bisq.desktop.main.account.content.fiataccounts; + +import bisq.desktop.common.model.ActivatableDataModel; +import bisq.desktop.util.GUIUtil; + +import bisq.core.offer.OpenOfferManager; +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.CryptoCurrencyAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.PaymentMethod; +import bisq.core.trade.TradeManager; +import bisq.core.user.Preferences; +import bisq.core.user.User; + +import bisq.common.locale.CryptoCurrency; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.FiatCurrency; +import bisq.common.locale.TradeCurrency; +import bisq.common.proto.persistable.PersistenceProtoResolver; import com.google.inject.Inject; -import io.bisq.common.locale.CryptoCurrency; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.FiatCurrency; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.common.proto.persistable.PersistenceProtoResolver; -import io.bisq.core.offer.OpenOfferManager; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.CryptoCurrencyAccount; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.core.trade.TradeManager; -import io.bisq.core.user.Preferences; -import io.bisq.core.user.User; -import io.bisq.gui.common.model.ActivatableDataModel; -import io.bisq.gui.util.GUIUtil; + +import javafx.stage.Stage; + import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.collections.SetChangeListener; -import javafx.stage.Stage; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsView.fxml b/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.fxml similarity index 83% rename from src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsView.fxml rename to src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.fxml index 08b789c8f1..3ca9c7d0ef 100644 --- a/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsView.fxml +++ b/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.fxml @@ -18,8 +18,10 @@ --> - - + + +. */ -package io.bisq.gui.main.account.content.fiataccounts; +package bisq.desktop.main.account.content.fiataccounts; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Tuple3; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.payment.*; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.gui.common.view.ActivatableViewAndModel; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.TitledGroupBg; -import io.bisq.gui.components.paymentmethods.*; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.ImageUtil; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.*; -import javafx.beans.value.ChangeListener; -import javafx.collections.FXCollections; -import javafx.geometry.VPos; -import javafx.scene.control.*; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.TitledGroupBg; +import bisq.desktop.components.paymentmethods.AliPayForm; +import bisq.desktop.components.paymentmethods.CashAppForm; +import bisq.desktop.components.paymentmethods.CashDepositForm; +import bisq.desktop.components.paymentmethods.ChaseQuickPayForm; +import bisq.desktop.components.paymentmethods.ClearXchangeForm; +import bisq.desktop.components.paymentmethods.FasterPaymentsForm; +import bisq.desktop.components.paymentmethods.InteracETransferForm; +import bisq.desktop.components.paymentmethods.MoneyBeamForm; +import bisq.desktop.components.paymentmethods.NationalBankForm; +import bisq.desktop.components.paymentmethods.OKPayForm; +import bisq.desktop.components.paymentmethods.PaymentMethodForm; +import bisq.desktop.components.paymentmethods.PerfectMoneyForm; +import bisq.desktop.components.paymentmethods.PopmoneyForm; +import bisq.desktop.components.paymentmethods.RevolutForm; +import bisq.desktop.components.paymentmethods.SameBankForm; +import bisq.desktop.components.paymentmethods.SepaForm; +import bisq.desktop.components.paymentmethods.SepaInstantForm; +import bisq.desktop.components.paymentmethods.SpecificBankForm; +import bisq.desktop.components.paymentmethods.SwishForm; +import bisq.desktop.components.paymentmethods.USPostalMoneyOrderForm; +import bisq.desktop.components.paymentmethods.UpholdForm; +import bisq.desktop.components.paymentmethods.VenmoForm; +import bisq.desktop.components.paymentmethods.WesternUnionForm; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.ImageUtil; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.AliPayValidator; +import bisq.desktop.util.validation.BICValidator; +import bisq.desktop.util.validation.CashAppValidator; +import bisq.desktop.util.validation.ChaseQuickPayValidator; +import bisq.desktop.util.validation.ClearXchangeValidator; +import bisq.desktop.util.validation.IBANValidator; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.InteracETransferValidator; +import bisq.desktop.util.validation.MoneyBeamValidator; +import bisq.desktop.util.validation.OKPayValidator; +import bisq.desktop.util.validation.PerfectMoneyValidator; +import bisq.desktop.util.validation.PopmoneyValidator; +import bisq.desktop.util.validation.RevolutValidator; +import bisq.desktop.util.validation.SwishValidator; +import bisq.desktop.util.validation.USPostalMoneyOrderValidator; +import bisq.desktop.util.validation.UpholdValidator; +import bisq.desktop.util.validation.VenmoValidator; + +import bisq.core.app.BisqEnvironment; +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.ClearXchangeAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.PaymentAccountFactory; +import bisq.core.payment.WesternUnionAccount; +import bisq.core.payment.payload.PaymentMethod; + +import bisq.common.UserThread; +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; +import bisq.common.util.Tuple3; + +import org.bitcoinj.core.Coin; + +import javax.inject.Inject; + +import javafx.scene.control.Button; +import javafx.scene.control.ComboBox; +import javafx.scene.control.Label; +import javafx.scene.control.ListCell; +import javafx.scene.control.ListView; import javafx.scene.image.ImageView; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.GridPane; import javafx.scene.text.TextAlignment; + +import javafx.geometry.VPos; + +import javafx.beans.value.ChangeListener; + +import javafx.collections.FXCollections; + import javafx.util.Callback; import javafx.util.StringConverter; -import org.bitcoinj.core.Coin; -import javax.inject.Inject; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import static io.bisq.gui.util.FormBuilder.*; +import static bisq.desktop.util.FormBuilder.*; @FxmlView public class FiatAccountsView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsViewModel.java b/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsViewModel.java similarity index 90% rename from src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsViewModel.java rename to src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsViewModel.java index ab37456f0b..fc1526afc7 100644 --- a/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsViewModel.java +++ b/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsViewModel.java @@ -15,12 +15,15 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.account.content.fiataccounts; +package bisq.desktop.main.account.content.fiataccounts; + +import bisq.desktop.common.model.ActivatableWithDataModel; +import bisq.desktop.common.model.ViewModel; + +import bisq.core.payment.PaymentAccount; import com.google.inject.Inject; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.gui.common.model.ActivatableWithDataModel; -import io.bisq.gui.common.model.ViewModel; + import javafx.collections.ObservableList; class FiatAccountsViewModel extends ActivatableWithDataModel implements ViewModel { diff --git a/src/main/java/io/bisq/gui/main/account/content/password/PasswordView.fxml b/src/main/java/bisq/desktop/main/account/content/password/PasswordView.fxml similarity index 82% rename from src/main/java/io/bisq/gui/main/account/content/password/PasswordView.fxml rename to src/main/java/bisq/desktop/main/account/content/password/PasswordView.fxml index 1f865701f0..4c79f847eb 100644 --- a/src/main/java/io/bisq/gui/main/account/content/password/PasswordView.fxml +++ b/src/main/java/bisq/desktop/main/account/content/password/PasswordView.fxml @@ -17,8 +17,10 @@ ~ along with Bisq. If not, see . --> - - + + + - \ No newline at end of file + diff --git a/src/main/java/io/bisq/gui/main/account/content/password/PasswordView.java b/src/main/java/bisq/desktop/main/account/content/password/PasswordView.java similarity index 90% rename from src/main/java/io/bisq/gui/main/account/content/password/PasswordView.java rename to src/main/java/bisq/desktop/main/account/content/password/PasswordView.java index 8b58bdc13c..a6ead3f1bf 100644 --- a/src/main/java/io/bisq/gui/main/account/content/password/PasswordView.java +++ b/src/main/java/bisq/desktop/main/account/content/password/PasswordView.java @@ -15,36 +15,41 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.account.content.password; +package bisq.desktop.main.account.content.password; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.BusyAnimation; +import bisq.desktop.components.PasswordTextField; +import bisq.desktop.components.TitledGroupBg; +import bisq.desktop.main.MainView; +import bisq.desktop.main.account.AccountView; +import bisq.desktop.main.account.content.seedwords.SeedWordsView; +import bisq.desktop.main.account.settings.AccountSettingsView; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.PasswordValidator; + +import bisq.core.btc.wallet.WalletsManager; +import bisq.core.crypto.ScryptUtil; + +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; +import bisq.common.util.Tuple3; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Tuple3; -import io.bisq.core.btc.wallet.WalletsManager; -import io.bisq.core.crypto.ScryptUtil; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.BusyAnimation; -import io.bisq.gui.components.PasswordTextField; -import io.bisq.gui.components.TitledGroupBg; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.account.AccountView; -import io.bisq.gui.main.account.content.seedwords.SeedWordsView; -import io.bisq.gui.main.account.settings.AccountSettingsView; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.InputValidator; -import io.bisq.gui.util.validation.PasswordValidator; -import javafx.beans.value.ChangeListener; -import javafx.scene.control.Button; -import javafx.scene.control.Label; -import javafx.scene.layout.GridPane; import org.bitcoinj.crypto.KeyCrypterScrypt; import javax.inject.Inject; +import javafx.scene.control.Button; +import javafx.scene.control.Label; +import javafx.scene.layout.GridPane; + +import javafx.beans.value.ChangeListener; + import static com.google.common.base.Preconditions.checkArgument; @FxmlView diff --git a/src/main/java/io/bisq/gui/main/account/content/seedwords/SeedWordsView.fxml b/src/main/java/bisq/desktop/main/account/content/seedwords/SeedWordsView.fxml similarity index 83% rename from src/main/java/io/bisq/gui/main/account/content/seedwords/SeedWordsView.fxml rename to src/main/java/bisq/desktop/main/account/content/seedwords/SeedWordsView.fxml index a0bdbe6910..9f4dec5a1d 100644 --- a/src/main/java/io/bisq/gui/main/account/content/seedwords/SeedWordsView.fxml +++ b/src/main/java/bisq/desktop/main/account/content/seedwords/SeedWordsView.fxml @@ -17,8 +17,10 @@ ~ along with Bisq. If not, see . --> - - + + +. */ -package io.bisq.gui.main.account.content.seedwords; +package bisq.desktop.main.account.content.seedwords; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.overlays.windows.WalletPasswordWindow; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Layout; + +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.WalletsManager; +import bisq.core.user.DontShowAgainLookup; + +import bisq.common.locale.Res; +import bisq.common.storage.Storage; -import com.google.common.base.Joiner; -import com.google.common.base.Splitter; -import io.bisq.common.locale.Res; -import io.bisq.common.storage.Storage; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.WalletsManager; -import io.bisq.core.user.DontShowAgainLookup; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.overlays.windows.WalletPasswordWindow; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.Layout; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.SimpleBooleanProperty; -import javafx.beans.value.ChangeListener; -import javafx.scene.control.Button; -import javafx.scene.control.DatePicker; -import javafx.scene.control.TextArea; -import javafx.scene.layout.GridPane; import org.bitcoinj.crypto.MnemonicCode; import org.bitcoinj.crypto.MnemonicException; import org.bitcoinj.wallet.DeterministicSeed; import javax.inject.Inject; import javax.inject.Named; + +import com.google.common.base.Joiner; +import com.google.common.base.Splitter; + +import javafx.scene.control.Button; +import javafx.scene.control.DatePicker; +import javafx.scene.control.TextArea; +import javafx.scene.layout.GridPane; + +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.value.ChangeListener; + import java.io.File; import java.io.IOException; + +import java.util.List; + import java.time.Instant; import java.time.LocalDate; import java.time.ZoneId; import java.time.ZoneOffset; -import java.util.List; -import static io.bisq.gui.util.FormBuilder.*; +import static bisq.desktop.util.FormBuilder.*; import static javafx.beans.binding.Bindings.createBooleanBinding; @FxmlView diff --git a/src/main/java/io/bisq/gui/main/account/settings/AccountSettingsView.fxml b/src/main/java/bisq/desktop/main/account/settings/AccountSettingsView.fxml similarity index 90% rename from src/main/java/io/bisq/gui/main/account/settings/AccountSettingsView.fxml rename to src/main/java/bisq/desktop/main/account/settings/AccountSettingsView.fxml index fc8b4f1f9f..882c23ba4e 100644 --- a/src/main/java/io/bisq/gui/main/account/settings/AccountSettingsView.fxml +++ b/src/main/java/bisq/desktop/main/account/settings/AccountSettingsView.fxml @@ -18,10 +18,11 @@ --> - + + + fx:controller="bisq.desktop.main.account.settings.AccountSettingsView"> diff --git a/src/main/java/io/bisq/gui/main/account/settings/AccountSettingsView.java b/src/main/java/bisq/desktop/main/account/settings/AccountSettingsView.java similarity index 88% rename from src/main/java/io/bisq/gui/main/account/settings/AccountSettingsView.java rename to src/main/java/bisq/desktop/main/account/settings/AccountSettingsView.java index 192479b1e2..3562eb3a05 100644 --- a/src/main/java/io/bisq/gui/main/account/settings/AccountSettingsView.java +++ b/src/main/java/bisq/desktop/main/account/settings/AccountSettingsView.java @@ -15,28 +15,35 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.account.settings; +package bisq.desktop.main.account.settings; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.common.view.ViewPath; +import bisq.desktop.components.AutoTooltipToggleButton; +import bisq.desktop.main.MainView; +import bisq.desktop.main.account.AccountView; +import bisq.desktop.main.account.content.altcoinaccounts.AltCoinAccountsView; +import bisq.desktop.main.account.content.arbitratorselection.ArbitratorSelectionView; +import bisq.desktop.main.account.content.backup.BackupView; +import bisq.desktop.main.account.content.fiataccounts.FiatAccountsView; +import bisq.desktop.main.account.content.password.PasswordView; +import bisq.desktop.main.account.content.seedwords.SeedWordsView; +import bisq.desktop.util.Colors; + +import bisq.common.locale.Res; + +import javax.inject.Inject; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.*; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.AutoTooltipToggleButton; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.account.AccountView; -import io.bisq.gui.main.account.content.altcoinaccounts.AltCoinAccountsView; -import io.bisq.gui.main.account.content.arbitratorselection.ArbitratorSelectionView; -import io.bisq.gui.main.account.content.backup.BackupView; -import io.bisq.gui.main.account.content.fiataccounts.FiatAccountsView; -import io.bisq.gui.main.account.content.password.PasswordView; -import io.bisq.gui.main.account.content.seedwords.SeedWordsView; -import io.bisq.gui.util.Colors; -import javafx.beans.value.ChangeListener; + import javafx.fxml.FXML; -import javafx.geometry.Insets; -import javafx.geometry.Pos; + import javafx.scene.control.Label; import javafx.scene.control.ScrollPane; import javafx.scene.control.ToggleGroup; @@ -44,7 +51,10 @@ import javafx.scene.layout.AnchorPane; import javafx.scene.layout.VBox; import javafx.scene.paint.Paint; -import javax.inject.Inject; +import javafx.geometry.Insets; +import javafx.geometry.Pos; + +import javafx.beans.value.ChangeListener; @FxmlView public class AccountSettingsView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/dao/DaoView.fxml b/src/main/java/bisq/desktop/main/dao/DaoView.fxml similarity index 94% rename from src/main/java/io/bisq/gui/main/dao/DaoView.fxml rename to src/main/java/bisq/desktop/main/dao/DaoView.fxml index 6e721dfd2a..90bd84c653 100644 --- a/src/main/java/io/bisq/gui/main/dao/DaoView.fxml +++ b/src/main/java/bisq/desktop/main/dao/DaoView.fxml @@ -20,7 +20,7 @@ - diff --git a/src/main/java/io/bisq/gui/main/dao/DaoView.java b/src/main/java/bisq/desktop/main/dao/DaoView.java similarity index 88% rename from src/main/java/io/bisq/gui/main/dao/DaoView.java rename to src/main/java/bisq/desktop/main/dao/DaoView.java index ced09e2657..3c388fa603 100644 --- a/src/main/java/io/bisq/gui/main/dao/DaoView.java +++ b/src/main/java/bisq/desktop/main/dao/DaoView.java @@ -15,25 +15,34 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao; +package bisq.desktop.main.dao; + +import bisq.desktop.Navigation; +import bisq.desktop.common.model.Activatable; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.main.MainView; +import bisq.desktop.main.dao.compensation.CompensationView; +import bisq.desktop.main.dao.voting.VotingView; +import bisq.desktop.main.dao.wallet.BsqWalletView; +import bisq.desktop.main.dao.wallet.dashboard.BsqDashboardView; + +import bisq.core.app.BisqEnvironment; + +import bisq.common.app.DevEnv; +import bisq.common.locale.Res; + +import javax.inject.Inject; -import io.bisq.common.app.DevEnv; -import io.bisq.common.locale.Res; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.model.Activatable; -import io.bisq.gui.common.view.*; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.dao.compensation.CompensationView; -import io.bisq.gui.main.dao.voting.VotingView; -import io.bisq.gui.main.dao.wallet.BsqWalletView; -import io.bisq.gui.main.dao.wallet.dashboard.BsqDashboardView; -import javafx.beans.value.ChangeListener; import javafx.fxml.FXML; + import javafx.scene.control.Tab; import javafx.scene.control.TabPane; -import javax.inject.Inject; +import javafx.beans.value.ChangeListener; @FxmlView public class DaoView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestDisplay.java b/src/main/java/bisq/desktop/main/dao/compensation/CompensationRequestDisplay.java similarity index 93% rename from src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestDisplay.java rename to src/main/java/bisq/desktop/main/dao/compensation/CompensationRequestDisplay.java index 8751025811..aa6c6d6c10 100644 --- a/src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestDisplay.java +++ b/src/main/java/bisq/desktop/main/dao/compensation/CompensationRequestDisplay.java @@ -15,34 +15,51 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.compensation; +package bisq.desktop.main.dao.compensation; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.dao.request.compensation.CompensationRequestPayload; -import io.bisq.core.dao.request.compensation.consensus.Restrictions; -import io.bisq.core.provider.fee.FeeService; -import io.bisq.gui.components.*; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.BsqAddressValidator; -import io.bisq.gui.util.validation.BsqValidator; -import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.geometry.Orientation; -import javafx.scene.control.*; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.AutoTooltipTableColumn; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.components.InputTextField; +import bisq.desktop.components.TableGroupHeadline; +import bisq.desktop.components.TxIdTextField; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.BsqAddressValidator; +import bisq.desktop.util.validation.BsqValidator; + +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.dao.request.compensation.CompensationRequestPayload; +import bisq.core.dao.request.compensation.consensus.Restrictions; +import bisq.core.provider.fee.FeeService; + +import bisq.common.locale.Res; + +import javafx.scene.control.ScrollPane; +import javafx.scene.control.SplitPane; +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.control.TextArea; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.ColumnConstraints; import javafx.scene.layout.GridPane; import javafx.scene.layout.Priority; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.Orientation; + +import javafx.beans.property.ReadOnlyObjectWrapper; + import javafx.util.Callback; -import javax.annotation.Nullable; import java.util.UUID; -import static io.bisq.gui.util.FormBuilder.*; +import javax.annotation.Nullable; + +import static bisq.desktop.util.FormBuilder.*; public class CompensationRequestDisplay { private final GridPane gridPane; diff --git a/src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestListItem.java b/src/main/java/bisq/desktop/main/dao/compensation/CompensationRequestListItem.java similarity index 92% rename from src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestListItem.java rename to src/main/java/bisq/desktop/main/dao/compensation/CompensationRequestListItem.java index dee8b87e32..b406b3a24c 100644 --- a/src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestListItem.java +++ b/src/main/java/bisq/desktop/main/dao/compensation/CompensationRequestListItem.java @@ -15,29 +15,34 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.compensation; +package bisq.desktop.main.dao.compensation; + +import bisq.desktop.components.indicator.TxConfidenceIndicator; +import bisq.desktop.util.BsqFormatter; + +import bisq.core.btc.listeners.TxConfidenceListener; +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.dao.blockchain.BsqBlockChain; +import bisq.core.dao.blockchain.BsqBlockChainChangeDispatcher; +import bisq.core.dao.blockchain.BsqBlockChainListener; +import bisq.core.dao.blockchain.vo.Tx; +import bisq.core.dao.request.compensation.CompensationRequest; + +import bisq.common.locale.Res; + +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionConfidence; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.listeners.TxConfidenceListener; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.dao.blockchain.BsqBlockChain; -import io.bisq.core.dao.blockchain.BsqBlockChainChangeDispatcher; -import io.bisq.core.dao.blockchain.BsqBlockChainListener; -import io.bisq.core.dao.blockchain.vo.Tx; -import io.bisq.core.dao.request.compensation.CompensationRequest; -import io.bisq.gui.components.indicator.TxConfidenceIndicator; -import io.bisq.gui.util.BsqFormatter; -import javafx.beans.value.ChangeListener; import javafx.scene.control.Tooltip; + +import javafx.beans.value.ChangeListener; + +import java.util.Optional; + import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.Transaction; -import org.bitcoinj.core.TransactionConfidence; - -import java.util.Optional; - @ToString @Slf4j diff --git a/src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestView.java b/src/main/java/bisq/desktop/main/dao/compensation/CompensationRequestView.java similarity index 90% rename from src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestView.java rename to src/main/java/bisq/desktop/main/dao/compensation/CompensationRequestView.java index 2a7c45b822..973c01e352 100644 --- a/src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestView.java +++ b/src/main/java/bisq/desktop/main/dao/compensation/CompensationRequestView.java @@ -15,33 +15,40 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.compensation; +package bisq.desktop.main.dao.compensation; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.Layout; + +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.dao.blockchain.BsqBlockChain; +import bisq.core.dao.blockchain.BsqBlockChainChangeDispatcher; +import bisq.core.dao.blockchain.BsqBlockChainListener; +import bisq.core.dao.request.compensation.CompensationRequest; +import bisq.core.dao.request.compensation.CompensationRequestManager; + +import bisq.common.UserThread; +import bisq.common.locale.Res; + +import javax.inject.Inject; + +import javafx.scene.control.SplitPane; +import javafx.scene.control.TableView; +import javafx.scene.layout.GridPane; + +import org.fxmisc.easybind.EasyBind; +import org.fxmisc.easybind.Subscription; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.dao.blockchain.BsqBlockChain; -import io.bisq.core.dao.blockchain.BsqBlockChainChangeDispatcher; -import io.bisq.core.dao.blockchain.BsqBlockChainListener; -import io.bisq.core.dao.request.compensation.CompensationRequest; -import io.bisq.core.dao.request.compensation.CompensationRequestManager; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.Layout; import javafx.beans.value.ChangeListener; + import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; import javafx.collections.transformation.FilteredList; import javafx.collections.transformation.SortedList; -import javafx.scene.control.SplitPane; -import javafx.scene.control.TableView; -import javafx.scene.layout.GridPane; -import org.fxmisc.easybind.EasyBind; -import org.fxmisc.easybind.Subscription; -import javax.inject.Inject; import java.util.stream.Collectors; @FxmlView diff --git a/src/main/java/io/bisq/gui/main/dao/compensation/CompensationView.fxml b/src/main/java/bisq/desktop/main/dao/compensation/CompensationView.fxml similarity index 87% rename from src/main/java/io/bisq/gui/main/dao/compensation/CompensationView.fxml rename to src/main/java/bisq/desktop/main/dao/compensation/CompensationView.fxml index 5813d96636..ba10ddf89b 100644 --- a/src/main/java/io/bisq/gui/main/dao/compensation/CompensationView.fxml +++ b/src/main/java/bisq/desktop/main/dao/compensation/CompensationView.fxml @@ -18,8 +18,9 @@ --> - - + + diff --git a/src/main/java/io/bisq/gui/main/dao/compensation/CompensationView.java b/src/main/java/bisq/desktop/main/dao/compensation/CompensationView.java similarity index 89% rename from src/main/java/io/bisq/gui/main/dao/compensation/CompensationView.java rename to src/main/java/bisq/desktop/main/dao/compensation/CompensationView.java index 8e8ba09e9b..ee17baceeb 100644 --- a/src/main/java/io/bisq/gui/main/dao/compensation/CompensationView.java +++ b/src/main/java/bisq/desktop/main/dao/compensation/CompensationView.java @@ -15,32 +15,42 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.compensation; +package bisq.desktop.main.dao.compensation; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.common.view.ViewPath; +import bisq.desktop.components.AutoTooltipToggleButton; +import bisq.desktop.main.MainView; +import bisq.desktop.main.dao.DaoView; +import bisq.desktop.main.dao.compensation.active.ActiveCompensationRequestView; +import bisq.desktop.main.dao.compensation.create.CreateCompensationRequestView; +import bisq.desktop.main.dao.compensation.past.PastCompensationRequestView; +import bisq.desktop.util.Colors; + +import bisq.common.locale.Res; + +import javax.inject.Inject; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.*; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.AutoTooltipToggleButton; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.dao.DaoView; -import io.bisq.gui.main.dao.compensation.active.ActiveCompensationRequestView; -import io.bisq.gui.main.dao.compensation.create.CreateCompensationRequestView; -import io.bisq.gui.main.dao.compensation.past.PastCompensationRequestView; -import io.bisq.gui.util.Colors; -import javafx.beans.value.ChangeListener; + import javafx.fxml.FXML; -import javafx.geometry.Insets; -import javafx.geometry.Pos; + import javafx.scene.control.Label; import javafx.scene.control.ToggleGroup; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.VBox; import javafx.scene.paint.Paint; -import javax.inject.Inject; +import javafx.geometry.Insets; +import javafx.geometry.Pos; + +import javafx.beans.value.ChangeListener; @FxmlView public class CompensationView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/dao/compensation/active/ActiveCompensationRequestView.fxml b/src/main/java/bisq/desktop/main/dao/compensation/active/ActiveCompensationRequestView.fxml similarity index 90% rename from src/main/java/io/bisq/gui/main/dao/compensation/active/ActiveCompensationRequestView.fxml rename to src/main/java/bisq/desktop/main/dao/compensation/active/ActiveCompensationRequestView.fxml index 1efbc3e80f..9d53ae3a69 100644 --- a/src/main/java/io/bisq/gui/main/dao/compensation/active/ActiveCompensationRequestView.fxml +++ b/src/main/java/bisq/desktop/main/dao/compensation/active/ActiveCompensationRequestView.fxml @@ -20,7 +20,7 @@ - diff --git a/src/main/java/io/bisq/gui/main/dao/compensation/active/ActiveCompensationRequestView.java b/src/main/java/bisq/desktop/main/dao/compensation/active/ActiveCompensationRequestView.java similarity index 89% rename from src/main/java/io/bisq/gui/main/dao/compensation/active/ActiveCompensationRequestView.java rename to src/main/java/bisq/desktop/main/dao/compensation/active/ActiveCompensationRequestView.java index 5632d19875..90900a34c9 100644 --- a/src/main/java/io/bisq/gui/main/dao/compensation/active/ActiveCompensationRequestView.java +++ b/src/main/java/bisq/desktop/main/dao/compensation/active/ActiveCompensationRequestView.java @@ -15,45 +15,52 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.compensation.active; +package bisq.desktop.main.dao.compensation.active; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.SeparatedPhaseBars; +import bisq.desktop.main.MainView; +import bisq.desktop.main.dao.DaoView; +import bisq.desktop.main.dao.compensation.CompensationRequestDisplay; +import bisq.desktop.main.dao.compensation.CompensationRequestListItem; +import bisq.desktop.main.dao.compensation.CompensationRequestView; +import bisq.desktop.main.dao.voting.VotingView; +import bisq.desktop.main.dao.voting.vote.VoteView; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.Layout; + +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.dao.DaoPeriodService; +import bisq.core.dao.blockchain.BsqBlockChain; +import bisq.core.dao.blockchain.BsqBlockChainChangeDispatcher; +import bisq.core.dao.blockchain.BsqBlockChainListener; +import bisq.core.dao.request.compensation.CompensationRequest; +import bisq.core.dao.request.compensation.CompensationRequestManager; +import bisq.core.provider.fee.FeeService; + +import bisq.common.locale.Res; + +import javax.inject.Inject; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.dao.DaoPeriodService; -import io.bisq.core.dao.blockchain.BsqBlockChain; -import io.bisq.core.dao.blockchain.BsqBlockChainChangeDispatcher; -import io.bisq.core.dao.blockchain.BsqBlockChainListener; -import io.bisq.core.dao.request.compensation.CompensationRequest; -import io.bisq.core.dao.request.compensation.CompensationRequestManager; -import io.bisq.core.provider.fee.FeeService; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.SeparatedPhaseBars; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.dao.DaoView; -import io.bisq.gui.main.dao.compensation.CompensationRequestDisplay; -import io.bisq.gui.main.dao.compensation.CompensationRequestListItem; -import io.bisq.gui.main.dao.compensation.CompensationRequestView; -import io.bisq.gui.main.dao.voting.VotingView; -import io.bisq.gui.main.dao.voting.vote.VoteView; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.Layout; -import javafx.beans.value.ChangeListener; -import javafx.geometry.Insets; import javafx.scene.control.Button; import javafx.scene.control.TableView; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.GridPane; + +import javafx.geometry.Insets; + import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; -import javax.inject.Inject; +import javafx.beans.value.ChangeListener; + import java.util.Arrays; import java.util.List; -import static io.bisq.gui.util.FormBuilder.addButtonAfterGroup; -import static io.bisq.gui.util.FormBuilder.addTitledGroupBg; +import static bisq.desktop.util.FormBuilder.addButtonAfterGroup; +import static bisq.desktop.util.FormBuilder.addTitledGroupBg; @FxmlView public class ActiveCompensationRequestView extends CompensationRequestView implements BsqBlockChainListener { diff --git a/src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.fxml b/src/main/java/bisq/desktop/main/dao/compensation/create/CreateCompensationRequestView.fxml similarity index 81% rename from src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.fxml rename to src/main/java/bisq/desktop/main/dao/compensation/create/CreateCompensationRequestView.fxml index fa602148fa..387e31f7df 100644 --- a/src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.fxml +++ b/src/main/java/bisq/desktop/main/dao/compensation/create/CreateCompensationRequestView.fxml @@ -17,8 +17,10 @@ ~ along with Bisq. If not, see . --> - - + + + - \ No newline at end of file + diff --git a/src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.java b/src/main/java/bisq/desktop/main/dao/compensation/create/CreateCompensationRequestView.java similarity index 86% rename from src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.java rename to src/main/java/bisq/desktop/main/dao/compensation/create/CreateCompensationRequestView.java index 574bead528..b2dd05c84a 100644 --- a/src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.java +++ b/src/main/java/bisq/desktop/main/dao/compensation/create/CreateCompensationRequestView.java @@ -15,47 +15,57 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.compensation.create; +package bisq.desktop.main.dao.compensation.create; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.main.dao.compensation.CompensationRequestDisplay; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.core.btc.exceptions.TransactionVerificationException; +import bisq.core.btc.exceptions.WalletException; +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.InsufficientBsqException; +import bisq.core.btc.wallet.WalletsSetup; +import bisq.core.dao.request.compensation.CompensationAmountException; +import bisq.core.dao.request.compensation.CompensationRequest; +import bisq.core.dao.request.compensation.CompensationRequestManager; +import bisq.core.dao.request.compensation.CompensationRequestPayload; +import bisq.core.provider.fee.FeeService; +import bisq.core.util.CoinUtil; + +import bisq.network.p2p.NodeAddress; +import bisq.network.p2p.P2PService; + +import bisq.common.crypto.KeyRing; +import bisq.common.locale.Res; -import com.google.common.util.concurrent.FutureCallback; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.exceptions.TransactionVerificationException; -import io.bisq.core.btc.exceptions.WalletException; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.InsufficientBsqException; -import io.bisq.core.btc.wallet.WalletsSetup; -import io.bisq.core.dao.request.compensation.CompensationAmountException; -import io.bisq.core.dao.request.compensation.CompensationRequest; -import io.bisq.core.dao.request.compensation.CompensationRequestManager; -import io.bisq.core.dao.request.compensation.CompensationRequestPayload; -import io.bisq.core.provider.fee.FeeService; -import io.bisq.core.util.CoinUtil; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.main.dao.compensation.CompensationRequestDisplay; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.network.p2p.NodeAddress; -import io.bisq.network.p2p.P2PService; -import javafx.scene.control.Button; -import javafx.scene.layout.GridPane; import org.bitcoinj.core.Coin; import org.bitcoinj.core.InsufficientMoneyException; import org.bitcoinj.core.Transaction; -import org.jetbrains.annotations.NotNull; -import javax.annotation.Nullable; import javax.inject.Inject; + +import com.google.common.util.concurrent.FutureCallback; + +import javafx.scene.control.Button; +import javafx.scene.layout.GridPane; + import java.security.PublicKey; + import java.util.Date; import java.util.UUID; +import org.jetbrains.annotations.NotNull; + +import javax.annotation.Nullable; + +import static bisq.desktop.util.FormBuilder.addButtonAfterGroup; import static com.google.common.base.Preconditions.checkNotNull; -import static io.bisq.gui.util.FormBuilder.addButtonAfterGroup; @FxmlView public class CreateCompensationRequestView extends ActivatableView { diff --git a/src/main/java/io/bisq/gui/main/dao/compensation/past/PastCompensationRequestView.fxml b/src/main/java/bisq/desktop/main/dao/compensation/past/PastCompensationRequestView.fxml similarity index 90% rename from src/main/java/io/bisq/gui/main/dao/compensation/past/PastCompensationRequestView.fxml rename to src/main/java/bisq/desktop/main/dao/compensation/past/PastCompensationRequestView.fxml index 0829268708..73ff0959dd 100644 --- a/src/main/java/io/bisq/gui/main/dao/compensation/past/PastCompensationRequestView.fxml +++ b/src/main/java/bisq/desktop/main/dao/compensation/past/PastCompensationRequestView.fxml @@ -19,7 +19,7 @@ - diff --git a/src/main/java/io/bisq/gui/main/dao/compensation/past/PastCompensationRequestView.java b/src/main/java/bisq/desktop/main/dao/compensation/past/PastCompensationRequestView.java similarity index 84% rename from src/main/java/io/bisq/gui/main/dao/compensation/past/PastCompensationRequestView.java rename to src/main/java/bisq/desktop/main/dao/compensation/past/PastCompensationRequestView.java index 41cd501d0c..dde547673c 100644 --- a/src/main/java/io/bisq/gui/main/dao/compensation/past/PastCompensationRequestView.java +++ b/src/main/java/bisq/desktop/main/dao/compensation/past/PastCompensationRequestView.java @@ -15,26 +15,31 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.compensation.past; +package bisq.desktop.main.dao.compensation.past; + +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.SeparatedPhaseBars; +import bisq.desktop.main.dao.compensation.CompensationRequestDisplay; +import bisq.desktop.main.dao.compensation.CompensationRequestView; +import bisq.desktop.util.BsqFormatter; + +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.dao.DaoPeriodService; +import bisq.core.dao.blockchain.BsqBlockChain; +import bisq.core.dao.blockchain.BsqBlockChainChangeDispatcher; +import bisq.core.dao.blockchain.BsqBlockChainListener; +import bisq.core.dao.request.compensation.CompensationRequestManager; + +import bisq.common.locale.Res; + +import javax.inject.Inject; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.dao.DaoPeriodService; -import io.bisq.core.dao.blockchain.BsqBlockChain; -import io.bisq.core.dao.blockchain.BsqBlockChainChangeDispatcher; -import io.bisq.core.dao.blockchain.BsqBlockChainListener; -import io.bisq.core.dao.request.compensation.CompensationRequestManager; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.SeparatedPhaseBars; -import io.bisq.gui.main.dao.compensation.CompensationRequestDisplay; -import io.bisq.gui.main.dao.compensation.CompensationRequestView; -import io.bisq.gui.util.BsqFormatter; -import javafx.geometry.Insets; import javafx.scene.control.TableView; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.GridPane; -import javax.inject.Inject; +import javafx.geometry.Insets; + import java.util.List; @FxmlView diff --git a/src/main/java/io/bisq/gui/main/dao/voting/VotingView.fxml b/src/main/java/bisq/desktop/main/dao/voting/VotingView.fxml similarity index 87% rename from src/main/java/io/bisq/gui/main/dao/voting/VotingView.fxml rename to src/main/java/bisq/desktop/main/dao/voting/VotingView.fxml index d840dac4a3..35fed3b3c3 100644 --- a/src/main/java/io/bisq/gui/main/dao/voting/VotingView.fxml +++ b/src/main/java/bisq/desktop/main/dao/voting/VotingView.fxml @@ -17,9 +17,9 @@ ~ along with Bisq. If not, see . --> - - - + + diff --git a/src/main/java/io/bisq/gui/main/dao/voting/VotingView.java b/src/main/java/bisq/desktop/main/dao/voting/VotingView.java similarity index 89% rename from src/main/java/io/bisq/gui/main/dao/voting/VotingView.java rename to src/main/java/bisq/desktop/main/dao/voting/VotingView.java index ce85e0c79d..eae4dacef6 100644 --- a/src/main/java/io/bisq/gui/main/dao/voting/VotingView.java +++ b/src/main/java/bisq/desktop/main/dao/voting/VotingView.java @@ -15,32 +15,42 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.voting; +package bisq.desktop.main.dao.voting; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.common.view.ViewPath; +import bisq.desktop.components.AutoTooltipToggleButton; +import bisq.desktop.main.MainView; +import bisq.desktop.main.dao.DaoView; +import bisq.desktop.main.dao.voting.dashboard.VotingDashboardView; +import bisq.desktop.main.dao.voting.history.VotingHistoryView; +import bisq.desktop.main.dao.voting.vote.VoteView; +import bisq.desktop.util.Colors; + +import bisq.common.locale.Res; + +import javax.inject.Inject; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.*; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.AutoTooltipToggleButton; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.dao.DaoView; -import io.bisq.gui.main.dao.voting.dashboard.VotingDashboardView; -import io.bisq.gui.main.dao.voting.history.VotingHistoryView; -import io.bisq.gui.main.dao.voting.vote.VoteView; -import io.bisq.gui.util.Colors; -import javafx.beans.value.ChangeListener; + import javafx.fxml.FXML; -import javafx.geometry.Insets; -import javafx.geometry.Pos; + import javafx.scene.control.Label; import javafx.scene.control.ToggleGroup; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.VBox; import javafx.scene.paint.Paint; -import javax.inject.Inject; +import javafx.geometry.Insets; +import javafx.geometry.Pos; + +import javafx.beans.value.ChangeListener; @FxmlView public class VotingView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/dao/voting/dashboard/VotingDashboardView.fxml b/src/main/java/bisq/desktop/main/dao/voting/dashboard/VotingDashboardView.fxml similarity index 82% rename from src/main/java/io/bisq/gui/main/dao/voting/dashboard/VotingDashboardView.fxml rename to src/main/java/bisq/desktop/main/dao/voting/dashboard/VotingDashboardView.fxml index 3a292dd9de..ee3f9e90cb 100644 --- a/src/main/java/io/bisq/gui/main/dao/voting/dashboard/VotingDashboardView.fxml +++ b/src/main/java/bisq/desktop/main/dao/voting/dashboard/VotingDashboardView.fxml @@ -17,8 +17,10 @@ ~ along with Bisq. If not, see . --> - - + + + - \ No newline at end of file + diff --git a/src/main/java/io/bisq/gui/main/dao/voting/dashboard/VotingDashboardView.java b/src/main/java/bisq/desktop/main/dao/voting/dashboard/VotingDashboardView.java similarity index 90% rename from src/main/java/io/bisq/gui/main/dao/voting/dashboard/VotingDashboardView.java rename to src/main/java/bisq/desktop/main/dao/voting/dashboard/VotingDashboardView.java index 8b2eb4e060..034979eaa2 100644 --- a/src/main/java/io/bisq/gui/main/dao/voting/dashboard/VotingDashboardView.java +++ b/src/main/java/bisq/desktop/main/dao/voting/dashboard/VotingDashboardView.java @@ -15,14 +15,15 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.voting.dashboard; +package bisq.desktop.main.dao.voting.dashboard; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import javafx.scene.layout.GridPane; +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; import javax.inject.Inject; +import javafx.scene.layout.GridPane; + @FxmlView public class VotingDashboardView extends ActivatableView { diff --git a/src/main/java/io/bisq/gui/main/dao/voting/history/VotingHistoryView.fxml b/src/main/java/bisq/desktop/main/dao/voting/history/VotingHistoryView.fxml similarity index 83% rename from src/main/java/io/bisq/gui/main/dao/voting/history/VotingHistoryView.fxml rename to src/main/java/bisq/desktop/main/dao/voting/history/VotingHistoryView.fxml index f2e2808b8f..dbae0652b5 100644 --- a/src/main/java/io/bisq/gui/main/dao/voting/history/VotingHistoryView.fxml +++ b/src/main/java/bisq/desktop/main/dao/voting/history/VotingHistoryView.fxml @@ -17,9 +17,10 @@ ~ along with Bisq. If not, see . --> - - - + + +. */ -package io.bisq.gui.main.dao.voting.history; +package bisq.desktop.main.dao.voting.history; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import javafx.scene.layout.GridPane; +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; import javax.inject.Inject; +import javafx.scene.layout.GridPane; + @FxmlView public class VotingHistoryView extends ActivatableView { - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/main/java/io/bisq/gui/main/dao/voting/vote/CompensationViewItem.java b/src/main/java/bisq/desktop/main/dao/voting/vote/CompensationViewItem.java similarity index 88% rename from src/main/java/io/bisq/gui/main/dao/voting/vote/CompensationViewItem.java rename to src/main/java/bisq/desktop/main/dao/voting/vote/CompensationViewItem.java index 024726b28a..b2cfe349a5 100644 --- a/src/main/java/io/bisq/gui/main/dao/voting/vote/CompensationViewItem.java +++ b/src/main/java/bisq/desktop/main/dao/voting/vote/CompensationViewItem.java @@ -15,33 +15,46 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.voting.vote; +package bisq.desktop.main.dao.voting.vote; + +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipCheckBox; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.main.MainView; +import bisq.desktop.main.dao.compensation.CompensationRequestDisplay; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.Layout; + +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.dao.request.compensation.CompensationRequest; +import bisq.core.dao.request.compensation.CompensationRequestPayload; +import bisq.core.dao.vote.CompensationRequestVoteItem; + +import bisq.common.locale.Res; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.dao.request.compensation.CompensationRequest; -import io.bisq.core.dao.request.compensation.CompensationRequestPayload; -import io.bisq.core.dao.vote.CompensationRequestVoteItem; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.AutoTooltipCheckBox; -import io.bisq.gui.components.HyperlinkWithIcon; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.dao.compensation.CompensationRequestDisplay; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.Layout; -import javafx.beans.property.DoubleProperty; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.scene.Scene; -import javafx.scene.control.Button; -import javafx.scene.control.CheckBox; -import javafx.scene.layout.*; + import javafx.stage.Modality; import javafx.stage.Stage; import javafx.stage.StageStyle; import javafx.stage.Window; +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.control.CheckBox; +import javafx.scene.layout.AnchorPane; +import javafx.scene.layout.ColumnConstraints; +import javafx.scene.layout.GridPane; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Pane; +import javafx.scene.layout.Priority; +import javafx.scene.layout.VBox; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; + +import javafx.beans.property.DoubleProperty; + import java.util.ArrayList; import java.util.List; @@ -123,8 +136,8 @@ public class CompensationViewItem { Scene scene = new Scene(anchorPane); scene.getStylesheets().setAll( - "/io/bisq/gui/bisq.css", - "/io/bisq/gui/images.css"); + "/bisq/desktop/bisq.css", + "/bisq/desktop/images.css"); Stage stage = new Stage(); stage.setTitle(Res.get("dao.voting.item.stage.title", compensationRequestPayload.getShortId())); stage.setScene(scene); diff --git a/src/main/java/io/bisq/gui/main/dao/voting/vote/ParameterViewItem.java b/src/main/java/bisq/desktop/main/dao/voting/vote/ParameterViewItem.java similarity index 95% rename from src/main/java/io/bisq/gui/main/dao/voting/vote/ParameterViewItem.java rename to src/main/java/bisq/desktop/main/dao/voting/vote/ParameterViewItem.java index 936eef776c..ff1f340698 100644 --- a/src/main/java/io/bisq/gui/main/dao/voting/vote/ParameterViewItem.java +++ b/src/main/java/bisq/desktop/main/dao/voting/vote/ParameterViewItem.java @@ -15,31 +15,38 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.voting.vote; +package bisq.desktop.main.dao.voting.vote; + +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.InputTextField; + +import bisq.core.dao.vote.VoteItem; +import bisq.core.dao.vote.VotingDefaultValues; + +import bisq.common.UserThread; +import bisq.common.locale.Res; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.core.dao.vote.VoteItem; -import io.bisq.core.dao.vote.VotingDefaultValues; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.InputTextField; -import javafx.beans.property.DoubleProperty; -import javafx.beans.value.ChangeListener; -import javafx.geometry.Insets; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.Slider; import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; import javafx.scene.layout.VBox; + +import javafx.geometry.Insets; + +import javafx.beans.property.DoubleProperty; +import javafx.beans.value.ChangeListener; + import javafx.util.StringConverter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class ParameterViewItem { private static final Logger log = LoggerFactory.getLogger(ParameterViewItem.class); diff --git a/src/main/java/io/bisq/gui/main/dao/voting/vote/VoteView.fxml b/src/main/java/bisq/desktop/main/dao/voting/vote/VoteView.fxml similarity index 84% rename from src/main/java/io/bisq/gui/main/dao/voting/vote/VoteView.fxml rename to src/main/java/bisq/desktop/main/dao/voting/vote/VoteView.fxml index 8902231b8b..42c0593329 100644 --- a/src/main/java/io/bisq/gui/main/dao/voting/vote/VoteView.fxml +++ b/src/main/java/bisq/desktop/main/dao/voting/vote/VoteView.fxml @@ -18,8 +18,10 @@ --> - - + + +. */ -package io.bisq.gui.main.dao.voting.vote; +package bisq.desktop.main.dao.voting.vote; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.TitledGroupBg; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Layout; + +import bisq.core.btc.exceptions.TransactionVerificationException; +import bisq.core.btc.exceptions.WalletException; +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.WalletsSetup; +import bisq.core.dao.request.compensation.CompensationRequest; +import bisq.core.dao.request.compensation.CompensationRequestManager; +import bisq.core.dao.vote.CompensationRequestVoteItem; +import bisq.core.dao.vote.CompensationRequestVoteItemCollection; +import bisq.core.dao.vote.VoteItem; +import bisq.core.dao.vote.VoteItemsList; +import bisq.core.dao.vote.VotingManager; +import bisq.core.provider.fee.FeeService; +import bisq.core.util.CoinUtil; + +import bisq.network.p2p.P2PService; + +import bisq.common.UserThread; +import bisq.common.locale.Res; + +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.InsufficientMoneyException; +import org.bitcoinj.core.Transaction; + +import javax.inject.Inject; import com.google.common.util.concurrent.FutureCallback; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.exceptions.TransactionVerificationException; -import io.bisq.core.btc.exceptions.WalletException; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.WalletsSetup; -import io.bisq.core.dao.request.compensation.CompensationRequest; -import io.bisq.core.dao.request.compensation.CompensationRequestManager; -import io.bisq.core.dao.vote.*; -import io.bisq.core.provider.fee.FeeService; -import io.bisq.core.util.CoinUtil; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.TitledGroupBg; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.Layout; -import io.bisq.network.p2p.P2PService; -import javafx.beans.property.DoubleProperty; -import javafx.beans.property.SimpleDoubleProperty; -import javafx.beans.value.ChangeListener; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; -import javafx.geometry.Insets; + import javafx.scene.control.Button; import javafx.scene.control.ComboBox; import javafx.scene.control.SingleSelectionModel; import javafx.scene.layout.GridPane; import javafx.scene.layout.VBox; + +import javafx.geometry.Insets; + +import javafx.beans.property.DoubleProperty; +import javafx.beans.property.SimpleDoubleProperty; +import javafx.beans.value.ChangeListener; + +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; + import javafx.util.StringConverter; -import org.bitcoinj.core.Coin; -import org.bitcoinj.core.InsufficientMoneyException; -import org.bitcoinj.core.Transaction; + +import java.io.IOException; + +import java.util.List; + import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; -import javax.inject.Inject; -import java.io.IOException; -import java.util.List; +import static bisq.desktop.util.FormBuilder.addButtonAfterGroup; +import static bisq.desktop.util.FormBuilder.addLabelComboBox; +import static bisq.desktop.util.FormBuilder.addTitledGroupBg; import static com.google.common.base.Preconditions.checkNotNull; -import static io.bisq.gui.util.FormBuilder.*; import static javafx.beans.binding.Bindings.createBooleanBinding; @FxmlView diff --git a/src/main/java/io/bisq/gui/main/dao/wallet/BsqBalanceUtil.java b/src/main/java/bisq/desktop/main/dao/wallet/BsqBalanceUtil.java similarity index 89% rename from src/main/java/io/bisq/gui/main/dao/wallet/BsqBalanceUtil.java rename to src/main/java/bisq/desktop/main/dao/wallet/BsqBalanceUtil.java index 84ab5ad369..3bc20b5a4c 100644 --- a/src/main/java/io/bisq/gui/main/dao/wallet/BsqBalanceUtil.java +++ b/src/main/java/bisq/desktop/main/dao/wallet/BsqBalanceUtil.java @@ -15,23 +15,29 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.wallet; +package bisq.desktop.main.dao.wallet; + +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.Layout; + +import bisq.core.btc.wallet.BsqBalanceListener; +import bisq.core.btc.wallet.BsqWalletService; + +import bisq.common.locale.Res; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.wallet.BsqBalanceListener; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.Layout; -import javafx.geometry.Pos; -import javafx.scene.control.TextField; -import javafx.scene.layout.GridPane; -import lombok.extern.slf4j.Slf4j; import org.bitcoinj.core.Coin; import javax.inject.Inject; -import static io.bisq.gui.util.FormBuilder.addLabelTextField; -import static io.bisq.gui.util.FormBuilder.addTitledGroupBg; +import javafx.scene.control.TextField; +import javafx.scene.layout.GridPane; + +import javafx.geometry.Pos; + +import lombok.extern.slf4j.Slf4j; + +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addTitledGroupBg; @Slf4j public class BsqBalanceUtil implements BsqBalanceListener { diff --git a/src/main/java/io/bisq/gui/main/dao/wallet/BsqWalletView.fxml b/src/main/java/bisq/desktop/main/dao/wallet/BsqWalletView.fxml similarity index 87% rename from src/main/java/io/bisq/gui/main/dao/wallet/BsqWalletView.fxml rename to src/main/java/bisq/desktop/main/dao/wallet/BsqWalletView.fxml index b836df1fdf..cd519d16ed 100644 --- a/src/main/java/io/bisq/gui/main/dao/wallet/BsqWalletView.fxml +++ b/src/main/java/bisq/desktop/main/dao/wallet/BsqWalletView.fxml @@ -18,8 +18,9 @@ --> - - + + diff --git a/src/main/java/io/bisq/gui/main/dao/wallet/BsqWalletView.java b/src/main/java/bisq/desktop/main/dao/wallet/BsqWalletView.java similarity index 89% rename from src/main/java/io/bisq/gui/main/dao/wallet/BsqWalletView.java rename to src/main/java/bisq/desktop/main/dao/wallet/BsqWalletView.java index c1ffa83142..40b8607e99 100644 --- a/src/main/java/io/bisq/gui/main/dao/wallet/BsqWalletView.java +++ b/src/main/java/bisq/desktop/main/dao/wallet/BsqWalletView.java @@ -15,34 +15,45 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.wallet; +package bisq.desktop.main.dao.wallet; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.common.view.ViewPath; +import bisq.desktop.components.AutoTooltipToggleButton; +import bisq.desktop.main.MainView; +import bisq.desktop.main.dao.DaoView; +import bisq.desktop.main.dao.wallet.dashboard.BsqDashboardView; +import bisq.desktop.main.dao.wallet.receive.BsqReceiveView; +import bisq.desktop.main.dao.wallet.send.BsqSendView; +import bisq.desktop.main.dao.wallet.tx.BsqTxView; +import bisq.desktop.util.Colors; + +import bisq.core.app.BisqEnvironment; + +import bisq.common.locale.Res; + +import javax.inject.Inject; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.*; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.AutoTooltipToggleButton; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.dao.DaoView; -import io.bisq.gui.main.dao.wallet.dashboard.BsqDashboardView; -import io.bisq.gui.main.dao.wallet.receive.BsqReceiveView; -import io.bisq.gui.main.dao.wallet.send.BsqSendView; -import io.bisq.gui.main.dao.wallet.tx.BsqTxView; -import io.bisq.gui.util.Colors; -import javafx.beans.value.ChangeListener; + import javafx.fxml.FXML; -import javafx.geometry.Insets; -import javafx.geometry.Pos; + import javafx.scene.control.Label; import javafx.scene.control.ToggleGroup; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.VBox; import javafx.scene.paint.Paint; -import javax.inject.Inject; +import javafx.geometry.Insets; +import javafx.geometry.Pos; + +import javafx.beans.value.ChangeListener; @FxmlView public class BsqWalletView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/dao/wallet/dashboard/BsqDashboardView.fxml b/src/main/java/bisq/desktop/main/dao/wallet/dashboard/BsqDashboardView.fxml similarity index 82% rename from src/main/java/io/bisq/gui/main/dao/wallet/dashboard/BsqDashboardView.fxml rename to src/main/java/bisq/desktop/main/dao/wallet/dashboard/BsqDashboardView.fxml index 2ce1ca3c90..bb59f975fe 100644 --- a/src/main/java/io/bisq/gui/main/dao/wallet/dashboard/BsqDashboardView.fxml +++ b/src/main/java/bisq/desktop/main/dao/wallet/dashboard/BsqDashboardView.fxml @@ -17,8 +17,10 @@ ~ along with Bisq. If not, see . --> - - + + + - \ No newline at end of file + diff --git a/src/main/java/io/bisq/gui/main/dao/wallet/dashboard/BsqDashboardView.java b/src/main/java/bisq/desktop/main/dao/wallet/dashboard/BsqDashboardView.java similarity index 87% rename from src/main/java/io/bisq/gui/main/dao/wallet/dashboard/BsqDashboardView.java rename to src/main/java/bisq/desktop/main/dao/wallet/dashboard/BsqDashboardView.java index 580e6d3187..ecb1e6e48e 100644 --- a/src/main/java/io/bisq/gui/main/dao/wallet/dashboard/BsqDashboardView.java +++ b/src/main/java/bisq/desktop/main/dao/wallet/dashboard/BsqDashboardView.java @@ -15,40 +15,47 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.wallet.dashboard; +package bisq.desktop.main.dao.wallet.dashboard; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.main.dao.wallet.BsqBalanceUtil; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Layout; + +import bisq.core.dao.blockchain.BsqBlockChain; +import bisq.core.dao.blockchain.BsqBlockChainListener; +import bisq.core.dao.node.BsqNode; +import bisq.core.dao.node.BsqNodeProvider; +import bisq.core.provider.price.MarketPrice; +import bisq.core.provider.price.PriceFeedService; +import bisq.core.user.Preferences; + +import bisq.common.locale.Res; +import bisq.common.monetary.Altcoin; +import bisq.common.monetary.Price; +import bisq.common.util.MathUtils; -import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.common.monetary.Altcoin; -import io.bisq.common.monetary.Price; -import io.bisq.common.util.MathUtils; -import io.bisq.core.dao.blockchain.BsqBlockChain; -import io.bisq.core.dao.blockchain.BsqBlockChainListener; -import io.bisq.core.dao.node.BsqNode; -import io.bisq.core.dao.node.BsqNodeProvider; -import io.bisq.core.provider.price.MarketPrice; -import io.bisq.core.provider.price.PriceFeedService; -import io.bisq.core.user.Preferences; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.HyperlinkWithIcon; -import io.bisq.gui.main.dao.wallet.BsqBalanceUtil; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.Layout; -import javafx.beans.value.ChangeListener; -import javafx.geometry.Insets; -import javafx.scene.control.Label; -import javafx.scene.control.TextField; -import javafx.scene.control.Tooltip; -import javafx.scene.layout.GridPane; import org.bitcoinj.core.Coin; import javax.inject.Inject; -import static io.bisq.gui.util.FormBuilder.addLabelTextField; -import static io.bisq.gui.util.FormBuilder.addTitledGroupBg; +import de.jensd.fx.fontawesome.AwesomeIcon; + +import javafx.scene.control.Label; +import javafx.scene.control.TextField; +import javafx.scene.control.Tooltip; +import javafx.scene.layout.GridPane; + +import javafx.geometry.Insets; + +import javafx.beans.value.ChangeListener; + +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addTitledGroupBg; @FxmlView public class BsqDashboardView extends ActivatableView implements BsqBlockChainListener { diff --git a/src/main/java/io/bisq/gui/main/dao/wallet/receive/BsqReceiveView.fxml b/src/main/java/bisq/desktop/main/dao/wallet/receive/BsqReceiveView.fxml similarity index 83% rename from src/main/java/io/bisq/gui/main/dao/wallet/receive/BsqReceiveView.fxml rename to src/main/java/bisq/desktop/main/dao/wallet/receive/BsqReceiveView.fxml index ca5eb1de17..65647c4a25 100644 --- a/src/main/java/io/bisq/gui/main/dao/wallet/receive/BsqReceiveView.fxml +++ b/src/main/java/bisq/desktop/main/dao/wallet/receive/BsqReceiveView.fxml @@ -18,8 +18,10 @@ --> - - + + +. */ -package io.bisq.gui.main.dao.wallet.receive; +package bisq.desktop.main.dao.wallet.receive; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.BsqAddressTextField; -import io.bisq.gui.main.dao.wallet.BsqBalanceUtil; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.Layout; -import javafx.scene.layout.GridPane; +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.BsqAddressTextField; +import bisq.desktop.main.dao.wallet.BsqBalanceUtil; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.Layout; + +import bisq.core.btc.wallet.BsqWalletService; + +import bisq.common.locale.Res; import javax.inject.Inject; -import static io.bisq.gui.util.FormBuilder.addLabelBsqAddressTextField; -import static io.bisq.gui.util.FormBuilder.addTitledGroupBg; +import javafx.scene.layout.GridPane; + +import static bisq.desktop.util.FormBuilder.addLabelBsqAddressTextField; +import static bisq.desktop.util.FormBuilder.addTitledGroupBg; @FxmlView public class BsqReceiveView extends ActivatableView { @@ -42,7 +45,6 @@ public class BsqReceiveView extends ActivatableView { private final String paymentLabelString; private int gridRow = 0; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/main/java/io/bisq/gui/main/dao/wallet/send/BsqSendView.fxml b/src/main/java/bisq/desktop/main/dao/wallet/send/BsqSendView.fxml similarity index 84% rename from src/main/java/io/bisq/gui/main/dao/wallet/send/BsqSendView.fxml rename to src/main/java/bisq/desktop/main/dao/wallet/send/BsqSendView.fxml index 7464b7ac1f..13ab468ba5 100644 --- a/src/main/java/io/bisq/gui/main/dao/wallet/send/BsqSendView.fxml +++ b/src/main/java/bisq/desktop/main/dao/wallet/send/BsqSendView.fxml @@ -18,8 +18,10 @@ --> - - + + +. */ -package io.bisq.gui.main.dao.wallet.send; +package bisq.desktop.main.dao.wallet.send; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.MainView; +import bisq.desktop.main.dao.wallet.BsqBalanceUtil; +import bisq.desktop.main.funds.FundsView; +import bisq.desktop.main.funds.deposit.DepositView; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Layout; +import bisq.desktop.util.validation.BsqAddressValidator; +import bisq.desktop.util.validation.BsqValidator; + +import bisq.core.btc.Restrictions; +import bisq.core.btc.wallet.BsqBalanceListener; +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.WalletsSetup; +import bisq.core.util.CoinUtil; + +import bisq.network.p2p.P2PService; + +import bisq.common.locale.Res; -import com.google.common.util.concurrent.FutureCallback; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.Restrictions; -import io.bisq.core.btc.wallet.BsqBalanceListener; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.WalletsSetup; -import io.bisq.core.util.CoinUtil; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.dao.wallet.BsqBalanceUtil; -import io.bisq.gui.main.funds.FundsView; -import io.bisq.gui.main.funds.deposit.DepositView; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.validation.BsqAddressValidator; -import io.bisq.gui.util.validation.BsqValidator; -import io.bisq.network.p2p.P2PService; -import javafx.beans.value.ChangeListener; -import javafx.scene.control.Button; -import javafx.scene.layout.GridPane; import org.bitcoinj.core.Coin; import org.bitcoinj.core.InsufficientMoneyException; import org.bitcoinj.core.Transaction; + +import javax.inject.Inject; + +import com.google.common.util.concurrent.FutureCallback; + +import javafx.scene.control.Button; +import javafx.scene.layout.GridPane; + +import javafx.beans.value.ChangeListener; + import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; -import javax.inject.Inject; -import static io.bisq.gui.util.FormBuilder.*; +import static bisq.desktop.util.FormBuilder.addButtonAfterGroup; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addTitledGroupBg; @FxmlView public class BsqSendView extends ActivatableView { @@ -74,7 +85,6 @@ public class BsqSendView extends ActivatableView { private ChangeListener focusOutListener; private BsqBalanceListener balanceListener; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/main/java/io/bisq/gui/main/dao/wallet/tx/BsqTxListItem.java b/src/main/java/bisq/desktop/main/dao/wallet/tx/BsqTxListItem.java similarity index 92% rename from src/main/java/io/bisq/gui/main/dao/wallet/tx/BsqTxListItem.java rename to src/main/java/bisq/desktop/main/dao/wallet/tx/BsqTxListItem.java index 17faf4086d..8f5bbb6159 100644 --- a/src/main/java/io/bisq/gui/main/dao/wallet/tx/BsqTxListItem.java +++ b/src/main/java/bisq/desktop/main/dao/wallet/tx/BsqTxListItem.java @@ -15,31 +15,36 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.dao.wallet.tx; +package bisq.desktop.main.dao.wallet.tx; + +import bisq.desktop.components.indicator.TxConfidenceIndicator; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.core.btc.listeners.TxConfidenceListener; +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.WalletService; +import bisq.core.dao.blockchain.BsqBlockChain; +import bisq.core.dao.blockchain.vo.TxType; + +import bisq.common.locale.Res; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.listeners.TxConfidenceListener; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.WalletService; -import io.bisq.core.dao.blockchain.BsqBlockChain; -import io.bisq.core.dao.blockchain.vo.TxType; -import io.bisq.gui.components.indicator.TxConfidenceIndicator; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.GUIUtil; -import javafx.scene.control.Tooltip; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.ToString; -import lombok.extern.slf4j.Slf4j; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; import org.bitcoinj.core.TransactionConfidence; import org.bitcoinj.core.TransactionOutput; +import javafx.scene.control.Tooltip; + import java.util.Date; import java.util.Optional; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.ToString; +import lombok.extern.slf4j.Slf4j; + import static com.google.common.base.Preconditions.checkNotNull; diff --git a/src/main/java/io/bisq/gui/main/dao/wallet/tx/BsqTxView.fxml b/src/main/java/bisq/desktop/main/dao/wallet/tx/BsqTxView.fxml similarity index 84% rename from src/main/java/io/bisq/gui/main/dao/wallet/tx/BsqTxView.fxml rename to src/main/java/bisq/desktop/main/dao/wallet/tx/BsqTxView.fxml index 897c5ecfec..c2f99a220f 100644 --- a/src/main/java/io/bisq/gui/main/dao/wallet/tx/BsqTxView.fxml +++ b/src/main/java/bisq/desktop/main/dao/wallet/tx/BsqTxView.fxml @@ -17,8 +17,10 @@ ~ along with Bisq. If not, see . --> - - + + +. */ -package io.bisq.gui.main.dao.wallet.tx; +package bisq.desktop.main.dao.wallet.tx; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AddressWithIconAndDirection; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.AutoTooltipTableColumn; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.main.dao.wallet.BsqBalanceUtil; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.GUIUtil; + +import bisq.core.app.BisqEnvironment; +import bisq.core.btc.wallet.BsqBalanceListener; +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.dao.blockchain.BsqBlockChain; +import bisq.core.dao.blockchain.BsqBlockChainListener; +import bisq.core.dao.blockchain.vo.TxType; +import bisq.core.dao.node.BsqNode; +import bisq.core.dao.node.BsqNodeProvider; +import bisq.core.user.Preferences; + +import bisq.common.locale.Res; + +import org.bitcoinj.core.Transaction; + +import javax.inject.Inject; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.btc.wallet.BsqBalanceListener; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.dao.blockchain.BsqBlockChain; -import io.bisq.core.dao.blockchain.BsqBlockChainListener; -import io.bisq.core.dao.blockchain.vo.TxType; -import io.bisq.core.dao.node.BsqNode; -import io.bisq.core.dao.node.BsqNodeProvider; -import io.bisq.core.user.Preferences; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.AddressWithIconAndDirection; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.AutoTooltipTableColumn; -import io.bisq.gui.components.HyperlinkWithIcon; -import io.bisq.gui.main.dao.wallet.BsqBalanceUtil; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.FormBuilder; -import io.bisq.gui.util.GUIUtil; -import javafx.beans.property.DoubleProperty; -import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.beans.property.SimpleDoubleProperty; -import javafx.beans.value.ChangeListener; -import javafx.collections.FXCollections; -import javafx.collections.ListChangeListener; -import javafx.collections.ObservableList; -import javafx.collections.transformation.SortedList; -import javafx.geometry.Insets; -import javafx.scene.control.*; + +import javafx.scene.control.Label; +import javafx.scene.control.ProgressBar; +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.control.Tooltip; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.scene.layout.VBox; -import javafx.util.Callback; -import org.bitcoinj.core.Transaction; -import javax.inject.Inject; +import javafx.geometry.Insets; + +import javafx.beans.property.DoubleProperty; +import javafx.beans.property.ReadOnlyObjectWrapper; +import javafx.beans.property.SimpleDoubleProperty; +import javafx.beans.value.ChangeListener; + +import javafx.collections.FXCollections; +import javafx.collections.ListChangeListener; +import javafx.collections.ObservableList; +import javafx.collections.transformation.SortedList; + +import javafx.util.Callback; + import java.util.ArrayList; import java.util.List; import java.util.Set; diff --git a/src/main/java/io/bisq/gui/main/debug/DebugView.fxml b/src/main/java/bisq/desktop/main/debug/DebugView.fxml similarity index 87% rename from src/main/java/io/bisq/gui/main/debug/DebugView.fxml rename to src/main/java/bisq/desktop/main/debug/DebugView.fxml index 7ad1497c2f..67afa46b04 100644 --- a/src/main/java/io/bisq/gui/main/debug/DebugView.fxml +++ b/src/main/java/bisq/desktop/main/debug/DebugView.fxml @@ -17,9 +17,10 @@ ~ along with Bisq. If not, see . --> + + - -. */ -package io.bisq.gui.main.debug; +package bisq.desktop.main.debug; -import io.bisq.common.taskrunner.Task; -import io.bisq.core.offer.availability.tasks.ProcessOfferAvailabilityResponse; -import io.bisq.core.offer.availability.tasks.SendOfferAvailabilityRequest; -import io.bisq.core.offer.placeoffer.tasks.AddToOfferBook; -import io.bisq.core.offer.placeoffer.tasks.CreateMakerFeeTx; -import io.bisq.core.offer.placeoffer.tasks.ValidateOffer; -import io.bisq.core.trade.protocol.tasks.CheckIfPeerIsBanned; -import io.bisq.core.trade.protocol.tasks.PublishTradeStatistics; -import io.bisq.core.trade.protocol.tasks.buyer.BuyerSendCounterCurrencyTransferStartedMessage; -import io.bisq.core.trade.protocol.tasks.buyer.BuyerSetupPayoutTxListener; -import io.bisq.core.trade.protocol.tasks.buyer_as_maker.BuyerAsMakerCreatesAndSignsDepositTx; -import io.bisq.core.trade.protocol.tasks.buyer_as_maker.BuyerAsMakerSignPayoutTx; -import io.bisq.core.trade.protocol.tasks.buyer_as_taker.BuyerAsTakerCreatesDepositTxInputs; -import io.bisq.core.trade.protocol.tasks.buyer_as_taker.BuyerAsTakerSignAndPublishDepositTx; -import io.bisq.core.trade.protocol.tasks.maker.*; -import io.bisq.core.trade.protocol.tasks.seller.SellerBroadcastPayoutTx; -import io.bisq.core.trade.protocol.tasks.seller.SellerProcessCounterCurrencyTransferStartedMessage; -import io.bisq.core.trade.protocol.tasks.seller.SellerSendPayoutTxPublishedMessage; -import io.bisq.core.trade.protocol.tasks.seller.SellerSignAndFinalizePayoutTx; -import io.bisq.core.trade.protocol.tasks.seller_as_maker.SellerAsMakerCreatesAndSignsDepositTx; -import io.bisq.core.trade.protocol.tasks.seller_as_taker.SellerAsTakerCreatesDepositTxInputs; -import io.bisq.core.trade.protocol.tasks.seller_as_taker.SellerAsTakerSignAndPublishDepositTx; -import io.bisq.core.trade.protocol.tasks.taker.*; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.common.view.InitializableView; -import io.bisq.gui.components.TitledGroupBg; -import io.bisq.gui.util.FormBuilder; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; -import javafx.fxml.FXML; -import javafx.scene.control.ComboBox; -import javafx.scene.layout.GridPane; -import javafx.util.StringConverter; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.InitializableView; +import bisq.desktop.components.TitledGroupBg; +import bisq.desktop.util.FormBuilder; + +import bisq.core.offer.availability.tasks.ProcessOfferAvailabilityResponse; +import bisq.core.offer.availability.tasks.SendOfferAvailabilityRequest; +import bisq.core.offer.placeoffer.tasks.AddToOfferBook; +import bisq.core.offer.placeoffer.tasks.CreateMakerFeeTx; +import bisq.core.offer.placeoffer.tasks.ValidateOffer; +import bisq.core.trade.protocol.tasks.CheckIfPeerIsBanned; +import bisq.core.trade.protocol.tasks.PublishTradeStatistics; +import bisq.core.trade.protocol.tasks.buyer.BuyerSendCounterCurrencyTransferStartedMessage; +import bisq.core.trade.protocol.tasks.buyer.BuyerSetupPayoutTxListener; +import bisq.core.trade.protocol.tasks.buyer_as_maker.BuyerAsMakerCreatesAndSignsDepositTx; +import bisq.core.trade.protocol.tasks.buyer_as_maker.BuyerAsMakerSignPayoutTx; +import bisq.core.trade.protocol.tasks.buyer_as_taker.BuyerAsTakerCreatesDepositTxInputs; +import bisq.core.trade.protocol.tasks.buyer_as_taker.BuyerAsTakerSignAndPublishDepositTx; +import bisq.core.trade.protocol.tasks.maker.MakerCreateAndSignContract; +import bisq.core.trade.protocol.tasks.maker.MakerProcessDepositTxPublishedMessage; +import bisq.core.trade.protocol.tasks.maker.MakerProcessPayDepositRequest; +import bisq.core.trade.protocol.tasks.maker.MakerSendPublishDepositTxRequest; +import bisq.core.trade.protocol.tasks.maker.MakerSetupDepositTxListener; +import bisq.core.trade.protocol.tasks.maker.MakerVerifyArbitratorSelection; +import bisq.core.trade.protocol.tasks.maker.MakerVerifyMediatorSelection; +import bisq.core.trade.protocol.tasks.maker.MakerVerifyTakerAccount; +import bisq.core.trade.protocol.tasks.maker.MakerVerifyTakerFeePayment; +import bisq.core.trade.protocol.tasks.seller.SellerBroadcastPayoutTx; +import bisq.core.trade.protocol.tasks.seller.SellerProcessCounterCurrencyTransferStartedMessage; +import bisq.core.trade.protocol.tasks.seller.SellerSendPayoutTxPublishedMessage; +import bisq.core.trade.protocol.tasks.seller.SellerSignAndFinalizePayoutTx; +import bisq.core.trade.protocol.tasks.seller_as_maker.SellerAsMakerCreatesAndSignsDepositTx; +import bisq.core.trade.protocol.tasks.seller_as_taker.SellerAsTakerCreatesDepositTxInputs; +import bisq.core.trade.protocol.tasks.seller_as_taker.SellerAsTakerSignAndPublishDepositTx; +import bisq.core.trade.protocol.tasks.taker.CreateTakerFeeTx; +import bisq.core.trade.protocol.tasks.taker.TakerProcessPublishDepositTxRequest; +import bisq.core.trade.protocol.tasks.taker.TakerSelectArbitrator; +import bisq.core.trade.protocol.tasks.taker.TakerSelectMediator; +import bisq.core.trade.protocol.tasks.taker.TakerSendDepositTxPublishedMessage; +import bisq.core.trade.protocol.tasks.taker.TakerSendPayDepositRequest; +import bisq.core.trade.protocol.tasks.taker.TakerVerifyAndSignContract; +import bisq.core.trade.protocol.tasks.taker.TakerVerifyMakerAccount; +import bisq.core.trade.protocol.tasks.taker.TakerVerifyMakerFeePayment; + +import bisq.common.taskrunner.Task; import javax.inject.Inject; + +import javafx.fxml.FXML; + +import javafx.scene.control.ComboBox; +import javafx.scene.layout.GridPane; + +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; + +import javafx.util.StringConverter; + import java.util.Arrays; @FxmlView diff --git a/src/main/java/io/bisq/gui/main/disputes/DisputesView.fxml b/src/main/java/bisq/desktop/main/disputes/DisputesView.fxml similarity index 93% rename from src/main/java/io/bisq/gui/main/disputes/DisputesView.fxml rename to src/main/java/bisq/desktop/main/disputes/DisputesView.fxml index 5a374c9b7b..49ec3a39dc 100644 --- a/src/main/java/io/bisq/gui/main/disputes/DisputesView.fxml +++ b/src/main/java/bisq/desktop/main/disputes/DisputesView.fxml @@ -17,11 +17,10 @@ ~ along with Bisq. If not, see . --> - - diff --git a/src/main/java/io/bisq/gui/main/disputes/DisputesView.java b/src/main/java/bisq/desktop/main/disputes/DisputesView.java similarity index 87% rename from src/main/java/io/bisq/gui/main/disputes/DisputesView.java rename to src/main/java/bisq/desktop/main/disputes/DisputesView.java index f1ec4669a9..3f28b0f71f 100644 --- a/src/main/java/io/bisq/gui/main/disputes/DisputesView.java +++ b/src/main/java/bisq/desktop/main/disputes/DisputesView.java @@ -15,29 +15,40 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.disputes; +package bisq.desktop.main.disputes; + +import bisq.desktop.Navigation; +import bisq.desktop.common.model.Activatable; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.main.MainView; +import bisq.desktop.main.disputes.arbitrator.ArbitratorDisputeView; +import bisq.desktop.main.disputes.trader.TraderDisputeView; +import bisq.desktop.main.overlays.popups.Popup; + +import bisq.core.arbitration.Arbitrator; +import bisq.core.arbitration.ArbitratorManager; +import bisq.core.arbitration.DisputeManager; + +import bisq.network.p2p.NodeAddress; + +import bisq.common.app.DevEnv; +import bisq.common.crypto.KeyRing; +import bisq.common.locale.Res; + +import javax.inject.Inject; -import io.bisq.common.app.DevEnv; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.locale.Res; -import io.bisq.core.arbitration.Arbitrator; -import io.bisq.core.arbitration.ArbitratorManager; -import io.bisq.core.arbitration.DisputeManager; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.model.Activatable; -import io.bisq.gui.common.view.*; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.disputes.arbitrator.ArbitratorDisputeView; -import io.bisq.gui.main.disputes.trader.TraderDisputeView; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.network.p2p.NodeAddress; -import javafx.beans.value.ChangeListener; -import javafx.collections.MapChangeListener; import javafx.fxml.FXML; + import javafx.scene.control.Tab; import javafx.scene.control.TabPane; -import javax.inject.Inject; +import javafx.beans.value.ChangeListener; + +import javafx.collections.MapChangeListener; // will be probably only used for arbitration communication, will be renamed and the icon changed @FxmlView diff --git a/src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.fxml b/src/main/java/bisq/desktop/main/disputes/arbitrator/ArbitratorDisputeView.fxml similarity index 91% rename from src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.fxml rename to src/main/java/bisq/desktop/main/disputes/arbitrator/ArbitratorDisputeView.fxml index 892626fc2c..216a94bfff 100644 --- a/src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.fxml +++ b/src/main/java/bisq/desktop/main/disputes/arbitrator/ArbitratorDisputeView.fxml @@ -17,10 +17,9 @@ ~ along with Bisq. If not, see . --> - - - + diff --git a/src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.java b/src/main/java/bisq/desktop/main/disputes/arbitrator/ArbitratorDisputeView.java similarity index 81% rename from src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.java rename to src/main/java/bisq/desktop/main/disputes/arbitrator/ArbitratorDisputeView.java index d89cd891fb..02a79c7142 100644 --- a/src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.java +++ b/src/main/java/bisq/desktop/main/disputes/arbitrator/ArbitratorDisputeView.java @@ -15,25 +15,30 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.disputes.arbitrator; +package bisq.desktop.main.disputes.arbitrator; + +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.main.disputes.trader.TraderDisputeView; +import bisq.desktop.main.overlays.windows.ContractWindow; +import bisq.desktop.main.overlays.windows.DisputeSummaryWindow; +import bisq.desktop.main.overlays.windows.TradeDetailsWindow; +import bisq.desktop.util.BSFormatter; + +import bisq.core.alert.PrivateNotificationManager; +import bisq.core.app.AppOptionKeys; +import bisq.core.arbitration.DisputeManager; +import bisq.core.trade.TradeManager; + +import bisq.network.p2p.P2PService; + +import bisq.common.crypto.KeyRing; import com.google.inject.name.Named; -import io.bisq.common.crypto.KeyRing; -import io.bisq.core.alert.PrivateNotificationManager; -import io.bisq.core.app.AppOptionKeys; -import io.bisq.core.arbitration.DisputeManager; -import io.bisq.core.trade.TradeManager; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.main.disputes.trader.TraderDisputeView; -import io.bisq.gui.main.overlays.windows.ContractWindow; -import io.bisq.gui.main.overlays.windows.DisputeSummaryWindow; -import io.bisq.gui.main.overlays.windows.TradeDetailsWindow; -import io.bisq.gui.util.BSFormatter; -import io.bisq.network.p2p.P2PService; -import javafx.stage.Stage; import javax.inject.Inject; +import javafx.stage.Stage; + @FxmlView public class ArbitratorDisputeView extends TraderDisputeView { diff --git a/src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.fxml b/src/main/java/bisq/desktop/main/disputes/trader/TraderDisputeView.fxml similarity index 91% rename from src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.fxml rename to src/main/java/bisq/desktop/main/disputes/trader/TraderDisputeView.fxml index ca7dfb452f..66fd277a5c 100644 --- a/src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.fxml +++ b/src/main/java/bisq/desktop/main/disputes/trader/TraderDisputeView.fxml @@ -17,10 +17,9 @@ ~ along with Bisq. If not, see . --> - - - + diff --git a/src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.java b/src/main/java/bisq/desktop/main/disputes/trader/TraderDisputeView.java similarity index 96% rename from src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.java rename to src/main/java/bisq/desktop/main/disputes/trader/TraderDisputeView.java index 84f0df9a2c..7178a349e8 100644 --- a/src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.java +++ b/src/main/java/bisq/desktop/main/disputes/trader/TraderDisputeView.java @@ -15,80 +15,122 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.disputes.trader; +package bisq.desktop.main.disputes.trader; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.AutoTooltipTableColumn; +import bisq.desktop.components.BusyAnimation; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.components.InputTextField; +import bisq.desktop.components.TableGroupHeadline; +import bisq.desktop.main.disputes.arbitrator.ArbitratorDisputeView; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.overlays.windows.ContractWindow; +import bisq.desktop.main.overlays.windows.DisputeSummaryWindow; +import bisq.desktop.main.overlays.windows.SendPrivateNotificationWindow; +import bisq.desktop.main.overlays.windows.TradeDetailsWindow; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.core.alert.PrivateNotificationManager; +import bisq.core.app.AppOptionKeys; +import bisq.core.arbitration.Attachment; +import bisq.core.arbitration.Dispute; +import bisq.core.arbitration.DisputeManager; +import bisq.core.arbitration.messages.DisputeCommunicationMessage; +import bisq.core.trade.Contract; +import bisq.core.trade.Trade; +import bisq.core.trade.TradeManager; + +import bisq.network.p2p.NodeAddress; +import bisq.network.p2p.P2PService; +import bisq.network.p2p.network.Connection; + +import bisq.common.Timer; +import bisq.common.UserThread; +import bisq.common.app.Version; +import bisq.common.crypto.KeyRing; +import bisq.common.crypto.PubKeyRing; +import bisq.common.locale.Res; +import bisq.common.util.Utilities; + +import com.google.inject.name.Named; + +import javax.inject.Inject; import com.google.common.collect.Lists; import com.google.common.io.ByteStreams; -import com.google.inject.name.Named; + import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.Timer; -import io.bisq.common.UserThread; -import io.bisq.common.app.Version; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Utilities; -import io.bisq.core.alert.PrivateNotificationManager; -import io.bisq.core.app.AppOptionKeys; -import io.bisq.core.arbitration.Attachment; -import io.bisq.core.arbitration.Dispute; -import io.bisq.core.arbitration.DisputeManager; -import io.bisq.core.arbitration.messages.DisputeCommunicationMessage; -import io.bisq.core.trade.Contract; -import io.bisq.core.trade.Trade; -import io.bisq.core.trade.TradeManager; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.*; -import io.bisq.gui.main.disputes.arbitrator.ArbitratorDisputeView; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.overlays.windows.ContractWindow; -import io.bisq.gui.main.overlays.windows.DisputeSummaryWindow; -import io.bisq.gui.main.overlays.windows.SendPrivateNotificationWindow; -import io.bisq.gui.main.overlays.windows.TradeDetailsWindow; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.network.p2p.NodeAddress; -import io.bisq.network.p2p.P2PService; -import io.bisq.network.p2p.network.Connection; + +import javafx.stage.FileChooser; +import javafx.stage.Stage; + +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.control.Label; +import javafx.scene.control.ListCell; +import javafx.scene.control.ListView; +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.control.TextArea; +import javafx.scene.control.Tooltip; +import javafx.scene.image.ImageView; +import javafx.scene.input.KeyCode; +import javafx.scene.input.KeyEvent; +import javafx.scene.layout.AnchorPane; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Pane; +import javafx.scene.layout.Priority; +import javafx.scene.layout.VBox; +import javafx.scene.paint.Paint; +import javafx.scene.text.TextAlignment; + +import javafx.geometry.Insets; + +import org.fxmisc.easybind.EasyBind; +import org.fxmisc.easybind.Subscription; + import javafx.beans.property.ReadOnlyBooleanProperty; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.value.ChangeListener; + +import javafx.event.EventHandler; + import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; import javafx.collections.transformation.FilteredList; import javafx.collections.transformation.SortedList; -import javafx.event.EventHandler; -import javafx.geometry.Insets; -import javafx.scene.Scene; -import javafx.scene.control.*; -import javafx.scene.image.ImageView; -import javafx.scene.input.KeyCode; -import javafx.scene.input.KeyEvent; -import javafx.scene.layout.*; -import javafx.scene.paint.Paint; -import javafx.scene.text.TextAlignment; -import javafx.stage.FileChooser; -import javafx.stage.Stage; -import javafx.util.Callback; -import org.fxmisc.easybind.EasyBind; -import org.fxmisc.easybind.Subscription; -import javax.annotation.Nullable; -import javax.inject.Inject; +import javafx.util.Callback; + import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; + import java.net.MalformedURLException; import java.net.URL; + import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.*; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; + // will be probably only used for arbitration communication, will be renamed and the icon changed @FxmlView public class TraderDisputeView extends ActivatableView { diff --git a/src/main/java/io/bisq/gui/main/funds/FundsView.fxml b/src/main/java/bisq/desktop/main/funds/FundsView.fxml similarity index 88% rename from src/main/java/io/bisq/gui/main/funds/FundsView.fxml rename to src/main/java/bisq/desktop/main/funds/FundsView.fxml index 5953074c96..715c9cc108 100644 --- a/src/main/java/io/bisq/gui/main/funds/FundsView.fxml +++ b/src/main/java/bisq/desktop/main/funds/FundsView.fxml @@ -16,9 +16,10 @@ ~ along with Bisq. If not, see . --> - + + - @@ -29,4 +30,4 @@ - \ No newline at end of file + diff --git a/src/main/java/io/bisq/gui/main/funds/FundsView.java b/src/main/java/bisq/desktop/main/funds/FundsView.java similarity index 88% rename from src/main/java/io/bisq/gui/main/funds/FundsView.java rename to src/main/java/bisq/desktop/main/funds/FundsView.java index 54ddccb06a..690bd09926 100644 --- a/src/main/java/io/bisq/gui/main/funds/FundsView.java +++ b/src/main/java/bisq/desktop/main/funds/FundsView.java @@ -15,24 +15,32 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds; +package bisq.desktop.main.funds; + +import bisq.desktop.Navigation; +import bisq.desktop.common.model.Activatable; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.main.MainView; +import bisq.desktop.main.funds.deposit.DepositView; +import bisq.desktop.main.funds.locked.LockedView; +import bisq.desktop.main.funds.reserved.ReservedView; +import bisq.desktop.main.funds.transactions.TransactionsView; +import bisq.desktop.main.funds.withdrawal.WithdrawalView; + +import bisq.common.locale.Res; + +import javax.inject.Inject; -import io.bisq.common.locale.Res; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.model.Activatable; -import io.bisq.gui.common.view.*; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.funds.deposit.DepositView; -import io.bisq.gui.main.funds.locked.LockedView; -import io.bisq.gui.main.funds.reserved.ReservedView; -import io.bisq.gui.main.funds.transactions.TransactionsView; -import io.bisq.gui.main.funds.withdrawal.WithdrawalView; -import javafx.beans.value.ChangeListener; import javafx.fxml.FXML; + import javafx.scene.control.Tab; import javafx.scene.control.TabPane; -import javax.inject.Inject; +import javafx.beans.value.ChangeListener; @FxmlView public class FundsView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/funds/deposit/DepositListItem.java b/src/main/java/bisq/desktop/main/funds/deposit/DepositListItem.java similarity index 91% rename from src/main/java/io/bisq/gui/main/funds/deposit/DepositListItem.java rename to src/main/java/bisq/desktop/main/funds/deposit/DepositListItem.java index edd47db7c7..1442f91055 100644 --- a/src/main/java/io/bisq/gui/main/funds/deposit/DepositListItem.java +++ b/src/main/java/bisq/desktop/main/funds/deposit/DepositListItem.java @@ -15,23 +15,29 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.deposit; +package bisq.desktop.main.funds.deposit; + +import bisq.desktop.components.indicator.TxConfidenceIndicator; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.core.btc.AddressEntry; +import bisq.core.btc.listeners.BalanceListener; +import bisq.core.btc.listeners.TxConfidenceListener; +import bisq.core.btc.wallet.BtcWalletService; + +import bisq.common.locale.Res; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.listeners.BalanceListener; -import io.bisq.core.btc.listeners.TxConfidenceListener; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.gui.components.indicator.TxConfidenceIndicator; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import javafx.beans.property.SimpleStringProperty; -import javafx.beans.property.StringProperty; -import javafx.scene.control.Tooltip; import org.bitcoinj.core.Address; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; import org.bitcoinj.core.TransactionConfidence; + +import javafx.scene.control.Tooltip; + +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/main/funds/deposit/DepositView.fxml b/src/main/java/bisq/desktop/main/funds/deposit/DepositView.fxml similarity index 86% rename from src/main/java/io/bisq/gui/main/funds/deposit/DepositView.fxml rename to src/main/java/bisq/desktop/main/funds/deposit/DepositView.fxml index 0594d73995..ec16237fa0 100644 --- a/src/main/java/io/bisq/gui/main/funds/deposit/DepositView.fxml +++ b/src/main/java/bisq/desktop/main/funds/deposit/DepositView.fxml @@ -17,10 +17,13 @@ ~ along with Bisq. If not, see . --> + + + + + - - - diff --git a/src/main/java/io/bisq/gui/main/funds/deposit/DepositView.java b/src/main/java/bisq/desktop/main/funds/deposit/DepositView.java similarity index 93% rename from src/main/java/io/bisq/gui/main/funds/deposit/DepositView.java rename to src/main/java/bisq/desktop/main/funds/deposit/DepositView.java index 1608c99f94..a70b51656b 100644 --- a/src/main/java/io/bisq/gui/main/funds/deposit/DepositView.java +++ b/src/main/java/bisq/desktop/main/funds/deposit/DepositView.java @@ -15,53 +15,81 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.deposit; +package bisq.desktop.main.funds.deposit; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AddressTextField; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.components.InputTextField; +import bisq.desktop.components.TitledGroupBg; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.overlays.windows.QRCodeWindow; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Layout; + +import bisq.core.btc.AddressEntry; +import bisq.core.btc.listeners.BalanceListener; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.provider.fee.FeeService; +import bisq.core.user.Preferences; + +import bisq.common.UserThread; +import bisq.common.app.DevEnv; +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; + +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Transaction; + +import net.glxn.qrgen.QRCode; +import net.glxn.qrgen.image.ImageType; + +import javax.inject.Inject; import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.UserThread; -import io.bisq.common.app.DevEnv; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.listeners.BalanceListener; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.provider.fee.FeeService; -import io.bisq.core.user.Preferences; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.*; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.overlays.windows.QRCodeWindow; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.Layout; -import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.beans.value.ChangeListener; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; -import javafx.collections.transformation.SortedList; + import javafx.fxml.FXML; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.scene.control.*; + +import javafx.scene.control.Button; +import javafx.scene.control.Label; +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.control.Tooltip; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.GridPane; import javafx.scene.layout.VBox; -import javafx.util.Callback; -import net.glxn.qrgen.QRCode; -import net.glxn.qrgen.image.ImageType; -import org.bitcoinj.core.Coin; -import org.bitcoinj.core.Transaction; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; + import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; -import org.jetbrains.annotations.NotNull; -import javax.inject.Inject; +import javafx.beans.property.ReadOnlyObjectWrapper; +import javafx.beans.value.ChangeListener; + +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.collections.transformation.SortedList; + +import javafx.util.Callback; + import java.io.ByteArrayInputStream; + import java.util.concurrent.TimeUnit; -import static io.bisq.gui.util.FormBuilder.*; +import org.jetbrains.annotations.NotNull; + +import static bisq.desktop.util.FormBuilder.addButton; +import static bisq.desktop.util.FormBuilder.addLabelAddressTextField; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addTitledGroupBg; @FxmlView public class DepositView extends ActivatableView { diff --git a/src/main/java/io/bisq/gui/main/funds/locked/LockedListItem.java b/src/main/java/bisq/desktop/main/funds/locked/LockedListItem.java similarity index 88% rename from src/main/java/io/bisq/gui/main/funds/locked/LockedListItem.java rename to src/main/java/bisq/desktop/main/funds/locked/LockedListItem.java index c2181ed02f..b6065b390d 100644 --- a/src/main/java/io/bisq/gui/main/funds/locked/LockedListItem.java +++ b/src/main/java/bisq/desktop/main/funds/locked/LockedListItem.java @@ -15,21 +15,24 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.locked; +package bisq.desktop.main.funds.locked; + +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.util.BSFormatter; + +import bisq.core.btc.AddressEntry; +import bisq.core.btc.listeners.BalanceListener; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.WalletService; +import bisq.core.trade.Tradable; +import bisq.core.trade.Trade; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.listeners.BalanceListener; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.WalletService; -import io.bisq.core.trade.Tradable; -import io.bisq.core.trade.Trade; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.util.BSFormatter; -import javafx.scene.control.Label; import org.bitcoinj.core.Address; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; +import javafx.scene.control.Label; + import javax.annotation.Nullable; class LockedListItem { diff --git a/src/main/java/io/bisq/gui/main/funds/locked/LockedView.fxml b/src/main/java/bisq/desktop/main/funds/locked/LockedView.fxml similarity index 89% rename from src/main/java/io/bisq/gui/main/funds/locked/LockedView.fxml rename to src/main/java/bisq/desktop/main/funds/locked/LockedView.fxml index b8db890dd1..92a3076fdb 100644 --- a/src/main/java/io/bisq/gui/main/funds/locked/LockedView.fxml +++ b/src/main/java/bisq/desktop/main/funds/locked/LockedView.fxml @@ -17,10 +17,11 @@ ~ along with Bisq. If not, see . --> - - + + - + diff --git a/src/main/java/io/bisq/gui/main/funds/locked/LockedView.java b/src/main/java/bisq/desktop/main/funds/locked/LockedView.java similarity index 93% rename from src/main/java/io/bisq/gui/main/funds/locked/LockedView.java rename to src/main/java/bisq/desktop/main/funds/locked/LockedView.java index 9d4a984b04..8caa523b2d 100644 --- a/src/main/java/io/bisq/gui/main/funds/locked/LockedView.java +++ b/src/main/java/bisq/desktop/main/funds/locked/LockedView.java @@ -15,40 +15,53 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.locked; +package bisq.desktop.main.funds.locked; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.main.overlays.windows.OfferDetailsWindow; +import bisq.desktop.main.overlays.windows.TradeDetailsWindow; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.core.btc.AddressEntry; +import bisq.core.btc.listeners.BalanceListener; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.offer.OpenOffer; +import bisq.core.offer.OpenOfferManager; +import bisq.core.trade.Tradable; +import bisq.core.trade.Trade; +import bisq.core.trade.TradeManager; +import bisq.core.user.Preferences; + +import bisq.common.locale.Res; -import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.listeners.BalanceListener; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.offer.OpenOffer; -import io.bisq.core.offer.OpenOfferManager; -import io.bisq.core.trade.Tradable; -import io.bisq.core.trade.Trade; -import io.bisq.core.trade.TradeManager; -import io.bisq.core.user.Preferences; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.HyperlinkWithIcon; -import io.bisq.gui.main.overlays.windows.OfferDetailsWindow; -import io.bisq.gui.main.overlays.windows.TradeDetailsWindow; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.collections.FXCollections; -import javafx.collections.ListChangeListener; -import javafx.collections.ObservableList; -import javafx.collections.transformation.SortedList; -import javafx.fxml.FXML; -import javafx.scene.control.*; -import javafx.scene.layout.VBox; -import javafx.util.Callback; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; import javax.inject.Inject; + +import de.jensd.fx.fontawesome.AwesomeIcon; + +import javafx.fxml.FXML; + +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.control.Tooltip; +import javafx.scene.layout.VBox; + +import javafx.beans.property.ReadOnlyObjectWrapper; + +import javafx.collections.FXCollections; +import javafx.collections.ListChangeListener; +import javafx.collections.ObservableList; +import javafx.collections.transformation.SortedList; + +import javafx.util.Callback; + import java.util.Optional; import java.util.stream.Collectors; diff --git a/src/main/java/io/bisq/gui/main/funds/reserved/ReservedListItem.java b/src/main/java/bisq/desktop/main/funds/reserved/ReservedListItem.java similarity index 89% rename from src/main/java/io/bisq/gui/main/funds/reserved/ReservedListItem.java rename to src/main/java/bisq/desktop/main/funds/reserved/ReservedListItem.java index 574f90ac26..942d99125e 100644 --- a/src/main/java/io/bisq/gui/main/funds/reserved/ReservedListItem.java +++ b/src/main/java/bisq/desktop/main/funds/reserved/ReservedListItem.java @@ -15,20 +15,23 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.reserved; +package bisq.desktop.main.funds.reserved; + +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.util.BSFormatter; + +import bisq.core.btc.AddressEntry; +import bisq.core.btc.listeners.BalanceListener; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.offer.OpenOffer; +import bisq.core.trade.Tradable; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.listeners.BalanceListener; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.offer.OpenOffer; -import io.bisq.core.trade.Tradable; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.util.BSFormatter; -import javafx.scene.control.Label; import org.bitcoinj.core.Address; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; +import javafx.scene.control.Label; + import java.util.Optional; class ReservedListItem { diff --git a/src/main/java/io/bisq/gui/main/funds/reserved/ReservedView.fxml b/src/main/java/bisq/desktop/main/funds/reserved/ReservedView.fxml similarity index 88% rename from src/main/java/io/bisq/gui/main/funds/reserved/ReservedView.fxml rename to src/main/java/bisq/desktop/main/funds/reserved/ReservedView.fxml index 71d72b772f..8fbd7127a1 100644 --- a/src/main/java/io/bisq/gui/main/funds/reserved/ReservedView.fxml +++ b/src/main/java/bisq/desktop/main/funds/reserved/ReservedView.fxml @@ -17,10 +17,11 @@ ~ along with Bisq. If not, see . --> - - + + - + diff --git a/src/main/java/io/bisq/gui/main/funds/reserved/ReservedView.java b/src/main/java/bisq/desktop/main/funds/reserved/ReservedView.java similarity index 93% rename from src/main/java/io/bisq/gui/main/funds/reserved/ReservedView.java rename to src/main/java/bisq/desktop/main/funds/reserved/ReservedView.java index 20f2e6978c..07f995fd14 100644 --- a/src/main/java/io/bisq/gui/main/funds/reserved/ReservedView.java +++ b/src/main/java/bisq/desktop/main/funds/reserved/ReservedView.java @@ -15,40 +15,53 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.reserved; +package bisq.desktop.main.funds.reserved; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.main.overlays.windows.OfferDetailsWindow; +import bisq.desktop.main.overlays.windows.TradeDetailsWindow; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.core.btc.AddressEntry; +import bisq.core.btc.listeners.BalanceListener; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.offer.OpenOffer; +import bisq.core.offer.OpenOfferManager; +import bisq.core.trade.Tradable; +import bisq.core.trade.Trade; +import bisq.core.trade.TradeManager; +import bisq.core.user.Preferences; + +import bisq.common.locale.Res; -import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.listeners.BalanceListener; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.offer.OpenOffer; -import io.bisq.core.offer.OpenOfferManager; -import io.bisq.core.trade.Tradable; -import io.bisq.core.trade.Trade; -import io.bisq.core.trade.TradeManager; -import io.bisq.core.user.Preferences; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.HyperlinkWithIcon; -import io.bisq.gui.main.overlays.windows.OfferDetailsWindow; -import io.bisq.gui.main.overlays.windows.TradeDetailsWindow; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.collections.FXCollections; -import javafx.collections.ListChangeListener; -import javafx.collections.ObservableList; -import javafx.collections.transformation.SortedList; -import javafx.fxml.FXML; -import javafx.scene.control.*; -import javafx.scene.layout.VBox; -import javafx.util.Callback; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; import javax.inject.Inject; + +import de.jensd.fx.fontawesome.AwesomeIcon; + +import javafx.fxml.FXML; + +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.control.Tooltip; +import javafx.scene.layout.VBox; + +import javafx.beans.property.ReadOnlyObjectWrapper; + +import javafx.collections.FXCollections; +import javafx.collections.ListChangeListener; +import javafx.collections.ObservableList; +import javafx.collections.transformation.SortedList; + +import javafx.util.Callback; + import java.util.Optional; import java.util.stream.Collectors; diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/DisplayedTransactions.java b/src/main/java/bisq/desktop/main/funds/transactions/DisplayedTransactions.java similarity index 95% rename from src/main/java/io/bisq/gui/main/funds/transactions/DisplayedTransactions.java rename to src/main/java/bisq/desktop/main/funds/transactions/DisplayedTransactions.java index b32da1e505..0606299547 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/DisplayedTransactions.java +++ b/src/main/java/bisq/desktop/main/funds/transactions/DisplayedTransactions.java @@ -15,10 +15,11 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.transactions; +package bisq.desktop.main.funds.transactions; + +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.trade.Tradable; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.trade.Tradable; import org.bitcoinj.core.Transaction; import java.util.List; diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/DisplayedTransactionsFactory.java b/src/main/java/bisq/desktop/main/funds/transactions/DisplayedTransactionsFactory.java similarity index 95% rename from src/main/java/io/bisq/gui/main/funds/transactions/DisplayedTransactionsFactory.java rename to src/main/java/bisq/desktop/main/funds/transactions/DisplayedTransactionsFactory.java index 375622a722..63a08bfebe 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/DisplayedTransactionsFactory.java +++ b/src/main/java/bisq/desktop/main/funds/transactions/DisplayedTransactionsFactory.java @@ -15,9 +15,9 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.transactions; +package bisq.desktop.main.funds.transactions; -import io.bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.BtcWalletService; import javax.inject.Inject; diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/DummyTransactionAwareTradable.java b/src/main/java/bisq/desktop/main/funds/transactions/DummyTransactionAwareTradable.java similarity index 93% rename from src/main/java/io/bisq/gui/main/funds/transactions/DummyTransactionAwareTradable.java rename to src/main/java/bisq/desktop/main/funds/transactions/DummyTransactionAwareTradable.java index a749cedfd6..74b24037ab 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/DummyTransactionAwareTradable.java +++ b/src/main/java/bisq/desktop/main/funds/transactions/DummyTransactionAwareTradable.java @@ -15,9 +15,10 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.transactions; +package bisq.desktop.main.funds.transactions; + +import bisq.core.trade.Tradable; -import io.bisq.core.trade.Tradable; import org.bitcoinj.core.Transaction; class DummyTransactionAwareTradable implements TransactionAwareTradable { diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/ObservableListDecorator.java b/src/main/java/bisq/desktop/main/funds/transactions/ObservableListDecorator.java similarity index 90% rename from src/main/java/io/bisq/gui/main/funds/transactions/ObservableListDecorator.java rename to src/main/java/bisq/desktop/main/funds/transactions/ObservableListDecorator.java index f9eebdcbb6..f5f6ea3d64 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/ObservableListDecorator.java +++ b/src/main/java/bisq/desktop/main/funds/transactions/ObservableListDecorator.java @@ -15,17 +15,14 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.transactions; +package bisq.desktop.main.funds.transactions; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.collections.transformation.SortedList; -import org.jetbrains.annotations.NotNull; -import java.util.AbstractCollection; import java.util.AbstractList; import java.util.Collection; -import java.util.Iterator; class ObservableListDecorator extends AbstractList { private final ObservableList delegate = FXCollections.observableArrayList(); diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/TradableRepository.java b/src/main/java/bisq/desktop/main/funds/transactions/TradableRepository.java similarity index 86% rename from src/main/java/io/bisq/gui/main/funds/transactions/TradableRepository.java rename to src/main/java/bisq/desktop/main/funds/transactions/TradableRepository.java index 99a257723a..0cabbe1438 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/TradableRepository.java +++ b/src/main/java/bisq/desktop/main/funds/transactions/TradableRepository.java @@ -15,16 +15,18 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.transactions; +package bisq.desktop.main.funds.transactions; -import com.google.common.collect.ImmutableSet; -import io.bisq.core.offer.OpenOfferManager; -import io.bisq.core.trade.Tradable; -import io.bisq.core.trade.TradeManager; -import io.bisq.core.trade.closed.ClosedTradableManager; -import io.bisq.core.trade.failed.FailedTradesManager; +import bisq.core.offer.OpenOfferManager; +import bisq.core.trade.Tradable; +import bisq.core.trade.TradeManager; +import bisq.core.trade.closed.ClosedTradableManager; +import bisq.core.trade.failed.FailedTradesManager; import javax.inject.Inject; + +import com.google.common.collect.ImmutableSet; + import java.util.Set; public class TradableRepository { diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionAwareOpenOffer.java b/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareOpenOffer.java similarity index 89% rename from src/main/java/io/bisq/gui/main/funds/transactions/TransactionAwareOpenOffer.java rename to src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareOpenOffer.java index d9c212cbb5..dfc13ba36b 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionAwareOpenOffer.java +++ b/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareOpenOffer.java @@ -15,11 +15,12 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.transactions; +package bisq.desktop.main.funds.transactions; + +import bisq.core.offer.Offer; +import bisq.core.offer.OpenOffer; +import bisq.core.trade.Tradable; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OpenOffer; -import io.bisq.core.trade.Tradable; import org.bitcoinj.core.Transaction; class TransactionAwareOpenOffer implements TransactionAwareTradable { diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionAwareTradable.java b/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTradable.java similarity index 91% rename from src/main/java/io/bisq/gui/main/funds/transactions/TransactionAwareTradable.java rename to src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTradable.java index e5cf42a692..199e01590f 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionAwareTradable.java +++ b/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTradable.java @@ -15,9 +15,10 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.transactions; +package bisq.desktop.main.funds.transactions; + +import bisq.core.trade.Tradable; -import io.bisq.core.trade.Tradable; import org.bitcoinj.core.Transaction; interface TransactionAwareTradable { diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionAwareTradableFactory.java b/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTradableFactory.java similarity index 87% rename from src/main/java/io/bisq/gui/main/funds/transactions/TransactionAwareTradableFactory.java rename to src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTradableFactory.java index 14d341e3f9..0a6992d684 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionAwareTradableFactory.java +++ b/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTradableFactory.java @@ -15,12 +15,12 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.transactions; +package bisq.desktop.main.funds.transactions; -import io.bisq.core.arbitration.DisputeManager; -import io.bisq.core.offer.OpenOffer; -import io.bisq.core.trade.Tradable; -import io.bisq.core.trade.Trade; +import bisq.core.arbitration.DisputeManager; +import bisq.core.offer.OpenOffer; +import bisq.core.trade.Tradable; +import bisq.core.trade.Trade; import javax.inject.Inject; diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionAwareTrade.java b/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTrade.java similarity index 93% rename from src/main/java/io/bisq/gui/main/funds/transactions/TransactionAwareTrade.java rename to src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTrade.java index 58190d8128..b45618d962 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionAwareTrade.java +++ b/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTrade.java @@ -15,16 +15,18 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.transactions; +package bisq.desktop.main.funds.transactions; + +import bisq.core.arbitration.Dispute; +import bisq.core.arbitration.DisputeManager; +import bisq.core.offer.Offer; +import bisq.core.trade.Tradable; +import bisq.core.trade.Trade; -import io.bisq.core.arbitration.Dispute; -import io.bisq.core.arbitration.DisputeManager; -import io.bisq.core.offer.Offer; -import io.bisq.core.trade.Tradable; -import io.bisq.core.trade.Trade; -import javafx.collections.ObservableList; import org.bitcoinj.core.Transaction; +import javafx.collections.ObservableList; + import java.util.Optional; class TransactionAwareTrade implements TransactionAwareTradable { diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionListItemFactory.java b/src/main/java/bisq/desktop/main/funds/transactions/TransactionListItemFactory.java similarity index 87% rename from src/main/java/io/bisq/gui/main/funds/transactions/TransactionListItemFactory.java rename to src/main/java/bisq/desktop/main/funds/transactions/TransactionListItemFactory.java index 2e5f31062f..33040fa751 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionListItemFactory.java +++ b/src/main/java/bisq/desktop/main/funds/transactions/TransactionListItemFactory.java @@ -15,19 +15,23 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.transactions; +package bisq.desktop.main.funds.transactions; + +import bisq.desktop.util.BSFormatter; + +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.dao.blockchain.BsqBlockChain; +import bisq.core.trade.Tradable; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.dao.blockchain.BsqBlockChain; -import io.bisq.core.trade.Tradable; -import io.bisq.gui.util.BSFormatter; import org.bitcoinj.core.Transaction; -import javax.annotation.Nullable; import javax.inject.Inject; + import java.util.Optional; +import javax.annotation.Nullable; + public class TransactionListItemFactory { private final BtcWalletService btcWalletService; private final BsqWalletService bsqWalletService; diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsListItem.java b/src/main/java/bisq/desktop/main/funds/transactions/TransactionsListItem.java similarity index 93% rename from src/main/java/io/bisq/gui/main/funds/transactions/TransactionsListItem.java rename to src/main/java/bisq/desktop/main/funds/transactions/TransactionsListItem.java index d40526f01b..aa9aa1190f 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsListItem.java +++ b/src/main/java/bisq/desktop/main/funds/transactions/TransactionsListItem.java @@ -15,34 +15,40 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.transactions; +package bisq.desktop.main.funds.transactions; + +import bisq.desktop.components.indicator.TxConfidenceIndicator; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.core.app.BisqEnvironment; +import bisq.core.btc.listeners.TxConfidenceListener; +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.WalletService; +import bisq.core.dao.blockchain.BsqBlockChain; +import bisq.core.dao.blockchain.vo.TxType; +import bisq.core.offer.Offer; +import bisq.core.offer.OpenOffer; +import bisq.core.trade.Tradable; +import bisq.core.trade.Trade; + +import bisq.common.locale.Res; -import io.bisq.common.locale.Res; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.btc.listeners.TxConfidenceListener; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.WalletService; -import io.bisq.core.dao.blockchain.BsqBlockChain; -import io.bisq.core.dao.blockchain.vo.TxType; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OpenOffer; -import io.bisq.core.trade.Tradable; -import io.bisq.core.trade.Trade; -import io.bisq.gui.components.indicator.TxConfidenceIndicator; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import javafx.scene.control.Tooltip; -import lombok.extern.slf4j.Slf4j; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; import org.bitcoinj.core.TransactionConfidence; import org.bitcoinj.core.TransactionOutput; -import javax.annotation.Nullable; +import javafx.scene.control.Tooltip; + import java.util.Date; import java.util.Optional; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; + @Slf4j class TransactionsListItem { private String dateString; diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsView.fxml b/src/main/java/bisq/desktop/main/funds/transactions/TransactionsView.fxml similarity index 88% rename from src/main/java/io/bisq/gui/main/funds/transactions/TransactionsView.fxml rename to src/main/java/bisq/desktop/main/funds/transactions/TransactionsView.fxml index fd45836843..aebd95beb1 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsView.fxml +++ b/src/main/java/bisq/desktop/main/funds/transactions/TransactionsView.fxml @@ -17,10 +17,12 @@ ~ along with Bisq. If not, see . --> - - + + + - + diff --git a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsView.java b/src/main/java/bisq/desktop/main/funds/transactions/TransactionsView.java similarity index 95% rename from src/main/java/io/bisq/gui/main/funds/transactions/TransactionsView.java rename to src/main/java/bisq/desktop/main/funds/transactions/TransactionsView.java index 997d3e755e..f618310d31 100644 --- a/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsView.java +++ b/src/main/java/bisq/desktop/main/funds/transactions/TransactionsView.java @@ -15,44 +15,34 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.transactions; +package bisq.desktop.main.funds.transactions; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AddressWithIconAndDirection; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.overlays.windows.OfferDetailsWindow; +import bisq.desktop.main.overlays.windows.TradeDetailsWindow; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.WalletsSetup; +import bisq.core.offer.OpenOffer; +import bisq.core.trade.Tradable; +import bisq.core.trade.Trade; +import bisq.core.user.Preferences; + +import bisq.network.p2p.P2PService; + +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; +import bisq.common.util.Tuple4; +import bisq.common.util.Utilities; -import com.googlecode.jcsv.writer.CSVEntryConverter; -import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Tuple4; -import io.bisq.common.util.Utilities; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.WalletsSetup; -import io.bisq.core.offer.OpenOffer; -import io.bisq.core.trade.Tradable; -import io.bisq.core.trade.Trade; -import io.bisq.core.user.Preferences; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.AddressWithIconAndDirection; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.HyperlinkWithIcon; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.overlays.windows.OfferDetailsWindow; -import io.bisq.gui.main.overlays.windows.TradeDetailsWindow; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.network.p2p.P2PService; -import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.collections.ObservableList; -import javafx.collections.transformation.SortedList; -import javafx.event.EventHandler; -import javafx.fxml.FXML; -import javafx.scene.Scene; -import javafx.scene.control.*; -import javafx.scene.input.KeyCode; -import javafx.scene.input.KeyEvent; -import javafx.scene.layout.VBox; -import javafx.stage.Stage; -import javafx.util.Callback; import org.bitcoinj.core.Coin; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.Transaction; @@ -61,12 +51,48 @@ import org.bitcoinj.script.Script; import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.listeners.WalletEventListener; -import javax.annotation.Nullable; +import com.googlecode.jcsv.writer.CSVEntryConverter; + import javax.inject.Inject; + +import de.jensd.fx.fontawesome.AwesomeIcon; + +import javafx.fxml.FXML; + +import javafx.stage.Stage; + +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.control.Tooltip; +import javafx.scene.input.KeyCode; +import javafx.scene.input.KeyEvent; +import javafx.scene.layout.VBox; + +import javafx.beans.property.ReadOnlyObjectWrapper; + +import javafx.event.EventHandler; + +import javafx.collections.ObservableList; +import javafx.collections.transformation.SortedList; + +import javafx.util.Callback; + import java.text.DateFormat; -import java.util.*; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; import java.util.stream.Collectors; +import javax.annotation.Nullable; + @FxmlView public class TransactionsView extends ActivatableView { diff --git a/src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalListItem.java b/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalListItem.java similarity index 92% rename from src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalListItem.java rename to src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalListItem.java index a9013e5138..e862e86bba 100644 --- a/src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalListItem.java +++ b/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalListItem.java @@ -15,21 +15,26 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.withdrawal; +package bisq.desktop.main.funds.withdrawal; + +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.util.BSFormatter; + +import bisq.core.btc.AddressEntry; +import bisq.core.btc.listeners.BalanceListener; +import bisq.core.btc.wallet.BtcWalletService; + +import bisq.common.locale.Res; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.listeners.BalanceListener; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.util.BSFormatter; -import javafx.scene.control.Label; -import lombok.Getter; -import lombok.Setter; import org.bitcoinj.core.Address; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; +import javafx.scene.control.Label; + +import lombok.Getter; +import lombok.Setter; + class WithdrawalListItem { private final BalanceListener balanceListener; private final Label balanceLabel; diff --git a/src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalView.fxml b/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.fxml similarity index 87% rename from src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalView.fxml rename to src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.fxml index 992979aa13..3a6530c4c3 100644 --- a/src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalView.fxml +++ b/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.fxml @@ -17,12 +17,18 @@ ~ along with Bisq. If not, see . --> + + + + + + + + + + - - - - - diff --git a/src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalView.java b/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.java similarity index 93% rename from src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalView.java rename to src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.java index b1b53139cd..a71f977e05 100644 --- a/src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalView.java +++ b/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.java @@ -15,62 +15,92 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.funds.withdrawal; +package bisq.desktop.main.funds.withdrawal; + +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipCheckBox; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.overlays.windows.WalletPasswordWindow; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.validation.BtcAddressValidator; + +import bisq.core.btc.AddressEntry; +import bisq.core.btc.AddressEntryException; +import bisq.core.btc.InsufficientFundsException; +import bisq.core.btc.Restrictions; +import bisq.core.btc.listeners.BalanceListener; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.WalletsSetup; +import bisq.core.trade.Tradable; +import bisq.core.trade.Trade; +import bisq.core.trade.TradeManager; +import bisq.core.trade.closed.ClosedTradableManager; +import bisq.core.trade.failed.FailedTradesManager; +import bisq.core.user.Preferences; +import bisq.core.util.CoinUtil; + +import bisq.network.p2p.P2PService; + +import bisq.common.UserThread; +import bisq.common.locale.Res; -import com.google.common.util.concurrent.FutureCallback; -import de.jensd.fx.fontawesome.AwesomeIcon; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.AddressEntryException; -import io.bisq.core.btc.InsufficientFundsException; -import io.bisq.core.btc.Restrictions; -import io.bisq.core.btc.listeners.BalanceListener; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.WalletsSetup; -import io.bisq.core.trade.Tradable; -import io.bisq.core.trade.Trade; -import io.bisq.core.trade.TradeManager; -import io.bisq.core.trade.closed.ClosedTradableManager; -import io.bisq.core.trade.failed.FailedTradesManager; -import io.bisq.core.user.Preferences; -import io.bisq.core.util.CoinUtil; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.AutoTooltipCheckBox; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.HyperlinkWithIcon; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.overlays.windows.WalletPasswordWindow; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.validation.BtcAddressValidator; -import io.bisq.network.p2p.P2PService; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.beans.property.SimpleBooleanProperty; -import javafx.beans.value.ChangeListener; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; -import javafx.collections.transformation.SortedList; -import javafx.fxml.FXML; -import javafx.scene.control.*; -import javafx.scene.layout.VBox; -import javafx.util.Callback; -import org.apache.commons.lang3.StringUtils; import org.bitcoinj.core.AddressFormatException; import org.bitcoinj.core.Coin; import org.bitcoinj.core.InsufficientMoneyException; import org.bitcoinj.core.Transaction; import org.bitcoinj.wallet.Wallet; -import org.jetbrains.annotations.NotNull; -import org.spongycastle.crypto.params.KeyParameter; import javax.inject.Inject; -import java.util.*; + +import com.google.common.util.concurrent.FutureCallback; + +import org.apache.commons.lang3.StringUtils; + +import de.jensd.fx.fontawesome.AwesomeIcon; + +import javafx.fxml.FXML; + +import javafx.scene.control.Button; +import javafx.scene.control.CheckBox; +import javafx.scene.control.Label; +import javafx.scene.control.RadioButton; +import javafx.scene.control.SelectionMode; +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.control.TextField; +import javafx.scene.control.Toggle; +import javafx.scene.control.ToggleGroup; +import javafx.scene.control.Tooltip; +import javafx.scene.layout.VBox; + +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.ReadOnlyObjectWrapper; +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.value.ChangeListener; + +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.collections.transformation.SortedList; + +import javafx.util.Callback; + +import org.spongycastle.crypto.params.KeyParameter; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; +import org.jetbrains.annotations.NotNull; + import static com.google.common.base.Preconditions.checkNotNull; @FxmlView diff --git a/src/main/java/io/bisq/gui/main/market/MarketView.fxml b/src/main/java/bisq/desktop/main/market/MarketView.fxml similarity index 86% rename from src/main/java/io/bisq/gui/main/market/MarketView.fxml rename to src/main/java/bisq/desktop/main/market/MarketView.fxml index 19f75aafaf..2c21eb928b 100644 --- a/src/main/java/io/bisq/gui/main/market/MarketView.fxml +++ b/src/main/java/bisq/desktop/main/market/MarketView.fxml @@ -17,9 +17,11 @@ ~ along with Bisq. If not, see . --> - - - + + + + diff --git a/src/main/java/io/bisq/gui/main/market/MarketView.java b/src/main/java/bisq/desktop/main/market/MarketView.java similarity index 87% rename from src/main/java/io/bisq/gui/main/market/MarketView.java rename to src/main/java/bisq/desktop/main/market/MarketView.java index 11e9ff3a3f..2e33d9a55a 100644 --- a/src/main/java/io/bisq/gui/main/market/MarketView.java +++ b/src/main/java/bisq/desktop/main/market/MarketView.java @@ -15,23 +15,31 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.market; +package bisq.desktop.main.market; + +import bisq.desktop.Navigation; +import bisq.desktop.common.model.Activatable; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.main.MainView; +import bisq.desktop.main.market.offerbook.OfferBookChartView; +import bisq.desktop.main.market.spread.SpreadView; +import bisq.desktop.main.market.trades.TradesChartsView; + +import bisq.common.locale.Res; + +import javax.inject.Inject; -import io.bisq.common.locale.Res; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.model.Activatable; -import io.bisq.gui.common.view.*; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.market.offerbook.OfferBookChartView; -import io.bisq.gui.main.market.spread.SpreadView; -import io.bisq.gui.main.market.trades.TradesChartsView; -import javafx.beans.value.ChangeListener; import javafx.fxml.FXML; + import javafx.scene.control.ScrollPane; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; -import javax.inject.Inject; +import javafx.beans.value.ChangeListener; @FxmlView public class MarketView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.fxml b/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.fxml similarity index 86% rename from src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.fxml rename to src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.fxml index 1780833ad9..8f3c42fd53 100644 --- a/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.fxml +++ b/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.fxml @@ -17,10 +17,10 @@ ~ along with Bisq. If not, see . --> - + + - - - \ No newline at end of file + diff --git a/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.java b/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java similarity index 95% rename from src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.java rename to src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java index ca0546981e..26f097abaa 100644 --- a/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.java +++ b/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java @@ -15,58 +15,76 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.market.offerbook; +package bisq.desktop.main.market.offerbook; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.AutoTooltipTableColumn; +import bisq.desktop.components.ColoredDecimalPlacesWithZerosText; +import bisq.desktop.main.MainView; +import bisq.desktop.main.offer.BuyOfferView; +import bisq.desktop.main.offer.SellOfferView; +import bisq.desktop.main.offer.offerbook.OfferBookListItem; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.CurrencyListItem; +import bisq.desktop.util.GUIUtil; + +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; + +import bisq.common.UserThread; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.util.Tuple4; + +import javax.inject.Inject; + +import javafx.scene.chart.AreaChart; +import javafx.scene.chart.NumberAxis; +import javafx.scene.chart.XYChart; +import javafx.scene.control.Button; +import javafx.scene.control.ComboBox; +import javafx.scene.control.Label; +import javafx.scene.control.SingleSelectionModel; +import javafx.scene.control.Tab; +import javafx.scene.control.TabPane; +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.image.ImageView; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Priority; +import javafx.scene.layout.VBox; + +import javafx.geometry.Insets; +import javafx.geometry.Pos; + +import org.fxmisc.easybind.EasyBind; +import org.fxmisc.easybind.Subscription; -import io.bisq.common.UserThread; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple4; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.ActivatableViewAndModel; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.AutoTooltipTableColumn; -import io.bisq.gui.components.ColoredDecimalPlacesWithZerosText; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.offer.BuyOfferView; -import io.bisq.gui.main.offer.SellOfferView; -import io.bisq.gui.main.offer.offerbook.OfferBookListItem; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.CurrencyListItem; -import io.bisq.gui.util.GUIUtil; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; + import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; -import javafx.geometry.Insets; -import javafx.geometry.Pos; -import javafx.scene.chart.AreaChart; -import javafx.scene.chart.NumberAxis; -import javafx.scene.chart.XYChart; -import javafx.scene.control.*; -import javafx.scene.image.ImageView; -import javafx.scene.layout.HBox; -import javafx.scene.layout.Priority; -import javafx.scene.layout.VBox; + import javafx.util.Callback; import javafx.util.StringConverter; -import org.fxmisc.easybind.EasyBind; -import org.fxmisc.easybind.Subscription; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import javax.inject.Inject; import java.util.Collections; import java.util.function.Function; -import static io.bisq.gui.util.Layout.INITIAL_SCENE_HEIGHT; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static bisq.desktop.util.Layout.INITIAL_SCENE_HEIGHT; @FxmlView public class OfferBookChartView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartViewModel.java b/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java similarity index 94% rename from src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartViewModel.java rename to src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java index 5022da2514..17b25e4f21 100644 --- a/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartViewModel.java +++ b/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java @@ -15,39 +15,46 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.market.offerbook; +package bisq.desktop.main.market.offerbook; + +import bisq.desktop.Navigation; +import bisq.desktop.common.model.ActivatableViewModel; +import bisq.desktop.main.MainView; +import bisq.desktop.main.offer.offerbook.OfferBook; +import bisq.desktop.main.offer.offerbook.OfferBookListItem; +import bisq.desktop.main.settings.SettingsView; +import bisq.desktop.main.settings.preferences.PreferencesView; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.CurrencyList; +import bisq.desktop.util.CurrencyListItem; +import bisq.desktop.util.GUIUtil; + +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.provider.price.PriceFeedService; +import bisq.core.user.Preferences; + +import bisq.common.GlobalSettings; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.TradeCurrency; +import bisq.common.monetary.Price; + +import com.google.inject.Inject; import com.google.common.math.LongMath; -import com.google.inject.Inject; -import io.bisq.common.GlobalSettings; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.common.monetary.Price; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.provider.price.PriceFeedService; -import io.bisq.core.user.Preferences; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.model.ActivatableViewModel; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.offer.offerbook.OfferBook; -import io.bisq.gui.main.offer.offerbook.OfferBookListItem; -import io.bisq.gui.main.settings.SettingsView; -import io.bisq.gui.main.settings.preferences.PreferencesView; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.CurrencyList; -import io.bisq.gui.util.CurrencyListItem; -import io.bisq.gui.util.GUIUtil; + +import javafx.scene.chart.XYChart; + import javafx.beans.property.IntegerProperty; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; + import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; -import javafx.scene.chart.XYChart; import java.util.ArrayList; import java.util.Comparator; diff --git a/src/main/java/io/bisq/gui/main/market/offerbook/OfferListItem.java b/src/main/java/bisq/desktop/main/market/offerbook/OfferListItem.java similarity index 95% rename from src/main/java/io/bisq/gui/main/market/offerbook/OfferListItem.java rename to src/main/java/bisq/desktop/main/market/offerbook/OfferListItem.java index fd0fb4e18b..244f9bbca9 100644 --- a/src/main/java/io/bisq/gui/main/market/offerbook/OfferListItem.java +++ b/src/main/java/bisq/desktop/main/market/offerbook/OfferListItem.java @@ -15,9 +15,10 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.market.offerbook; +package bisq.desktop.main.market.offerbook; + +import bisq.core.offer.Offer; -import io.bisq.core.offer.Offer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/main/market/spread/SpreadItem.java b/src/main/java/bisq/desktop/main/market/spread/SpreadItem.java similarity index 57% rename from src/main/java/io/bisq/gui/main/market/spread/SpreadItem.java rename to src/main/java/bisq/desktop/main/market/spread/SpreadItem.java index a362d287d0..53372ecbc6 100644 --- a/src/main/java/io/bisq/gui/main/market/spread/SpreadItem.java +++ b/src/main/java/bisq/desktop/main/market/spread/SpreadItem.java @@ -1,7 +1,26 @@ -package io.bisq.gui.main.market.spread; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.main.market.spread; + +import bisq.common.monetary.Price; -import io.bisq.common.monetary.Price; import org.bitcoinj.core.Coin; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/main/market/spread/SpreadView.fxml b/src/main/java/bisq/desktop/main/market/spread/SpreadView.fxml similarity index 85% rename from src/main/java/io/bisq/gui/main/market/spread/SpreadView.fxml rename to src/main/java/bisq/desktop/main/market/spread/SpreadView.fxml index 0da7741bc7..703350bf97 100644 --- a/src/main/java/io/bisq/gui/main/market/spread/SpreadView.fxml +++ b/src/main/java/bisq/desktop/main/market/spread/SpreadView.fxml @@ -17,10 +17,10 @@ ~ along with Bisq. If not, see . --> - + + - - - \ No newline at end of file + diff --git a/src/main/java/io/bisq/gui/main/market/spread/SpreadView.java b/src/main/java/bisq/desktop/main/market/spread/SpreadView.java similarity index 97% rename from src/main/java/io/bisq/gui/main/market/spread/SpreadView.java rename to src/main/java/bisq/desktop/main/market/spread/SpreadView.java index 0856df1864..15f1b3d604 100644 --- a/src/main/java/io/bisq/gui/main/market/spread/SpreadView.java +++ b/src/main/java/bisq/desktop/main/market/spread/SpreadView.java @@ -15,31 +15,38 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.market.spread; +package bisq.desktop.main.market.spread; + +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.AutoTooltipTableColumn; +import bisq.desktop.components.ColoredDecimalPlacesWithZerosText; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; + +import org.bitcoinj.core.Coin; + +import javax.inject.Inject; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.gui.common.view.ActivatableViewAndModel; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.AutoTooltipTableColumn; -import io.bisq.gui.components.ColoredDecimalPlacesWithZerosText; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.collections.ListChangeListener; -import javafx.collections.transformation.SortedList; -import javafx.geometry.Insets; import javafx.scene.control.Label; import javafx.scene.control.TableCell; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; import javafx.scene.layout.GridPane; import javafx.scene.layout.Priority; -import javafx.util.Callback; -import org.bitcoinj.core.Coin; -import javax.inject.Inject; +import javafx.geometry.Insets; + +import javafx.beans.property.ReadOnlyObjectWrapper; + +import javafx.collections.ListChangeListener; +import javafx.collections.transformation.SortedList; + +import javafx.util.Callback; @FxmlView public class SpreadView extends ActivatableViewAndModel { @@ -50,7 +57,6 @@ public class SpreadView extends ActivatableViewAndModel itemListChangeListener; private TableColumn totalAmountColumn, numberOfOffersColumn, numberOfBuyOffersColumn, numberOfSellOffersColumn; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle /////////////////////////////////////////////////////////////////////////////////////////// @@ -130,7 +136,6 @@ public class SpreadView extends ActivatableViewAndModel. */ -package io.bisq.gui.main.market.spread; +package bisq.desktop.main.market.spread; + +import bisq.desktop.common.model.ActivatableViewModel; +import bisq.desktop.main.offer.offerbook.OfferBook; +import bisq.desktop.main.offer.offerbook.OfferBookListItem; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.provider.price.MarketPrice; +import bisq.core.provider.price.PriceFeedService; + +import bisq.common.locale.CurrencyUtil; +import bisq.common.monetary.Altcoin; +import bisq.common.monetary.Price; -import com.google.inject.Inject; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.monetary.Altcoin; -import io.bisq.common.monetary.Price; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.provider.price.MarketPrice; -import io.bisq.core.provider.price.PriceFeedService; -import io.bisq.gui.common.model.ActivatableViewModel; -import io.bisq.gui.main.offer.offerbook.OfferBook; -import io.bisq.gui.main.offer.offerbook.OfferBookListItem; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import javafx.beans.property.IntegerProperty; -import javafx.beans.property.SimpleIntegerProperty; -import javafx.collections.FXCollections; -import javafx.collections.ListChangeListener; -import javafx.collections.ObservableList; import org.bitcoinj.core.Coin; import org.bitcoinj.utils.Fiat; -import java.math.BigDecimal; -import java.math.RoundingMode; +import com.google.inject.Inject; + +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.SimpleIntegerProperty; + +import javafx.collections.FXCollections; +import javafx.collections.ListChangeListener; +import javafx.collections.ObservableList; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import java.math.BigDecimal; +import java.math.RoundingMode; + class SpreadViewModel extends ActivatableViewModel { private final OfferBook offerBook; diff --git a/src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.fxml b/src/main/java/bisq/desktop/main/market/trades/TradesChartsView.fxml similarity index 86% rename from src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.fxml rename to src/main/java/bisq/desktop/main/market/trades/TradesChartsView.fxml index 05deea2ca6..940a2bacf4 100644 --- a/src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.fxml +++ b/src/main/java/bisq/desktop/main/market/trades/TradesChartsView.fxml @@ -17,10 +17,10 @@ ~ along with Bisq. If not, see . --> - + + - - - \ No newline at end of file + diff --git a/src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.java b/src/main/java/bisq/desktop/main/market/trades/TradesChartsView.java similarity index 95% rename from src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.java rename to src/main/java/bisq/desktop/main/market/trades/TradesChartsView.java index 3a23545edb..8255502377 100644 --- a/src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.java +++ b/src/main/java/bisq/desktop/main/market/trades/TradesChartsView.java @@ -15,56 +15,78 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.market.trades; +package bisq.desktop.main.market.trades; + +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.AutoTooltipTableColumn; +import bisq.desktop.components.AutoTooltipToggleButton; +import bisq.desktop.components.ColoredDecimalPlacesWithZerosText; +import bisq.desktop.main.market.trades.charts.price.CandleStickChart; +import bisq.desktop.main.market.trades.charts.volume.VolumeChart; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.CurrencyListItem; +import bisq.desktop.util.GUIUtil; + +import bisq.core.offer.OfferPayload; +import bisq.core.trade.statistics.TradeStatistics2; + +import bisq.common.UserThread; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.monetary.Price; +import bisq.common.monetary.Volume; +import bisq.common.util.MathUtils; + +import org.bitcoinj.core.Coin; + +import javax.inject.Inject; -import io.bisq.common.UserThread; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.monetary.Price; -import io.bisq.common.monetary.Volume; -import io.bisq.common.util.MathUtils; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.trade.statistics.TradeStatistics2; -import io.bisq.gui.common.view.ActivatableViewAndModel; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.AutoTooltipTableColumn; -import io.bisq.gui.components.AutoTooltipToggleButton; -import io.bisq.gui.components.ColoredDecimalPlacesWithZerosText; -import io.bisq.gui.main.market.trades.charts.price.CandleStickChart; -import io.bisq.gui.main.market.trades.charts.volume.VolumeChart; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.CurrencyListItem; -import io.bisq.gui.util.GUIUtil; -import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.beans.property.SimpleStringProperty; -import javafx.beans.property.StringProperty; -import javafx.beans.value.ChangeListener; -import javafx.collections.FXCollections; -import javafx.collections.ListChangeListener; -import javafx.collections.transformation.SortedList; -import javafx.geometry.Insets; -import javafx.geometry.Pos; import javafx.scene.chart.NumberAxis; import javafx.scene.chart.XYChart; -import javafx.scene.control.*; +import javafx.scene.control.ComboBox; +import javafx.scene.control.Label; +import javafx.scene.control.SingleSelectionModel; +import javafx.scene.control.Tab; +import javafx.scene.control.TabPane; +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.control.Toggle; +import javafx.scene.control.ToggleButton; +import javafx.scene.control.ToggleGroup; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.scene.layout.Priority; import javafx.scene.layout.VBox; -import javafx.util.Callback; -import javafx.util.StringConverter; -import org.bitcoinj.core.Coin; + +import javafx.geometry.Insets; +import javafx.geometry.Pos; + import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; import org.fxmisc.easybind.monadic.MonadicBinding; -import org.jetbrains.annotations.NotNull; + +import javafx.beans.property.ReadOnlyObjectWrapper; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; +import javafx.beans.value.ChangeListener; + +import javafx.collections.FXCollections; +import javafx.collections.ListChangeListener; +import javafx.collections.transformation.SortedList; + +import javafx.util.Callback; +import javafx.util.StringConverter; + +import java.util.Date; +import java.util.concurrent.TimeUnit; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.inject.Inject; -import java.util.Date; -import java.util.concurrent.TimeUnit; +import org.jetbrains.annotations.NotNull; @FxmlView public class TradesChartsView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/market/trades/TradesChartsViewModel.java b/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java similarity index 93% rename from src/main/java/io/bisq/gui/main/market/trades/TradesChartsViewModel.java rename to src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java index a313ca058b..eb31a21255 100644 --- a/src/main/java/io/bisq/gui/main/market/trades/TradesChartsViewModel.java +++ b/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java @@ -15,51 +15,68 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.market.trades; +package bisq.desktop.main.market.trades; + +import bisq.desktop.Navigation; +import bisq.desktop.common.model.ActivatableViewModel; +import bisq.desktop.main.MainView; +import bisq.desktop.main.market.trades.charts.CandleData; +import bisq.desktop.main.settings.SettingsView; +import bisq.desktop.main.settings.preferences.PreferencesView; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.CurrencyList; +import bisq.desktop.util.CurrencyListItem; +import bisq.desktop.util.GUIUtil; + +import bisq.core.provider.price.PriceFeedService; +import bisq.core.trade.statistics.TradeStatistics2; +import bisq.core.trade.statistics.TradeStatisticsManager; +import bisq.core.user.Preferences; + +import bisq.common.GlobalSettings; +import bisq.common.locale.CryptoCurrency; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.TradeCurrency; +import bisq.common.monetary.Altcoin; +import bisq.common.util.MathUtils; + +import org.bitcoinj.core.Coin; + +import com.google.inject.Inject; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; -import io.bisq.common.GlobalSettings; -import io.bisq.common.locale.CryptoCurrency; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.common.monetary.Altcoin; -import io.bisq.common.util.MathUtils; -import io.bisq.core.provider.price.PriceFeedService; -import io.bisq.core.trade.statistics.TradeStatistics2; -import io.bisq.core.trade.statistics.TradeStatisticsManager; -import io.bisq.core.user.Preferences; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.model.ActivatableViewModel; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.market.trades.charts.CandleData; -import io.bisq.gui.main.settings.SettingsView; -import io.bisq.gui.main.settings.preferences.PreferencesView; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.CurrencyList; -import io.bisq.gui.util.CurrencyListItem; -import io.bisq.gui.util.GUIUtil; + +import javafx.scene.chart.XYChart; + import javafx.beans.property.BooleanProperty; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.SimpleObjectProperty; + import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.collections.SetChangeListener; -import javafx.scene.chart.XYChart; + import javafx.util.Pair; -import org.bitcoinj.core.Coin; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.temporal.ChronoUnit; -import java.util.*; -import java.util.stream.Collectors; class TradesChartsViewModel extends ActivatableViewModel { - private static final int TAB_INDEX = 2; + private static final int TAB_INDEX = 2; /////////////////////////////////////////////////////////////////////////////////////////// // Enum @@ -94,7 +111,6 @@ class TradesChartsViewModel extends ActivatableViewModel { final int maxTicks = 30; private int selectedTabIndex; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle /////////////////////////////////////////////////////////////////////////////////////////// @@ -155,7 +171,6 @@ class TradesChartsViewModel extends ActivatableViewModel { tradeStatisticsManager.getObservableTradeStatisticsSet().removeListener(setChangeListener); } - /////////////////////////////////////////////////////////////////////////////////////////// // UI actions /////////////////////////////////////////////////////////////////////////////////////////// @@ -197,7 +212,6 @@ class TradesChartsViewModel extends ActivatableViewModel { setMarketPriceFeedCurrency(); } - /////////////////////////////////////////////////////////////////////////////////////////// // Getters /////////////////////////////////////////////////////////////////////////////////////////// @@ -214,7 +228,6 @@ class TradesChartsViewModel extends ActivatableViewModel { return currencyListItems.stream().filter(e -> e.tradeCurrency.equals(selectedTradeCurrencyProperty.get())).findAny(); } - /////////////////////////////////////////////////////////////////////////////////////////// // Private /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/main/java/io/bisq/gui/main/market/trades/charts/CandleData.java b/src/main/java/bisq/desktop/main/market/trades/charts/CandleData.java similarity index 97% rename from src/main/java/io/bisq/gui/main/market/trades/charts/CandleData.java rename to src/main/java/bisq/desktop/main/market/trades/charts/CandleData.java index 37b47b687e..2cf248f96e 100644 --- a/src/main/java/io/bisq/gui/main/market/trades/charts/CandleData.java +++ b/src/main/java/bisq/desktop/main/market/trades/charts/CandleData.java @@ -15,7 +15,7 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.market.trades.charts; +package bisq.desktop.main.market.trades.charts; public class CandleData { public final long tick; // Is the time tick in the chosen time interval diff --git a/src/main/java/io/bisq/gui/main/market/trades/charts/price/Candle.java b/src/main/java/bisq/desktop/main/market/trades/charts/price/Candle.java similarity index 84% rename from src/main/java/io/bisq/gui/main/market/trades/charts/price/Candle.java rename to src/main/java/bisq/desktop/main/market/trades/charts/price/Candle.java index abef86b873..40443145c0 100644 --- a/src/main/java/io/bisq/gui/main/market/trades/charts/price/Candle.java +++ b/src/main/java/bisq/desktop/main/market/trades/charts/price/Candle.java @@ -1,3 +1,20 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + /* * Copyright (c) 2008, 2014, Oracle and/or its affiliates. * All rights reserved. Use is subject to license terms. @@ -29,14 +46,17 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package io.bisq.gui.main.market.trades.charts.price; +package bisq.desktop.main.market.trades.charts.price; + +import bisq.desktop.main.market.trades.charts.CandleData; -import io.bisq.gui.main.market.trades.charts.CandleData; import javafx.scene.Group; import javafx.scene.control.Tooltip; import javafx.scene.layout.Region; import javafx.scene.shape.Line; + import javafx.util.StringConverter; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/main/market/trades/charts/price/CandleStickChart.java b/src/main/java/bisq/desktop/main/market/trades/charts/price/CandleStickChart.java similarity index 94% rename from src/main/java/io/bisq/gui/main/market/trades/charts/price/CandleStickChart.java rename to src/main/java/bisq/desktop/main/market/trades/charts/price/CandleStickChart.java index 30eb91a5b8..f2184c9546 100644 --- a/src/main/java/io/bisq/gui/main/market/trades/charts/price/CandleStickChart.java +++ b/src/main/java/bisq/desktop/main/market/trades/charts/price/CandleStickChart.java @@ -1,3 +1,20 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + /* * Copyright (c) 2008, 2014, Oracle and/or its affiliates. * All rights reserved. Use is subject to license terms. @@ -29,11 +46,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package io.bisq.gui.main.market.trades.charts.price; +package bisq.desktop.main.market.trades.charts.price; + +import bisq.desktop.main.market.trades.charts.CandleData; -import io.bisq.gui.main.market.trades.charts.CandleData; import javafx.animation.FadeTransition; -import javafx.event.ActionEvent; + import javafx.scene.Node; import javafx.scene.chart.Axis; import javafx.scene.chart.NumberAxis; @@ -41,15 +59,19 @@ import javafx.scene.chart.XYChart; import javafx.scene.shape.LineTo; import javafx.scene.shape.MoveTo; import javafx.scene.shape.Path; + +import javafx.event.ActionEvent; + import javafx.util.Duration; import javafx.util.StringConverter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * A candlestick chart is a style of bar-chart used primarily to describe price movements of a security, derivative, * or currency over time. @@ -306,4 +328,4 @@ public class CandleStickChart extends XYChart { } } } -} \ No newline at end of file +} diff --git a/src/main/java/io/bisq/gui/main/market/trades/charts/price/CandleTooltip.java b/src/main/java/bisq/desktop/main/market/trades/charts/price/CandleTooltip.java similarity index 83% rename from src/main/java/io/bisq/gui/main/market/trades/charts/price/CandleTooltip.java rename to src/main/java/bisq/desktop/main/market/trades/charts/price/CandleTooltip.java index 0aa0d29b26..a3411bd717 100644 --- a/src/main/java/io/bisq/gui/main/market/trades/charts/price/CandleTooltip.java +++ b/src/main/java/bisq/desktop/main/market/trades/charts/price/CandleTooltip.java @@ -1,3 +1,20 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + /* * Copyright (c) 2008, 2014, Oracle and/or its affiliates. * All rights reserved. Use is subject to license terms. @@ -29,17 +46,21 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package io.bisq.gui.main.market.trades.charts.price; +package bisq.desktop.main.market.trades.charts.price; + +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.main.market.trades.charts.CandleData; +import bisq.desktop.util.Layout; + +import bisq.common.locale.Res; -import io.bisq.common.locale.Res; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.main.market.trades.charts.CandleData; -import io.bisq.gui.util.Layout; -import javafx.geometry.HPos; import javafx.scene.control.Label; import javafx.scene.layout.ColumnConstraints; import javafx.scene.layout.GridPane; import javafx.scene.layout.Priority; + +import javafx.geometry.HPos; + import javafx.util.StringConverter; /** diff --git a/src/main/java/io/bisq/gui/main/market/trades/charts/volume/VolumeBar.java b/src/main/java/bisq/desktop/main/market/trades/charts/volume/VolumeBar.java similarity index 94% rename from src/main/java/io/bisq/gui/main/market/trades/charts/volume/VolumeBar.java rename to src/main/java/bisq/desktop/main/market/trades/charts/volume/VolumeBar.java index 15d0cbf8ab..98a05d3498 100644 --- a/src/main/java/io/bisq/gui/main/market/trades/charts/volume/VolumeBar.java +++ b/src/main/java/bisq/desktop/main/market/trades/charts/volume/VolumeBar.java @@ -14,14 +14,18 @@ * You should have received a copy of the GNU Affero General Public License * along with Bisq. If not, see . */ -package io.bisq.gui.main.market.trades.charts.volume; +package bisq.desktop.main.market.trades.charts.volume; + +import bisq.desktop.main.market.trades.charts.CandleData; + +import bisq.common.locale.Res; -import io.bisq.common.locale.Res; -import io.bisq.gui.main.market.trades.charts.CandleData; import javafx.scene.Group; import javafx.scene.control.Tooltip; import javafx.scene.layout.Region; + import javafx.util.StringConverter; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -62,4 +66,4 @@ public class VolumeBar extends Group { private void updateStyleClasses() { bar.getStyleClass().setAll("volume-bar", seriesStyleClass, dataStyleClass, "bg"); } -} \ No newline at end of file +} diff --git a/src/main/java/io/bisq/gui/main/market/trades/charts/volume/VolumeChart.java b/src/main/java/bisq/desktop/main/market/trades/charts/volume/VolumeChart.java similarity index 97% rename from src/main/java/io/bisq/gui/main/market/trades/charts/volume/VolumeChart.java rename to src/main/java/bisq/desktop/main/market/trades/charts/volume/VolumeChart.java index f337e3d83a..3c60c72194 100644 --- a/src/main/java/io/bisq/gui/main/market/trades/charts/volume/VolumeChart.java +++ b/src/main/java/bisq/desktop/main/market/trades/charts/volume/VolumeChart.java @@ -14,25 +14,30 @@ * You should have received a copy of the GNU Affero General Public License * along with Bisq. If not, see . */ -package io.bisq.gui.main.market.trades.charts.volume; +package bisq.desktop.main.market.trades.charts.volume; + +import bisq.desktop.main.market.trades.charts.CandleData; +import bisq.desktop.main.market.trades.charts.price.CandleStickChart; -import io.bisq.gui.main.market.trades.charts.CandleData; -import io.bisq.gui.main.market.trades.charts.price.CandleStickChart; import javafx.animation.FadeTransition; -import javafx.event.ActionEvent; + import javafx.scene.Node; import javafx.scene.chart.Axis; import javafx.scene.chart.NumberAxis; import javafx.scene.chart.XYChart; + +import javafx.event.ActionEvent; + import javafx.util.Duration; import javafx.util.StringConverter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class VolumeChart extends XYChart { private static final Logger log = LoggerFactory.getLogger(CandleStickChart.class); @@ -65,7 +70,7 @@ public class VolumeChart extends XYChart { candleWidth = xa.getDisplayPosition(xa.getTickUnit()) * 0.90; // use 90% width between ticks } - // 97 is visible chart data height if chart height is 140. + // 97 is visible chart data height if chart height is 140. // So we subtract 43 form the height to get the height for the bar to the bottom. // Did not find a way how to request the chart data height final double height = getHeight() - 43; @@ -184,4 +189,4 @@ public class VolumeChart extends XYChart { } } } -} \ No newline at end of file +} diff --git a/src/main/java/io/bisq/gui/main/offer/BuyOfferView.fxml b/src/main/java/bisq/desktop/main/offer/BuyOfferView.fxml similarity index 93% rename from src/main/java/io/bisq/gui/main/offer/BuyOfferView.fxml rename to src/main/java/bisq/desktop/main/offer/BuyOfferView.fxml index b865156c56..4c86edc170 100644 --- a/src/main/java/io/bisq/gui/main/offer/BuyOfferView.fxml +++ b/src/main/java/bisq/desktop/main/offer/BuyOfferView.fxml @@ -19,7 +19,7 @@ - diff --git a/src/main/java/io/bisq/gui/main/offer/BuyOfferView.java b/src/main/java/bisq/desktop/main/offer/BuyOfferView.java similarity index 83% rename from src/main/java/io/bisq/gui/main/offer/BuyOfferView.java rename to src/main/java/bisq/desktop/main/offer/BuyOfferView.java index d6eed4eadf..ed082446b3 100644 --- a/src/main/java/io/bisq/gui/main/offer/BuyOfferView.java +++ b/src/main/java/bisq/desktop/main/offer/BuyOfferView.java @@ -15,12 +15,13 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.offer; +package bisq.desktop.main.offer; -import io.bisq.core.user.Preferences; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.common.view.ViewLoader; +import bisq.desktop.Navigation; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.ViewLoader; + +import bisq.core.user.Preferences; import javax.inject.Inject; diff --git a/src/main/java/io/bisq/gui/main/offer/OfferDataModel.java b/src/main/java/bisq/desktop/main/offer/OfferDataModel.java similarity index 95% rename from src/main/java/io/bisq/gui/main/offer/OfferDataModel.java rename to src/main/java/bisq/desktop/main/offer/OfferDataModel.java index 8eff9241b0..c9c188a7c2 100644 --- a/src/main/java/io/bisq/gui/main/offer/OfferDataModel.java +++ b/src/main/java/bisq/desktop/main/offer/OfferDataModel.java @@ -15,17 +15,21 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.offer; +package bisq.desktop.main.offer; + +import bisq.desktop.common.model.ActivatableDataModel; + +import bisq.core.btc.AddressEntry; +import bisq.core.btc.wallet.BtcWalletService; + +import org.bitcoinj.core.Coin; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.gui.common.model.ActivatableDataModel; import javafx.beans.property.BooleanProperty; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.SimpleObjectProperty; + import lombok.Getter; -import org.bitcoinj.core.Coin; /** * Domain for that UI element. diff --git a/src/main/java/io/bisq/gui/main/offer/OfferView.java b/src/main/java/bisq/desktop/main/offer/OfferView.java similarity index 93% rename from src/main/java/io/bisq/gui/main/offer/OfferView.java rename to src/main/java/bisq/desktop/main/offer/OfferView.java index 9fdef385d3..28ea5ab23b 100644 --- a/src/main/java/io/bisq/gui/main/offer/OfferView.java +++ b/src/main/java/bisq/desktop/main/offer/OfferView.java @@ -15,31 +15,36 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.offer; +package bisq.desktop.main.offer; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.ActivatableView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.MainView; +import bisq.desktop.main.offer.createoffer.CreateOfferView; +import bisq.desktop.main.offer.offerbook.OfferBookView; +import bisq.desktop.main.offer.takeoffer.TakeOfferView; + +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.user.Preferences; + +import bisq.common.GlobalSettings; +import bisq.common.UserThread; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; -import io.bisq.common.GlobalSettings; -import io.bisq.common.UserThread; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.user.Preferences; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.ActivatableView; -import io.bisq.gui.common.view.View; -import io.bisq.gui.common.view.ViewLoader; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.offer.createoffer.CreateOfferView; -import io.bisq.gui.main.offer.offerbook.OfferBookView; -import io.bisq.gui.main.offer.takeoffer.TakeOfferView; -import javafx.beans.value.ChangeListener; -import javafx.collections.ListChangeListener; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import javafx.scene.layout.AnchorPane; +import javafx.beans.value.ChangeListener; + +import javafx.collections.ListChangeListener; + import java.util.List; import java.util.Optional; diff --git a/src/main/java/io/bisq/gui/main/offer/SellOfferView.fxml b/src/main/java/bisq/desktop/main/offer/SellOfferView.fxml similarity index 92% rename from src/main/java/io/bisq/gui/main/offer/SellOfferView.fxml rename to src/main/java/bisq/desktop/main/offer/SellOfferView.fxml index 953811b1ea..99349b45c2 100644 --- a/src/main/java/io/bisq/gui/main/offer/SellOfferView.fxml +++ b/src/main/java/bisq/desktop/main/offer/SellOfferView.fxml @@ -19,7 +19,7 @@ - diff --git a/src/main/java/io/bisq/gui/main/offer/SellOfferView.java b/src/main/java/bisq/desktop/main/offer/SellOfferView.java similarity index 83% rename from src/main/java/io/bisq/gui/main/offer/SellOfferView.java rename to src/main/java/bisq/desktop/main/offer/SellOfferView.java index b213231139..eb0bf00278 100644 --- a/src/main/java/io/bisq/gui/main/offer/SellOfferView.java +++ b/src/main/java/bisq/desktop/main/offer/SellOfferView.java @@ -15,12 +15,13 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.offer; +package bisq.desktop.main.offer; -import io.bisq.core.user.Preferences; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.common.view.ViewLoader; +import bisq.desktop.Navigation; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.ViewLoader; + +import bisq.core.user.Preferences; import javax.inject.Inject; diff --git a/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java b/src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferDataModel.java similarity index 93% rename from src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java rename to src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferDataModel.java index cddc41ed1c..a3f5068ca4 100644 --- a/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java +++ b/src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferDataModel.java @@ -15,51 +15,80 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.offer.createoffer; +package bisq.desktop.main.offer.createoffer; + +import bisq.desktop.main.offer.OfferDataModel; +import bisq.desktop.util.BSFormatter; + +import bisq.core.app.BisqEnvironment; +import bisq.core.arbitration.Arbitrator; +import bisq.core.btc.AddressEntry; +import bisq.core.btc.Restrictions; +import bisq.core.btc.listeners.BalanceListener; +import bisq.core.btc.wallet.BsqBalanceListener; +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.TradeWalletService; +import bisq.core.filter.FilterManager; +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.offer.OfferUtil; +import bisq.core.offer.OpenOfferManager; +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.BankAccount; +import bisq.core.payment.CountryBasedPaymentAccount; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.SameBankAccount; +import bisq.core.payment.SepaAccount; +import bisq.core.payment.SepaInstantAccount; +import bisq.core.payment.SpecificBanksAccount; +import bisq.core.provider.fee.FeeService; +import bisq.core.provider.price.PriceFeedService; +import bisq.core.trade.handlers.TransactionResultHandler; +import bisq.core.user.Preferences; +import bisq.core.user.User; + +import bisq.network.p2p.P2PService; + +import bisq.common.app.Version; +import bisq.common.crypto.KeyRing; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; +import bisq.common.monetary.Price; +import bisq.common.monetary.Volume; +import bisq.common.util.Utilities; -import com.google.common.collect.Lists; -import com.google.inject.Inject; -import io.bisq.common.app.Version; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.common.monetary.Price; -import io.bisq.common.monetary.Volume; -import io.bisq.common.util.Utilities; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.arbitration.Arbitrator; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.Restrictions; -import io.bisq.core.btc.listeners.BalanceListener; -import io.bisq.core.btc.wallet.BsqBalanceListener; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.TradeWalletService; -import io.bisq.core.filter.FilterManager; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.offer.OfferUtil; -import io.bisq.core.offer.OpenOfferManager; -import io.bisq.core.payment.*; -import io.bisq.core.provider.fee.FeeService; -import io.bisq.core.provider.price.PriceFeedService; -import io.bisq.core.trade.handlers.TransactionResultHandler; -import io.bisq.core.user.Preferences; -import io.bisq.core.user.User; -import io.bisq.gui.main.offer.OfferDataModel; -import io.bisq.gui.util.BSFormatter; -import io.bisq.network.p2p.P2PService; -import javafx.beans.property.*; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; -import javafx.collections.SetChangeListener; import org.bitcoinj.core.Address; import org.bitcoinj.core.Coin; import org.bitcoinj.core.InsufficientMoneyException; import org.bitcoinj.core.Transaction; -import java.util.*; +import com.google.inject.Inject; + +import com.google.common.collect.Lists; + +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.ReadOnlyBooleanProperty; +import javafx.beans.property.ReadOnlyObjectProperty; +import javafx.beans.property.ReadOnlyStringProperty; +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.property.SimpleObjectProperty; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; + +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.collections.SetChangeListener; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.UUID; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @@ -113,7 +142,6 @@ class CreateOfferDataModel extends OfferDataModel { private int feeTxSize = 260; // size of typical tx with 1 input private int feeTxSizeEstimationRecursionCounter; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle /////////////////////////////////////////////////////////////////////////////////////////// @@ -213,7 +241,6 @@ class CreateOfferDataModel extends OfferDataModel { user.getPaymentAccountsAsObservable().removeListener(paymentAccountsChangeListener); } - /////////////////////////////////////////////////////////////////////////////////////////// // API /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.fxml b/src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferView.fxml similarity index 90% rename from src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.fxml rename to src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferView.fxml index 1964d7db08..4d419ff1f9 100644 --- a/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.fxml +++ b/src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferView.fxml @@ -18,6 +18,6 @@ --> - diff --git a/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.java b/src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferView.java similarity index 94% rename from src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.java rename to src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferView.java index f97515e4a4..71fbbe090e 100644 --- a/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.java +++ b/src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferView.java @@ -15,71 +15,115 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.offer.createoffer; +package bisq.desktop.main.offer.createoffer; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AddressTextField; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.AutoTooltipToggleButton; +import bisq.desktop.components.BalanceTextField; +import bisq.desktop.components.BusyAnimation; +import bisq.desktop.components.FundsTextField; +import bisq.desktop.components.InputTextField; +import bisq.desktop.components.TitledGroupBg; +import bisq.desktop.main.MainView; +import bisq.desktop.main.account.AccountView; +import bisq.desktop.main.account.content.arbitratorselection.ArbitratorSelectionView; +import bisq.desktop.main.account.content.fiataccounts.FiatAccountsView; +import bisq.desktop.main.account.settings.AccountSettingsView; +import bisq.desktop.main.dao.DaoView; +import bisq.desktop.main.dao.wallet.BsqWalletView; +import bisq.desktop.main.dao.wallet.receive.BsqReceiveView; +import bisq.desktop.main.funds.FundsView; +import bisq.desktop.main.funds.withdrawal.WithdrawalView; +import bisq.desktop.main.offer.OfferView; +import bisq.desktop.main.overlays.notifications.Notification; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.overlays.windows.FeeOptionWindow; +import bisq.desktop.main.overlays.windows.OfferDetailsWindow; +import bisq.desktop.main.overlays.windows.QRCodeWindow; +import bisq.desktop.main.portfolio.PortfolioView; +import bisq.desktop.main.portfolio.openoffer.OpenOffersView; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Layout; +import bisq.desktop.util.Transitions; + +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.PaymentMethod; +import bisq.core.user.DontShowAgainLookup; +import bisq.core.user.Preferences; + +import bisq.common.UserThread; +import bisq.common.app.DevEnv; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; +import bisq.common.util.Tuple2; +import bisq.common.util.Tuple3; +import bisq.common.util.Utilities; + +import org.bitcoinj.core.Coin; -import io.bisq.common.UserThread; -import io.bisq.common.app.DevEnv; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Tuple3; -import io.bisq.common.util.Utilities; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.core.user.DontShowAgainLookup; -import io.bisq.core.user.Preferences; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.ActivatableViewAndModel; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.*; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.account.AccountView; -import io.bisq.gui.main.account.content.arbitratorselection.ArbitratorSelectionView; -import io.bisq.gui.main.account.content.fiataccounts.FiatAccountsView; -import io.bisq.gui.main.account.settings.AccountSettingsView; -import io.bisq.gui.main.dao.DaoView; -import io.bisq.gui.main.dao.wallet.BsqWalletView; -import io.bisq.gui.main.dao.wallet.receive.BsqReceiveView; -import io.bisq.gui.main.funds.FundsView; -import io.bisq.gui.main.funds.withdrawal.WithdrawalView; -import io.bisq.gui.main.offer.OfferView; -import io.bisq.gui.main.overlays.notifications.Notification; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.overlays.windows.FeeOptionWindow; -import io.bisq.gui.main.overlays.windows.OfferDetailsWindow; -import io.bisq.gui.main.overlays.windows.QRCodeWindow; -import io.bisq.gui.main.portfolio.PortfolioView; -import io.bisq.gui.main.portfolio.openoffer.OpenOffersView; -import io.bisq.gui.util.*; -import javafx.beans.value.ChangeListener; -import javafx.collections.FXCollections; -import javafx.event.ActionEvent; -import javafx.event.EventHandler; -import javafx.geometry.*; -import javafx.scene.Node; -import javafx.scene.control.*; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; -import javafx.scene.layout.*; -import javafx.scene.text.Font; -import javafx.util.StringConverter; import net.glxn.qrgen.QRCode; import net.glxn.qrgen.image.ImageType; -import org.bitcoinj.core.Coin; -import org.fxmisc.easybind.EasyBind; -import org.fxmisc.easybind.Subscription; -import org.jetbrains.annotations.NotNull; import javax.inject.Inject; + +import javafx.scene.Node; +import javafx.scene.control.Button; +import javafx.scene.control.ComboBox; +import javafx.scene.control.Label; +import javafx.scene.control.ScrollPane; +import javafx.scene.control.Separator; +import javafx.scene.control.TextField; +import javafx.scene.control.ToggleButton; +import javafx.scene.control.ToggleGroup; +import javafx.scene.control.Tooltip; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.layout.AnchorPane; +import javafx.scene.layout.ColumnConstraints; +import javafx.scene.layout.GridPane; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Priority; +import javafx.scene.layout.VBox; +import javafx.scene.text.Font; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.Orientation; +import javafx.geometry.Pos; +import javafx.geometry.VPos; + +import org.fxmisc.easybind.EasyBind; +import org.fxmisc.easybind.Subscription; + +import javafx.beans.value.ChangeListener; + +import javafx.event.ActionEvent; +import javafx.event.EventHandler; + +import javafx.collections.FXCollections; + +import javafx.util.StringConverter; + import java.io.ByteArrayInputStream; + import java.net.URI; + import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; -import static io.bisq.gui.util.FormBuilder.*; +import org.jetbrains.annotations.NotNull; + +import static bisq.desktop.util.FormBuilder.*; import static javafx.beans.binding.Bindings.createStringBinding; @FxmlView @@ -129,7 +173,6 @@ public class CreateOfferView extends ActivatableViewAndModel getShowWalletFundedNotificationListener; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle /////////////////////////////////////////////////////////////////////////////////////////// @@ -212,7 +255,6 @@ public class CreateOfferView extends ActivatableViewAndModel. */ -package io.bisq.gui.main.offer.createoffer; +package bisq.desktop.main.offer.createoffer; + +import bisq.desktop.Navigation; +import bisq.desktop.common.model.ActivatableWithDataModel; +import bisq.desktop.common.model.ViewModel; +import bisq.desktop.main.MainView; +import bisq.desktop.main.funds.FundsView; +import bisq.desktop.main.funds.deposit.DepositView; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.settings.SettingsView; +import bisq.desktop.main.settings.preferences.PreferencesView; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.validation.AltcoinValidator; +import bisq.desktop.util.validation.BsqValidator; +import bisq.desktop.util.validation.BtcValidator; +import bisq.desktop.util.validation.FiatPriceValidator; +import bisq.desktop.util.validation.FiatVolumeValidator; +import bisq.desktop.util.validation.InputValidator; +import bisq.desktop.util.validation.MonetaryValidator; +import bisq.desktop.util.validation.SecurityDepositValidator; + +import bisq.core.app.BisqEnvironment; +import bisq.core.btc.Restrictions; +import bisq.core.btc.wallet.WalletsSetup; +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.payment.PaymentAccount; +import bisq.core.provider.price.MarketPrice; +import bisq.core.provider.price.PriceFeedService; +import bisq.core.user.Preferences; + +import bisq.network.p2p.P2PService; + +import bisq.common.Timer; +import bisq.common.UserThread; +import bisq.common.app.DevEnv; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; +import bisq.common.monetary.Altcoin; +import bisq.common.monetary.Price; +import bisq.common.monetary.Volume; +import bisq.common.util.MathUtils; -import io.bisq.common.Timer; -import io.bisq.common.UserThread; -import io.bisq.common.app.DevEnv; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.common.monetary.Altcoin; -import io.bisq.common.monetary.Price; -import io.bisq.common.monetary.Volume; -import io.bisq.common.util.MathUtils; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.btc.Restrictions; -import io.bisq.core.btc.wallet.WalletsSetup; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.provider.price.MarketPrice; -import io.bisq.core.provider.price.PriceFeedService; -import io.bisq.core.user.Preferences; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.model.ActivatableWithDataModel; -import io.bisq.gui.common.model.ViewModel; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.funds.FundsView; -import io.bisq.gui.main.funds.deposit.DepositView; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.settings.SettingsView; -import io.bisq.gui.main.settings.preferences.PreferencesView; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.validation.*; -import io.bisq.network.p2p.P2PService; -import javafx.beans.property.*; -import javafx.beans.value.ChangeListener; import org.bitcoinj.core.Address; import org.bitcoinj.core.Coin; import org.bitcoinj.utils.Fiat; import javax.inject.Inject; + +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.beans.property.SimpleObjectProperty; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; +import javafx.beans.value.ChangeListener; + import java.util.concurrent.TimeUnit; import static javafx.beans.binding.Bindings.createStringBinding; @@ -150,7 +170,6 @@ class CreateOfferViewModel extends ActivatableWithDataModel currenciesUpdateListener; private boolean syncMinAmountWithAmount = true; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle /////////////////////////////////////////////////////////////////////////////////////////// @@ -788,7 +807,6 @@ class CreateOfferViewModel extends ActivatableWithDataModel. */ -package io.bisq.gui.main.offer.offerbook; +package bisq.desktop.main.offer.offerbook; -import io.bisq.common.app.Log; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferBookService; -import io.bisq.core.trade.TradeManager; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; -import lombok.extern.slf4j.Slf4j; +import bisq.core.offer.Offer; +import bisq.core.offer.OfferBookService; +import bisq.core.trade.TradeManager; + +import bisq.common.app.Log; import javax.inject.Inject; + +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; + import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; -import static io.bisq.core.offer.OfferPayload.Direction.BUY; +import lombok.extern.slf4j.Slf4j; + +import static bisq.core.offer.OfferPayload.Direction.BUY; /** * Holds and manages the unsorted and unfiltered offerbook list of both buy and sell offers. diff --git a/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookListItem.java b/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookListItem.java similarity index 91% rename from src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookListItem.java rename to src/main/java/bisq/desktop/main/offer/offerbook/OfferBookListItem.java index 569b1cc886..c65c255e99 100644 --- a/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookListItem.java +++ b/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookListItem.java @@ -15,9 +15,10 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.offer.offerbook; +package bisq.desktop.main.offer.offerbook; + +import bisq.core.offer.Offer; -import io.bisq.core.offer.Offer; import lombok.Value; @Value diff --git a/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.fxml b/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.fxml similarity index 92% rename from src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.fxml rename to src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.fxml index abdb3efdcd..4cb453b255 100644 --- a/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.fxml +++ b/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.fxml @@ -19,7 +19,7 @@ - diff --git a/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java b/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java similarity index 95% rename from src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java rename to src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java index 360c6addde..5e4661bd3c 100644 --- a/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java +++ b/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java @@ -15,64 +15,90 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.offer.offerbook; +package bisq.desktop.main.offer.offerbook; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.AutoTooltipTableColumn; +import bisq.desktop.components.ColoredDecimalPlacesWithZerosText; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.components.PeerInfoIcon; +import bisq.desktop.main.MainView; +import bisq.desktop.main.account.AccountView; +import bisq.desktop.main.account.content.arbitratorselection.ArbitratorSelectionView; +import bisq.desktop.main.account.content.fiataccounts.FiatAccountsView; +import bisq.desktop.main.account.settings.AccountSettingsView; +import bisq.desktop.main.funds.FundsView; +import bisq.desktop.main.funds.withdrawal.WithdrawalView; +import bisq.desktop.main.offer.OfferView; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.overlays.windows.OfferDetailsWindow; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Layout; + +import bisq.core.alert.PrivateNotificationManager; +import bisq.core.app.AppOptionKeys; +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.PaymentMethod; +import bisq.core.user.DontShowAgainLookup; + +import bisq.network.p2p.NodeAddress; + +import bisq.common.locale.FiatCurrency; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; +import bisq.common.monetary.Price; +import bisq.common.monetary.Volume; + +import org.bitcoinj.core.Coin; import com.google.inject.name.Named; -import io.bisq.common.locale.FiatCurrency; -import io.bisq.common.locale.Res; -import io.bisq.common.locale.TradeCurrency; -import io.bisq.common.monetary.Price; -import io.bisq.common.monetary.Volume; -import io.bisq.core.alert.PrivateNotificationManager; -import io.bisq.core.app.AppOptionKeys; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.core.user.DontShowAgainLookup; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.ActivatableViewAndModel; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.*; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.account.AccountView; -import io.bisq.gui.main.account.content.arbitratorselection.ArbitratorSelectionView; -import io.bisq.gui.main.account.content.fiataccounts.FiatAccountsView; -import io.bisq.gui.main.account.settings.AccountSettingsView; -import io.bisq.gui.main.funds.FundsView; -import io.bisq.gui.main.funds.withdrawal.WithdrawalView; -import io.bisq.gui.main.offer.OfferView; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.overlays.windows.OfferDetailsWindow; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.Layout; -import io.bisq.network.p2p.NodeAddress; -import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.beans.value.ChangeListener; -import javafx.beans.value.ObservableValue; -import javafx.collections.ListChangeListener; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.geometry.VPos; + +import javax.inject.Inject; + import javafx.scene.Scene; import javafx.scene.canvas.Canvas; -import javafx.scene.control.*; +import javafx.scene.control.Button; +import javafx.scene.control.ComboBox; +import javafx.scene.control.Label; +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableRow; +import javafx.scene.control.TableView; +import javafx.scene.control.Tooltip; import javafx.scene.image.ImageView; import javafx.scene.layout.GridPane; import javafx.scene.layout.Priority; -import javafx.util.Callback; -import javafx.util.StringConverter; -import org.bitcoinj.core.Coin; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.VPos; + import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; import org.fxmisc.easybind.monadic.MonadicBinding; -import javax.inject.Inject; +import javafx.beans.property.ReadOnlyObjectWrapper; +import javafx.beans.value.ChangeListener; +import javafx.beans.value.ObservableValue; + +import javafx.collections.ListChangeListener; + +import javafx.util.Callback; +import javafx.util.StringConverter; + import java.util.Comparator; import java.util.Optional; -import static io.bisq.gui.util.FormBuilder.*; +import static bisq.desktop.util.FormBuilder.addButton; +import static bisq.desktop.util.FormBuilder.addLabelComboBox; +import static bisq.desktop.util.FormBuilder.addTitledGroupBg; @FxmlView public class OfferBookView extends ActivatableViewAndModel { @@ -96,7 +122,6 @@ public class OfferBookView extends ActivatableViewAndModel priceFeedUpdateCounterListener; private Subscription currencySelectionSubscriber; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle /////////////////////////////////////////////////////////////////////////////////////////// @@ -305,7 +330,6 @@ public class OfferBookView extends ActivatableViewAndModel. */ -package io.bisq.gui.main.offer.offerbook; +package bisq.desktop.main.offer.offerbook; + +import bisq.desktop.Navigation; +import bisq.desktop.common.model.ActivatableViewModel; +import bisq.desktop.main.MainView; +import bisq.desktop.main.settings.SettingsView; +import bisq.desktop.main.settings.preferences.PreferencesView; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; + +import bisq.core.btc.wallet.WalletsSetup; +import bisq.core.filter.FilterManager; +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.offer.OpenOfferManager; +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.PaymentAccountUtil; +import bisq.core.payment.payload.PaymentMethod; +import bisq.core.provider.price.PriceFeedService; +import bisq.core.trade.Trade; +import bisq.core.trade.closed.ClosedTradableManager; +import bisq.core.user.Preferences; +import bisq.core.user.User; + +import bisq.network.p2p.NodeAddress; +import bisq.network.p2p.P2PService; + +import bisq.common.GlobalSettings; +import bisq.common.app.Version; +import bisq.common.handlers.ErrorMessageHandler; +import bisq.common.handlers.ResultHandler; +import bisq.common.locale.BankUtil; +import bisq.common.locale.CountryUtil; +import bisq.common.locale.CryptoCurrency; +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.locale.TradeCurrency; +import bisq.common.monetary.Price; +import bisq.common.monetary.Volume; + +import org.bitcoinj.core.Coin; + +import com.google.inject.Inject; import com.google.common.base.Joiner; -import com.google.inject.Inject; -import io.bisq.common.GlobalSettings; -import io.bisq.common.app.Version; -import io.bisq.common.handlers.ErrorMessageHandler; -import io.bisq.common.handlers.ResultHandler; -import io.bisq.common.locale.*; -import io.bisq.common.monetary.Price; -import io.bisq.common.monetary.Volume; -import io.bisq.core.btc.wallet.WalletsSetup; -import io.bisq.core.filter.FilterManager; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.offer.OpenOfferManager; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.PaymentAccountUtil; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.core.provider.price.PriceFeedService; -import io.bisq.core.trade.Trade; -import io.bisq.core.trade.closed.ClosedTradableManager; -import io.bisq.core.user.Preferences; -import io.bisq.core.user.User; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.model.ActivatableViewModel; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.settings.SettingsView; -import io.bisq.gui.main.settings.preferences.PreferencesView; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.network.p2p.NodeAddress; -import io.bisq.network.p2p.P2PService; -import javafx.beans.property.*; + +import javafx.scene.control.TableColumn; + +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.beans.property.SimpleObjectProperty; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; + import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; import javafx.collections.transformation.FilteredList; import javafx.collections.transformation.SortedList; -import javafx.scene.control.TableColumn; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.Coin; import java.text.DecimalFormat; + import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; + @Slf4j class OfferBookViewModel extends ActivatableViewModel { private final OpenOfferManager openOfferManager; @@ -106,7 +129,6 @@ class OfferBookViewModel extends ActivatableViewModel { final IntegerProperty maxPlacesForMarketPriceMargin = new SimpleIntegerProperty(); boolean showAllPaymentMethods = true; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle /////////////////////////////////////////////////////////////////////////////////////////// @@ -216,7 +238,6 @@ class OfferBookViewModel extends ActivatableViewModel { preferences.getTradeCurrenciesAsObservable().removeListener(tradeCurrencyListChangeListener); } - /////////////////////////////////////////////////////////////////////////////////////////// // API /////////////////////////////////////////////////////////////////////////////////////////// @@ -230,7 +251,6 @@ class OfferBookViewModel extends ActivatableViewModel { setMarketPriceFeedCurrency(); } - /////////////////////////////////////////////////////////////////////////////////////////// // UI actions /////////////////////////////////////////////////////////////////////////////////////////// @@ -280,7 +300,6 @@ class OfferBookViewModel extends ActivatableViewModel { openOfferManager.removeOffer(offer, resultHandler, errorMessageHandler); } - /////////////////////////////////////////////////////////////////////////////////////////// // Getters /////////////////////////////////////////////////////////////////////////////////////////// @@ -469,7 +488,6 @@ class OfferBookViewModel extends ActivatableViewModel { allTradeCurrencies.add(new CryptoCurrency(GUIUtil.EDIT_FLAG, GUIUtil.EDIT_FLAG)); } - /////////////////////////////////////////////////////////////////////////////////////////// // Checks /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferDataModel.java b/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferDataModel.java similarity index 95% rename from src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferDataModel.java rename to src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferDataModel.java index 4a5d1e98e0..5adbcebfb7 100644 --- a/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferDataModel.java +++ b/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferDataModel.java @@ -15,50 +15,57 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.offer.takeoffer; +package bisq.desktop.main.offer.takeoffer; + +import bisq.desktop.main.offer.OfferDataModel; +import bisq.desktop.main.overlays.popups.Popup; + +import bisq.core.app.BisqEnvironment; +import bisq.core.arbitration.Arbitrator; +import bisq.core.btc.AddressEntry; +import bisq.core.btc.Restrictions; +import bisq.core.btc.listeners.BalanceListener; +import bisq.core.btc.wallet.BsqWalletService; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.TradeWalletService; +import bisq.core.filter.FilterManager; +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.payment.AccountAgeWitnessService; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.PaymentAccountUtil; +import bisq.core.payment.payload.PaymentMethod; +import bisq.core.provider.fee.FeeService; +import bisq.core.provider.price.PriceFeedService; +import bisq.core.trade.TradeManager; +import bisq.core.trade.handlers.TradeResultHandler; +import bisq.core.user.Preferences; +import bisq.core.user.User; +import bisq.core.util.CoinUtil; + +import bisq.common.locale.CurrencyUtil; +import bisq.common.locale.Res; +import bisq.common.monetary.Price; +import bisq.common.monetary.Volume; -import com.google.inject.Inject; -import io.bisq.common.locale.CurrencyUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.monetary.Price; -import io.bisq.common.monetary.Volume; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.arbitration.Arbitrator; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.Restrictions; -import io.bisq.core.btc.listeners.BalanceListener; -import io.bisq.core.btc.wallet.BsqWalletService; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.TradeWalletService; -import io.bisq.core.filter.FilterManager; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.payment.AccountAgeWitnessService; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.PaymentAccountUtil; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.core.provider.fee.FeeService; -import io.bisq.core.provider.price.PriceFeedService; -import io.bisq.core.trade.TradeManager; -import io.bisq.core.trade.handlers.TradeResultHandler; -import io.bisq.core.user.Preferences; -import io.bisq.core.user.User; -import io.bisq.core.util.CoinUtil; -import io.bisq.gui.main.offer.OfferDataModel; -import io.bisq.gui.main.overlays.popups.Popup; -import javafx.beans.property.ObjectProperty; -import javafx.beans.property.ReadOnlyObjectProperty; -import javafx.beans.property.SimpleObjectProperty; -import javafx.collections.ObservableList; import org.bitcoinj.core.Address; import org.bitcoinj.core.Coin; import org.bitcoinj.core.InsufficientMoneyException; import org.bitcoinj.core.Transaction; import org.bitcoinj.wallet.Wallet; -import javax.annotation.Nullable; +import com.google.inject.Inject; + +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.ReadOnlyObjectProperty; +import javafx.beans.property.SimpleObjectProperty; + +import javafx.collections.ObservableList; + import java.util.List; +import javax.annotation.Nullable; + import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @@ -157,7 +164,6 @@ class TakeOfferDataModel extends OfferDataModel { tradeManager.onCancelAvailabilityRequest(offer); } - /////////////////////////////////////////////////////////////////////////////////////////// // API /////////////////////////////////////////////////////////////////////////////////////////// @@ -270,7 +276,6 @@ class TakeOfferDataModel extends OfferDataModel { btcWalletService.resetAddressEntriesForOpenOffer(offer.getId()); } - /////////////////////////////////////////////////////////////////////////////////////////// // UI actions /////////////////////////////////////////////////////////////////////////////////////////// @@ -422,7 +427,6 @@ class TakeOfferDataModel extends OfferDataModel { preferences.setPayFeeInBtc(isCurrencyForTakerFeeBtc); } - /////////////////////////////////////////////////////////////////////////////////////////// // Getters /////////////////////////////////////////////////////////////////////////////////////////// @@ -467,7 +471,6 @@ class TakeOfferDataModel extends OfferDataModel { return 0; } - /////////////////////////////////////////////////////////////////////////////////////////// // Bindings, listeners /////////////////////////////////////////////////////////////////////////////////////////// @@ -480,7 +483,6 @@ class TakeOfferDataModel extends OfferDataModel { btcWalletService.removeBalanceListener(balanceListener); } - /////////////////////////////////////////////////////////////////////////////////////////// // Utils /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.fxml b/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferView.fxml similarity index 90% rename from src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.fxml rename to src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferView.fxml index 3956d00716..af183ce569 100644 --- a/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.fxml +++ b/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferView.fxml @@ -18,7 +18,7 @@ --> - diff --git a/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.java b/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferView.java similarity index 94% rename from src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.java rename to src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferView.java index 5d9a89c5a7..b2249eb956 100644 --- a/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.java +++ b/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferView.java @@ -15,62 +15,102 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.offer.takeoffer; +package bisq.desktop.main.offer.takeoffer; + +import bisq.desktop.Navigation; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.components.AddressTextField; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.BalanceTextField; +import bisq.desktop.components.BusyAnimation; +import bisq.desktop.components.FundsTextField; +import bisq.desktop.components.InputTextField; +import bisq.desktop.components.TitledGroupBg; +import bisq.desktop.main.MainView; +import bisq.desktop.main.account.AccountView; +import bisq.desktop.main.account.content.arbitratorselection.ArbitratorSelectionView; +import bisq.desktop.main.account.settings.AccountSettingsView; +import bisq.desktop.main.dao.DaoView; +import bisq.desktop.main.dao.wallet.BsqWalletView; +import bisq.desktop.main.dao.wallet.receive.BsqReceiveView; +import bisq.desktop.main.funds.FundsView; +import bisq.desktop.main.funds.withdrawal.WithdrawalView; +import bisq.desktop.main.offer.OfferView; +import bisq.desktop.main.overlays.notifications.Notification; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.overlays.windows.FeeOptionWindow; +import bisq.desktop.main.overlays.windows.OfferDetailsWindow; +import bisq.desktop.main.overlays.windows.QRCodeWindow; +import bisq.desktop.main.portfolio.PortfolioView; +import bisq.desktop.main.portfolio.pendingtrades.PendingTradesView; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Layout; + +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.PaymentMethod; +import bisq.core.user.DontShowAgainLookup; + +import bisq.common.UserThread; +import bisq.common.app.DevEnv; +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; +import bisq.common.util.Tuple3; +import bisq.common.util.Utilities; + +import org.bitcoinj.core.Coin; -import io.bisq.common.UserThread; -import io.bisq.common.app.DevEnv; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Tuple3; -import io.bisq.common.util.Utilities; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.core.user.DontShowAgainLookup; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.view.ActivatableViewAndModel; -import io.bisq.gui.common.view.FxmlView; -import io.bisq.gui.components.*; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.account.AccountView; -import io.bisq.gui.main.account.content.arbitratorselection.ArbitratorSelectionView; -import io.bisq.gui.main.account.settings.AccountSettingsView; -import io.bisq.gui.main.dao.DaoView; -import io.bisq.gui.main.dao.wallet.BsqWalletView; -import io.bisq.gui.main.dao.wallet.receive.BsqReceiveView; -import io.bisq.gui.main.funds.FundsView; -import io.bisq.gui.main.funds.withdrawal.WithdrawalView; -import io.bisq.gui.main.offer.OfferView; -import io.bisq.gui.main.overlays.notifications.Notification; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.overlays.windows.FeeOptionWindow; -import io.bisq.gui.main.overlays.windows.OfferDetailsWindow; -import io.bisq.gui.main.overlays.windows.QRCodeWindow; -import io.bisq.gui.main.portfolio.PortfolioView; -import io.bisq.gui.main.portfolio.pendingtrades.PendingTradesView; -import io.bisq.gui.util.*; -import javafx.beans.property.SimpleBooleanProperty; -import javafx.beans.value.ChangeListener; -import javafx.geometry.*; -import javafx.scene.control.*; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; -import javafx.scene.layout.*; -import javafx.scene.text.Font; import net.glxn.qrgen.QRCode; import net.glxn.qrgen.image.ImageType; -import org.bitcoinj.core.Coin; -import org.fxmisc.easybind.EasyBind; -import org.fxmisc.easybind.Subscription; -import org.jetbrains.annotations.NotNull; import javax.inject.Inject; + +import javafx.scene.control.Button; +import javafx.scene.control.ComboBox; +import javafx.scene.control.Label; +import javafx.scene.control.ScrollPane; +import javafx.scene.control.Separator; +import javafx.scene.control.TextField; +import javafx.scene.control.Tooltip; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.layout.AnchorPane; +import javafx.scene.layout.ColumnConstraints; +import javafx.scene.layout.GridPane; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Priority; +import javafx.scene.layout.VBox; +import javafx.scene.text.Font; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.Orientation; +import javafx.geometry.Pos; +import javafx.geometry.VPos; + +import org.fxmisc.easybind.EasyBind; +import org.fxmisc.easybind.Subscription; + +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.value.ChangeListener; + import java.io.ByteArrayInputStream; + import java.net.URI; + import java.util.concurrent.TimeUnit; -import static io.bisq.gui.util.FormBuilder.*; +import org.jetbrains.annotations.NotNull; + +import static bisq.desktop.util.FormBuilder.addLabelFundsTextfield; +import static bisq.desktop.util.FormBuilder.getAmountCurrencyBox; +import static bisq.desktop.util.FormBuilder.getNonEditableValueCurrencyBox; import static javafx.beans.binding.Bindings.createStringBinding; @FxmlView @@ -113,7 +153,6 @@ public class TakeOfferView extends ActivatableViewAndModel getShowWalletFundedNotificationListener; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle /////////////////////////////////////////////////////////////////////////////////////////// @@ -229,7 +268,6 @@ public class TakeOfferView extends ActivatableViewAndModel. */ -package io.bisq.gui.main.offer.takeoffer; +package bisq.desktop.main.offer.takeoffer; + +import bisq.desktop.Navigation; +import bisq.desktop.common.model.ActivatableWithDataModel; +import bisq.desktop.common.model.ViewModel; +import bisq.desktop.main.MainView; +import bisq.desktop.main.funds.FundsView; +import bisq.desktop.main.funds.deposit.DepositView; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.BsqFormatter; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.validation.BtcValidator; +import bisq.desktop.util.validation.InputValidator; + +import bisq.core.btc.wallet.WalletsSetup; +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.PaymentMethod; +import bisq.core.trade.Trade; + +import bisq.network.p2p.P2PService; +import bisq.network.p2p.network.CloseConnectionReason; +import bisq.network.p2p.network.Connection; +import bisq.network.p2p.network.ConnectionListener; + +import bisq.common.app.DevEnv; +import bisq.common.locale.Res; -import io.bisq.common.app.DevEnv; -import io.bisq.common.locale.Res; -import io.bisq.core.btc.wallet.WalletsSetup; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.core.trade.Trade; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.model.ActivatableWithDataModel; -import io.bisq.gui.common.model.ViewModel; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.funds.FundsView; -import io.bisq.gui.main.funds.deposit.DepositView; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.BsqFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.validation.BtcValidator; -import io.bisq.gui.util.validation.InputValidator; -import io.bisq.network.p2p.P2PService; -import io.bisq.network.p2p.network.CloseConnectionReason; -import io.bisq.network.p2p.network.Connection; -import io.bisq.network.p2p.network.ConnectionListener; -import javafx.beans.property.*; -import javafx.beans.value.ChangeListener; -import javafx.collections.ObservableList; import org.bitcoinj.core.Coin; -import javax.annotation.Nullable; import javax.inject.Inject; +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.property.SimpleObjectProperty; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; +import javafx.beans.value.ChangeListener; + +import javafx.collections.ObservableList; + +import javax.annotation.Nullable; + import static com.google.common.base.Preconditions.checkNotNull; import static javafx.beans.binding.Bindings.createStringBinding; @@ -104,7 +116,6 @@ class TakeOfferViewModel extends ActivatableWithDataModel im private Runnable takeOfferSucceededHandler; String marketPriceMargin; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle /////////////////////////////////////////////////////////////////////////////////////////// @@ -155,7 +166,6 @@ class TakeOfferViewModel extends ActivatableWithDataModel im removeListeners(); } - /////////////////////////////////////////////////////////////////////////////////////////// // API /////////////////////////////////////////////////////////////////////////////////////////// @@ -192,7 +202,6 @@ class TakeOfferViewModel extends ActivatableWithDataModel im btcValidator.setMinValue(offer.getMinAmount()); } - /////////////////////////////////////////////////////////////////////////////////////////// // UI actions /////////////////////////////////////////////////////////////////////////////////////////// @@ -287,7 +296,6 @@ class TakeOfferViewModel extends ActivatableWithDataModel im } } - /////////////////////////////////////////////////////////////////////////////////////////// // States /////////////////////////////////////////////////////////////////////////////////////////// @@ -402,7 +410,6 @@ class TakeOfferViewModel extends ActivatableWithDataModel im isTakeOfferButtonDisabled.set(takeOfferRequested || !inputDataValid || !dataModel.getIsBtcWalletFunded().get()); } - /////////////////////////////////////////////////////////////////////////////////////////// // Bindings, listeners /////////////////////////////////////////////////////////////////////////////////////////// @@ -520,7 +527,6 @@ class TakeOfferViewModel extends ActivatableWithDataModel im //isFeeSufficientSubscription.unsubscribe(); } - /////////////////////////////////////////////////////////////////////////////////////////// // Utils /////////////////////////////////////////////////////////////////////////////////////////// @@ -534,7 +540,6 @@ class TakeOfferViewModel extends ActivatableWithDataModel im dataModel.applyAmount(btcFormatter.parseToCoinWith4Decimals(amount.get())); } - /////////////////////////////////////////////////////////////////////////////////////////// // Getters /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/main/java/io/bisq/gui/main/overlays/Overlay.java b/src/main/java/bisq/desktop/main/overlays/Overlay.java similarity index 97% rename from src/main/java/io/bisq/gui/main/overlays/Overlay.java rename to src/main/java/bisq/desktop/main/overlays/Overlay.java index ba774ceec1..9172370bf8 100644 --- a/src/main/java/io/bisq/gui/main/overlays/Overlay.java +++ b/src/main/java/bisq/desktop/main/overlays/Overlay.java @@ -15,31 +15,37 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays; +package bisq.desktop.main.overlays; + +import bisq.desktop.app.BisqApp; +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.BusyAnimation; +import bisq.desktop.main.MainView; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Transitions; + +import bisq.core.app.BisqEnvironment; +import bisq.core.user.DontShowAgainLookup; + +import bisq.common.GlobalSettings; +import bisq.common.Timer; +import bisq.common.UserThread; +import bisq.common.locale.Res; +import bisq.common.util.Utilities; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.GlobalSettings; -import io.bisq.common.Timer; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Utilities; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.user.DontShowAgainLookup; -import io.bisq.gui.app.BisqApp; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.BusyAnimation; -import io.bisq.gui.main.MainView; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.Transitions; import javafx.animation.Interpolator; import javafx.animation.KeyFrame; import javafx.animation.KeyValue; import javafx.animation.Timeline; -import javafx.beans.value.ChangeListener; -import javafx.collections.ObservableList; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.geometry.Orientation; + +import javafx.stage.Modality; +import javafx.stage.Stage; +import javafx.stage.StageStyle; +import javafx.stage.Window; + import javafx.scene.PerspectiveCamera; import javafx.scene.Scene; import javafx.scene.control.Button; @@ -47,24 +53,35 @@ import javafx.scene.control.CheckBox; import javafx.scene.control.Label; import javafx.scene.control.Separator; import javafx.scene.input.KeyCode; -import javafx.scene.layout.*; +import javafx.scene.layout.ColumnConstraints; +import javafx.scene.layout.GridPane; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Pane; +import javafx.scene.layout.Priority; import javafx.scene.paint.Color; import javafx.scene.transform.Rotate; -import javafx.stage.Modality; -import javafx.stage.Stage; -import javafx.stage.StageStyle; -import javafx.stage.Window; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.Orientation; + +import javafx.beans.value.ChangeListener; + +import javafx.collections.ObservableList; + import javafx.util.Duration; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; + +import java.nio.file.Paths; import java.io.File; import java.io.IOException; -import java.nio.file.Paths; + import java.util.Optional; import java.util.concurrent.TimeUnit; -import static io.bisq.gui.util.FormBuilder.addCheckBox; +import lombok.extern.slf4j.Slf4j; + +import static bisq.desktop.util.FormBuilder.addCheckBox; @Slf4j public abstract class Overlay { diff --git a/src/main/java/io/bisq/gui/main/overlays/editor/PeerInfoWithTagEditor.java b/src/main/java/bisq/desktop/main/overlays/editor/PeerInfoWithTagEditor.java similarity index 88% rename from src/main/java/io/bisq/gui/main/overlays/editor/PeerInfoWithTagEditor.java rename to src/main/java/bisq/desktop/main/overlays/editor/PeerInfoWithTagEditor.java index e7c9e3a27e..c513f368da 100644 --- a/src/main/java/io/bisq/gui/main/overlays/editor/PeerInfoWithTagEditor.java +++ b/src/main/java/bisq/desktop/main/overlays/editor/PeerInfoWithTagEditor.java @@ -1,25 +1,43 @@ -package io.bisq.gui.main.overlays.editor; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.main.overlays.editor; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.windows.SendPrivateNotificationWindow; +import bisq.desktop.util.FormBuilder; + +import bisq.core.alert.PrivateNotificationManager; +import bisq.core.offer.Offer; +import bisq.core.user.Preferences; + +import bisq.common.GlobalSettings; +import bisq.common.locale.Res; +import bisq.common.util.Utilities; -import io.bisq.common.GlobalSettings; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Utilities; -import io.bisq.core.alert.PrivateNotificationManager; -import io.bisq.core.offer.Offer; -import io.bisq.core.user.Preferences; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.windows.SendPrivateNotificationWindow; -import io.bisq.gui.util.FormBuilder; import javafx.animation.Interpolator; import javafx.animation.KeyFrame; import javafx.animation.KeyValue; import javafx.animation.Timeline; -import javafx.beans.value.ChangeListener; -import javafx.collections.ObservableList; -import javafx.event.EventHandler; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.geometry.Point2D; + +import javafx.stage.Modality; +import javafx.stage.Window; + import javafx.scene.Camera; import javafx.scene.PerspectiveCamera; import javafx.scene.Scene; @@ -27,14 +45,25 @@ import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; import javafx.scene.layout.GridPane; import javafx.scene.transform.Rotate; -import javafx.stage.Modality; -import javafx.stage.Window; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.Point2D; + +import javafx.beans.value.ChangeListener; + +import javafx.event.EventHandler; + +import javafx.collections.ObservableList; + import javafx.util.Duration; + +import java.util.Map; +import java.util.function.Consumer; + import lombok.extern.slf4j.Slf4j; import javax.annotation.Nullable; -import java.util.Map; -import java.util.function.Consumer; @Slf4j public class PeerInfoWithTagEditor extends Overlay { diff --git a/src/main/java/io/bisq/gui/main/overlays/notifications/Notification.java b/src/main/java/bisq/desktop/main/overlays/notifications/Notification.java similarity index 88% rename from src/main/java/io/bisq/gui/main/overlays/notifications/Notification.java rename to src/main/java/bisq/desktop/main/overlays/notifications/Notification.java index ed33b7d427..955ca28a9e 100644 --- a/src/main/java/io/bisq/gui/main/overlays/notifications/Notification.java +++ b/src/main/java/bisq/desktop/main/overlays/notifications/Notification.java @@ -1,21 +1,46 @@ -package io.bisq.gui.main.overlays.notifications; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.main.overlays.notifications; + +import bisq.desktop.main.overlays.Overlay; + +import bisq.common.Timer; +import bisq.common.UserThread; +import bisq.common.locale.Res; -import io.bisq.common.Timer; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.gui.main.overlays.Overlay; import javafx.animation.Interpolator; import javafx.animation.KeyFrame; import javafx.animation.KeyValue; import javafx.animation.Timeline; -import javafx.collections.ObservableList; -import javafx.geometry.Insets; + +import javafx.stage.Modality; +import javafx.stage.Window; + import javafx.scene.Camera; import javafx.scene.PerspectiveCamera; import javafx.scene.transform.Rotate; -import javafx.stage.Modality; -import javafx.stage.Window; + +import javafx.geometry.Insets; + +import javafx.collections.ObservableList; + import javafx.util.Duration; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/main/overlays/notifications/NotificationCenter.java b/src/main/java/bisq/desktop/main/overlays/notifications/NotificationCenter.java similarity index 87% rename from src/main/java/io/bisq/gui/main/overlays/notifications/NotificationCenter.java rename to src/main/java/bisq/desktop/main/overlays/notifications/NotificationCenter.java index cf0e6fa188..5ae8469044 100644 --- a/src/main/java/io/bisq/gui/main/overlays/notifications/NotificationCenter.java +++ b/src/main/java/bisq/desktop/main/overlays/notifications/NotificationCenter.java @@ -1,35 +1,62 @@ -package io.bisq.gui.main.overlays.notifications; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.main.overlays.notifications; + +import bisq.desktop.Navigation; +import bisq.desktop.main.MainView; +import bisq.desktop.main.disputes.DisputesView; +import bisq.desktop.main.disputes.trader.TraderDisputeView; +import bisq.desktop.main.portfolio.PortfolioView; +import bisq.desktop.main.portfolio.pendingtrades.PendingTradesView; + +import bisq.core.arbitration.DisputeManager; +import bisq.core.trade.BuyerTrade; +import bisq.core.trade.MakerTrade; +import bisq.core.trade.SellerTrade; +import bisq.core.trade.Trade; +import bisq.core.trade.TradeManager; +import bisq.core.user.DontShowAgainLookup; +import bisq.core.user.Preferences; + +import bisq.common.UserThread; +import bisq.common.app.Log; +import bisq.common.locale.Res; import com.google.inject.Inject; -import io.bisq.common.UserThread; -import io.bisq.common.app.Log; -import io.bisq.common.locale.Res; -import io.bisq.core.arbitration.DisputeManager; -import io.bisq.core.trade.*; -import io.bisq.core.user.DontShowAgainLookup; -import io.bisq.core.user.Preferences; -import io.bisq.gui.Navigation; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.disputes.DisputesView; -import io.bisq.gui.main.disputes.trader.TraderDisputeView; -import io.bisq.gui.main.portfolio.PortfolioView; -import io.bisq.gui.main.portfolio.pendingtrades.PendingTradesView; -import javafx.collections.ListChangeListener; -import lombok.extern.slf4j.Slf4j; + import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; -import javax.annotation.Nullable; +import javafx.collections.ListChangeListener; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Consumer; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; + @Slf4j public class NotificationCenter { - /////////////////////////////////////////////////////////////////////////////////////////// // Static /////////////////////////////////////////////////////////////////////////////////////////// @@ -44,7 +71,6 @@ public class NotificationCenter { static boolean useAnimations; - /////////////////////////////////////////////////////////////////////////////////////////// // Instance fields /////////////////////////////////////////////////////////////////////////////////////////// @@ -58,7 +84,6 @@ public class NotificationCenter { @Nullable private String selectedTradeId; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, initialisation /////////////////////////////////////////////////////////////////////////////////////////// @@ -125,7 +150,6 @@ public class NotificationCenter { ); } - /////////////////////////////////////////////////////////////////////////////////////////// // Setter/Getter /////////////////////////////////////////////////////////////////////////////////////////// @@ -143,12 +167,10 @@ public class NotificationCenter { this.selectItemByTradeIdConsumer = selectItemByTradeIdConsumer; } - /////////////////////////////////////////////////////////////////////////////////////////// // Private /////////////////////////////////////////////////////////////////////////////////////////// - private void onTradePhaseChanged(Trade trade, Trade.Phase phase) { String message = null; if (trade.isPayoutPublished() && !trade.isWithdrawn()) { diff --git a/src/main/java/io/bisq/gui/main/overlays/notifications/NotificationManager.java b/src/main/java/bisq/desktop/main/overlays/notifications/NotificationManager.java similarity index 64% rename from src/main/java/io/bisq/gui/main/overlays/notifications/NotificationManager.java rename to src/main/java/bisq/desktop/main/overlays/notifications/NotificationManager.java index 160a587c9a..7236ff9a9f 100644 --- a/src/main/java/io/bisq/gui/main/overlays/notifications/NotificationManager.java +++ b/src/main/java/bisq/desktop/main/overlays/notifications/NotificationManager.java @@ -1,11 +1,28 @@ -package io.bisq.gui.main.overlays.notifications; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +package bisq.desktop.main.overlays.notifications; import java.util.Queue; import java.util.concurrent.LinkedBlockingQueue; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class NotificationManager { private static final Logger log = LoggerFactory.getLogger(NotificationManager.class); private static final Queue popups = new LinkedBlockingQueue<>(5); diff --git a/src/main/java/io/bisq/gui/main/overlays/popups/Popup.java b/src/main/java/bisq/desktop/main/overlays/popups/Popup.java similarity index 93% rename from src/main/java/io/bisq/gui/main/overlays/popups/Popup.java rename to src/main/java/bisq/desktop/main/overlays/popups/Popup.java index 16b9d8647b..44b7b3518f 100644 --- a/src/main/java/io/bisq/gui/main/overlays/popups/Popup.java +++ b/src/main/java/bisq/desktop/main/overlays/popups/Popup.java @@ -15,9 +15,10 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.popups; +package bisq.desktop.main.overlays.popups; + +import bisq.desktop.main.overlays.Overlay; -import io.bisq.gui.main.overlays.Overlay; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/main/overlays/popups/PopupManager.java b/src/main/java/bisq/desktop/main/overlays/popups/PopupManager.java similarity index 63% rename from src/main/java/io/bisq/gui/main/overlays/popups/PopupManager.java rename to src/main/java/bisq/desktop/main/overlays/popups/PopupManager.java index 41a2c1dc1d..d5ec5e18f7 100644 --- a/src/main/java/io/bisq/gui/main/overlays/popups/PopupManager.java +++ b/src/main/java/bisq/desktop/main/overlays/popups/PopupManager.java @@ -1,11 +1,28 @@ -package io.bisq.gui.main.overlays.popups; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +package bisq.desktop.main.overlays.popups; import java.util.Queue; import java.util.concurrent.LinkedBlockingQueue; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class PopupManager { private static final Logger log = LoggerFactory.getLogger(PopupManager.class); private static final Queue popups = new LinkedBlockingQueue<>(5); diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/ContractWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/ContractWindow.java similarity index 94% rename from src/main/java/io/bisq/gui/main/overlays/windows/ContractWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/ContractWindow.java index 56ec6457b2..f027cfa5d1 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/ContractWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/ContractWindow.java @@ -15,38 +15,47 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.main.MainView; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; + +import bisq.core.arbitration.Dispute; +import bisq.core.arbitration.DisputeManager; +import bisq.core.offer.Offer; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.payment.payload.PaymentMethod; +import bisq.core.trade.Contract; + +import bisq.common.locale.CountryUtil; +import bisq.common.locale.Res; + +import org.bitcoinj.core.Utils; + +import javax.inject.Inject; import com.google.common.base.Joiner; -import io.bisq.common.locale.CountryUtil; -import io.bisq.common.locale.Res; -import io.bisq.core.arbitration.Dispute; -import io.bisq.core.arbitration.DisputeManager; -import io.bisq.core.offer.Offer; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.core.trade.Contract; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import javafx.geometry.Insets; + +import javafx.stage.Modality; +import javafx.stage.Stage; +import javafx.stage.StageStyle; +import javafx.stage.Window; + import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; -import javafx.stage.Modality; -import javafx.stage.Stage; -import javafx.stage.StageStyle; -import javafx.stage.Window; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.Utils; -import javax.inject.Inject; +import javafx.geometry.Insets; + import java.util.List; -import static io.bisq.gui.util.FormBuilder.*; +import lombok.extern.slf4j.Slf4j; + +import static bisq.desktop.util.FormBuilder.*; @Slf4j public class ContractWindow extends Overlay { diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/DisplayAlertMessageWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/DisplayAlertMessageWindow.java similarity index 91% rename from src/main/java/io/bisq/gui/main/overlays/windows/DisplayAlertMessageWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/DisplayAlertMessageWindow.java index 956b6901be..df92804987 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/DisplayAlertMessageWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/DisplayAlertMessageWindow.java @@ -15,16 +15,21 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.util.FormBuilder; + +import bisq.core.alert.Alert; + +import bisq.common.locale.Res; -import io.bisq.common.locale.Res; -import io.bisq.core.alert.Alert; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.HyperlinkWithIcon; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.util.FormBuilder; -import javafx.geometry.Insets; import javafx.scene.layout.GridPane; + +import javafx.geometry.Insets; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/DisputeSummaryWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/DisputeSummaryWindow.java similarity index 96% rename from src/main/java/io/bisq/gui/main/overlays/windows/DisputeSummaryWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/DisputeSummaryWindow.java index e80736e10b..ee5fdf0658 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/DisputeSummaryWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/DisputeSummaryWindow.java @@ -15,50 +15,64 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.components.AutoTooltipCheckBox; +import bisq.desktop.components.AutoTooltipRadioButton; +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; +import bisq.desktop.util.Transitions; + +import bisq.core.arbitration.Dispute; +import bisq.core.arbitration.DisputeManager; +import bisq.core.arbitration.DisputeResult; +import bisq.core.btc.AddressEntry; +import bisq.core.btc.exceptions.TransactionVerificationException; +import bisq.core.btc.wallet.BtcWalletService; +import bisq.core.btc.wallet.TradeWalletService; +import bisq.core.offer.Offer; +import bisq.core.trade.Contract; + +import bisq.common.UserThread; +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; + +import org.bitcoinj.core.AddressFormatException; +import org.bitcoinj.core.Coin; + +import javax.inject.Inject; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.core.arbitration.Dispute; -import io.bisq.core.arbitration.DisputeManager; -import io.bisq.core.arbitration.DisputeResult; -import io.bisq.core.btc.AddressEntry; -import io.bisq.core.btc.exceptions.TransactionVerificationException; -import io.bisq.core.btc.wallet.BtcWalletService; -import io.bisq.core.btc.wallet.TradeWalletService; -import io.bisq.core.offer.Offer; -import io.bisq.core.trade.Contract; -import io.bisq.gui.components.AutoTooltipCheckBox; -import io.bisq.gui.components.AutoTooltipRadioButton; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import io.bisq.gui.util.Transitions; -import javafx.beans.binding.Bindings; -import javafx.beans.value.ChangeListener; -import javafx.geometry.Insets; -import javafx.geometry.VPos; import javafx.scene.Scene; -import javafx.scene.control.*; +import javafx.scene.control.Button; +import javafx.scene.control.CheckBox; +import javafx.scene.control.Label; +import javafx.scene.control.RadioButton; +import javafx.scene.control.TextArea; +import javafx.scene.control.Toggle; +import javafx.scene.control.ToggleGroup; import javafx.scene.input.KeyCode; import javafx.scene.layout.FlowPane; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; -import org.bitcoinj.core.AddressFormatException; -import org.bitcoinj.core.Coin; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import javax.inject.Inject; +import javafx.geometry.Insets; +import javafx.geometry.VPos; + +import javafx.beans.binding.Bindings; +import javafx.beans.value.ChangeListener; + import java.util.Date; import java.util.Optional; import java.util.concurrent.TimeUnit; -import static io.bisq.gui.util.FormBuilder.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static bisq.desktop.util.FormBuilder.*; public class DisputeSummaryWindow extends Overlay { private static final Logger log = LoggerFactory.getLogger(DisputeSummaryWindow.class); diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/EmptyWalletWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/EmptyWalletWindow.java similarity index 90% rename from src/main/java/io/bisq/gui/main/overlays/windows/EmptyWalletWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/EmptyWalletWindow.java index 82b52694ac..1ab412ffbc 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/EmptyWalletWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/EmptyWalletWindow.java @@ -15,24 +15,33 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Transitions; + +import bisq.core.btc.Restrictions; +import bisq.core.btc.wallet.WalletService; +import bisq.core.btc.wallet.WalletsSetup; +import bisq.core.offer.OpenOfferManager; + +import bisq.network.p2p.P2PService; + +import bisq.common.UserThread; +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; + +import org.bitcoinj.core.AddressFormatException; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.InsufficientMoneyException; + +import javax.inject.Inject; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.core.btc.Restrictions; -import io.bisq.core.btc.wallet.WalletService; -import io.bisq.core.btc.wallet.WalletsSetup; -import io.bisq.core.offer.OpenOfferManager; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.Transitions; -import io.bisq.network.p2p.P2PService; -import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; @@ -40,17 +49,19 @@ import javafx.scene.control.TextField; import javafx.scene.input.KeyCode; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; -import org.bitcoinj.core.AddressFormatException; -import org.bitcoinj.core.Coin; -import org.bitcoinj.core.InsufficientMoneyException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import javafx.geometry.Insets; + import org.spongycastle.crypto.params.KeyParameter; -import javax.inject.Inject; import java.util.concurrent.TimeUnit; -import static io.bisq.gui.util.FormBuilder.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextField; +import static bisq.desktop.util.FormBuilder.addMultilineLabel; public class EmptyWalletWindow extends Overlay { private static final Logger log = LoggerFactory.getLogger(EmptyWalletWindow.class); diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/FeeOptionWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/FeeOptionWindow.java similarity index 88% rename from src/main/java/io/bisq/gui/main/overlays/windows/FeeOptionWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/FeeOptionWindow.java index 9fc9e22f38..2f0243e113 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/FeeOptionWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/FeeOptionWindow.java @@ -15,32 +15,44 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.Navigation; +import bisq.desktop.main.MainView; +import bisq.desktop.main.dao.DaoView; +import bisq.desktop.main.dao.wallet.BsqWalletView; +import bisq.desktop.main.dao.wallet.receive.BsqReceiveView; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.popups.Popup; + +import bisq.common.UserThread; +import bisq.common.locale.Res; +import bisq.common.util.Tuple3; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple3; -import io.bisq.gui.Navigation; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.dao.DaoView; -import io.bisq.gui.main.dao.wallet.BsqWalletView; -import io.bisq.gui.main.dao.wallet.receive.BsqReceiveView; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.popups.Popup; -import javafx.beans.property.StringProperty; -import javafx.beans.value.ChangeListener; -import javafx.geometry.HPos; import javafx.scene.Scene; -import javafx.scene.control.*; +import javafx.scene.control.Label; +import javafx.scene.control.RadioButton; +import javafx.scene.control.TextField; +import javafx.scene.control.Toggle; +import javafx.scene.control.ToggleGroup; import javafx.scene.input.KeyCode; import javafx.scene.layout.GridPane; -import lombok.extern.slf4j.Slf4j; -import javax.annotation.Nullable; +import javafx.geometry.HPos; + +import javafx.beans.property.StringProperty; +import javafx.beans.value.ChangeListener; + import java.util.concurrent.TimeUnit; import java.util.function.Consumer; -import static io.bisq.gui.util.FormBuilder.*; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; + +import static bisq.desktop.util.FormBuilder.addLabel; +import static bisq.desktop.util.FormBuilder.addLabelRadioButtonRadioButton; +import static bisq.desktop.util.FormBuilder.addLabelTextField; @Slf4j public class FeeOptionWindow extends Overlay { diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/FilterWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/FilterWindow.java similarity index 96% rename from src/main/java/io/bisq/gui/main/overlays/windows/FilterWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/FilterWindow.java index 0762aedb51..94ffd5eca0 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/FilterWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/FilterWindow.java @@ -15,34 +15,39 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.popups.Popup; + +import bisq.core.filter.Filter; +import bisq.core.filter.FilterManager; +import bisq.core.filter.PaymentAccountFilter; + +import bisq.common.app.DevEnv; +import bisq.common.locale.Res; + +import org.apache.commons.lang3.StringUtils; -import io.bisq.common.app.DevEnv; -import io.bisq.common.locale.Res; -import io.bisq.core.filter.Filter; -import io.bisq.core.filter.FilterManager; -import io.bisq.core.filter.PaymentAccountFilter; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.popups.Popup; -import javafx.geometry.HPos; -import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.CheckBox; import javafx.scene.input.KeyCode; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; -import org.apache.commons.lang3.StringUtils; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; -import static io.bisq.gui.util.FormBuilder.addLabelCheckBox; -import static io.bisq.gui.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelCheckBox; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; public class FilterWindow extends Overlay { private SendFilterMessageHandler sendFilterMessageHandler; diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/ManualPayoutTxWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/ManualPayoutTxWindow.java similarity index 93% rename from src/main/java/io/bisq/gui/main/overlays/windows/ManualPayoutTxWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/ManualPayoutTxWindow.java index 2453572c77..96f9163f55 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/ManualPayoutTxWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/ManualPayoutTxWindow.java @@ -15,32 +15,41 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.GUIUtil; + +import bisq.core.btc.exceptions.TransactionVerificationException; +import bisq.core.btc.exceptions.WalletException; +import bisq.core.btc.wallet.TradeWalletService; +import bisq.core.btc.wallet.WalletsSetup; + +import bisq.network.p2p.P2PService; + +import bisq.common.UserThread; -import com.google.common.util.concurrent.FutureCallback; -import io.bisq.common.UserThread; -import io.bisq.core.btc.exceptions.TransactionVerificationException; -import io.bisq.core.btc.exceptions.WalletException; -import io.bisq.core.btc.wallet.TradeWalletService; -import io.bisq.core.btc.wallet.WalletsSetup; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.GUIUtil; -import io.bisq.network.p2p.P2PService; -import javafx.scene.Scene; -import javafx.scene.input.KeyCode; import org.bitcoinj.core.AddressFormatException; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; -import org.jetbrains.annotations.NotNull; + +import javax.inject.Inject; + +import com.google.common.util.concurrent.FutureCallback; + +import javafx.scene.Scene; +import javafx.scene.input.KeyCode; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.annotation.Nullable; -import javax.inject.Inject; +import org.jetbrains.annotations.NotNull; -import static io.bisq.gui.util.FormBuilder.addLabelInputTextField; +import javax.annotation.Nullable; + +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; // We dont translate here as it is for dev only purpose public class ManualPayoutTxWindow extends Overlay { diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/OfferDetailsWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/OfferDetailsWindow.java similarity index 94% rename from src/main/java/io/bisq/gui/main/overlays/windows/OfferDetailsWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/OfferDetailsWindow.java index 0e48f75f0e..9c94917611 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/OfferDetailsWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/OfferDetailsWindow.java @@ -15,45 +15,53 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.Navigation; +import bisq.desktop.components.BusyAnimation; +import bisq.desktop.main.MainView; +import bisq.desktop.main.account.AccountView; +import bisq.desktop.main.account.content.arbitratorselection.ArbitratorSelectionView; +import bisq.desktop.main.account.settings.AccountSettingsView; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; + +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.payment.PaymentAccount; +import bisq.core.payment.payload.PaymentMethod; +import bisq.core.user.User; + +import bisq.common.crypto.KeyRing; +import bisq.common.locale.BankUtil; +import bisq.common.locale.CountryUtil; +import bisq.common.locale.Res; +import bisq.common.monetary.Price; +import bisq.common.util.Tuple3; + +import org.bitcoinj.core.Coin; + +import javax.inject.Inject; import com.google.common.base.Joiner; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.locale.BankUtil; -import io.bisq.common.locale.CountryUtil; -import io.bisq.common.locale.Res; -import io.bisq.common.monetary.Price; -import io.bisq.common.util.Tuple3; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.payment.PaymentAccount; -import io.bisq.core.payment.payload.PaymentMethod; -import io.bisq.core.user.User; -import io.bisq.gui.Navigation; -import io.bisq.gui.components.BusyAnimation; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.account.AccountView; -import io.bisq.gui.main.account.content.arbitratorselection.ArbitratorSelectionView; -import io.bisq.gui.main.account.settings.AccountSettingsView; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import javafx.geometry.Insets; + import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; import javafx.scene.image.ImageView; -import org.bitcoinj.core.Coin; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import javax.inject.Inject; +import javafx.geometry.Insets; + import java.util.List; import java.util.Optional; -import static io.bisq.gui.util.FormBuilder.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static bisq.desktop.util.FormBuilder.*; public class OfferDetailsWindow extends Overlay { protected static final Logger log = LoggerFactory.getLogger(OfferDetailsWindow.class); diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/QRCodeWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/QRCodeWindow.java similarity index 73% rename from src/main/java/io/bisq/gui/main/overlays/windows/QRCodeWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/QRCodeWindow.java index dca54ccb93..60da74a6fd 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/QRCodeWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/QRCodeWindow.java @@ -1,22 +1,44 @@ -package io.bisq.gui.main.overlays.windows; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.main.overlays.Overlay; + +import bisq.common.locale.Res; + +import net.glxn.qrgen.QRCode; +import net.glxn.qrgen.image.ImageType; -import io.bisq.common.locale.Res; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.main.overlays.Overlay; -import javafx.geometry.HPos; -import javafx.geometry.Insets; import javafx.scene.control.Label; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.GridPane; import javafx.scene.layout.Priority; -import net.glxn.qrgen.QRCode; -import net.glxn.qrgen.image.ImageType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; import java.io.ByteArrayInputStream; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class QRCodeWindow extends Overlay { private static final Logger log = LoggerFactory.getLogger(QRCodeWindow.class); private final ImageView qrCodeImageView; diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/SelectBaseCurrencyWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/SelectBaseCurrencyWindow.java similarity index 90% rename from src/main/java/io/bisq/gui/main/overlays/windows/SelectBaseCurrencyWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/SelectBaseCurrencyWindow.java index 9629fdfdbb..aedaf64acd 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/SelectBaseCurrencyWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/SelectBaseCurrencyWindow.java @@ -15,30 +15,37 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.main.overlays.Overlay; + +import bisq.core.app.BisqEnvironment; +import bisq.core.btc.BaseCurrencyNetwork; + +import bisq.common.app.DevEnv; +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; + +import javax.inject.Inject; -import io.bisq.common.app.DevEnv; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.core.app.BisqEnvironment; -import io.bisq.core.btc.BaseCurrencyNetwork; -import io.bisq.gui.main.overlays.Overlay; -import javafx.collections.FXCollections; -import javafx.geometry.Insets; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; + +import javafx.geometry.Insets; + +import javafx.collections.FXCollections; + import javafx.util.StringConverter; -import javax.inject.Inject; import java.util.Arrays; import java.util.List; import java.util.Optional; import java.util.function.Consumer; import java.util.stream.Collectors; -import static io.bisq.gui.util.FormBuilder.addLabelComboBox; -import static io.bisq.gui.util.FormBuilder.addMultilineLabel; +import static bisq.desktop.util.FormBuilder.addLabelComboBox; +import static bisq.desktop.util.FormBuilder.addMultilineLabel; public class SelectBaseCurrencyWindow extends Overlay { diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/SelectDepositTxWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/SelectDepositTxWindow.java similarity index 92% rename from src/main/java/io/bisq/gui/main/overlays/windows/SelectDepositTxWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/SelectDepositTxWindow.java index ba46733426..a3cc36ff9a 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/SelectDepositTxWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/SelectDepositTxWindow.java @@ -15,28 +15,36 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.main.overlays.Overlay; + +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; + +import org.bitcoinj.core.Transaction; + +import javax.inject.Inject; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.gui.main.overlays.Overlay; -import javafx.collections.FXCollections; -import javafx.geometry.Insets; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; -import javafx.util.StringConverter; -import org.bitcoinj.core.Transaction; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import javax.inject.Inject; +import javafx.geometry.Insets; + +import javafx.collections.FXCollections; + +import javafx.util.StringConverter; + import java.util.List; import java.util.Optional; import java.util.function.Consumer; -import static io.bisq.gui.util.FormBuilder.addLabelComboBox; -import static io.bisq.gui.util.FormBuilder.addMultilineLabel; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static bisq.desktop.util.FormBuilder.addLabelComboBox; +import static bisq.desktop.util.FormBuilder.addMultilineLabel; public class SelectDepositTxWindow extends Overlay { private static final Logger log = LoggerFactory.getLogger(SelectDepositTxWindow.class); diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/SendAlertMessageWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/SendAlertMessageWindow.java similarity index 92% rename from src/main/java/io/bisq/gui/main/overlays/windows/SendAlertMessageWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/SendAlertMessageWindow.java index c2403597b5..cb9f2adcb9 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/SendAlertMessageWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/SendAlertMessageWindow.java @@ -15,17 +15,19 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.popups.Popup; + +import bisq.core.alert.Alert; + +import bisq.common.app.DevEnv; +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; -import io.bisq.common.app.DevEnv; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.core.alert.Alert; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.popups.Popup; -import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.CheckBox; @@ -35,7 +37,11 @@ import javafx.scene.input.KeyCode; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; -import static io.bisq.gui.util.FormBuilder.*; +import javafx.geometry.Insets; + +import static bisq.desktop.util.FormBuilder.addLabelCheckBox; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextArea; public class SendAlertMessageWindow extends Overlay { private final boolean useDevPrivilegeKeys; diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/SendPrivateNotificationWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/SendPrivateNotificationWindow.java similarity index 91% rename from src/main/java/io/bisq/gui/main/overlays/windows/SendPrivateNotificationWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/SendPrivateNotificationWindow.java index 0c16d7df92..67b781fde4 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/SendPrivateNotificationWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/SendPrivateNotificationWindow.java @@ -15,20 +15,23 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.popups.Popup; + +import bisq.core.alert.PrivateNotificationPayload; + +import bisq.network.p2p.NodeAddress; +import bisq.network.p2p.SendMailboxMessageListener; + +import bisq.common.app.DevEnv; +import bisq.common.crypto.PubKeyRing; +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; -import io.bisq.common.app.DevEnv; -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.core.alert.PrivateNotificationPayload; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.network.p2p.NodeAddress; -import io.bisq.network.p2p.SendMailboxMessageListener; -import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; @@ -36,11 +39,14 @@ import javafx.scene.control.TextArea; import javafx.scene.input.KeyCode; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; + +import javafx.geometry.Insets; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static io.bisq.gui.util.FormBuilder.addLabelInputTextField; -import static io.bisq.gui.util.FormBuilder.addLabelTextArea; +import static bisq.desktop.util.FormBuilder.addLabelInputTextField; +import static bisq.desktop.util.FormBuilder.addLabelTextArea; public class SendPrivateNotificationWindow extends Overlay { private static final Logger log = LoggerFactory.getLogger(SendPrivateNotificationWindow.class); diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/ShowWalletDataWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/ShowWalletDataWindow.java similarity index 90% rename from src/main/java/io/bisq/gui/main/overlays/windows/ShowWalletDataWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/ShowWalletDataWindow.java index 3eb3a74188..3beff980ae 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/ShowWalletDataWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/ShowWalletDataWindow.java @@ -15,23 +15,27 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.main.overlays.Overlay; + +import bisq.core.btc.wallet.WalletsManager; + +import bisq.common.locale.Res; +import bisq.common.util.Tuple2; +import bisq.common.util.Utilities; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Utilities; -import io.bisq.core.btc.wallet.WalletsManager; -import io.bisq.gui.main.overlays.Overlay; import javafx.scene.Scene; import javafx.scene.control.CheckBox; import javafx.scene.control.Label; import javafx.scene.control.TextArea; import javafx.scene.input.KeyCode; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static io.bisq.gui.util.FormBuilder.addLabelCheckBox; -import static io.bisq.gui.util.FormBuilder.addLabelTextArea; +import static bisq.desktop.util.FormBuilder.addLabelCheckBox; +import static bisq.desktop.util.FormBuilder.addLabelTextArea; public class ShowWalletDataWindow extends Overlay { private static final Logger log = LoggerFactory.getLogger(ShowWalletDataWindow.class); diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/TacWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/TacWindow.java similarity index 84% rename from src/main/java/io/bisq/gui/main/overlays/windows/TacWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/TacWindow.java index 831bd3d055..780daf8fd5 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/TacWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/TacWindow.java @@ -1,17 +1,40 @@ -package io.bisq.gui.main.overlays.windows; +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.app.BisqApp; +import bisq.desktop.components.HyperlinkWithIcon; +import bisq.desktop.main.overlays.Overlay; + +import bisq.common.locale.Res; import com.google.inject.Inject; -import io.bisq.common.locale.Res; -import io.bisq.gui.app.BisqApp; -import io.bisq.gui.components.HyperlinkWithIcon; -import io.bisq.gui.main.overlays.Overlay; + +import javafx.stage.Screen; + +import javafx.scene.layout.GridPane; + import javafx.geometry.Insets; import javafx.geometry.Rectangle2D; -import javafx.scene.layout.GridPane; -import javafx.stage.Screen; + import lombok.extern.slf4j.Slf4j; -import static io.bisq.gui.util.FormBuilder.addHyperlinkWithIcon; +import static bisq.desktop.util.FormBuilder.addHyperlinkWithIcon; @Slf4j public class TacWindow extends Overlay { diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/TorNetworkSettingsWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/TorNetworkSettingsWindow.java similarity index 94% rename from src/main/java/io/bisq/gui/main/overlays/windows/TorNetworkSettingsWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/TorNetworkSettingsWindow.java index 6b82b1bf92..665d871fc3 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/TorNetworkSettingsWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/TorNetworkSettingsWindow.java @@ -1,5 +1,5 @@ /* - * This file is part of bisq. + * This file is part of Bisq. * * bisq is free software: you can redistribute it and/or modify it * under the terms of the GNU Affero General Public License as published by @@ -17,7 +17,7 @@ /** - * This file is part of bisq. + * This file is part of Bisq. *

* bisq is free software: you can redistribute it and/or modify it * under the terms of the GNU Affero General Public License as published by @@ -33,47 +33,65 @@ * along with bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.BusyAnimation; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.Layout; + +import bisq.core.user.Preferences; + +import bisq.network.NetworkOptionKeys; +import bisq.network.p2p.network.DefaultPluggableTransports; +import bisq.network.p2p.network.NetworkNode; + +import bisq.common.UserThread; +import bisq.common.locale.Res; +import bisq.common.storage.FileUtil; +import bisq.common.util.Tuple2; +import bisq.common.util.Tuple3; +import bisq.common.util.Utilities; import com.google.inject.name.Named; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.common.storage.FileUtil; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Tuple3; -import io.bisq.common.util.Utilities; -import io.bisq.core.user.Preferences; -import io.bisq.gui.components.BusyAnimation; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.Layout; -import io.bisq.network.NetworkOptionKeys; -import io.bisq.network.p2p.network.DefaultPluggableTransports; -import io.bisq.network.p2p.network.NetworkNode; -import javafx.collections.FXCollections; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.geometry.VPos; + +import javax.inject.Inject; + import javafx.scene.Scene; -import javafx.scene.control.*; +import javafx.scene.control.Button; +import javafx.scene.control.ComboBox; +import javafx.scene.control.Label; +import javafx.scene.control.RadioButton; +import javafx.scene.control.TextArea; +import javafx.scene.control.ToggleGroup; import javafx.scene.input.KeyCode; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.scene.layout.Priority; -import javafx.util.StringConverter; -import lombok.extern.slf4j.Slf4j; -import javax.inject.Inject; +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.VPos; + +import javafx.collections.FXCollections; + +import javafx.util.StringConverter; + +import java.nio.file.Paths; + import java.io.File; import java.io.IOException; + import java.net.URI; -import java.nio.file.Paths; + import java.util.Arrays; import java.util.concurrent.TimeUnit; -import static io.bisq.gui.util.FormBuilder.*; +import lombok.extern.slf4j.Slf4j; + +import static bisq.desktop.util.FormBuilder.*; @Slf4j public class TorNetworkSettingsWindow extends Overlay { diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/TradeDetailsWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/TradeDetailsWindow.java similarity index 95% rename from src/main/java/io/bisq/gui/main/overlays/windows/TradeDetailsWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/TradeDetailsWindow.java index 7b1bafa6a2..ea6819fdd4 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/TradeDetailsWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/TradeDetailsWindow.java @@ -15,40 +15,48 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.components.TextFieldWithCopyIcon; +import bisq.desktop.main.MainView; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.util.BSFormatter; +import bisq.desktop.util.Layout; + +import bisq.core.arbitration.DisputeManager; +import bisq.core.offer.Offer; +import bisq.core.payment.payload.PaymentAccountPayload; +import bisq.core.trade.Contract; +import bisq.core.trade.Trade; +import bisq.core.trade.TradeManager; + +import bisq.common.locale.Res; + +import org.bitcoinj.core.Utils; + +import javax.inject.Inject; + +import javafx.stage.Modality; +import javafx.stage.Stage; +import javafx.stage.StageStyle; +import javafx.stage.Window; -import io.bisq.common.locale.Res; -import io.bisq.core.arbitration.DisputeManager; -import io.bisq.core.offer.Offer; -import io.bisq.core.payment.payload.PaymentAccountPayload; -import io.bisq.core.trade.Contract; -import io.bisq.core.trade.Trade; -import io.bisq.core.trade.TradeManager; -import io.bisq.gui.components.TextFieldWithCopyIcon; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.util.BSFormatter; -import io.bisq.gui.util.Layout; -import javafx.beans.property.IntegerProperty; -import javafx.beans.property.SimpleIntegerProperty; -import javafx.beans.value.ChangeListener; -import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; -import javafx.stage.Modality; -import javafx.stage.Stage; -import javafx.stage.StageStyle; -import javafx.stage.Window; -import org.bitcoinj.core.Utils; + +import javafx.geometry.Insets; + +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.beans.value.ChangeListener; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.inject.Inject; - -import static io.bisq.gui.util.FormBuilder.*; +import static bisq.desktop.util.FormBuilder.*; public class TradeDetailsWindow extends Overlay { protected static final Logger log = LoggerFactory.getLogger(TradeDetailsWindow.class); diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/UnlockArbitrationRegistrationWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/UnlockArbitrationRegistrationWindow.java similarity index 93% rename from src/main/java/io/bisq/gui/main/overlays/windows/UnlockArbitrationRegistrationWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/UnlockArbitrationRegistrationWindow.java index 6e158acdac..a2bca88494 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/UnlockArbitrationRegistrationWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/UnlockArbitrationRegistrationWindow.java @@ -15,17 +15,17 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.InputTextField; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.popups.Popup; + +import bisq.common.app.DevEnv; +import bisq.common.locale.Res; -import io.bisq.common.app.DevEnv; -import io.bisq.common.locale.Res; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.InputTextField; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.popups.Popup; -import javafx.beans.value.ChangeListener; -import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; @@ -33,6 +33,10 @@ import javafx.scene.input.KeyCode; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; +import javafx.geometry.Insets; + +import javafx.beans.value.ChangeListener; + public class UnlockArbitrationRegistrationWindow extends Overlay { private final boolean useDevPrivilegeKeys; private Button unlockButton; diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/WalletPasswordWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/WalletPasswordWindow.java similarity index 92% rename from src/main/java/io/bisq/gui/main/overlays/windows/WalletPasswordWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/WalletPasswordWindow.java index 305bf76c8b..34806e62b4 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/WalletPasswordWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/WalletPasswordWindow.java @@ -15,57 +15,75 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows; +package bisq.desktop.main.overlays.windows; + +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.BusyAnimation; +import bisq.desktop.components.PasswordTextField; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.util.GUIUtil; +import bisq.desktop.util.Transitions; +import bisq.desktop.util.validation.PasswordValidator; + +import bisq.core.btc.wallet.WalletsManager; +import bisq.core.crypto.ScryptUtil; + +import bisq.common.UserThread; +import bisq.common.locale.Res; +import bisq.common.storage.Storage; +import bisq.common.util.Tuple2; + +import org.bitcoinj.crypto.KeyCrypterScrypt; +import org.bitcoinj.crypto.MnemonicCode; +import org.bitcoinj.crypto.MnemonicException; +import org.bitcoinj.wallet.DeterministicSeed; + +import javax.inject.Inject; +import javax.inject.Named; import com.google.common.base.Splitter; -import io.bisq.common.UserThread; -import io.bisq.common.locale.Res; -import io.bisq.common.storage.Storage; -import io.bisq.common.util.Tuple2; -import io.bisq.core.btc.wallet.WalletsManager; -import io.bisq.core.crypto.ScryptUtil; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.BusyAnimation; -import io.bisq.gui.components.PasswordTextField; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.util.GUIUtil; -import io.bisq.gui.util.Transitions; -import io.bisq.gui.util.validation.PasswordValidator; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.SimpleBooleanProperty; -import javafx.beans.value.ChangeListener; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.geometry.Orientation; -import javafx.geometry.Pos; + import javafx.scene.Scene; -import javafx.scene.control.*; +import javafx.scene.control.Button; +import javafx.scene.control.DatePicker; +import javafx.scene.control.Label; +import javafx.scene.control.Separator; +import javafx.scene.control.TextArea; import javafx.scene.input.KeyCode; import javafx.scene.layout.ColumnConstraints; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.crypto.KeyCrypterScrypt; -import org.bitcoinj.crypto.MnemonicCode; -import org.bitcoinj.crypto.MnemonicException; -import org.bitcoinj.wallet.DeterministicSeed; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.Orientation; +import javafx.geometry.Pos; + +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.value.ChangeListener; + import org.spongycastle.crypto.params.KeyParameter; -import javax.inject.Inject; -import javax.inject.Named; import java.io.File; import java.io.IOException; + +import java.util.concurrent.TimeUnit; + import java.time.Instant; import java.time.LocalDate; import java.time.ZoneId; import java.time.ZoneOffset; -import java.util.concurrent.TimeUnit; +import lombok.extern.slf4j.Slf4j; + +import static bisq.desktop.util.FormBuilder.addButton; +import static bisq.desktop.util.FormBuilder.addLabelDatePicker; +import static bisq.desktop.util.FormBuilder.addLabelTextArea; import static com.google.common.base.Preconditions.checkArgument; -import static io.bisq.gui.util.FormBuilder.*; import static javafx.beans.binding.Bindings.createBooleanBinding; @Slf4j diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/downloadupdate/BisqInstaller.java b/src/main/java/bisq/desktop/main/overlays/windows/downloadupdate/BisqInstaller.java similarity index 94% rename from src/main/java/io/bisq/gui/main/overlays/windows/downloadupdate/BisqInstaller.java rename to src/main/java/bisq/desktop/main/overlays/windows/downloadupdate/BisqInstaller.java index bcc4911819..412d96cbba 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/downloadupdate/BisqInstaller.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/downloadupdate/BisqInstaller.java @@ -15,25 +15,43 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows.downloadupdate; +package bisq.desktop.main.overlays.windows.downloadupdate; + +import bisq.common.util.Utilities; import com.google.common.collect.Lists; -import io.bisq.common.util.Utilities; -import lombok.Builder; -import lombok.Data; -import lombok.extern.slf4j.Slf4j; -import org.bouncycastle.openpgp.*; + +import org.bouncycastle.openpgp.PGPException; +import org.bouncycastle.openpgp.PGPObjectFactory; +import org.bouncycastle.openpgp.PGPPublicKey; +import org.bouncycastle.openpgp.PGPPublicKeyRing; +import org.bouncycastle.openpgp.PGPPublicKeyRingCollection; +import org.bouncycastle.openpgp.PGPSignature; +import org.bouncycastle.openpgp.PGPSignatureList; +import org.bouncycastle.openpgp.PGPUtil; import org.bouncycastle.openpgp.operator.bc.BcPGPContentVerifierBuilderProvider; import org.bouncycastle.openpgp.operator.jcajce.JcaKeyFingerprintCalculator; -import org.jetbrains.annotations.NotNull; -import java.io.*; import java.security.SignatureException; + +import java.io.BufferedInputStream; +import java.io.DataInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; + import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Optional; +import lombok.Builder; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; + +import org.jetbrains.annotations.NotNull; + import static com.google.common.base.Preconditions.checkArgument; @Slf4j diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/downloadupdate/DisplayUpdateDownloadWindow.java b/src/main/java/bisq/desktop/main/overlays/windows/downloadupdate/DisplayUpdateDownloadWindow.java similarity index 96% rename from src/main/java/io/bisq/gui/main/overlays/windows/downloadupdate/DisplayUpdateDownloadWindow.java rename to src/main/java/bisq/desktop/main/overlays/windows/downloadupdate/DisplayUpdateDownloadWindow.java index adc21c0daf..f28c2045f8 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/downloadupdate/DisplayUpdateDownloadWindow.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/downloadupdate/DisplayUpdateDownloadWindow.java @@ -15,23 +15,22 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows.downloadupdate; +package bisq.desktop.main.overlays.windows.downloadupdate; + +import bisq.desktop.components.AutoTooltipButton; +import bisq.desktop.components.AutoTooltipLabel; +import bisq.desktop.components.BusyAnimation; +import bisq.desktop.main.overlays.Overlay; +import bisq.desktop.main.overlays.popups.Popup; +import bisq.desktop.main.overlays.windows.downloadupdate.BisqInstaller.VerifyDescriptor; + +import bisq.core.alert.Alert; + +import bisq.common.locale.Res; +import bisq.common.util.Utilities; import com.google.common.base.Joiner; -import io.bisq.common.locale.Res; -import io.bisq.common.util.Utilities; -import io.bisq.core.alert.Alert; -import io.bisq.gui.components.AutoTooltipButton; -import io.bisq.gui.components.AutoTooltipLabel; -import io.bisq.gui.components.BusyAnimation; -import io.bisq.gui.main.overlays.Overlay; -import io.bisq.gui.main.overlays.popups.Popup; -import io.bisq.gui.main.overlays.windows.downloadupdate.BisqInstaller.VerifyDescriptor; -import javafx.beans.value.ChangeListener; -import javafx.geometry.HPos; -import javafx.geometry.Insets; -import javafx.geometry.Orientation; -import javafx.geometry.Pos; + import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; @@ -40,17 +39,26 @@ import javafx.scene.control.Separator; import javafx.scene.input.KeyCode; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; -import lombok.extern.slf4j.Slf4j; + +import javafx.geometry.HPos; +import javafx.geometry.Insets; +import javafx.geometry.Orientation; +import javafx.geometry.Pos; + +import javafx.beans.value.ChangeListener; import java.io.File; import java.io.IOException; + import java.util.ArrayList; import java.util.List; import java.util.Optional; +import lombok.extern.slf4j.Slf4j; + +import static bisq.desktop.util.FormBuilder.addLabel; +import static bisq.desktop.util.FormBuilder.addMultilineLabel; import static com.google.common.base.Preconditions.checkNotNull; -import static io.bisq.gui.util.FormBuilder.addLabel; -import static io.bisq.gui.util.FormBuilder.addMultilineLabel; @Slf4j public class DisplayUpdateDownloadWindow extends Overlay { diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/downloadupdate/DownloadTask.java b/src/main/java/bisq/desktop/main/overlays/windows/downloadupdate/DownloadTask.java similarity index 96% rename from src/main/java/io/bisq/gui/main/overlays/windows/downloadupdate/DownloadTask.java rename to src/main/java/bisq/desktop/main/overlays/windows/downloadupdate/DownloadTask.java index 486ca6e3cd..f2b6478700 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/downloadupdate/DownloadTask.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/downloadupdate/DownloadTask.java @@ -15,14 +15,14 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows.downloadupdate; +package bisq.desktop.main.overlays.windows.downloadupdate; + +import bisq.desktop.main.overlays.windows.downloadupdate.BisqInstaller.FileDescriptor; + +import bisq.common.storage.FileUtil; import com.google.common.collect.Lists; -import io.bisq.common.storage.FileUtil; -import io.bisq.gui.main.overlays.windows.downloadupdate.BisqInstaller.FileDescriptor; -import javafx.concurrent.Task; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; + import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; @@ -30,11 +30,20 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; + import java.net.URL; import java.net.URLConnection; + import java.util.List; import java.util.stream.Collectors; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; + + + +import javafx.concurrent.Task; + @Slf4j @Getter public class DownloadTask extends Task> { diff --git a/src/main/java/io/bisq/gui/main/overlays/windows/downloadupdate/VerifyTask.java b/src/main/java/bisq/desktop/main/overlays/windows/downloadupdate/VerifyTask.java similarity index 94% rename from src/main/java/io/bisq/gui/main/overlays/windows/downloadupdate/VerifyTask.java rename to src/main/java/bisq/desktop/main/overlays/windows/downloadupdate/VerifyTask.java index 4a36d54c83..30bdd7d813 100644 --- a/src/main/java/io/bisq/gui/main/overlays/windows/downloadupdate/VerifyTask.java +++ b/src/main/java/bisq/desktop/main/overlays/windows/downloadupdate/VerifyTask.java @@ -15,27 +15,33 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.overlays.windows.downloadupdate; +package bisq.desktop.main.overlays.windows.downloadupdate; /** * A Task to verify the downloaded bisq installer against the available keys/signatures. */ +import bisq.desktop.main.overlays.windows.downloadupdate.BisqInstaller.DownloadType; +import bisq.desktop.main.overlays.windows.downloadupdate.BisqInstaller.FileDescriptor; +import bisq.desktop.main.overlays.windows.downloadupdate.BisqInstaller.VerifyDescriptor; + import com.google.common.collect.Lists; -import io.bisq.gui.main.overlays.windows.downloadupdate.BisqInstaller.DownloadType; -import io.bisq.gui.main.overlays.windows.downloadupdate.BisqInstaller.FileDescriptor; -import io.bisq.gui.main.overlays.windows.downloadupdate.BisqInstaller.VerifyDescriptor; -import javafx.concurrent.Task; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; import java.io.FileReader; import java.io.IOException; + import java.util.List; import java.util.Optional; import java.util.Scanner; import java.util.stream.Collectors; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; + + + +import javafx.concurrent.Task; + @Slf4j @Getter public class VerifyTask extends Task> { diff --git a/src/main/java/io/bisq/gui/main/portfolio/PortfolioView.fxml b/src/main/java/bisq/desktop/main/portfolio/PortfolioView.fxml similarity index 93% rename from src/main/java/io/bisq/gui/main/portfolio/PortfolioView.fxml rename to src/main/java/bisq/desktop/main/portfolio/PortfolioView.fxml index 04d37a6c03..eda330d84c 100644 --- a/src/main/java/io/bisq/gui/main/portfolio/PortfolioView.fxml +++ b/src/main/java/bisq/desktop/main/portfolio/PortfolioView.fxml @@ -20,7 +20,7 @@ - diff --git a/src/main/java/io/bisq/gui/main/portfolio/PortfolioView.java b/src/main/java/bisq/desktop/main/portfolio/PortfolioView.java similarity index 87% rename from src/main/java/io/bisq/gui/main/portfolio/PortfolioView.java rename to src/main/java/bisq/desktop/main/portfolio/PortfolioView.java index 72e56b24c0..a6b6947f8a 100644 --- a/src/main/java/io/bisq/gui/main/portfolio/PortfolioView.java +++ b/src/main/java/bisq/desktop/main/portfolio/PortfolioView.java @@ -15,26 +15,36 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.portfolio; +package bisq.desktop.main.portfolio; + +import bisq.desktop.Navigation; +import bisq.desktop.common.model.Activatable; +import bisq.desktop.common.view.ActivatableViewAndModel; +import bisq.desktop.common.view.CachingViewLoader; +import bisq.desktop.common.view.FxmlView; +import bisq.desktop.common.view.View; +import bisq.desktop.common.view.ViewLoader; +import bisq.desktop.main.MainView; +import bisq.desktop.main.portfolio.closedtrades.ClosedTradesView; +import bisq.desktop.main.portfolio.failedtrades.FailedTradesView; +import bisq.desktop.main.portfolio.openoffer.OpenOffersView; +import bisq.desktop.main.portfolio.pendingtrades.PendingTradesView; + +import bisq.core.trade.Trade; +import bisq.core.trade.failed.FailedTradesManager; + +import bisq.common.locale.Res; + +import javax.inject.Inject; -import io.bisq.common.locale.Res; -import io.bisq.core.trade.Trade; -import io.bisq.core.trade.failed.FailedTradesManager; -import io.bisq.gui.Navigation; -import io.bisq.gui.common.model.Activatable; -import io.bisq.gui.common.view.*; -import io.bisq.gui.main.MainView; -import io.bisq.gui.main.portfolio.closedtrades.ClosedTradesView; -import io.bisq.gui.main.portfolio.failedtrades.FailedTradesView; -import io.bisq.gui.main.portfolio.openoffer.OpenOffersView; -import io.bisq.gui.main.portfolio.pendingtrades.PendingTradesView; -import javafx.beans.value.ChangeListener; -import javafx.collections.ListChangeListener; import javafx.fxml.FXML; + import javafx.scene.control.Tab; import javafx.scene.control.TabPane; -import javax.inject.Inject; +import javafx.beans.value.ChangeListener; + +import javafx.collections.ListChangeListener; @FxmlView public class PortfolioView extends ActivatableViewAndModel { diff --git a/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradableListItem.java b/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradableListItem.java similarity index 92% rename from src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradableListItem.java rename to src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradableListItem.java index 0fddc08bc3..602b4148cf 100644 --- a/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradableListItem.java +++ b/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradableListItem.java @@ -15,9 +15,9 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.portfolio.closedtrades; +package bisq.desktop.main.portfolio.closedtrades; -import io.bisq.core.trade.Tradable; +import bisq.core.trade.Tradable; /** * We could remove that wrapper if it is not needed for additional UI only fields. diff --git a/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesDataModel.java b/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesDataModel.java similarity index 89% rename from src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesDataModel.java rename to src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesDataModel.java index a4c09fa5ee..f0249b401d 100644 --- a/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesDataModel.java +++ b/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesDataModel.java @@ -15,14 +15,17 @@ * along with Bisq. If not, see . */ -package io.bisq.gui.main.portfolio.closedtrades; +package bisq.desktop.main.portfolio.closedtrades; + +import bisq.desktop.common.model.ActivatableDataModel; + +import bisq.core.offer.Offer; +import bisq.core.offer.OfferPayload; +import bisq.core.trade.Tradable; +import bisq.core.trade.closed.ClosedTradableManager; import com.google.inject.Inject; -import io.bisq.core.offer.Offer; -import io.bisq.core.offer.OfferPayload; -import io.bisq.core.trade.Tradable; -import io.bisq.core.trade.closed.ClosedTradableManager; -import io.bisq.gui.common.model.ActivatableDataModel; + import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; diff --git a/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesView.fxml b/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesView.fxml similarity index 88% rename from src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesView.fxml rename to src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesView.fxml index 6db4294ba9..a04f192aa3 100644 --- a/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesView.fxml +++ b/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesView.fxml @@ -17,10 +17,12 @@ ~ along with Bisq. If not, see . --> - - + + + - + @@ -40,4 +42,4 @@