-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5052 from jmacxx/show_offer_stats_by_payment_method
Add a 'payment method details' screen
- Loading branch information
Showing
7 changed files
with
157 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
desktop/src/main/java/bisq/desktop/main/market/spread/SpreadViewPaymentMethod.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
~ This file is part of Bisq. | ||
~ | ||
~ Bisq is free software: you can redistribute it and/or modify it | ||
~ under the terms of the GNU Affero General Public License as published by | ||
~ the Free Software Foundation, either version 3 of the License, or (at | ||
~ your option) any later version. | ||
~ | ||
~ Bisq is distributed in the hope that it will be useful, but WITHOUT | ||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
~ License for more details. | ||
~ | ||
~ You should have received a copy of the GNU Affero General Public License | ||
~ along with Bisq. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
|
||
<?import javafx.scene.layout.AnchorPane?> | ||
<?import javafx.scene.layout.GridPane?> | ||
<?import javafx.geometry.Insets?> | ||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.market.spread.SpreadViewPaymentMethod" | ||
hgap="5.0" vgap="5.0" | ||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" | ||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" | ||
xmlns:fx="http://javafx.com/fxml"> | ||
<padding> | ||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0"/> | ||
</padding> | ||
|
||
</GridPane> |
68 changes: 68 additions & 0 deletions
68
desktop/src/main/java/bisq/desktop/main/market/spread/SpreadViewPaymentMethod.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* This file is part of Bisq. | ||
* | ||
* Bisq is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at | ||
* your option) any later version. | ||
* | ||
* Bisq is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package bisq.desktop.main.market.spread; | ||
|
||
import bisq.desktop.common.view.FxmlView; | ||
|
||
import bisq.core.locale.Res; | ||
import bisq.core.util.FormattingUtils; | ||
import bisq.core.util.coin.CoinFormatter; | ||
|
||
import javax.inject.Inject; | ||
import javax.inject.Named; | ||
|
||
import javafx.scene.control.ToggleButton; | ||
|
||
import static bisq.desktop.util.FormBuilder.addSlideToggleButton; | ||
|
||
@FxmlView | ||
public class SpreadViewPaymentMethod extends SpreadView { | ||
private ToggleButton expandedMode; | ||
|
||
/////////////////////////////////////////////////////////////////////////////////////////// | ||
// Constructor, lifecycle | ||
/////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
@Inject | ||
public SpreadViewPaymentMethod(SpreadViewModel model, @Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter) { | ||
super(model, formatter); | ||
model.setIncludePaymentMethod(true); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
super.initialize(); | ||
int gridRow = 0; | ||
expandedMode = addSlideToggleButton(root, ++gridRow, Res.get("market.spread.expanded")); | ||
} | ||
|
||
@Override | ||
protected void activate() { | ||
super.activate(); | ||
expandedMode.setSelected(model.isExpandedView()); | ||
expandedMode.setOnAction(e -> model.setExpandedView(expandedMode.isSelected())); | ||
} | ||
|
||
@Override | ||
protected void deactivate() { | ||
expandedMode.setOnAction(null); | ||
super.deactivate(); | ||
} | ||
} | ||
|
||
|