Removing star and unused imports with checkstyle

This commit is contained in:
napoly 2023-03-14 20:28:47 +01:00 committed by woodser
parent ce05710537
commit 3b8f19c4ce
1206 changed files with 5197 additions and 6620 deletions

View file

@ -17,8 +17,6 @@
package haveno.desktop.main;
import javax.inject.Inject;
import com.jfoenix.controls.JFXBadge;
import com.jfoenix.controls.JFXComboBox;
import com.jfoenix.controls.JFXProgressBar;
@ -60,7 +58,16 @@ import haveno.desktop.util.Transitions;
import javafx.animation.Animation;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.beans.binding.ObjectBinding;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import javafx.geometry.Insets;
import javafx.geometry.NodeOrientation;
import javafx.geometry.Orientation;
import javafx.geometry.Pos;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
@ -81,32 +88,17 @@ import javafx.scene.layout.Region;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.TextAlignment;
import javafx.geometry.Insets;
import javafx.geometry.NodeOrientation;
import javafx.geometry.Orientation;
import javafx.geometry.Pos;
import javafx.beans.binding.ObjectBinding;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import javafx.util.Duration;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Date;
import java.util.Locale;
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;

View file

@ -72,9 +72,6 @@ import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.BootstrapListener;
import haveno.network.p2p.P2PService;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.monadic.MonadicBinding;
import javafx.beans.binding.Bindings;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.DoubleProperty;
@ -84,9 +81,12 @@ import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.monadic.MonadicBinding;
import java.util.ArrayList;
import java.util.Comparator;
@ -98,9 +98,6 @@ import java.util.Queue;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener {
private final HavenoSetup havenoSetup;

View file

@ -24,14 +24,12 @@ import haveno.core.offer.OpenOfferManager;
import haveno.core.xmr.wallet.WalletsManager;
import haveno.desktop.app.HavenoApp;
import haveno.desktop.main.overlays.popups.Popup;
import lombok.extern.slf4j.Slf4j;
import org.bitcoinj.wallet.DeterministicSeed;
import java.io.File;
import java.util.concurrent.TimeUnit;
import lombok.extern.slf4j.Slf4j;
/**
* This serves as shared space for static methods used from different views where no common parent view would fit as
* owner of that code. We keep it strictly static. It should replace GUIUtil for those methods which are not utility

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.account;
import haveno.common.app.DevEnv;
import haveno.common.util.Utilities;
import haveno.core.locale.Res;
import haveno.core.user.DontShowAgainLookup;
@ -39,12 +38,11 @@ import haveno.desktop.main.account.register.arbitrator.ArbitratorRegistrationVie
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.overlays.popups.Popup;
import haveno.desktop.main.presentation.AccountPresentation;
import javax.inject.Inject;
import javafx.beans.value.ChangeListener;
import javafx.collections.ListChangeListener;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.scene.Scene;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.Tab;
@ -52,12 +50,7 @@ import javafx.scene.control.TabPane;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.beans.value.ChangeListener;
import javafx.event.EventHandler;
import javafx.collections.ListChangeListener;
import javax.inject.Inject;
import java.util.List;
@FxmlView

View file

@ -14,8 +14,9 @@ import haveno.desktop.components.InfoAutoTooltipLabel;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.ImageUtil;
import org.apache.commons.lang3.StringUtils;
import javafx.beans.value.ChangeListener;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.control.ContentDisplay;
@ -26,14 +27,8 @@ import javafx.scene.image.ImageView;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.AnchorPane;
import javafx.beans.value.ChangeListener;
import javafx.event.EventHandler;
import javafx.collections.ObservableList;
import javafx.util.Callback;
import org.apache.commons.lang3.StringUtils;
import java.util.concurrent.TimeUnit;

View file

@ -33,11 +33,10 @@ import haveno.core.user.Preferences;
import haveno.core.user.User;
import haveno.desktop.common.model.ActivatableDataModel;
import haveno.desktop.util.GUIUtil;
import javafx.stage.Stage;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.collections.SetChangeListener;
import javafx.stage.Stage;
import java.util.ArrayList;
import java.util.Comparator;

View file

@ -18,10 +18,10 @@
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.geometry.Insets?>
<GridPane fx:id="root" fx:controller="haveno.desktop.main.account.content.altcoinaccounts.AltCoinAccountsView"
hgap="5.0" vgap="5.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"

View file

@ -17,12 +17,6 @@
package haveno.desktop.main.account.content.altcoinaccounts;
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;
import haveno.asset.AltCoinAccountDisclaimer;
import haveno.asset.Asset;
import haveno.asset.coins.Monero;
@ -50,21 +44,24 @@ import haveno.desktop.main.account.content.PaymentAccountsView;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.FormBuilder;
import haveno.desktop.util.Layout;
import javax.inject.Inject;
import javax.inject.Named;
import javafx.stage.Stage;
import javafx.collections.ObservableList;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.collections.ObservableList;
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 AltCoinAccountsView extends PaymentAccountsView<GridPane, AltCoinAccountsViewModel> {

View file

@ -17,10 +17,10 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.geometry.Insets?>
<GridPane fx:id="root" fx:controller="haveno.desktop.main.account.content.backup.BackupView"
hgap="5.0" vgap="5.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"

View file

@ -17,11 +17,6 @@
package haveno.desktop.main.account.content.backup;
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.common.config.Config;
import haveno.common.file.FileUtil;
import haveno.common.persistence.PersistenceManager;
@ -33,26 +28,24 @@ import haveno.desktop.common.view.ActivatableView;
import haveno.desktop.common.view.FxmlView;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.Layout;
import javax.inject.Inject;
import javafx.stage.DirectoryChooser;
import javafx.beans.value.ChangeListener;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import javafx.beans.value.ChangeListener;
import java.text.SimpleDateFormat;
import java.nio.file.Paths;
import java.io.File;
import java.io.IOException;
import java.util.Date;
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

@ -34,11 +34,10 @@ import haveno.core.user.Preferences;
import haveno.core.user.User;
import haveno.desktop.common.model.ActivatableDataModel;
import haveno.desktop.util.GUIUtil;
import javafx.stage.Stage;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.collections.SetChangeListener;
import javafx.stage.Stage;
import java.util.ArrayList;
import java.util.Comparator;

View file

@ -18,10 +18,10 @@
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.geometry.Insets?>
<GridPane fx:id="root" fx:controller="haveno.desktop.main.account.content.fiataccounts.FiatAccountsView"
hgap="5.0" vgap="5.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"

View file

@ -17,11 +17,6 @@
package haveno.desktop.main.account.content.fiataccounts;
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.common.config.Config;
import haveno.common.util.Tuple2;
import haveno.common.util.Tuple3;
@ -127,27 +122,28 @@ import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.FormBuilder;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.Layout;
import javax.inject.Inject;
import javax.inject.Named;
import javafx.stage.Stage;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
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 FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccountsViewModel> {

View file

@ -27,6 +27,9 @@ import haveno.desktop.components.AutoTooltipLabel;
import haveno.desktop.components.AutoTooltipTableColumn;
import haveno.desktop.main.overlays.Overlay;
import haveno.desktop.util.ImageUtil;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.FXCollections;
import javafx.geometry.Insets;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TableCell;
@ -35,15 +38,7 @@ import javafx.scene.control.TableView;
import javafx.scene.control.Tooltip;
import javafx.scene.image.ImageView;
import javafx.scene.layout.GridPane;
import javafx.geometry.Insets;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.FXCollections;
import javafx.util.Callback;
import lombok.extern.slf4j.Slf4j;
@Slf4j

View file

@ -17,10 +17,10 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.geometry.Insets?>
<GridPane fx:id="root" fx:controller="haveno.desktop.main.account.content.notifications.MobileNotificationsView"
hgap="5.0" vgap="5.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.account.content.notifications;
import static haveno.desktop.util.FormBuilder.*;
import haveno.common.UserThread;
import haveno.common.util.Tuple2;
import haveno.common.util.Tuple3;
@ -53,8 +51,10 @@ import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.FormBuilder;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.Layout;
import javax.inject.Inject;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.SetChangeListener;
import javafx.geometry.Insets;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
@ -64,20 +64,19 @@ import javafx.scene.control.Toggle;
import javafx.scene.control.ToggleButton;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.GridPane;
import javafx.geometry.Insets;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.SetChangeListener;
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,10 +17,10 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.geometry.Insets?>
<GridPane fx:id="root" fx:controller="haveno.desktop.main.account.content.password.PasswordView"
hgap="5.0" vgap="5.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.account.content.password;
import javax.inject.Inject;
import com.jfoenix.validation.RequiredFieldValidator;
import haveno.common.util.Tuple4;
import haveno.core.api.CoreAccountService;
@ -37,12 +35,13 @@ import haveno.desktop.main.account.content.backup.BackupView;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.Layout;
import haveno.desktop.util.validation.PasswordValidator;
import javafx.beans.value.ChangeListener;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javafx.beans.value.ChangeListener;
import javax.inject.Inject;
import static com.google.common.base.Preconditions.checkArgument;
import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabel;

View file

@ -17,10 +17,10 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.geometry.Insets?>
<GridPane fx:id="root" fx:controller="haveno.desktop.main.account.content.seedwords.SeedWordsView"
hgap="5.0" vgap="5.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"

View file

@ -17,13 +17,6 @@
package haveno.desktop.main.account.content.seedwords;
import org.bitcoinj.crypto.MnemonicCode;
import org.bitcoinj.crypto.MnemonicException;
import org.bitcoinj.wallet.DeterministicSeed;
import javax.inject.Inject;
import javax.inject.Named;
import com.google.common.base.Splitter;
import haveno.common.config.Config;
import haveno.core.locale.Res;
@ -37,26 +30,32 @@ import haveno.desktop.main.SharedPresentation;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.main.overlays.windows.WalletPasswordWindow;
import haveno.desktop.util.Layout;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.value.ChangeListener;
import javafx.scene.control.Button;
import javafx.scene.control.DatePicker;
import javafx.scene.control.TextArea;
import javafx.scene.layout.GridPane;
import org.bitcoinj.crypto.MnemonicCode;
import org.bitcoinj.crypto.MnemonicException;
import org.bitcoinj.wallet.DeterministicSeed;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.value.ChangeListener;
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.io.File;
import java.io.IOException;
import java.util.TimeZone;
import static haveno.desktop.util.FormBuilder.*;
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

View file

@ -17,10 +17,10 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.geometry.Insets?>
<GridPane fx:id="root" fx:controller="haveno.desktop.main.account.content.walletinfo.WalletInfoView"
hgap="5.0" vgap="5.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"

View file

@ -30,6 +30,9 @@ import haveno.desktop.common.view.FxmlView;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.main.overlays.windows.ShowWalletDataWindow;
import haveno.desktop.util.Layout;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.script.Script;
@ -38,10 +41,6 @@ import org.bitcoinj.wallet.DeterministicKeyChain;
import javax.inject.Inject;
import javax.inject.Named;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import static haveno.desktop.util.FormBuilder.addButtonAfterGroup;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;

View file

@ -18,11 +18,6 @@
package haveno.desktop.main.account.register;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelTextField;
import haveno.common.UserThread;
import haveno.common.util.Tuple2;
import haveno.common.util.Tuple3;
@ -38,6 +33,10 @@ import haveno.desktop.main.overlays.windows.UnlockDisputeAgentRegistrationWindow
import haveno.desktop.util.FormBuilder;
import haveno.desktop.util.ImageUtil;
import haveno.desktop.util.Layout;
import javafx.beans.value.ChangeListener;
import javafx.collections.ListChangeListener;
import javafx.geometry.Insets;
import javafx.geometry.VPos;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
@ -50,17 +49,14 @@ import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.geometry.Insets;
import javafx.geometry.VPos;
import javafx.beans.value.ChangeListener;
import javafx.collections.ListChangeListener;
import javafx.util.Callback;
import javafx.util.StringConverter;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addMultilineLabel;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelTextField;
public abstract class AgentRegistrationView<R extends DisputeAgent, T extends AgentRegistrationViewModel<R, ?>>
extends ActivatableViewAndModel<VBox, T> {

View file

@ -29,19 +29,17 @@ import haveno.desktop.common.model.ActivatableViewModel;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.NodeAddress;
import haveno.network.p2p.P2PService;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.Utils;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.collections.MapChangeListener;
import javafx.collections.ObservableList;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.Utils;
public abstract class AgentRegistrationViewModel<R extends DisputeAgent, T extends DisputeAgentManager<R>> extends ActivatableViewModel {
private final T disputeAgentManager;

View file

@ -16,8 +16,8 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.scene.layout.VBox?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.VBox?>
<VBox fx:id="root" fx:controller="haveno.desktop.main.account.register.arbitrator.ArbitratorRegistrationView"
spacing="10"
xmlns:fx="http://javafx.com/fxml">

View file

@ -23,9 +23,9 @@ 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.Named;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class ArbitratorRegistrationView extends AgentRegistrationView<Arbitrator, ArbitratorRegistrationViewModel> {

View file

@ -25,6 +25,7 @@ import haveno.core.user.User;
import haveno.core.xmr.wallet.XmrWalletService;
import haveno.desktop.main.account.register.AgentRegistrationViewModel;
import haveno.network.p2p.P2PService;
import java.util.ArrayList;
import java.util.Date;

View file

@ -16,8 +16,8 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.scene.layout.VBox?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.VBox?>
<VBox fx:id="root" fx:controller="haveno.desktop.main.account.register.mediator.MediatorRegistrationView"
spacing="10"
xmlns:fx="http://javafx.com/fxml">

View file

@ -23,9 +23,9 @@ 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.Named;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class MediatorRegistrationView extends AgentRegistrationView<Mediator, MediatorRegistrationViewModel> {

View file

@ -25,6 +25,7 @@ import haveno.core.user.User;
import haveno.core.xmr.wallet.XmrWalletService;
import haveno.desktop.main.account.register.AgentRegistrationViewModel;
import haveno.network.p2p.P2PService;
import java.util.ArrayList;
import java.util.Date;

View file

@ -16,8 +16,8 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.scene.layout.VBox?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.VBox?>
<VBox fx:id="root" fx:controller="haveno.desktop.main.account.register.refundagent.RefundAgentRegistrationView"
spacing="10"
xmlns:fx="http://javafx.com/fxml">

View file

@ -23,9 +23,9 @@ 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.Named;
import javax.inject.Inject;
import javax.inject.Named;
@FxmlView
public class RefundAgentRegistrationView extends AgentRegistrationView<RefundAgent, RefundAgentRegistrationViewModel> {

View file

@ -26,6 +26,7 @@ import haveno.core.user.User;
import haveno.core.xmr.wallet.XmrWalletService;
import haveno.desktop.main.account.register.AgentRegistrationViewModel;
import haveno.network.p2p.P2PService;
import java.util.ArrayList;
import java.util.Date;

View file

@ -16,8 +16,8 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane fx:id="root" fx:controller="haveno.desktop.main.account.register.signing.SigningView"
xmlns:fx="http://javafx.com/fxml">
<padding>

View file

@ -24,14 +24,13 @@ import haveno.desktop.common.view.FxmlView;
import haveno.desktop.main.overlays.windows.SignPaymentAccountsWindow;
import haveno.desktop.main.overlays.windows.SignSpecificWitnessWindow;
import haveno.desktop.main.overlays.windows.SignUnsignedPubKeysWindow;
import javax.inject.Inject;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.AnchorPane;
import javafx.event.EventHandler;
import javax.inject.Inject;
@FxmlView
public class SigningView extends ActivatableView<AnchorPane, Void> {

View file

@ -17,9 +17,9 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.geometry.Insets?>
<GridPane fx:id="root" fx:controller="haveno.desktop.main.debug.DebugView"
hgap="5.0" vgap="5.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.debug;
import static haveno.desktop.util.FormBuilder.addTopLabelComboBox;
import haveno.common.taskrunner.Task;
import haveno.common.util.Tuple2;
import haveno.core.offer.availability.tasks.ProcessOfferAvailabilityResponse;
@ -42,21 +40,19 @@ 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 javax.inject.Inject;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.layout.GridPane;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
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

@ -28,14 +28,12 @@ import haveno.desktop.main.MainView;
import haveno.desktop.main.funds.deposit.DepositView;
import haveno.desktop.main.funds.transactions.TransactionsView;
import haveno.desktop.main.funds.withdrawal.WithdrawalView;
import javax.inject.Inject;
import javafx.beans.value.ChangeListener;
import javafx.fxml.FXML;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.beans.value.ChangeListener;
import javax.inject.Inject;
@FxmlView
public class FundsView extends ActivatableView<TabPane, Void> {

View file

@ -27,8 +27,6 @@ import haveno.core.xmr.model.XmrAddressEntry;
import haveno.core.xmr.wallet.XmrWalletService;
import haveno.desktop.components.indicator.TxConfidenceIndicator;
import haveno.desktop.util.GUIUtil;
import java.math.BigInteger;
import java.util.List;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.scene.control.Tooltip;
@ -38,6 +36,9 @@ import monero.wallet.model.MoneroTransferQuery;
import monero.wallet.model.MoneroTxQuery;
import monero.wallet.model.MoneroTxWallet;
import java.math.BigInteger;
import java.util.List;
@Slf4j
class DepositListItem {
private final StringProperty balance = new SimpleStringProperty();
@ -135,16 +136,16 @@ class DepositListItem {
MoneroTx tx = getTxWithFewestConfirmations();
return tx == null ? 0 : tx.getNumConfirmations();
}
private MoneroTxWallet getTxWithFewestConfirmations() {
// get txs with incoming transfers to subaddress
List<MoneroTxWallet> txs = xmrWalletService.getWallet()
.getTxs(new MoneroTxQuery()
.setTransferQuery(new MoneroTransferQuery()
.setIsIncoming(true)
.setSubaddressIndex(addressEntry.getSubaddressIndex())));
// get tx with fewest confirmations
MoneroTxWallet highestTx = null;
for (MoneroTxWallet tx : txs) if (highestTx == null || tx.getNumConfirmations() < highestTx.getNumConfirmations()) highestTx = tx;

View file

@ -17,12 +17,12 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.geometry.Insets?>
<VBox fx:id="root" fx:controller="haveno.desktop.main.funds.deposit.DepositView"
spacing="10" xmlns:fx="http://javafx.com/fxml">
<padding>

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.funds.deposit;
import static haveno.desktop.util.FormBuilder.*;
import haveno.common.UserThread;
import haveno.common.app.DevEnv;
import haveno.common.util.Tuple3;
@ -43,17 +41,13 @@ import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.main.overlays.windows.QRCodeWindow;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.Layout;
import org.bitcoinj.core.Coin;
import net.glxn.qrgen.QRCode;
import net.glxn.qrgen.image.ImageType;
import javax.inject.Inject;
import javax.inject.Named;
import monero.wallet.model.MoneroTxConfig;
import monero.wallet.model.MoneroTxWallet;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.collections.transformation.SortedList;
import javafx.fxml.FXML;
import javafx.geometry.Insets;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.TableCell;
@ -65,28 +59,28 @@ import javafx.scene.image.ImageView;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.geometry.Insets;
import javafx.util.Callback;
import monero.wallet.model.MoneroTxConfig;
import monero.wallet.model.MoneroTxWallet;
import net.glxn.qrgen.QRCode;
import net.glxn.qrgen.image.ImageType;
import org.bitcoinj.core.Coin;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import org.jetbrains.annotations.NotNull;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.collections.transformation.SortedList;
import javafx.util.Callback;
import 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 org.jetbrains.annotations.NotNull;
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

@ -24,13 +24,11 @@ import haveno.core.xmr.listeners.BalanceListener;
import haveno.core.xmr.model.AddressEntry;
import haveno.core.xmr.wallet.BtcWalletService;
import haveno.desktop.util.DisplayUtils;
import javafx.scene.control.Label;
import lombok.Getter;
import org.bitcoinj.core.Address;
import org.bitcoinj.core.Coin;
import javafx.scene.control.Label;
import lombok.Getter;
import javax.annotation.Nullable;
class LockedListItem {

View file

@ -18,13 +18,13 @@
-->
<?import haveno.desktop.components.AutoTooltipButton?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.VBox?>
<?import javafx.geometry.Insets?>
<VBox fx:id="root" fx:controller="haveno.desktop.main.funds.locked.LockedView"
spacing="10" xmlns:fx="http://javafx.com/fxml">
<padding>

View file

@ -17,14 +17,7 @@
package haveno.desktop.main.funds.locked;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Transaction;
import com.googlecode.jcsv.writer.CSVEntryConverter;
import javax.inject.Inject;
import javax.inject.Named;
import de.jensd.fx.fontawesome.AwesomeIcon;
import haveno.core.locale.Res;
import haveno.core.offer.OpenOffer;
@ -47,10 +40,13 @@ 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 javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.collections.transformation.SortedList;
import javafx.fxml.FXML;
import javafx.stage.Stage;
import javafx.geometry.Insets;
import javafx.scene.control.Label;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
@ -60,18 +56,13 @@ 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.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.collections.transformation.SortedList;
import javafx.stage.Stage;
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;

View file

@ -25,16 +25,14 @@ import haveno.core.xmr.model.AddressEntry;
import haveno.core.xmr.wallet.BtcWalletService;
import haveno.desktop.components.AutoTooltipLabel;
import haveno.desktop.util.DisplayUtils;
import javafx.scene.control.Label;
import lombok.Getter;
import org.bitcoinj.core.Address;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Transaction;
import javafx.scene.control.Label;
import java.util.Optional;
import lombok.Getter;
class ReservedListItem {
private final BalanceListener balanceListener;
private final BtcWalletService btcWalletService;

View file

@ -18,13 +18,13 @@
-->
<?import haveno.desktop.components.AutoTooltipButton?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.VBox?>
<?import javafx.geometry.Insets?>
<VBox fx:id="root" fx:controller="haveno.desktop.main.funds.reserved.ReservedView"
spacing="10" xmlns:fx="http://javafx.com/fxml">
<padding>

View file

@ -17,14 +17,7 @@
package haveno.desktop.main.funds.reserved;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Transaction;
import com.googlecode.jcsv.writer.CSVEntryConverter;
import javax.inject.Inject;
import javax.inject.Named;
import de.jensd.fx.fontawesome.AwesomeIcon;
import haveno.core.locale.Res;
import haveno.core.offer.OpenOffer;
@ -47,10 +40,13 @@ 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 javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.collections.transformation.SortedList;
import javafx.fxml.FXML;
import javafx.stage.Stage;
import javafx.geometry.Insets;
import javafx.scene.control.Label;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
@ -60,18 +56,13 @@ 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.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.collections.transformation.SortedList;
import javafx.stage.Stage;
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;

View file

@ -19,14 +19,12 @@ package haveno.desktop.main.funds.transactions;
import haveno.core.trade.Tradable;
import haveno.core.xmr.wallet.XmrWalletService;
import monero.wallet.model.MoneroTxWallet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import monero.wallet.model.MoneroTxWallet;
class DisplayedTransactions extends ObservableListDecorator<TransactionsListItem> {
private final XmrWalletService xmrWalletService;
private final TradableRepository tradableRepository;

View file

@ -18,6 +18,7 @@
package haveno.desktop.main.funds.transactions;
import haveno.core.xmr.wallet.XmrWalletService;
import javax.inject.Inject;
import javax.inject.Singleton;

View file

@ -17,15 +17,15 @@
package haveno.desktop.main.funds.transactions;
import javax.inject.Inject;
import javax.inject.Singleton;
import com.google.common.collect.ImmutableSet;
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

@ -24,6 +24,7 @@ import haveno.core.support.dispute.refund.RefundManager;
import haveno.core.trade.Tradable;
import haveno.core.trade.Trade;
import haveno.core.xmr.wallet.XmrWalletService;
import javax.inject.Inject;
import javax.inject.Singleton;

View file

@ -26,13 +26,12 @@ import haveno.core.trade.Tradable;
import haveno.core.trade.Trade;
import haveno.core.xmr.wallet.XmrWalletService;
import javafx.collections.ObservableList;
import java.util.Optional;
import lombok.extern.slf4j.Slf4j;
import monero.daemon.model.MoneroTx;
import monero.wallet.model.MoneroTxWallet;
import java.util.Optional;
@Slf4j
class TransactionAwareTrade implements TransactionAwareTradable {

View file

@ -17,19 +17,17 @@
package haveno.desktop.main.funds.transactions;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
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

@ -29,11 +29,7 @@ import haveno.core.xmr.wallet.XmrWalletService;
import haveno.desktop.components.indicator.TxConfidenceIndicator;
import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.GUIUtil;
import java.math.BigInteger;
import java.util.Date;
import java.util.Optional;
import javafx.scene.control.Tooltip;
import javax.annotation.Nullable;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import monero.wallet.model.MoneroIncomingTransfer;
@ -41,6 +37,11 @@ import monero.wallet.model.MoneroOutgoingTransfer;
import monero.wallet.model.MoneroTxWallet;
import monero.wallet.model.MoneroWalletListener;
import javax.annotation.Nullable;
import java.math.BigInteger;
import java.util.Date;
import java.util.Optional;
@Slf4j
class TransactionsListItem {
private String dateString;

View file

@ -18,13 +18,13 @@
-->
<?import haveno.desktop.components.AutoTooltipButton?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.VBox?>
<?import javafx.geometry.Insets?>
<VBox fx:id="root" fx:controller="haveno.desktop.main.funds.transactions.TransactionsView"
spacing="10" alignment="CENTER_RIGHT" xmlns:fx="http://javafx.com/fxml">
<padding>

View file

@ -18,9 +18,6 @@
package haveno.desktop.main.funds.transactions;
import com.googlecode.jcsv.writer.CSVEntryConverter;
import javax.inject.Inject;
import monero.wallet.model.MoneroWalletListener;
import de.jensd.fx.fontawesome.AwesomeIcon;
import haveno.common.util.Utilities;
import haveno.core.api.CoreMoneroConnectionsService;
@ -40,10 +37,12 @@ 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 javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.ObservableList;
import javafx.collections.transformation.SortedList;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.stage.Stage;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
@ -57,17 +56,11 @@ 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.event.EventHandler;
import javafx.collections.ObservableList;
import javafx.collections.transformation.SortedList;
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;
@ -109,7 +102,7 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
displayedTransactions.update();
}
}
///////////////////////////////////////////////////////////////////////////////////////////
// Constructor, lifecycle
///////////////////////////////////////////////////////////////////////////////////////////

View file

@ -25,12 +25,11 @@ import haveno.core.xmr.model.XmrAddressEntry;
import haveno.core.xmr.wallet.XmrWalletService;
import haveno.desktop.components.AutoTooltipLabel;
import javafx.scene.control.Label;
import java.math.BigInteger;
import lombok.Getter;
import lombok.Setter;
import java.math.BigInteger;
class WithdrawalListItem {
private final XmrBalanceListener balanceListener;
private final Label balanceLabel;

View file

@ -17,12 +17,10 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.geometry.Insets?>
<VBox fx:id="root" fx:controller="haveno.desktop.main.funds.withdrawal.WithdrawalView"
spacing="10" xmlns:fx="http://javafx.com/fxml">
<padding>

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.funds.withdrawal;
import static haveno.desktop.util.FormBuilder.*;
import haveno.common.util.Tuple2;
import haveno.core.locale.Res;
import haveno.core.trade.HavenoUtils;
@ -40,24 +38,25 @@ import haveno.desktop.main.overlays.windows.WalletPasswordWindow;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.Layout;
import haveno.network.p2p.P2PService;
import javax.inject.Inject;
import monero.wallet.model.MoneroTxConfig;
import monero.wallet.model.MoneroTxWallet;
import javafx.beans.value.ChangeListener;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox;
import monero.wallet.model.MoneroTxConfig;
import monero.wallet.model.MoneroTxWallet;
import javafx.beans.value.ChangeListener;
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> {
@ -119,7 +118,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
balanceListener = new XmrBalanceListener() {
@Override
public void onBalanceChanged(BigInteger balance) {
}
};
amountListener = (observable, oldValue, newValue) -> {
@ -196,7 +195,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
.confirmation(messageText)
.actionButtonText(Res.get("shared.yes"))
.onAction(() -> {
// relay tx
try {
xmrWalletService.getWallet().relayTx(tx);
@ -208,7 +207,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
.show();
}
log.debug("onWithdraw onSuccess tx ID:{}", tx.getHash());
List<Trade> trades = new ArrayList<>(tradeManager.getObservableList());
trades.stream()
.filter(Trade::isPayoutPublished)

View file

@ -17,9 +17,6 @@
package haveno.desktop.main.market;
import javax.inject.Inject;
import javax.inject.Named;
import com.google.common.base.Joiner;
import haveno.common.util.Utilities;
import haveno.core.locale.CurrencyUtil;
@ -45,21 +42,19 @@ 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 org.apache.commons.lang3.StringUtils;
import javafx.beans.value.ChangeListener;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.scene.Scene;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import org.apache.commons.lang3.StringUtils;
import javafx.beans.value.ChangeListener;
import javafx.event.EventHandler;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.List;
import java.util.stream.Collectors;

View file

@ -17,9 +17,9 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.geometry.Insets?>
<VBox fx:id="root" fx:controller="haveno.desktop.main.market.offerbook.OfferBookChartView"
spacing="10.0" fillWidth="true"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"

View file

@ -17,12 +17,6 @@
package haveno.desktop.main.market.offerbook;
import static haveno.desktop.util.FormBuilder.addTopLabelAutocompleteComboBox;
import static haveno.desktop.util.Layout.INITIAL_WINDOW_HEIGHT;
import javax.inject.Inject;
import javax.inject.Named;
import com.jfoenix.controls.JFXTabPane;
import haveno.common.UserThread;
import haveno.common.config.Config;
@ -48,6 +42,15 @@ import haveno.desktop.util.CurrencyListItem;
import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.NodeAddress;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ListChangeListener;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.geometry.Side;
import javafx.scene.chart.AreaChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
@ -65,32 +68,22 @@ 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.geometry.Pos;
import javafx.geometry.Side;
import javafx.util.Callback;
import javafx.util.StringConverter;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ListChangeListener;
import javafx.util.Callback;
import javafx.util.StringConverter;
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,6 +17,7 @@
package haveno.desktop.main.market.offerbook;
import com.google.common.math.LongMath;
import com.google.inject.Inject;
import haveno.core.account.witness.AccountAgeWitnessService;
import haveno.core.locale.CurrencyUtil;
@ -45,19 +46,15 @@ import haveno.desktop.util.CurrencyList;
import haveno.desktop.util.CurrencyListItem;
import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.GUIUtil;
import com.google.common.math.LongMath;
import javafx.scene.chart.XYChart;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.scene.chart.XYChart;
import java.util.ArrayList;
import java.util.Comparator;

View file

@ -17,15 +17,12 @@
package haveno.desktop.main.market.spread;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import haveno.core.monetary.Price;
import java.math.BigInteger;
import javax.annotation.Nullable;
import java.math.BigInteger;
public class SpreadItem {
private static final Logger log = LoggerFactory.getLogger(SpreadItem.class);
public final String currencyCode;
public final int numberOfBuyOffers;
public final int numberOfSellOffers;

View file

@ -17,9 +17,9 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.geometry.Insets?>
<GridPane fx:id="root" fx:controller="haveno.desktop.main.market.spread.SpreadView"
hgap="5.0" vgap="5.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"

View file

@ -29,23 +29,19 @@ import haveno.desktop.components.AutoTooltipLabel;
import haveno.desktop.components.AutoTooltipTableColumn;
import haveno.desktop.components.ColoredDecimalPlacesWithZerosText;
import haveno.desktop.util.GUIUtil;
import javax.inject.Inject;
import javax.inject.Named;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.ListChangeListener;
import javafx.collections.transformation.SortedList;
import javafx.scene.control.Label;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.ListChangeListener;
import javafx.collections.transformation.SortedList;
import javafx.util.Callback;
import javax.inject.Inject;
import javax.inject.Named;
import java.math.BigInteger;
import java.util.Comparator;

View file

@ -17,8 +17,6 @@
package haveno.desktop.main.market.spread;
import org.bitcoinj.utils.Fiat;
import com.google.inject.Inject;
import haveno.common.UserThread;
import haveno.core.locale.Res;
@ -36,19 +34,19 @@ 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 javax.inject.Named;
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 org.bitcoinj.utils.Fiat;
import javax.inject.Named;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -59,9 +57,6 @@ import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import lombok.Getter;
import lombok.Setter;
class SpreadViewModel extends ActivatableViewModel {
private final OfferBook offerBook;

View file

@ -17,9 +17,9 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.geometry.Insets?>
<GridPane fx:id="root" fx:controller="haveno.desktop.main.market.spread.SpreadViewPaymentMethod"
hgap="5.0" vgap="5.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"

View file

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

View file

@ -17,10 +17,6 @@
package haveno.desktop.main.market.trades;
import org.bitcoinj.core.Coin;
import static haveno.desktop.main.market.trades.TradesChartsViewModel.MAX_TICKS;
import com.google.common.annotations.VisibleForTesting;
import haveno.common.util.MathUtils;
import haveno.core.locale.CurrencyUtil;
@ -29,13 +25,13 @@ import haveno.core.trade.statistics.TradeStatistics3;
import haveno.desktop.main.market.trades.charts.CandleData;
import haveno.desktop.util.DisplayUtils;
import javafx.scene.chart.XYChart;
import javafx.util.Pair;
import lombok.Getter;
import org.bitcoinj.core.Coin;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@ -49,7 +45,7 @@ import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;
import lombok.Getter;
import static haveno.desktop.main.market.trades.TradesChartsViewModel.MAX_TICKS;
public class ChartCalculations {
static final ZoneId ZONE_ID = ZoneId.systemDefault();

View file

@ -25,7 +25,6 @@ import haveno.core.util.VolumeUtil;
import haveno.core.util.coin.CoinFormatter;
import haveno.desktop.util.DisplayUtils;
import lombok.experimental.Delegate;
import org.jetbrains.annotations.Nullable;
public class TradeStatistics3ListItem {

View file

@ -17,9 +17,9 @@
~ along with Haveno. If not, see <http://www.gnu.org/licenses/>.
-->
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.geometry.Insets?>
<VBox fx:id="root" fx:controller="haveno.desktop.main.market.trades.TradesChartsView"
spacing="7.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"

View file

@ -17,17 +17,7 @@
package haveno.desktop.main.market.trades;
import org.bitcoinj.core.Coin;
import static haveno.desktop.main.market.trades.TradesChartsViewModel.MAX_TICKS;
import static haveno.desktop.util.FormBuilder.addTopLabelAutocompleteComboBox;
import static haveno.desktop.util.FormBuilder.getTopLabelWithVBox;
import com.googlecode.jcsv.writer.CSVEntryConverter;
import javax.inject.Inject;
import javax.inject.Named;
import com.jfoenix.controls.JFXTabPane;
import haveno.common.UserThread;
import haveno.common.util.MathUtils;
@ -55,8 +45,16 @@ import haveno.desktop.main.market.trades.charts.volume.VolumeChart;
import haveno.desktop.util.CurrencyListItem;
import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.GUIUtil;
import javafx.stage.Stage;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.collections.transformation.SortedList;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
@ -77,36 +75,27 @@ import javafx.scene.layout.Pane;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.stage.Stage;
import javafx.util.Callback;
import javafx.util.StringConverter;
import org.bitcoinj.core.Coin;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import org.fxmisc.easybind.monadic.MonadicBinding;
import org.jetbrains.annotations.NotNull;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.collections.transformation.SortedList;
import javafx.util.Callback;
import javafx.util.StringConverter;
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 org.jetbrains.annotations.NotNull;
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> {

View file

@ -36,19 +36,17 @@ import haveno.desktop.main.settings.preferences.PreferencesView;
import haveno.desktop.util.CurrencyList;
import haveno.desktop.util.CurrencyListItem;
import haveno.desktop.util.GUIUtil;
import javafx.scene.chart.XYChart;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.collections.SetChangeListener;
import javafx.scene.chart.XYChart;
import javafx.util.Pair;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
@ -59,8 +57,6 @@ import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
class TradesChartsViewModel extends ActivatableViewModel {
static final int MAX_TICKS = 90;
private static final int TAB_INDEX = 2;

View file

@ -54,7 +54,6 @@ import javafx.scene.Group;
import javafx.scene.control.Tooltip;
import javafx.scene.layout.Region;
import javafx.scene.shape.Line;
import javafx.util.StringConverter;
/**

View file

@ -49,8 +49,9 @@
package haveno.desktop.main.market.trades.charts.price;
import haveno.desktop.main.market.trades.charts.CandleData;
import javafx.animation.FadeTransition;
import javafx.event.ActionEvent;
import javafx.scene.Node;
import javafx.scene.chart.Axis;
import javafx.scene.chart.NumberAxis;
@ -58,12 +59,9 @@ import javafx.scene.chart.XYChart;
import javafx.scene.shape.LineTo;
import javafx.scene.shape.MoveTo;
import javafx.scene.shape.Path;
import javafx.event.ActionEvent;
import javafx.util.Duration;
import javafx.util.StringConverter;
import haveno.desktop.main.market.trades.charts.CandleData;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

View file

@ -53,13 +53,11 @@ import haveno.core.locale.Res;
import haveno.desktop.components.AutoTooltipLabel;
import haveno.desktop.main.market.trades.charts.CandleData;
import haveno.desktop.util.Layout;
import javafx.geometry.HPos;
import javafx.scene.control.Label;
import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
import javafx.geometry.HPos;
import javafx.util.StringConverter;
/**

View file

@ -23,7 +23,6 @@ import haveno.desktop.main.market.trades.charts.CandleData;
import javafx.scene.Group;
import javafx.scene.control.Tooltip;
import javafx.scene.layout.Region;
import javafx.util.StringConverter;
public class VolumeBar extends Group {

View file

@ -17,20 +17,18 @@
package haveno.desktop.main.market.trades.charts.volume;
import haveno.desktop.main.market.trades.charts.CandleData;
import javafx.animation.FadeTransition;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.event.ActionEvent;
import javafx.scene.Node;
import javafx.scene.chart.Axis;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.event.ActionEvent;
import javafx.util.Duration;
import javafx.util.StringConverter;
import haveno.desktop.main.market.trades.charts.CandleData;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

View file

@ -18,14 +18,13 @@
package haveno.desktop.main.offer;
import haveno.core.offer.OfferDirection;
import haveno.core.offer.OfferPayload;
import haveno.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import haveno.core.user.Preferences;
import haveno.core.user.User;
import haveno.desktop.Navigation;
import haveno.desktop.common.view.FxmlView;
import haveno.desktop.common.view.ViewLoader;
import haveno.network.p2p.P2PService;
import javax.inject.Inject;
@FxmlView

View file

@ -17,7 +17,6 @@
package haveno.desktop.main.offer;
import org.jetbrains.annotations.NotNull;
import com.google.inject.Inject;
import haveno.common.handlers.ErrorMessageHandler;
import haveno.common.util.MathUtils;
@ -52,8 +51,6 @@ import haveno.desktop.Navigation;
import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import javax.inject.Named;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.ObjectProperty;
@ -66,13 +63,14 @@ import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.collections.SetChangeListener;
import 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;
@ -82,8 +80,6 @@ import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import lombok.Getter;
import static com.google.common.base.Preconditions.checkNotNull;
import static haveno.core.payment.payload.PaymentMethod.HAL_CASH_ID;
import static java.util.Comparator.comparing;

View file

@ -17,9 +17,6 @@
package haveno.desktop.main.offer;
import net.glxn.qrgen.QRCode;
import net.glxn.qrgen.image.ImageType;
import de.jensd.fx.fontawesome.AwesomeIcon;
import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;
import haveno.common.UserThread;
@ -61,6 +58,16 @@ import haveno.desktop.main.portfolio.PortfolioView;
import haveno.desktop.main.portfolio.openoffer.OpenOffersView;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.Layout;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
import javafx.geometry.Orientation;
import javafx.geometry.Pos;
import javafx.geometry.VPos;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
@ -77,42 +84,37 @@ import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
import javafx.geometry.Orientation;
import javafx.geometry.Pos;
import javafx.geometry.VPos;
import javafx.util.StringConverter;
import lombok.Setter;
import net.glxn.qrgen.QRCode;
import net.glxn.qrgen.image.ImageType;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import javafx.beans.value.ChangeListener;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.util.StringConverter;
import java.net.URI;
import org.jetbrains.annotations.NotNull;
import java.io.ByteArrayInputStream;
import java.math.BigInteger;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.TimeUnit;
import lombok.Setter;
import org.jetbrains.annotations.NotNull;
import static haveno.core.payment.payload.PaymentMethod.HAL_CASH_ID;
import static haveno.desktop.main.offer.OfferViewUtil.addPayInfoEntry;
import static haveno.desktop.util.FormBuilder.*;
import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup;
import static haveno.desktop.util.FormBuilder.addAddressTextField;
import static haveno.desktop.util.FormBuilder.addBalanceTextField;
import static haveno.desktop.util.FormBuilder.addFundsTextfield;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import static haveno.desktop.util.FormBuilder.addTopLabelComboBox;
import static haveno.desktop.util.FormBuilder.addTopLabelTextField;
import static haveno.desktop.util.FormBuilder.getEditableValueBox;
import static haveno.desktop.util.FormBuilder.getEditableValueBoxWithInfo;
import static haveno.desktop.util.FormBuilder.getIconButton;
import static haveno.desktop.util.FormBuilder.getIconForLabel;
import static haveno.desktop.util.FormBuilder.getSmallIconForLabel;
import static haveno.desktop.util.FormBuilder.getTradeInputBox;
import static javafx.beans.binding.Bindings.createStringBinding;
public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> extends ActivatableViewAndModel<AnchorPane, M> implements ClosableView, SelectableView {

View file

@ -61,16 +61,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 org.bitcoinj.core.Coin;
import org.bitcoinj.utils.Fiat;
import javax.inject.Inject;
import javax.inject.Named;
import javafx.scene.control.ComboBox;
import javafx.scene.control.ListCell;
import javafx.scene.control.ListView;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
@ -80,14 +70,19 @@ import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import javafx.scene.control.ComboBox;
import javafx.scene.control.ListCell;
import javafx.scene.control.ListView;
import javafx.util.Callback;
import lombok.extern.slf4j.Slf4j;
import org.bitcoinj.core.Coin;
import org.bitcoinj.utils.Fiat;
import javax.inject.Inject;
import javax.inject.Named;
import java.math.BigInteger;
import java.util.concurrent.TimeUnit;
import lombok.extern.slf4j.Slf4j;
import static javafx.beans.binding.Bindings.createStringBinding;
@Slf4j

View file

@ -25,7 +25,6 @@ import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleObjectProperty;
import lombok.Getter;
import java.math.BigInteger;

View file

@ -40,16 +40,13 @@ import haveno.desktop.main.offer.offerbook.TopAltcoinOfferBookView;
import haveno.desktop.main.offer.takeoffer.TakeOfferView;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import javafx.beans.value.ChangeListener;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.beans.value.ChangeListener;
import java.util.Optional;
import org.jetbrains.annotations.NotNull;
import javax.annotation.Nullable;
import java.util.Optional;
public abstract class OfferView extends ActivatableView<TabPane, Void> {

View file

@ -25,6 +25,7 @@ import haveno.core.util.VolumeUtil;
import haveno.core.util.coin.CoinFormatter;
import haveno.desktop.util.DisplayUtils;
import haveno.desktop.util.GUIUtil;
import java.math.BigInteger;
import java.util.Optional;

View file

@ -36,30 +36,24 @@ import haveno.desktop.main.offer.offerbook.OtherOfferBookView;
import haveno.desktop.main.offer.offerbook.TopAltcoinOfferBookView;
import haveno.desktop.main.overlays.popups.Popup;
import haveno.desktop.util.GUIUtil;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.geometry.VPos;
import javafx.scene.control.Label;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.geometry.VPos;
import lombok.extern.slf4j.Slf4j;
import monero.daemon.model.MoneroSubmitTxResult;
import org.jetbrains.annotations.NotNull;
import java.util.HashMap;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.stream.Stream;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import monero.daemon.model.MoneroSubmitTxResult;
// Shared utils for Views
@Slf4j
public class OfferViewUtil {

View file

@ -18,14 +18,13 @@
package haveno.desktop.main.offer;
import haveno.core.offer.OfferDirection;
import haveno.core.offer.OfferPayload;
import haveno.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import haveno.core.user.Preferences;
import haveno.core.user.User;
import haveno.desktop.Navigation;
import haveno.desktop.common.view.FxmlView;
import haveno.desktop.common.view.ViewLoader;
import haveno.network.p2p.P2PService;
import javax.inject.Inject;
@FxmlView

View file

@ -33,10 +33,11 @@ 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;
import javax.inject.Named;
/**
* Domain for that UI element.

View file

@ -31,11 +31,12 @@ 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> {
@ -48,7 +49,7 @@ public class CreateOfferView extends MutableOfferView<CreateOfferViewModel> {
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter btcFormatter) {
super(model, navigation, preferences, offerDetailsWindow, btcFormatter);
}
@Override
public void initWithData(OfferDirection direction,
TradeCurrency tradeCurrency,

View file

@ -32,6 +32,7 @@ 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 {

View file

@ -28,11 +28,11 @@ import haveno.core.util.coin.CoinFormatter;
import haveno.desktop.Navigation;
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;
import javafx.scene.layout.GridPane;
@FxmlView
public class BtcOfferBookView extends OfferBookView<GridPane, BtcOfferBookViewModel> {

View file

@ -41,11 +41,10 @@ import haveno.core.xmr.setup.WalletsSetup;
import haveno.desktop.Navigation;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import javax.inject.Named;
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;

View file

@ -17,27 +17,25 @@
package haveno.desktop.main.offer.offerbook;
import static haveno.core.offer.OfferDirection.BUY;
import haveno.core.filter.FilterManager;
import haveno.core.offer.Offer;
import haveno.core.offer.OfferBookService;
import haveno.core.offer.OfferRestrictions;
import haveno.network.p2p.storage.P2PDataStorage;
import haveno.network.utils.Utils;
import javax.inject.Inject;
import javax.inject.Singleton;
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 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.
@ -219,7 +217,7 @@ public class OfferBook {
.filter(this::isOfferAllowed)
.map(OfferBookListItem::new)
.collect(Collectors.toList()));
log.debug("offerBookListItems.size {}", offerBookListItems.size());
fillOfferCountMaps();
} catch (Throwable t) {
@ -235,7 +233,7 @@ public class OfferBook {
log.debug("{} -> OfferBookListItems: none", msg);
return;
}
StringBuilder stringBuilder = new StringBuilder(msg + " -> ").append("OfferBookListItems:").append("\n");
offerBookListItems.forEach(i -> stringBuilder.append("\t").append(i.toString()).append("\n"));
stringBuilder.deleteCharAt(stringBuilder.length() - 1);

View file

@ -28,16 +28,15 @@ import haveno.core.offer.Offer;
import haveno.core.payment.payload.PaymentMethod;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.storage.P2PDataStorage;
import java.util.Date;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import lombok.Getter;
import lombok.Value;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import java.util.Date;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
@Slf4j
public class OfferBookListItem {
@Getter

View file

@ -17,10 +17,6 @@
package haveno.desktop.main.offer.offerbook;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
import org.bitcoinj.core.Coin;
import de.jensd.fx.fontawesome.AwesomeIcon;
import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;
import haveno.common.UserThread;
@ -73,6 +69,14 @@ import haveno.desktop.util.FormBuilder;
import haveno.desktop.util.GUIUtil;
import haveno.desktop.util.Layout;
import haveno.network.p2p.NodeAddress;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ListChangeListener;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.geometry.VPos;
import javafx.scene.canvas.Canvas;
import javafx.scene.control.ComboBox;
import javafx.scene.control.ContentDisplay;
@ -90,31 +94,20 @@ import javafx.scene.layout.Region;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.TextAlignment;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.geometry.VPos;
import javafx.util.Callback;
import javafx.util.StringConverter;
import org.bitcoinj.core.Coin;
import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.Subscription;
import org.fxmisc.easybind.monadic.MonadicBinding;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ListChangeListener;
import javafx.util.Callback;
import javafx.util.StringConverter;
import org.jetbrains.annotations.NotNull;
import java.math.BigInteger;
import java.util.Comparator;
import java.util.Map;
import java.util.Optional;
import org.jetbrains.annotations.NotNull;
import static haveno.desktop.util.FormBuilder.addTitledGroupBg;
abstract public class OfferBookView<R extends GridPane, M extends OfferBookViewModel> extends ActivatableViewAndModel<R, M> {

View file

@ -65,16 +65,16 @@ import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.collections.transformation.FilteredList;
import javafx.collections.transformation.SortedList;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
@ -83,9 +83,6 @@ import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
@Slf4j
abstract class OfferBookViewModel extends ActivatableViewModel {
private final OpenOfferManager openOfferManager;

View file

@ -28,11 +28,11 @@ import haveno.core.util.coin.CoinFormatter;
import haveno.desktop.Navigation;
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;
import javafx.scene.layout.GridPane;
@FxmlView
public class OtherOfferBookView extends OfferBookView<GridPane, OtherOfferBookViewModel> {

View file

@ -41,17 +41,15 @@ import haveno.desktop.Navigation;
import haveno.desktop.main.offer.OfferViewUtil;
import haveno.desktop.util.GUIUtil;
import haveno.network.p2p.P2PService;
import javax.inject.Named;
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;
import org.jetbrains.annotations.NotNull;
public class OtherOfferBookViewModel extends OfferBookViewModel {
@Inject

View file

@ -28,11 +28,11 @@ import haveno.core.util.coin.CoinFormatter;
import haveno.desktop.Navigation;
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;
import javafx.scene.layout.GridPane;
@FxmlView
public class TopAltcoinOfferBookView extends OfferBookView<GridPane, TopAltcoinOfferBookViewModel> {

Some files were not shown because too many files have changed in this diff Show more