20
20
import com .google .inject .Inject ;
21
21
import com .googlecode .jcsv .writer .CSVEntryConverter ;
22
22
import de .jensd .fx .fontawesome .AwesomeIcon ;
23
- import haveno .common .util .Utilities ;
24
23
import haveno .core .api .XmrConnectionService ;
25
24
import haveno .core .locale .Res ;
26
25
import haveno .core .offer .OpenOffer ;
47
46
import javafx .fxml .FXML ;
48
47
import javafx .geometry .Insets ;
49
48
import javafx .scene .Scene ;
50
- import javafx .scene .control .Button ;
51
49
import javafx .scene .control .Label ;
52
50
import javafx .scene .control .TableCell ;
53
51
import javafx .scene .control .TableColumn ;
54
52
import javafx .scene .control .TableView ;
55
53
import javafx .scene .control .Tooltip ;
56
- import javafx .scene .input .KeyCode ;
57
54
import javafx .scene .input .KeyEvent ;
58
55
import javafx .scene .layout .HBox ;
59
56
import javafx .scene .layout .Priority ;
@@ -70,7 +67,7 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
70
67
@ FXML
71
68
TableView <TransactionsListItem > tableView ;
72
69
@ FXML
73
- TableColumn <TransactionsListItem , TransactionsListItem > dateColumn , detailsColumn , addressColumn , transactionColumn , amountColumn , txFeeColumn , confidenceColumn , memoColumn , revertTxColumn ;
70
+ TableColumn <TransactionsListItem , TransactionsListItem > dateColumn , detailsColumn , addressColumn , transactionColumn , amountColumn , txFeeColumn , confidenceColumn , memoColumn ;
74
71
@ FXML
75
72
Label numItems ;
76
73
@ FXML
@@ -137,7 +134,6 @@ public void initialize() {
137
134
txFeeColumn .setGraphic (new AutoTooltipLabel (Res .get ("shared.txFee" , Res .getBaseCurrencyCode ())));
138
135
confidenceColumn .setGraphic (new AutoTooltipLabel (Res .get ("shared.confirmations" , Res .getBaseCurrencyCode ())));
139
136
memoColumn .setGraphic (new AutoTooltipLabel (Res .get ("funds.tx.memo" )));
140
- revertTxColumn .setGraphic (new AutoTooltipLabel (Res .get ("shared.revert" , Res .getBaseCurrencyCode ())));
141
137
142
138
tableView .setColumnResizePolicy (TableView .CONSTRAINED_RESIZE_POLICY_FLEX_LAST_COLUMN );
143
139
tableView .setPlaceholder (new AutoTooltipLabel (Res .get ("funds.tx.noTxAvailable" )));
@@ -151,7 +147,6 @@ public void initialize() {
151
147
setTxFeeColumnCellFactory ();
152
148
setConfidenceColumnCellFactory ();
153
149
setMemoColumnCellFactory ();
154
- setRevertTxColumnCellFactory ();
155
150
156
151
dateColumn .setComparator (Comparator .comparing (TransactionsListItem ::getDate ));
157
152
detailsColumn .setComparator ((o1 , o2 ) -> {
@@ -170,10 +165,7 @@ public void initialize() {
170
165
tableView .getSortOrder ().add (dateColumn );
171
166
172
167
keyEventEventHandler = event -> {
173
- // Not intended to be public to users as the feature is not well tested
174
- if (Utilities .isAltOrCtrlPressed (KeyCode .R , event )) {
175
- revertTxColumn .setVisible (!revertTxColumn .isVisible ());
176
- }
168
+ // unused
177
169
};
178
170
179
171
HBox .setHgrow (spacer , Priority .ALWAYS );
@@ -204,7 +196,7 @@ protected void activate() {
204
196
numItems .setText (Res .get ("shared.numItemsLabel" , sortedDisplayedTransactions .size ()));
205
197
exportButton .setOnAction (event -> {
206
198
final ObservableList <TableColumn <TransactionsListItem , ?>> tableColumns = GUIUtil .getContentColumns (tableView );
207
- final int reportColumns = tableColumns .size () - 1 ; // CSV report excludes the last column (an icon)
199
+ final int reportColumns = tableColumns .size ();
208
200
CSVEntryConverter <TransactionsListItem > headerConverter = item -> {
209
201
String [] columns = new String [reportColumns ];
210
202
for (int i = 0 ; i < columns .length ; i ++)
@@ -501,31 +493,5 @@ public void updateItem(final TransactionsListItem item, boolean empty) {
501
493
}
502
494
});
503
495
}
504
-
505
- private void setRevertTxColumnCellFactory () {
506
- revertTxColumn .setCellValueFactory ((addressListItem ) ->
507
- new ReadOnlyObjectWrapper <>(addressListItem .getValue ()));
508
- revertTxColumn .setCellFactory (
509
- new Callback <>() {
510
-
511
- @ Override
512
- public TableCell <TransactionsListItem , TransactionsListItem > call (TableColumn <TransactionsListItem ,
513
- TransactionsListItem > column ) {
514
- return new TableCell <>() {
515
- Button button ;
516
-
517
- @ Override
518
- public void updateItem (final TransactionsListItem item , boolean empty ) {
519
- super .updateItem (item , empty );
520
- setGraphic (null );
521
- if (button != null ) {
522
- button .setOnAction (null );
523
- button = null ;
524
- }
525
- }
526
- };
527
- }
528
- });
529
- }
530
496
}
531
497
0 commit comments