Revert "Support for open JDK 20 by updating dependencies"

This reverts commit 5923a34ef9.
This commit is contained in:
woodser 2023-07-11 09:57:22 -04:00
parent 8b7a6945b2
commit c4898a8ec0
257 changed files with 1875 additions and 1479 deletions

View file

@ -17,7 +17,6 @@
package haveno.desktop.main;
import com.google.inject.Inject;
import com.jfoenix.controls.JFXBadge;
import com.jfoenix.controls.JFXComboBox;
import com.jfoenix.controls.JFXProgressBar;
@ -56,10 +55,6 @@ import haveno.desktop.main.shared.PriceFeedComboBoxItem;
import haveno.desktop.main.support.SupportView;
import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.Transitions;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Date;
import java.util.Locale;
import javafx.animation.Animation;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
@ -86,10 +81,6 @@ import javafx.scene.image.ImageView;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.AnchorPane;
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;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
@ -102,6 +93,17 @@ import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import javax.inject.Inject;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Date;
import java.util.Locale;
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
public class MainView extends InitializableView<StackPane, MainViewModel> {

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.account;
import com.google.inject.Inject;
import haveno.common.util.Utilities;
import haveno.core.locale.Res;
import haveno.core.user.DontShowAgainLookup;
@ -40,7 +39,6 @@ import haveno.desktop.main.account.register.mediator.MediatorRegistrationView;
import haveno.desktop.main.account.register.refundagent.RefundAgentRegistrationView;
import haveno.desktop.main.account.register.signing.SigningView;
import haveno.desktop.main.presentation.AccountPresentation;
import java.util.List;
import javafx.beans.value.ChangeListener;
import javafx.collections.ListChangeListener;
import javafx.event.EventHandler;
@ -52,6 +50,9 @@ import javafx.scene.control.TabPane;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javax.inject.Inject;
import java.util.List;
@FxmlView
public class AccountView extends ActivatableView<TabPane, Void> {

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.account.content.backup;
import com.google.inject.Inject;
import haveno.common.config.Config;
import haveno.common.file.FileUtil;
import haveno.common.persistence.PersistenceManager;
@ -28,22 +27,25 @@ import haveno.core.user.Preferences;
import haveno.desktop.common.view.ActivatableView;
import haveno.desktop.common.view.FxmlView;
import haveno.desktop.main.overlays.popups.Popup;
import static haveno.desktop.util.FormBuilder.add2Buttons;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import haveno.desktop.util.Layout;
import java.io.File;
import java.io.IOException;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.util.Date;
import javafx.beans.value.ChangeListener;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import javafx.stage.DirectoryChooser;
import javax.annotation.Nullable;
import javax.inject.Inject;
import java.io.File;
import java.io.IOException;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.util.Date;
import static haveno.desktop.util.FormBuilder.add2Buttons;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
@FxmlView
public class BackupView extends ActivatableView<GridPane, Void> {

View file

@ -17,10 +17,8 @@
package haveno.desktop.main.account.content.cryptoaccounts;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.asset.Asset;
import haveno.asset.CryptoAccountDisclaimer;
import haveno.asset.Asset;
import haveno.asset.coins.Monero;
import haveno.common.util.Tuple2;
import haveno.common.util.Tuple3;
@ -41,17 +39,11 @@ import haveno.core.util.validation.InputValidator;
import haveno.desktop.common.view.FxmlView;
import haveno.desktop.components.TitledGroupBg;
import haveno.desktop.components.paymentmethods.AssetsForm;
import static haveno.desktop.components.paymentmethods.AssetsForm.INSTANT_TRADE_NEWS;
import haveno.desktop.components.paymentmethods.PaymentMethodForm;
import haveno.desktop.main.account.content.PaymentAccountsView;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.FormBuilder;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.add3ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelListView;
import haveno.desktop.util.Layout;
import java.util.Optional;
import javafx.collections.ObservableList;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
@ -60,6 +52,16 @@ import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.Optional;
import static haveno.desktop.components.paymentmethods.AssetsForm.INSTANT_TRADE_NEWS;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.add3ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelListView;
@FxmlView
public class CryptoAccountsView extends PaymentAccountsView<GridPane, CryptoAccountsViewModel> {

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.account.content.notifications;
import com.google.inject.Inject;
import haveno.common.UserThread;
import haveno.common.util.Tuple2;
import haveno.common.util.Tuple3;
@ -41,25 +40,17 @@ import haveno.core.user.User;
import haveno.core.util.FormattingUtils;
import haveno.core.util.ParsingUtils;
import haveno.core.util.PriceUtil;
import haveno.core.util.validation.NonFiatPriceValidator;
import haveno.core.util.validation.FiatPriceValidator;
import haveno.core.util.validation.InputValidator;
import haveno.core.util.validation.NonFiatPriceValidator;
import haveno.desktop.common.view.ActivatableView;
import haveno.desktop.common.view.FxmlView;
import haveno.desktop.components.InfoInputTextField;
import haveno.desktop.components.InputTextField;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.FormBuilder;
import static haveno.desktop.util.FormBuilder.addButton;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addSlideToggleButton;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelButton;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.Layout;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.SetChangeListener;
@ -75,6 +66,17 @@ import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.GridPane;
import javafx.util.StringConverter;
import javax.inject.Inject;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import static haveno.desktop.util.FormBuilder.addButton;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addSlideToggleButton;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelButton;
@FxmlView
public class MobileNotificationsView extends ActivatableView<GridPane, Void> {
private final Preferences preferences;

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.account.content.password;
import static com.google.common.base.Preconditions.checkArgument;
import com.google.inject.Inject;
import com.jfoenix.validation.RequiredFieldValidator;
import haveno.common.util.Tuple4;
import haveno.core.api.CoreAccountService;
@ -35,10 +33,6 @@ import haveno.desktop.main.MainView;
import haveno.desktop.main.account.AccountView;
import haveno.desktop.main.account.content.backup.BackupView;
import haveno.desktop.main.overlays.popups.Popup;
import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabel;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addPasswordTextField;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import haveno.desktop.util.Layout;
import haveno.desktop.util.validation.PasswordValidator;
import javafx.beans.value.ChangeListener;
@ -47,6 +41,14 @@ import javafx.scene.control.Label;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javax.inject.Inject;
import static com.google.common.base.Preconditions.checkArgument;
import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabel;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addPasswordTextField;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
@FxmlView
public class PasswordView extends ActivatableView<GridPane, Void> {

View file

@ -18,8 +18,6 @@
package haveno.desktop.main.account.content.seedwords;
import com.google.common.base.Splitter;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.core.locale.Res;
import haveno.core.offer.OpenOfferManager;
@ -31,20 +29,7 @@ import haveno.desktop.common.view.FxmlView;
import haveno.desktop.main.SharedPresentation;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.main.overlays.windows.WalletPasswordWindow;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addPrimaryActionButtonAFterGroup;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelDatePicker;
import static haveno.desktop.util.FormBuilder.addTopLabelTextArea;
import haveno.desktop.util.Layout;
import java.io.File;
import java.io.IOException;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.TimeZone;
import static javafx.beans.binding.Bindings.createBooleanBinding;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.value.ChangeListener;
@ -56,6 +41,23 @@ import org.bitcoinj.crypto.MnemonicCode;
import org.bitcoinj.crypto.MnemonicException;
import org.bitcoinj.wallet.DeterministicSeed;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.File;
import java.io.IOException;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.TimeZone;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addPrimaryActionButtonAFterGroup;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelDatePicker;
import static haveno.desktop.util.FormBuilder.addTopLabelTextArea;
import static javafx.beans.binding.Bindings.createBooleanBinding;
@FxmlView
public class SeedWordsView extends ActivatableView<GridPane, Void> {
private final WalletsManager walletsManager;

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.account.content.traditionalaccounts;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.common.util.Tuple2;
import haveno.common.util.Tuple3;
@ -29,17 +27,17 @@ import haveno.core.offer.OfferRestrictions;
import haveno.core.payment.AmazonGiftCardAccount;
import haveno.core.payment.AustraliaPayidAccount;
import haveno.core.payment.CashAtAtmAccount;
import haveno.core.payment.PayByMailAccount;
import haveno.core.payment.CashDepositAccount;
import haveno.core.payment.ZelleAccount;
import haveno.core.payment.F2FAccount;
import haveno.core.payment.HalCashAccount;
import haveno.core.payment.MoneyGramAccount;
import haveno.core.payment.PayByMailAccount;
import haveno.core.payment.PaymentAccount;
import haveno.core.payment.PaymentAccountFactory;
import haveno.core.payment.RevolutAccount;
import haveno.core.payment.USPostalMoneyOrderAccount;
import haveno.core.payment.WesternUnionAccount;
import haveno.core.payment.ZelleAccount;
import haveno.core.payment.payload.PaymentMethod;
import haveno.core.payment.validation.AdvancedCashValidator;
import haveno.core.payment.validation.AliPayValidator;
@ -76,9 +74,11 @@ import haveno.desktop.components.paymentmethods.AustraliaPayidForm;
import haveno.desktop.components.paymentmethods.BizumForm;
import haveno.desktop.components.paymentmethods.CapitualForm;
import haveno.desktop.components.paymentmethods.CashAtAtmForm;
import haveno.desktop.components.paymentmethods.PayByMailForm;
import haveno.desktop.components.paymentmethods.CashDepositForm;
import haveno.desktop.components.paymentmethods.CelPayForm;
import haveno.desktop.components.paymentmethods.ChaseQuickPayForm;
import haveno.desktop.components.paymentmethods.ZelleForm;
import haveno.desktop.components.paymentmethods.DomesticWireTransferForm;
import haveno.desktop.components.paymentmethods.F2FForm;
import haveno.desktop.components.paymentmethods.FasterPaymentsForm;
@ -93,7 +93,6 @@ import haveno.desktop.components.paymentmethods.NationalBankForm;
import haveno.desktop.components.paymentmethods.NeftForm;
import haveno.desktop.components.paymentmethods.NequiForm;
import haveno.desktop.components.paymentmethods.PaxumForm;
import haveno.desktop.components.paymentmethods.PayByMailForm;
import haveno.desktop.components.paymentmethods.PaymentMethodForm;
import haveno.desktop.components.paymentmethods.PayseraForm;
import haveno.desktop.components.paymentmethods.PaytmForm;
@ -120,19 +119,11 @@ import haveno.desktop.components.paymentmethods.UpiForm;
import haveno.desktop.components.paymentmethods.VerseForm;
import haveno.desktop.components.paymentmethods.WeChatPayForm;
import haveno.desktop.components.paymentmethods.WesternUnionForm;
import haveno.desktop.components.paymentmethods.ZelleForm;
import haveno.desktop.main.account.content.PaymentAccountsView;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.FormBuilder;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.add3ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelListView;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.Layout;
import java.math.BigInteger;
import java.util.List;
import java.util.stream.Collectors;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.control.Button;
@ -144,6 +135,17 @@ import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.util.StringConverter;
import javax.inject.Inject;
import javax.inject.Named;
import java.math.BigInteger;
import java.util.List;
import java.util.stream.Collectors;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.add3ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelListView;
@FxmlView
public class TraditionalAccountsView extends PaymentAccountsView<GridPane, TraditionalAccountsViewModel> {

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.account.content.walletinfo;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.core.locale.Res;
import haveno.core.util.FormattingUtils;
@ -31,10 +29,6 @@ import haveno.desktop.common.view.ActivatableView;
import haveno.desktop.common.view.FxmlView;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.main.overlays.windows.ShowWalletDataWindow;
import static haveno.desktop.util.FormBuilder.addButtonAfterGroup;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelTextField;
import haveno.desktop.util.Layout;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
@ -43,6 +37,14 @@ import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.script.Script;
import org.bitcoinj.wallet.DeterministicKeyChain;
import javax.inject.Inject;
import javax.inject.Named;
import static haveno.desktop.util.FormBuilder.addButtonAfterGroup;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelTextField;
import static org.bitcoinj.wallet.Wallet.BalanceType.ESTIMATED_SPENDABLE;
@FxmlView

View file

@ -18,14 +18,15 @@
package haveno.desktop.main.account.register.arbitrator;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.core.locale.Res;
import haveno.core.support.dispute.arbitration.arbitrator.Arbitrator;
import haveno.desktop.common.view.FxmlView;
import haveno.desktop.main.account.register.AgentRegistrationView;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class ArbitratorRegistrationView extends AgentRegistrationView<Arbitrator, ArbitratorRegistrationViewModel> {

View file

@ -18,14 +18,15 @@
package haveno.desktop.main.account.register.mediator;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.core.locale.Res;
import haveno.core.support.dispute.mediation.mediator.Mediator;
import haveno.desktop.common.view.FxmlView;
import haveno.desktop.main.account.register.AgentRegistrationView;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class MediatorRegistrationView extends AgentRegistrationView<Mediator, MediatorRegistrationViewModel> {

View file

@ -18,14 +18,15 @@
package haveno.desktop.main.account.register.refundagent;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.core.locale.Res;
import haveno.core.support.dispute.refund.refundagent.RefundAgent;
import haveno.desktop.common.view.FxmlView;
import haveno.desktop.main.account.register.AgentRegistrationView;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class RefundAgentRegistrationView extends AgentRegistrationView<RefundAgent, RefundAgentRegistrationViewModel> {

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.account.register.signing;
import com.google.inject.Inject;
import haveno.common.util.Utilities;
import haveno.desktop.common.view.ActivatableView;
import haveno.desktop.common.view.FxmlView;
@ -31,6 +30,8 @@ import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.AnchorPane;
import javax.inject.Inject;
@FxmlView
public class SigningView extends ActivatableView<AnchorPane, Void> {

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.debug;
import com.google.inject.Inject;
import haveno.common.taskrunner.Task;
import haveno.common.util.Tuple2;
import haveno.core.offer.availability.tasks.ProcessOfferAvailabilityResponse;
@ -41,8 +40,6 @@ import haveno.core.trade.protocol.tasks.VerifyPeersAccountAgeWitness;
import haveno.desktop.common.view.FxmlView;
import haveno.desktop.common.view.InitializableView;
import haveno.desktop.components.TitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelComboBox;
import java.util.Arrays;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
@ -51,6 +48,11 @@ import javafx.scene.control.Label;
import javafx.scene.layout.GridPane;
import javafx.util.StringConverter;
import javax.inject.Inject;
import java.util.Arrays;
import static haveno.desktop.util.FormBuilder.addTopLabelComboBox;
// Not maintained anymore with new trade protocol, but leave it...If used needs to be adopted to current protocol.
@FxmlView
public class DebugView extends InitializableView<GridPane, Void> {

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.funds;
import com.google.inject.Inject;
import haveno.core.locale.Res;
import haveno.desktop.Navigation;
import haveno.desktop.common.view.ActivatableView;
@ -34,6 +33,8 @@ import javafx.fxml.FXML;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javax.inject.Inject;
@FxmlView
public class FundsView extends ActivatableView<TabPane, Void> {

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.funds.deposit;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.UserThread;
import haveno.common.app.DevEnv;
import haveno.common.util.Tuple3;
@ -41,17 +39,8 @@ import haveno.desktop.components.InputTextField;
import haveno.desktop.components.TitledGroupBg;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.main.overlays.windows.QRCodeWindow;
import static haveno.desktop.util.FormBuilder.addAddressTextField;
import static haveno.desktop.util.FormBuilder.addButtonCheckBoxWithBox;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.Layout;
import java.io.ByteArrayInputStream;
import java.math.BigInteger;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
@ -81,6 +70,19 @@ import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import org.jetbrains.annotations.NotNull;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.ByteArrayInputStream;
import java.math.BigInteger;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.TimeUnit;
import static haveno.desktop.util.FormBuilder.addAddressTextField;
import static haveno.desktop.util.FormBuilder.addButtonCheckBoxWithBox;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
@FxmlView
public class DepositView extends ActivatableView<VBox, Void> {

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.funds.locked;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.googlecode.jcsv.writer.CSVEntryConverter;
import de.jensd.fx.fontawesome.AwesomeIcon;
import haveno.core.locale.Res;
@ -42,11 +40,6 @@ import haveno.desktop.components.HyperlinkWithIcon;
import haveno.desktop.main.overlays.windows.OfferDetailsWindow;
import haveno.desktop.main.overlays.windows.TradeDetailsWindow;
import haveno.desktop.util.GUIUtil;
import java.util.Comparator;
import java.util.Date;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
@ -68,6 +61,14 @@ import javafx.util.Callback;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Transaction;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.Comparator;
import java.util.Date;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
@FxmlView
public class LockedView extends ActivatableView<VBox, Void> {
@FXML

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.funds.reserved;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.googlecode.jcsv.writer.CSVEntryConverter;
import de.jensd.fx.fontawesome.AwesomeIcon;
import haveno.core.locale.Res;
@ -42,11 +40,6 @@ import haveno.desktop.components.HyperlinkWithIcon;
import haveno.desktop.main.overlays.windows.OfferDetailsWindow;
import haveno.desktop.main.overlays.windows.TradeDetailsWindow;
import haveno.desktop.util.GUIUtil;
import java.util.Comparator;
import java.util.Date;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
@ -68,6 +61,14 @@ import javafx.util.Callback;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Transaction;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.Comparator;
import java.util.Date;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
@FxmlView
public class ReservedView extends ActivatableView<VBox, Void> {
@FXML

View file

@ -17,10 +17,11 @@
package haveno.desktop.main.funds.transactions;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import haveno.core.xmr.wallet.XmrWalletService;
import javax.inject.Inject;
import javax.inject.Singleton;
@Singleton
public class DisplayedTransactionsFactory {
private final XmrWalletService xmrWalletService;

View file

@ -18,13 +18,14 @@
package haveno.desktop.main.funds.transactions;
import com.google.common.collect.ImmutableSet;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import haveno.core.offer.OpenOfferManager;
import haveno.core.trade.ClosedTradableManager;
import haveno.core.trade.Tradable;
import haveno.core.trade.TradeManager;
import haveno.core.trade.failed.FailedTradesManager;
import javax.inject.Inject;
import javax.inject.Singleton;
import java.util.Set;
@Singleton

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.funds.transactions;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import haveno.common.crypto.PubKeyRingProvider;
import haveno.core.offer.OpenOffer;
import haveno.core.support.dispute.arbitration.ArbitrationManager;
@ -27,6 +25,9 @@ import haveno.core.trade.Tradable;
import haveno.core.trade.Trade;
import haveno.core.xmr.wallet.XmrWalletService;
import javax.inject.Inject;
import javax.inject.Singleton;
@Singleton
public class TransactionAwareTradableFactory {

View file

@ -17,16 +17,17 @@
package haveno.desktop.main.funds.transactions;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.google.inject.name.Named;
import haveno.core.user.Preferences;
import haveno.core.util.FormattingUtils;
import haveno.core.util.coin.CoinFormatter;
import haveno.core.xmr.wallet.XmrWalletService;
import javax.annotation.Nullable;
import monero.wallet.model.MoneroTxWallet;
import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
@Singleton
public class TransactionListItemFactory {

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.funds.transactions;
import com.google.inject.Inject;
import com.googlecode.jcsv.writer.CSVEntryConverter;
import de.jensd.fx.fontawesome.AwesomeIcon;
import haveno.common.util.Utilities;
@ -38,8 +37,6 @@ import haveno.desktop.main.overlays.windows.OfferDetailsWindow;
import haveno.desktop.main.overlays.windows.TradeDetailsWindow;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import java.math.BigInteger;
import java.util.Comparator;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.ObservableList;
import javafx.collections.transformation.SortedList;
@ -63,6 +60,10 @@ import javafx.stage.Stage;
import javafx.util.Callback;
import monero.wallet.model.MoneroWalletListener;
import javax.inject.Inject;
import java.math.BigInteger;
import java.util.Comparator;
@FxmlView
public class TransactionsView extends ActivatableView<VBox, Void> {

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.funds.withdrawal;
import com.google.inject.Inject;
import haveno.common.util.Tuple2;
import haveno.core.locale.Res;
import haveno.core.trade.HavenoUtils;
@ -36,15 +35,9 @@ import haveno.desktop.components.TitledGroupBg;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.main.overlays.windows.TxDetails;
import haveno.desktop.main.overlays.windows.WalletPasswordWindow;
import static haveno.desktop.util.FormBuilder.addButton;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelInputTextField;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.Layout;
import haveno.network.p2p.P2PService;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javafx.beans.value.ChangeListener;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
@ -55,6 +48,15 @@ import javafx.scene.layout.VBox;
import monero.wallet.model.MoneroTxConfig;
import monero.wallet.model.MoneroTxWallet;
import javax.inject.Inject;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import static haveno.desktop.util.FormBuilder.addButton;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelInputTextField;
@FxmlView
public class WithdrawalView extends ActivatableView<VBox, Void> {

View file

@ -18,8 +18,6 @@
package haveno.desktop.main.market;
import com.google.common.base.Joiner;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.util.Utilities;
import haveno.core.locale.CurrencyUtil;
import haveno.core.locale.Res;
@ -45,8 +43,6 @@ import haveno.desktop.main.offer.offerbook.OfferBook;
import haveno.desktop.main.offer.offerbook.OfferBookListItem;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.DisplayUtils;
import java.util.List;
import java.util.stream.Collectors;
import javafx.beans.value.ChangeListener;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
@ -58,6 +54,11 @@ import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import org.apache.commons.lang3.StringUtils;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.List;
import java.util.stream.Collectors;
@FxmlView
public class MarketView extends ActivatableView<TabPane, Void> {
@FXML

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.market.offerbook;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.jfoenix.controls.JFXTabPane;
import haveno.common.UserThread;
import haveno.common.config.Config;
@ -42,15 +40,8 @@ import haveno.desktop.components.PeerInfoIconSmall;
import haveno.desktop.main.offer.offerbook.OfferBookListItem;
import haveno.desktop.util.CurrencyListItem;
import haveno.desktop.util.DisplayUtils;
import static haveno.desktop.util.FormBuilder.addTopLabelAutocompleteComboBox;
import haveno.desktop.util.GUIUtil;
import static haveno.desktop.util.Layout.INITIAL_WINDOW_HEIGHT;
import haveno.network.p2p.NodeAddress;
import java.text.DecimalFormat;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Collectors;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
@ -82,6 +73,17 @@ import javafx.util.StringConverter;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import javax.inject.Inject;
import javax.inject.Named;
import java.text.DecimalFormat;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Collectors;
import static haveno.desktop.util.FormBuilder.addTopLabelAutocompleteComboBox;
import static haveno.desktop.util.Layout.INITIAL_WINDOW_HEIGHT;
@FxmlView
public class OfferBookChartView extends ActivatableViewAndModel<VBox, OfferBookChartViewModel> {
private final boolean useDevPrivilegeKeys;

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.market.spread;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.UserThread;
import haveno.core.locale.CurrencyUtil;
import haveno.core.locale.Res;
@ -31,8 +29,6 @@ import haveno.desktop.components.AutoTooltipLabel;
import haveno.desktop.components.AutoTooltipTableColumn;
import haveno.desktop.components.ColoredDecimalPlacesWithZerosText;
import haveno.desktop.util.GUIUtil;
import java.math.BigInteger;
import java.util.Comparator;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.ListChangeListener;
import javafx.collections.transformation.SortedList;
@ -44,6 +40,11 @@ import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
import javafx.util.Callback;
import javax.inject.Inject;
import javax.inject.Named;
import java.math.BigInteger;
import java.util.Comparator;
@FxmlView
public class SpreadView extends ActivatableViewAndModel<GridPane, SpreadViewModel> {
private final CoinFormatter formatter;

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.market.spread;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.UserThread;
import haveno.core.locale.Res;
import haveno.core.monetary.CryptoMoney;
@ -36,6 +35,15 @@ import haveno.desktop.main.offer.offerbook.OfferBook;
import haveno.desktop.main.offer.offerbook.OfferBookListItem;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.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 lombok.Getter;
import lombok.Setter;
import javax.inject.Named;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
@ -48,13 +56,6 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import lombok.Getter;
import lombok.Setter;
class SpreadViewModel extends ActivatableViewModel {

View file

@ -17,15 +17,17 @@
package haveno.desktop.main.market.spread;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.core.locale.Res;
import haveno.core.util.FormattingUtils;
import haveno.core.util.coin.CoinFormatter;
import haveno.desktop.common.view.FxmlView;
import static haveno.desktop.util.FormBuilder.addSlideToggleButton;
import javafx.scene.control.ToggleButton;
import javax.inject.Inject;
import javax.inject.Named;
import static haveno.desktop.util.FormBuilder.addSlideToggleButton;
@FxmlView
public class SpreadViewPaymentMethod extends SpreadView {
private ToggleButton expandedMode;

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.market.trades;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.googlecode.jcsv.writer.CSVEntryConverter;
import com.jfoenix.controls.JFXTabPane;
import haveno.common.UserThread;
@ -43,20 +41,11 @@ import haveno.desktop.components.AutoTooltipTableColumn;
import haveno.desktop.components.AutoTooltipToggleButton;
import haveno.desktop.components.AutocompleteComboBox;
import haveno.desktop.components.ColoredDecimalPlacesWithZerosText;
import static haveno.desktop.main.market.trades.TradesChartsViewModel.MAX_TICKS;
import haveno.desktop.main.market.trades.charts.price.CandleStickChart;
import haveno.desktop.main.market.trades.charts.volume.VolumeChart;
import haveno.desktop.util.CurrencyListItem;
import haveno.desktop.util.DisplayUtils;
import static haveno.desktop.util.FormBuilder.addTopLabelAutocompleteComboBox;
import static haveno.desktop.util.FormBuilder.getTopLabelWithVBox;
import haveno.desktop.util.GUIUtil;
import java.text.DecimalFormat;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
@ -95,6 +84,19 @@ import org.fxmisc.easybind.Subscription;
import org.fxmisc.easybind.monadic.MonadicBinding;
import org.jetbrains.annotations.NotNull;
import javax.inject.Inject;
import javax.inject.Named;
import java.text.DecimalFormat;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
import static haveno.desktop.main.market.trades.TradesChartsViewModel.MAX_TICKS;
import static haveno.desktop.util.FormBuilder.addTopLabelAutocompleteComboBox;
import static haveno.desktop.util.FormBuilder.getTopLabelWithVBox;
@FxmlView
public class TradesChartsView extends ActivatableViewAndModel<VBox, TradesChartsViewModel> {
private static final int SHOW_ALL = 0;

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.offer;
import com.google.inject.Inject;
import haveno.core.offer.OfferDirection;
import haveno.core.user.Preferences;
import haveno.core.user.User;
@ -26,6 +25,8 @@ import haveno.desktop.common.view.FxmlView;
import haveno.desktop.common.view.ViewLoader;
import haveno.network.p2p.P2PService;
import javax.inject.Inject;
@FxmlView
public class BuyOfferView extends OfferView {

View file

@ -17,9 +17,7 @@
package haveno.desktop.main.offer;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.handlers.ErrorMessageHandler;
import haveno.common.util.MathUtils;
import haveno.common.util.Utilities;
@ -54,16 +52,6 @@ import haveno.desktop.Navigation;
import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import java.math.BigInteger;
import java.util.Comparator;
import static java.util.Comparator.comparing;
import java.util.Date;
import java.util.HashSet;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.ObjectProperty;
@ -82,6 +70,20 @@ import javafx.collections.SetChangeListener;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
import javax.inject.Named;
import java.math.BigInteger;
import java.util.Comparator;
import java.util.Date;
import java.util.HashSet;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Comparator.comparing;
public abstract class MutableOfferDataModel extends OfferDataModel {
private final CreateOfferService createOfferService;
protected final OpenOfferManager openOfferManager;

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.offer;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.UserThread;
import haveno.common.app.DevEnv;
import haveno.common.util.MathUtils;
@ -49,10 +47,10 @@ import haveno.core.util.PriceUtil;
import haveno.core.util.VolumeUtil;
import haveno.core.util.coin.CoinFormatter;
import haveno.core.util.coin.CoinUtil;
import haveno.core.util.validation.NonFiatPriceValidator;
import haveno.core.util.validation.FiatPriceValidator;
import haveno.core.util.validation.InputValidator;
import haveno.core.util.validation.MonetaryValidator;
import haveno.core.util.validation.NonFiatPriceValidator;
import haveno.core.xmr.wallet.Restrictions;
import haveno.desktop.Navigation;
import haveno.desktop.common.model.ActivatableWithDataModel;
@ -64,9 +62,6 @@ import haveno.desktop.main.settings.SettingsView;
import haveno.desktop.main.settings.preferences.PreferencesView;
import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.GUIUtil;
import java.math.BigInteger;
import java.util.concurrent.TimeUnit;
import static javafx.beans.binding.Bindings.createStringBinding;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
@ -83,6 +78,13 @@ import javafx.util.Callback;
import lombok.extern.slf4j.Slf4j;
import org.bitcoinj.core.Coin;
import javax.inject.Inject;
import javax.inject.Named;
import java.math.BigInteger;
import java.util.concurrent.TimeUnit;
import static javafx.beans.binding.Bindings.createStringBinding;
@Slf4j
public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> extends ActivatableWithDataModel<M> {
private final XmrValidator xmrValidator;

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.offer;
import com.google.inject.Inject;
import haveno.core.offer.OfferDirection;
import haveno.core.user.Preferences;
import haveno.core.user.User;
@ -26,6 +25,8 @@ import haveno.desktop.common.view.FxmlView;
import haveno.desktop.common.view.ViewLoader;
import haveno.network.p2p.P2PService;
import javax.inject.Inject;
@FxmlView
public class SellOfferView extends OfferView {

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.offer.createoffer;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.core.account.witness.AccountAgeWitnessService;
import haveno.core.offer.CreateOfferService;
import haveno.core.offer.OfferUtil;
@ -34,6 +33,8 @@ import haveno.core.xmr.wallet.XmrWalletService;
import haveno.desktop.Navigation;
import haveno.desktop.main.offer.MutableOfferDataModel;
import haveno.network.p2p.P2PService;
import javax.inject.Named;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.offer.createoffer;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.core.locale.CurrencyUtil;
import haveno.core.locale.TradeCurrency;
import haveno.core.offer.OfferDirection;
@ -32,11 +31,13 @@ import haveno.desktop.main.offer.MutableOfferView;
import haveno.desktop.main.offer.OfferView;
import haveno.desktop.main.overlays.windows.OfferDetailsWindow;
import haveno.desktop.util.GUIUtil;
import java.util.Objects;
import java.util.stream.Collectors;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javax.inject.Named;
import java.util.Objects;
import java.util.stream.Collectors;
@FxmlView
public class CreateOfferView extends MutableOfferView<CreateOfferViewModel> {

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.offer.createoffer;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.core.account.witness.AccountAgeWitnessService;
import haveno.core.offer.OfferUtil;
import haveno.core.payment.validation.FiatVolumeValidator;
@ -28,12 +27,14 @@ import haveno.core.provider.price.PriceFeedService;
import haveno.core.user.Preferences;
import haveno.core.util.FormattingUtils;
import haveno.core.util.coin.CoinFormatter;
import haveno.core.util.validation.FiatPriceValidator;
import haveno.core.util.validation.NonFiatPriceValidator;
import haveno.core.util.validation.FiatPriceValidator;
import haveno.desktop.Navigation;
import haveno.desktop.common.model.ViewModel;
import haveno.desktop.main.offer.MutableOfferViewModel;
import javax.inject.Named;
class CreateOfferViewModel extends MutableOfferViewModel<CreateOfferDataModel> implements ViewModel {
@Inject

View file

@ -17,23 +17,25 @@
package haveno.desktop.main.offer.offerbook;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import haveno.core.filter.FilterManager;
import haveno.core.offer.Offer;
import haveno.core.offer.OfferBookService;
import static haveno.core.offer.OfferDirection.BUY;
import haveno.core.offer.OfferRestrictions;
import haveno.network.p2p.storage.P2PDataStorage;
import haveno.network.utils.Utils;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import lombok.extern.slf4j.Slf4j;
import javax.inject.Inject;
import javax.inject.Singleton;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import lombok.extern.slf4j.Slf4j;
import static haveno.core.offer.OfferDirection.BUY;
/**
* Holds and manages the unsorted and unfiltered offerbook list (except for banned offers) of both buy and sell offers.

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.offer.offerbook;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.core.account.sign.SignedWitnessService;
import haveno.core.account.witness.AccountAgeWitnessService;
@ -32,6 +30,9 @@ import haveno.desktop.common.view.FxmlView;
import haveno.desktop.main.overlays.windows.OfferDetailsWindow;
import javafx.scene.layout.GridPane;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class OtherOfferBookView extends OfferBookView<GridPane, OtherOfferBookViewModel> {

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.offer.offerbook;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.core.account.witness.AccountAgeWitnessService;
import haveno.core.api.CoreApi;
import haveno.core.locale.CryptoCurrency;
@ -43,13 +42,15 @@ import haveno.desktop.Navigation;
import haveno.desktop.main.offer.OfferViewUtil;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import org.jetbrains.annotations.NotNull;
import javax.inject.Named;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
public class OtherOfferBookViewModel extends OfferBookViewModel {
@Inject

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.offer.offerbook;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.core.account.sign.SignedWitnessService;
import haveno.core.account.witness.AccountAgeWitnessService;
@ -32,6 +30,9 @@ import haveno.desktop.common.view.FxmlView;
import haveno.desktop.main.overlays.windows.OfferDetailsWindow;
import javafx.scene.layout.GridPane;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class TopCryptoOfferBookView extends OfferBookView<GridPane, TopCryptoOfferBookViewModel> {

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.offer.offerbook;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.core.account.witness.AccountAgeWitnessService;
import haveno.core.api.CoreApi;
import haveno.core.locale.TradeCurrency;
@ -38,11 +37,13 @@ import haveno.core.xmr.setup.WalletsSetup;
import haveno.desktop.Navigation;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javax.inject.Named;
import java.util.function.Predicate;
import java.util.stream.Collectors;
public class TopCryptoOfferBookViewModel extends OfferBookViewModel {
public static TradeCurrency TOP_CRYPTO = GUIUtil.TOP_CRYPTO;

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.offer.offerbook;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.core.account.sign.SignedWitnessService;
import haveno.core.account.witness.AccountAgeWitnessService;
@ -32,6 +30,9 @@ import haveno.desktop.common.view.FxmlView;
import haveno.desktop.main.overlays.windows.OfferDetailsWindow;
import javafx.scene.layout.GridPane;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class XmrOfferBookView extends OfferBookView<GridPane, XmrOfferBookViewModel> {

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.offer.offerbook;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.core.account.witness.AccountAgeWitnessService;
import haveno.core.api.CoreApi;
import haveno.core.locale.CryptoCurrency;
@ -43,11 +42,13 @@ import haveno.core.xmr.setup.WalletsSetup;
import haveno.desktop.Navigation;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javax.inject.Named;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
public class XmrOfferBookViewModel extends OfferBookViewModel {

View file

@ -17,7 +17,38 @@
package haveno.desktop.main.offer.signedoffer;
import com.google.inject.Inject;
import javax.inject.Inject;
import javafx.fxml.FXML;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.Label;
import javafx.scene.control.MenuItem;
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.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import javafx.geometry.Insets;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.transformation.FilteredList;
import javafx.collections.transformation.SortedList;
import javafx.util.Callback;
import javafx.util.Duration;
import java.util.Comparator;
import java.util.Date;
import haveno.common.util.Utilities;
import haveno.core.locale.Res;
import haveno.core.offer.SignedOffer;
@ -34,27 +65,6 @@ import haveno.desktop.main.offer.OfferViewUtil;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.GUIUtil;
import java.util.Comparator;
import java.util.Date;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.transformation.FilteredList;
import javafx.collections.transformation.SortedList;
import javafx.fxml.FXML;
import javafx.geometry.Insets;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.Label;
import javafx.scene.control.MenuItem;
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.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import javafx.util.Callback;
import javafx.util.Duration;
@FxmlView
public class SignedOfferView extends ActivatableViewAndModel<VBox, SignedOffersViewModel> {

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.offer.takeoffer;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.jfoenix.controls.JFXTextField;
import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;
import haveno.common.UserThread;
@ -56,7 +54,6 @@ import haveno.desktop.main.offer.ClosableView;
import haveno.desktop.main.offer.InitializableViewWithTakeOfferData;
import haveno.desktop.main.offer.OfferView;
import haveno.desktop.main.offer.OfferViewUtil;
import static haveno.desktop.main.offer.OfferViewUtil.addPayInfoEntry;
import haveno.desktop.main.offer.SelectableView;
import haveno.desktop.main.overlays.notifications.Notification;
import haveno.desktop.main.overlays.popups.Popup;
@ -65,27 +62,9 @@ import haveno.desktop.main.overlays.windows.OfferDetailsWindow;
import haveno.desktop.main.overlays.windows.QRCodeWindow;
import haveno.desktop.main.portfolio.PortfolioView;
import haveno.desktop.main.portfolio.pendingtrades.PendingTradesView;
import static haveno.desktop.util.FormBuilder.add2ButtonsWithBox;
import static haveno.desktop.util.FormBuilder.addAddressTextField;
import static haveno.desktop.util.FormBuilder.addBalanceTextField;
import static haveno.desktop.util.FormBuilder.addComboBoxTopLabelTextField;
import static haveno.desktop.util.FormBuilder.addFundsTextfield;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.getEditableValueBox;
import static haveno.desktop.util.FormBuilder.getIconForLabel;
import static haveno.desktop.util.FormBuilder.getNonEditableValueBox;
import static haveno.desktop.util.FormBuilder.getNonEditableValueBoxWithInfo;
import static haveno.desktop.util.FormBuilder.getSmallIconForLabel;
import static haveno.desktop.util.FormBuilder.getTopLabelWithVBox;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.Layout;
import haveno.desktop.util.Transitions;
import java.io.ByteArrayInputStream;
import java.math.BigInteger;
import java.net.URI;
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import static javafx.beans.binding.Bindings.createStringBinding;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.value.ChangeListener;
import javafx.geometry.HPos;
@ -114,6 +93,29 @@ import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import org.jetbrains.annotations.NotNull;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.ByteArrayInputStream;
import java.math.BigInteger;
import java.net.URI;
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import static haveno.desktop.main.offer.OfferViewUtil.addPayInfoEntry;
import static haveno.desktop.util.FormBuilder.add2ButtonsWithBox;
import static haveno.desktop.util.FormBuilder.addAddressTextField;
import static haveno.desktop.util.FormBuilder.addBalanceTextField;
import static haveno.desktop.util.FormBuilder.addComboBoxTopLabelTextField;
import static haveno.desktop.util.FormBuilder.addFundsTextfield;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.getEditableValueBox;
import static haveno.desktop.util.FormBuilder.getIconForLabel;
import static haveno.desktop.util.FormBuilder.getNonEditableValueBox;
import static haveno.desktop.util.FormBuilder.getNonEditableValueBoxWithInfo;
import static haveno.desktop.util.FormBuilder.getSmallIconForLabel;
import static haveno.desktop.util.FormBuilder.getTopLabelWithVBox;
import static javafx.beans.binding.Bindings.createStringBinding;
@FxmlView
public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOfferViewModel> implements ClosableView, InitializableViewWithTakeOfferData, SelectableView {
private final Navigation navigation;

View file

@ -17,9 +17,6 @@
package haveno.desktop.main.offer.takeoffer;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.UserThread;
import haveno.core.account.witness.AccountAgeWitnessService;
import haveno.core.locale.Res;
@ -53,8 +50,6 @@ import haveno.network.p2p.P2PService;
import haveno.network.p2p.network.CloseConnectionReason;
import haveno.network.p2p.network.Connection;
import haveno.network.p2p.network.ConnectionListener;
import java.math.BigInteger;
import static javafx.beans.binding.Bindings.createStringBinding;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
@ -67,7 +62,14 @@ import javafx.scene.control.ComboBox;
import javafx.scene.control.ListCell;
import javafx.scene.control.ListView;
import javafx.util.Callback;
import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.inject.Named;
import java.math.BigInteger;
import static com.google.common.base.Preconditions.checkNotNull;
import static javafx.beans.binding.Bindings.createStringBinding;
class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> implements ViewModel {
final TakeOfferDataModel dataModel;
@ -590,7 +592,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> im
&& !isAmountEqualMinAmount(amount) && !isAmountEqualMaxAmount(amount)) {
// We only apply the rounding if the amount is variable (minAmount is lower as amount).
// Otherwise we could get an amount lower then the minAmount set by rounding
amount = dataModel.getOffer().isFiatOffer() ?
amount = dataModel.getOffer().isFiatOffer() ?
CoinUtil.getRoundedFiatAmount(amount, price, maxTradeLimit) :
CoinUtil.getRoundedTraditionalAmount(amount, price, maxTradeLimit);
}

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.overlays.notifications;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import haveno.common.UserThread;
import haveno.core.api.NotificationListener;
import haveno.core.locale.Res;
@ -46,17 +45,19 @@ import haveno.desktop.main.support.dispute.client.mediation.MediationClientView;
import haveno.desktop.main.support.dispute.client.refund.RefundClientView;
import haveno.proto.grpc.NotificationMessage;
import haveno.proto.grpc.NotificationMessage.NotificationType;
import javafx.collections.ListChangeListener;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import javax.annotation.Nullable;
import javax.inject.Singleton;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
import javafx.collections.ListChangeListener;
import javax.annotation.Nullable;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
@Slf4j
@Singleton

View file

@ -17,16 +17,18 @@
package haveno.desktop.main.overlays.windows;
import com.google.inject.Inject;
import haveno.core.locale.Res;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.main.portfolio.closedtrades.ClosedTradesViewModel;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelLabel;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import haveno.desktop.util.Layout;
import javafx.geometry.Insets;
import javax.inject.Inject;
import java.math.BigInteger;
import java.util.Map;
import javafx.geometry.Insets;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelLabel;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
public class ClosedTradesSummaryWindow extends Overlay<ClosedTradesSummaryWindow> {
private final ClosedTradesViewModel model;

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.overlays.windows;
import com.google.common.base.Joiner;
import com.google.inject.Inject;
import haveno.common.UserThread;
import haveno.core.account.witness.AccountAgeWitnessService;
import haveno.core.locale.CountryUtil;
@ -39,17 +38,8 @@ import haveno.desktop.components.HavenoTextArea;
import haveno.desktop.main.MainView;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.util.DisplayUtils;
import static haveno.desktop.util.DisplayUtils.getAccountWitnessDescription;
import static haveno.desktop.util.FormBuilder.addButtonAfterGroup;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelButton;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextField;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextFieldWithCopyIcon;
import static haveno.desktop.util.FormBuilder.addLabelExplorerAddressTextField;
import static haveno.desktop.util.FormBuilder.addLabelTxIdTextField;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import haveno.desktop.util.Layout;
import haveno.network.p2p.NodeAddress;
import java.util.List;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Button;
@ -64,6 +54,18 @@ import javafx.stage.Window;
import lombok.extern.slf4j.Slf4j;
import org.bitcoinj.core.Utils;
import javax.inject.Inject;
import java.util.List;
import static haveno.desktop.util.DisplayUtils.getAccountWitnessDescription;
import static haveno.desktop.util.FormBuilder.addButtonAfterGroup;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelButton;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextField;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextFieldWithCopyIcon;
import static haveno.desktop.util.FormBuilder.addLabelExplorerAddressTextField;
import static haveno.desktop.util.FormBuilder.addLabelTxIdTextField;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
@Slf4j
public class ContractWindow extends Overlay<ContractWindow> {
private final ArbitrationManager arbitrationManager;

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.overlays.windows;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.UserThread;
import haveno.common.app.DevEnv;
import haveno.common.config.Config;
@ -30,14 +29,6 @@ import haveno.desktop.components.AutoTooltipButton;
import haveno.desktop.components.InputTextField;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.main.overlays.popups.Popup;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addLabelCheckBox;
import static haveno.desktop.util.FormBuilder.addTopLabelInputTextField;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.stream.Collectors;
import javafx.collections.FXCollections;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
@ -51,6 +42,17 @@ import javafx.scene.layout.HBox;
import javafx.scene.layout.Region;
import org.apache.commons.lang3.StringUtils;
import javax.inject.Named;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.stream.Collectors;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addLabelCheckBox;
import static haveno.desktop.util.FormBuilder.addTopLabelInputTextField;
public class FilterWindow extends Overlay<FilterWindow> {
private final FilterManager filterManager;
private final boolean useDevPrivilegeKeys;

View file

@ -18,8 +18,7 @@
package haveno.desktop.main.overlays.windows;
import com.google.common.base.Joiner;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.UserThread;
import haveno.common.crypto.KeyRing;
import haveno.common.util.Tuple2;
@ -43,17 +42,8 @@ import haveno.desktop.components.AutoTooltipButton;
import haveno.desktop.components.BusyAnimation;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.util.DisplayUtils;
import static haveno.desktop.util.FormBuilder.addButtonAfterGroup;
import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabelAfterGroup;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelLabel;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextArea;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextFieldWithCopyIcon;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.Layout;
import java.math.BigInteger;
import java.util.List;
import java.util.Optional;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
import javafx.scene.control.Button;
@ -68,6 +58,19 @@ import org.fxmisc.easybind.Subscription;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.inject.Inject;
import javax.inject.Named;
import java.math.BigInteger;
import java.util.List;
import java.util.Optional;
import static haveno.desktop.util.FormBuilder.addButtonAfterGroup;
import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabelAfterGroup;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelLabel;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextArea;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextFieldWithCopyIcon;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
protected static final Logger log = LoggerFactory.getLogger(OfferDetailsWindow.class);

View file

@ -17,14 +17,9 @@
package haveno.desktop.main.overlays.windows;
import com.google.inject.Inject;
import haveno.core.locale.Res;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.util.FormBuilder;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import java.util.List;
import java.util.Optional;
import java.util.function.Consumer;
import javafx.collections.FXCollections;
import javafx.geometry.Insets;
import javafx.scene.control.ComboBox;
@ -33,6 +28,13 @@ import javafx.scene.layout.GridPane;
import javafx.util.StringConverter;
import org.bitcoinj.core.Transaction;
import javax.inject.Inject;
import java.util.List;
import java.util.Optional;
import java.util.function.Consumer;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
//TODO might be removed, but leave it for now until sure we will not use it anymore.
public class SelectDepositTxWindow extends Overlay<SelectDepositTxWindow> {
private ComboBox<Transaction> transactionsComboBox;

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.overlays.windows;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.app.DevEnv;
import haveno.common.config.Config;
import haveno.common.util.Tuple2;
@ -30,10 +29,6 @@ import haveno.desktop.components.InputTextField;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.FormBuilder;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addLabelCheckBox;
import static haveno.desktop.util.FormBuilder.addRadioButton;
import static haveno.desktop.util.FormBuilder.addTopLabelTextArea;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
import javafx.scene.Scene;
@ -47,6 +42,13 @@ import javafx.scene.input.KeyCode;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javax.inject.Named;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addLabelCheckBox;
import static haveno.desktop.util.FormBuilder.addRadioButton;
import static haveno.desktop.util.FormBuilder.addTopLabelTextArea;
public class SendAlertMessageWindow extends Overlay<SendAlertMessageWindow> {
private final AlertManager alertManager;
private final boolean useDevPrivilegeKeys;

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.overlays.windows;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.common.util.Tuple2;
import haveno.common.util.Tuple3;
@ -36,22 +34,6 @@ import haveno.desktop.components.AutoTooltipButton;
import haveno.desktop.components.InputTextField;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.main.overlays.popups.Popup;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addComboBox;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addLabelCheckBox;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addTopLabelDatePicker;
import static haveno.desktop.util.FormBuilder.addTopLabelListView;
import static haveno.desktop.util.FormBuilder.removeRowsFromGridPane;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.geometry.HPos;
@ -72,6 +54,26 @@ import lombok.extern.slf4j.Slf4j;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.Utils;
import javax.inject.Inject;
import javax.inject.Named;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addComboBox;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addLabelCheckBox;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addTopLabelDatePicker;
import static haveno.desktop.util.FormBuilder.addTopLabelListView;
import static haveno.desktop.util.FormBuilder.removeRowsFromGridPane;
@Slf4j
public class SignPaymentAccountsWindow extends Overlay<SignPaymentAccountsWindow> {

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.overlays.windows;
import com.google.inject.Inject;
import haveno.common.util.Tuple2;
import haveno.common.util.Utilities;
import haveno.core.account.witness.AccountAgeWitness;
@ -29,12 +28,6 @@ import haveno.desktop.components.HavenoTextArea;
import haveno.desktop.components.InputTextField;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.main.overlays.popups.Popup;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addTopLabelTextField;
import static haveno.desktop.util.FormBuilder.removeRowsFromGridPane;
import java.util.Date;
import javafx.geometry.VPos;
import javafx.scene.control.TextArea;
import javafx.scene.layout.GridPane;
@ -43,6 +36,15 @@ import lombok.extern.slf4j.Slf4j;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.Utils;
import javax.inject.Inject;
import java.util.Date;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addTopLabelTextField;
import static haveno.desktop.util.FormBuilder.removeRowsFromGridPane;
@Slf4j
public class SignSpecificWitnessWindow extends Overlay<SignSpecificWitnessWindow> {

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.overlays.windows;
import com.google.inject.Inject;
import haveno.common.crypto.Hash;
import haveno.common.util.Tuple3;
import haveno.common.util.Utilities;
@ -29,12 +28,6 @@ import haveno.desktop.components.AutoTooltipButton;
import haveno.desktop.components.InputTextField;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.main.overlays.popups.Popup;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addTopLabelListView;
import static haveno.desktop.util.FormBuilder.removeRowsFromGridPane;
import java.util.ArrayList;
import java.util.List;
import javafx.collections.FXCollections;
import javafx.geometry.VPos;
import javafx.scene.control.Label;
@ -47,6 +40,15 @@ import javafx.util.Callback;
import lombok.extern.slf4j.Slf4j;
import org.bitcoinj.core.Utils;
import javax.inject.Inject;
import java.util.ArrayList;
import java.util.List;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addTopLabelListView;
import static haveno.desktop.util.FormBuilder.removeRowsFromGridPane;
@Slf4j
public class SignUnsignedPubKeysWindow extends Overlay<SignUnsignedPubKeysWindow> {

View file

@ -18,8 +18,6 @@
package haveno.desktop.main.overlays.windows;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import haveno.common.UserThread;
import haveno.common.util.Tuple2;
import haveno.common.util.Tuple4;
@ -32,19 +30,9 @@ import haveno.desktop.components.BusyAnimation;
import haveno.desktop.components.TitledGroupBg;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.main.overlays.popups.Popup;
import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabelAfterGroup;
import static haveno.desktop.util.FormBuilder.addComboBox;
import static haveno.desktop.util.FormBuilder.addLabel;
import static haveno.desktop.util.FormBuilder.addRadioButton;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelTextArea;
import haveno.desktop.util.Layout;
import haveno.network.p2p.network.DefaultPluggableTransports;
import haveno.network.p2p.network.NetworkNode;
import java.io.IOException;
import java.net.URI;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import javafx.collections.FXCollections;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
@ -64,6 +52,20 @@ import javafx.scene.layout.Priority;
import javafx.util.StringConverter;
import lombok.extern.slf4j.Slf4j;
import javax.inject.Inject;
import javax.inject.Singleton;
import java.io.IOException;
import java.net.URI;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabelAfterGroup;
import static haveno.desktop.util.FormBuilder.addComboBox;
import static haveno.desktop.util.FormBuilder.addLabel;
import static haveno.desktop.util.FormBuilder.addRadioButton;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelTextArea;
@Slf4j
@Singleton
public class TorNetworkSettingsWindow extends Overlay<TorNetworkSettingsWindow> {

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.overlays.windows;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.UserThread;
import haveno.common.util.Tuple3;
import haveno.common.util.Utilities;
@ -39,12 +37,6 @@ import haveno.desktop.components.HavenoTextArea;
import haveno.desktop.main.MainView;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.util.DisplayUtils;
import static haveno.desktop.util.DisplayUtils.getAccountWitnessDescription;
import static haveno.desktop.util.FormBuilder.add2ButtonsWithBox;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextArea;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextField;
import static haveno.desktop.util.FormBuilder.addLabelTxIdTextField;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import haveno.desktop.util.Layout;
import haveno.network.p2p.NodeAddress;
import javafx.beans.property.IntegerProperty;
@ -67,6 +59,16 @@ import javafx.stage.Window;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.inject.Inject;
import javax.inject.Named;
import static haveno.desktop.util.DisplayUtils.getAccountWitnessDescription;
import static haveno.desktop.util.FormBuilder.add2ButtonsWithBox;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextArea;
import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextField;
import static haveno.desktop.util.FormBuilder.addLabelTxIdTextField;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
public class TradeDetailsWindow extends Overlay<TradeDetailsWindow> {
protected static final Logger log = LoggerFactory.getLogger(TradeDetailsWindow.class);

View file

@ -17,10 +17,7 @@
package haveno.desktop.main.overlays.windows;
import static com.google.common.base.Preconditions.checkArgument;
import com.google.common.base.Splitter;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.common.crypto.IncorrectPasswordException;
import haveno.common.util.Tuple2;
@ -35,18 +32,7 @@ import haveno.desktop.components.PasswordTextField;
import haveno.desktop.main.SharedPresentation;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.main.overlays.popups.Popup;
import static haveno.desktop.util.FormBuilder.addPasswordTextField;
import static haveno.desktop.util.FormBuilder.addPrimaryActionButton;
import static haveno.desktop.util.FormBuilder.addTextArea;
import static haveno.desktop.util.FormBuilder.addTopLabelDatePicker;
import haveno.desktop.util.Layout;
import java.io.File;
import java.io.IOException;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.ZoneOffset;
import static javafx.beans.binding.Bindings.createBooleanBinding;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.value.ChangeListener;
@ -68,6 +54,22 @@ import org.bitcoinj.crypto.MnemonicCode;
import org.bitcoinj.crypto.MnemonicException;
import org.bitcoinj.wallet.DeterministicSeed;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.File;
import java.io.IOException;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.ZoneOffset;
import static com.google.common.base.Preconditions.checkArgument;
import static haveno.desktop.util.FormBuilder.addPasswordTextField;
import static haveno.desktop.util.FormBuilder.addPrimaryActionButton;
import static haveno.desktop.util.FormBuilder.addTextArea;
import static haveno.desktop.util.FormBuilder.addTopLabelDatePicker;
import static javafx.beans.binding.Bindings.createBooleanBinding;
@Slf4j
public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
private final CoreAccountService accountService;

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.portfolio;
import com.google.inject.Inject;
import haveno.core.locale.Res;
import haveno.core.offer.OfferPayload;
import haveno.core.offer.OpenOffer;
@ -35,13 +34,15 @@ import haveno.desktop.main.portfolio.editoffer.EditOfferView;
import haveno.desktop.main.portfolio.failedtrades.FailedTradesView;
import haveno.desktop.main.portfolio.openoffer.OpenOffersView;
import haveno.desktop.main.portfolio.pendingtrades.PendingTradesView;
import java.util.List;
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.annotation.Nullable;
import javax.inject.Inject;
import java.util.List;
@FxmlView
public class PortfolioView extends ActivatableView<TabPane, Void> {

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.portfolio.closedtrades;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.googlecode.jcsv.writer.CSVEntryConverter;
import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;
import haveno.common.config.Config;
@ -45,11 +43,8 @@ import haveno.desktop.main.overlays.windows.ClosedTradesSummaryWindow;
import haveno.desktop.main.overlays.windows.OfferDetailsWindow;
import haveno.desktop.main.overlays.windows.TradeDetailsWindow;
import haveno.desktop.main.portfolio.presentation.PortfolioUtil;
import static haveno.desktop.util.FormBuilder.getRegularIconButton;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.NodeAddress;
import java.util.Comparator;
import java.util.function.Function;
import javafx.beans.binding.Bindings;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.value.ChangeListener;
@ -75,6 +70,13 @@ import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.util.Callback;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.Comparator;
import java.util.function.Function;
import static haveno.desktop.util.FormBuilder.getRegularIconButton;
@FxmlView
public class ClosedTradesView extends ActivatableViewAndModel<VBox, ClosedTradesViewModel> {
private final boolean useDevPrivilegeKeys;

View file

@ -19,7 +19,6 @@ package haveno.desktop.main.portfolio.duplicateoffer;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.core.account.witness.AccountAgeWitnessService;
import haveno.core.locale.CurrencyUtil;
import haveno.core.locale.TradeCurrency;
@ -40,6 +39,8 @@ import haveno.core.xmr.wallet.XmrWalletService;
import haveno.desktop.Navigation;
import haveno.desktop.main.offer.MutableOfferDataModel;
import haveno.network.p2p.P2PService;
import javax.inject.Named;
import java.math.BigInteger;
import java.util.Objects;
import java.util.Optional;

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.portfolio.duplicateoffer;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.core.locale.CurrencyUtil;
import haveno.core.offer.OfferPayload;
import haveno.core.payment.PaymentAccount;
@ -32,6 +31,8 @@ import haveno.desktop.main.overlays.windows.OfferDetailsWindow;
import javafx.collections.ObservableList;
import javafx.geometry.Insets;
import javax.inject.Named;
@FxmlView
public class DuplicateOfferView extends MutableOfferView<DuplicateOfferViewModel> {

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.portfolio.duplicateoffer;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.core.account.witness.AccountAgeWitnessService;
import haveno.core.offer.Offer;
import haveno.core.offer.OfferPayload;
@ -30,12 +29,14 @@ import haveno.core.provider.price.PriceFeedService;
import haveno.core.user.Preferences;
import haveno.core.util.FormattingUtils;
import haveno.core.util.coin.CoinFormatter;
import haveno.core.util.validation.FiatPriceValidator;
import haveno.core.util.validation.NonFiatPriceValidator;
import haveno.core.util.validation.FiatPriceValidator;
import haveno.desktop.Navigation;
import haveno.desktop.main.offer.MutableOfferViewModel;
import lombok.extern.slf4j.Slf4j;
import javax.inject.Named;
@Slf4j
class DuplicateOfferViewModel extends MutableOfferViewModel<DuplicateOfferDataModel> {

View file

@ -19,7 +19,6 @@ package haveno.desktop.main.portfolio.editoffer;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.handlers.ErrorMessageHandler;
import haveno.common.handlers.ResultHandler;
import haveno.core.account.witness.AccountAgeWitnessService;
@ -46,6 +45,8 @@ import haveno.core.xmr.wallet.XmrWalletService;
import haveno.desktop.Navigation;
import haveno.desktop.main.offer.MutableOfferDataModel;
import haveno.network.p2p.P2PService;
import javax.inject.Named;
import java.util.Optional;
import java.util.Set;

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.portfolio.editoffer;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.util.Tuple4;
import haveno.core.locale.CurrencyUtil;
import haveno.core.locale.Res;
@ -35,7 +34,6 @@ import haveno.desktop.components.BusyAnimation;
import haveno.desktop.main.offer.MutableOfferView;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.main.overlays.windows.OfferDetailsWindow;
import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabelAfterGroup;
import javafx.collections.ObservableList;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
@ -46,6 +44,10 @@ import javafx.scene.image.ImageView;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javax.inject.Named;
import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabelAfterGroup;
@FxmlView
public class EditOfferView extends MutableOfferView<EditOfferViewModel> {

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.portfolio.editoffer;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.handlers.ErrorMessageHandler;
import haveno.common.handlers.ResultHandler;
import haveno.core.account.witness.AccountAgeWitnessService;
@ -32,11 +31,13 @@ import haveno.core.user.Preferences;
import haveno.core.util.FormattingUtils;
import haveno.core.util.PriceUtil;
import haveno.core.util.coin.CoinFormatter;
import haveno.core.util.validation.FiatPriceValidator;
import haveno.core.util.validation.NonFiatPriceValidator;
import haveno.core.util.validation.FiatPriceValidator;
import haveno.desktop.Navigation;
import haveno.desktop.main.offer.MutableOfferViewModel;
import javax.inject.Named;
class EditOfferViewModel extends MutableOfferViewModel<EditOfferDataModel> {
@Inject

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.portfolio.failedtrades;
import com.google.inject.Inject;
import com.googlecode.jcsv.writer.CSVEntryConverter;
import com.jfoenix.controls.JFXButton;
import de.jensd.fx.fontawesome.AwesomeIcon;
@ -39,8 +38,6 @@ import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.main.overlays.windows.TradeDetailsWindow;
import haveno.desktop.util.FormBuilder;
import haveno.desktop.util.GUIUtil;
import java.math.BigInteger;
import java.util.Comparator;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.value.ChangeListener;
import javafx.collections.ObservableList;
@ -68,6 +65,10 @@ import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.util.Callback;
import javax.inject.Inject;
import java.math.BigInteger;
import java.util.Comparator;
@FxmlView
public class FailedTradesView extends ActivatableViewAndModel<VBox, FailedTradesViewModel> {

View file

@ -18,7 +18,6 @@
package haveno.desktop.main.portfolio.failedtrades;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.core.locale.CurrencyUtil;
import haveno.core.locale.Res;
import haveno.core.trade.HavenoUtils;
@ -30,6 +29,8 @@ import haveno.desktop.common.model.ViewModel;
import haveno.desktop.util.DisplayUtils;
import javafx.collections.ObservableList;
import javax.inject.Named;
class FailedTradesViewModel extends ActivatableWithDataModel<FailedTradesDataModel> implements ViewModel {
private final CoinFormatter formatter;

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.portfolio.openoffer;
import com.google.inject.Inject;
import com.googlecode.jcsv.writer.CSVEntryConverter;
import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;
import haveno.core.locale.Res;
@ -41,13 +40,7 @@ import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.main.overlays.windows.OfferDetailsWindow;
import haveno.desktop.main.portfolio.PortfolioView;
import haveno.desktop.main.portfolio.duplicateoffer.DuplicateOfferView;
import static haveno.desktop.util.FormBuilder.getRegularIconButton;
import haveno.desktop.util.GUIUtil;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javafx.beans.binding.Bindings;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.value.ChangeListener;
@ -75,10 +68,20 @@ import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.util.Callback;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import org.jetbrains.annotations.NotNull;
import javax.inject.Inject;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static haveno.desktop.util.FormBuilder.getRegularIconButton;
@FxmlView
public class OpenOffersView extends ActivatableViewAndModel<VBox, OpenOffersViewModel> {

View file

@ -17,9 +17,7 @@
package haveno.desktop.main.portfolio.openoffer;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.handlers.ErrorMessageHandler;
import haveno.common.handlers.ResultHandler;
import haveno.core.locale.CurrencyUtil;
@ -39,6 +37,10 @@ import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import javafx.collections.ObservableList;
import javax.inject.Named;
import static com.google.common.base.Preconditions.checkNotNull;
class OpenOffersViewModel extends ActivatableWithDataModel<OpenOffersDataModel> implements ViewModel {
private final P2PService p2PService;
private final PriceUtil priceUtil;

View file

@ -17,10 +17,7 @@
package haveno.desktop.main.portfolio.pendingtrades;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.UserThread;
import haveno.common.crypto.PubKeyRing;
import haveno.common.crypto.PubKeyRingProvider;
@ -64,9 +61,6 @@ import haveno.desktop.main.support.dispute.client.arbitration.ArbitrationClientV
import haveno.desktop.main.support.dispute.client.mediation.MediationClientView;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import java.math.BigInteger;
import java.util.Date;
import java.util.stream.Collectors;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
@ -75,11 +69,19 @@ import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javax.annotation.Nullable;
import lombok.Getter;
import org.bitcoinj.core.Coin;
import org.bouncycastle.crypto.params.KeyParameter;
import javax.annotation.Nullable;
import javax.inject.Named;
import java.math.BigInteger;
import java.util.Date;
import java.util.stream.Collectors;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
public class PendingTradesDataModel extends ActivatableDataModel {
@Getter
public final TradeManager tradeManager;

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.portfolio.pendingtrades;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.jfoenix.controls.JFXBadge;
import com.jfoenix.controls.JFXButton;
import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;
@ -56,9 +54,6 @@ import haveno.desktop.util.CssTheme;
import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.FormBuilder;
import haveno.network.p2p.NodeAddress;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
import javafx.application.Platform;
import javafx.beans.binding.Bindings;
import javafx.beans.property.ReadOnlyObjectWrapper;
@ -97,6 +92,12 @@ import javafx.util.Callback;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
@FxmlView
public class PendingTradesView extends ActivatableViewAndModel<VBox, PendingTradesViewModel> {
public interface ChatCallback {

View file

@ -17,9 +17,7 @@
package haveno.desktop.main.portfolio.pendingtrades;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.ClockWatcher;
import haveno.common.app.DevEnv;
import haveno.core.account.witness.AccountAgeWitnessService;
@ -43,23 +41,27 @@ import haveno.core.xmr.wallet.Restrictions;
import haveno.desktop.Navigation;
import haveno.desktop.common.model.ActivatableWithDataModel;
import haveno.desktop.common.model.ViewModel;
import static haveno.desktop.main.portfolio.pendingtrades.PendingTradesViewModel.SellerState.UNDEFINED;
import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import java.math.BigInteger;
import java.util.Date;
import java.util.stream.Collectors;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.ReadOnlyObjectProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleObjectProperty;
import javax.annotation.Nullable;
import lombok.Getter;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import javax.annotation.Nullable;
import javax.inject.Named;
import java.math.BigInteger;
import java.util.Date;
import java.util.stream.Collectors;
import static com.google.common.base.Preconditions.checkNotNull;
import static haveno.desktop.main.portfolio.pendingtrades.PendingTradesViewModel.SellerState.UNDEFINED;
public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTradesDataModel> implements ViewModel {
@Getter
@ -150,12 +152,12 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
tradeStateSubscription.unsubscribe();
tradeStateSubscription = null;
}
if (payoutStateSubscription != null) {
payoutStateSubscription.unsubscribe();
payoutStateSubscription = null;
}
if (messageStateSubscription != null) {
messageStateSubscription.unsubscribe();
messageStateSubscription = null;
@ -171,18 +173,18 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
sellerState.set(SellerState.UNDEFINED);
buyerState.set(BuyerState.UNDEFINED);
}
if (payoutStateSubscription != null) {
payoutStateSubscription.unsubscribe();
sellerState.set(SellerState.UNDEFINED);
buyerState.set(BuyerState.UNDEFINED);
}
if (messageStateSubscription != null) {
messageStateSubscription.unsubscribe();
messageStateProperty.set(MessageState.UNDEFINED);
}
if (selectedItem != null) {
this.trade = selectedItem.getTrade();
tradeStateSubscription = EasyBind.subscribe(trade.stateProperty(), state -> {

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.presentation;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import haveno.common.app.DevEnv;
import haveno.core.locale.Res;
import haveno.core.user.DontShowAgainLookup;
@ -28,6 +26,9 @@ import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.collections.MapChangeListener;
import javax.inject.Inject;
import javax.inject.Singleton;
@Singleton
public class AccountPresentation {

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.presentation;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import haveno.common.UserThread;
import haveno.core.locale.CurrencyUtil;
import haveno.core.locale.Res;
@ -30,10 +28,6 @@ import haveno.core.util.FormattingUtils;
import haveno.core.xmr.wallet.XmrWalletService;
import haveno.desktop.components.TxIdTextField;
import haveno.desktop.main.shared.PriceFeedComboBoxItem;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
@ -50,6 +44,13 @@ import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import org.fxmisc.easybind.monadic.MonadicBinding;
import javax.inject.Inject;
import javax.inject.Singleton;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
@Singleton
public class MarketPricePresentation {
private final Preferences preferences;

View file

@ -17,13 +17,14 @@
package haveno.desktop.main.presentation;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import haveno.core.user.Preferences;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.collections.MapChangeListener;
import javax.inject.Inject;
import javax.inject.Singleton;
@Singleton
public class SettingsPresentation {

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.settings;
import com.google.inject.Inject;
import haveno.core.locale.Res;
import haveno.core.user.Preferences;
import haveno.desktop.Navigation;
@ -37,6 +36,8 @@ import javafx.scene.control.ScrollPane;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javax.inject.Inject;
@FxmlView
public class SettingsView extends ActivatableView<TabPane, Void> {
@FXML

View file

@ -17,21 +17,23 @@
package haveno.desktop.main.settings.about;
import com.google.inject.Inject;
import haveno.common.app.Version;
import haveno.core.locale.Res;
import haveno.desktop.common.view.ActivatableView;
import haveno.desktop.common.view.FxmlView;
import haveno.desktop.components.HyperlinkWithIcon;
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextField;
import static haveno.desktop.util.FormBuilder.addHyperlinkWithIcon;
import static haveno.desktop.util.FormBuilder.addLabel;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import haveno.desktop.util.Layout;
import javafx.geometry.HPos;
import javafx.scene.control.Label;
import javafx.scene.layout.GridPane;
import javax.inject.Inject;
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextField;
import static haveno.desktop.util.FormBuilder.addHyperlinkWithIcon;
import static haveno.desktop.util.FormBuilder.addLabel;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
@FxmlView
public class AboutView extends ActivatableView<GridPane, Void> {

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.settings.network;
import com.google.inject.Inject;
import haveno.common.ClockWatcher;
import haveno.common.UserThread;
import haveno.core.api.CoreMoneroConnectionsService;
@ -28,8 +27,8 @@ import haveno.core.user.Preferences;
import haveno.core.util.FormattingUtils;
import haveno.core.util.validation.RegexValidator;
import haveno.core.util.validation.RegexValidatorFactory;
import haveno.core.xmr.nodes.LocalBitcoinNode;
import haveno.core.xmr.nodes.XmrNodes;
import haveno.core.xmr.nodes.LocalBitcoinNode;
import haveno.core.xmr.setup.WalletsSetup;
import haveno.desktop.app.HavenoApp;
import haveno.desktop.common.view.ActivatableView;
@ -43,10 +42,6 @@ import haveno.desktop.main.overlays.windows.TorNetworkSettingsWindow;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import haveno.network.p2p.network.Statistic;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import static javafx.beans.binding.Bindings.createStringBinding;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
@ -67,6 +62,13 @@ import monero.daemon.model.MoneroPeer;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import javax.inject.Inject;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import static javafx.beans.binding.Bindings.createStringBinding;
@FxmlView
public class NetworkSettingsView extends ActivatableView<GridPane, Void> {

View file

@ -17,9 +17,6 @@
package haveno.desktop.main.settings.preferences;
import static com.google.common.base.Preconditions.checkArgument;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.UserThread;
import haveno.common.app.DevEnv;
import haveno.common.config.Config;
@ -32,10 +29,10 @@ import haveno.core.locale.Country;
import haveno.core.locale.CountryUtil;
import haveno.core.locale.CryptoCurrency;
import haveno.core.locale.CurrencyUtil;
import haveno.core.locale.TraditionalCurrency;
import haveno.core.locale.LanguageUtil;
import haveno.core.locale.Res;
import haveno.core.locale.TradeCurrency;
import haveno.core.locale.TraditionalCurrency;
import haveno.core.payment.PaymentAccount;
import haveno.core.payment.payload.PaymentMethod;
import haveno.core.payment.validation.XmrValidator;
@ -57,24 +54,9 @@ import haveno.desktop.components.PasswordTextField;
import haveno.desktop.components.TitledGroupBg;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.main.overlays.windows.EditCustomExplorerWindow;
import static haveno.desktop.util.FormBuilder.addButton;
import static haveno.desktop.util.FormBuilder.addComboBox;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addSlideToggleButton;
import static haveno.desktop.util.FormBuilder.addTextFieldWithEditButton;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelListView;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.ImageUtil;
import haveno.desktop.util.Layout;
import java.io.File;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
@ -99,6 +81,26 @@ import javafx.util.Callback;
import javafx.util.StringConverter;
import org.apache.commons.lang3.StringUtils;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.File;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import static com.google.common.base.Preconditions.checkArgument;
import static haveno.desktop.util.FormBuilder.addButton;
import static haveno.desktop.util.FormBuilder.addComboBox;
import static haveno.desktop.util.FormBuilder.addInputTextField;
import static haveno.desktop.util.FormBuilder.addSlideToggleButton;
import static haveno.desktop.util.FormBuilder.addTextFieldWithEditButton;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelListView;
@FxmlView
public class PreferencesView extends ActivatableViewAndModel<GridPane, PreferencesViewModel> {
private final User user;

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.support;
import com.google.inject.Inject;
import haveno.common.app.DevEnv;
import haveno.common.crypto.KeyRing;
import haveno.common.crypto.PubKeyRing;
@ -38,8 +37,8 @@ import haveno.desktop.common.view.FxmlView;
import haveno.desktop.common.view.View;
import haveno.desktop.common.view.ViewLoader;
import haveno.desktop.main.MainView;
import haveno.desktop.main.offer.signedoffer.SignedOfferView;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.main.offer.signedoffer.SignedOfferView;
import haveno.desktop.main.support.dispute.agent.arbitration.ArbitratorView;
import haveno.desktop.main.support.dispute.agent.mediation.MediatorView;
import haveno.desktop.main.support.dispute.agent.refund.RefundAgentView;
@ -51,7 +50,9 @@ import javafx.beans.value.ChangeListener;
import javafx.collections.MapChangeListener;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javax.annotation.Nullable;
import javax.inject.Inject;
@FxmlView
public class SupportView extends ActivatableView<TabPane, Void> {

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.support.dispute.agent.arbitration;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.common.crypto.KeyRing;
import haveno.core.account.witness.AccountAgeWitnessService;
@ -39,6 +37,9 @@ import haveno.desktop.main.overlays.windows.DisputeSummaryWindow;
import haveno.desktop.main.overlays.windows.TradeDetailsWindow;
import haveno.desktop.main.support.dispute.agent.DisputeAgentView;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class ArbitratorView extends DisputeAgentView {

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.support.dispute.agent.mediation;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.common.crypto.KeyRing;
import haveno.core.account.witness.AccountAgeWitnessService;
@ -39,6 +37,9 @@ import haveno.desktop.main.overlays.windows.DisputeSummaryWindow;
import haveno.desktop.main.overlays.windows.TradeDetailsWindow;
import haveno.desktop.main.support.dispute.agent.DisputeAgentView;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class MediatorView extends DisputeAgentView {

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.support.dispute.agent.refund;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.common.crypto.KeyRing;
import haveno.core.account.witness.AccountAgeWitnessService;
@ -41,6 +39,9 @@ import haveno.desktop.main.overlays.windows.DisputeSummaryWindow;
import haveno.desktop.main.overlays.windows.TradeDetailsWindow;
import haveno.desktop.main.support.dispute.agent.DisputeAgentView;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class RefundAgentView extends DisputeAgentView {

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.support.dispute.client.arbitration;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.common.crypto.KeyRing;
import haveno.core.account.witness.AccountAgeWitnessService;
@ -39,6 +37,9 @@ import haveno.desktop.main.overlays.windows.DisputeSummaryWindow;
import haveno.desktop.main.overlays.windows.TradeDetailsWindow;
import haveno.desktop.main.support.dispute.client.DisputeClientView;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class ArbitrationClientView extends DisputeClientView {
@Inject

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.support.dispute.client.mediation;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.common.crypto.KeyRing;
import haveno.core.account.witness.AccountAgeWitnessService;
@ -43,6 +41,9 @@ import haveno.desktop.main.overlays.windows.TradeDetailsWindow;
import haveno.desktop.main.support.dispute.client.DisputeClientView;
import haveno.network.p2p.NodeAddress;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class MediationClientView extends DisputeClientView {
@Inject

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.support.dispute.client.refund;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import haveno.common.config.Config;
import haveno.common.crypto.KeyRing;
import haveno.core.account.witness.AccountAgeWitnessService;
@ -41,6 +39,9 @@ import haveno.desktop.main.overlays.windows.TradeDetailsWindow;
import haveno.desktop.main.support.dispute.client.DisputeClientView;
import haveno.network.p2p.NodeAddress;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class RefundClientView extends DisputeClientView {
@Inject