followup, minor tidying

This commit is contained in:
Craig Raw 2023-03-09 11:01:25 +02:00
parent 35965235f3
commit 40a3eb5d4f

View file

@ -31,7 +31,6 @@ class CoinCell extends TreeTableCell<Entry, Number> implements ConfirmationsList
tooltip = new CoinTooltip(); tooltip = new CoinTooltip();
tooltip.setShowDelay(Duration.millis(500)); tooltip.setShowDelay(Duration.millis(500));
contextMenu = new CoinContextMenu(); contextMenu = new CoinContextMenu();
setContextMenu(contextMenu);
getStyleClass().add("coin-cell"); getStyleClass().add("coin-cell");
if(Platform.getCurrent() == Platform.OSX) { if(Platform.getCurrent() == Platform.OSX) {
getStyleClass().add("number-field"); getStyleClass().add("number-field");
@ -165,13 +164,12 @@ class CoinCell extends TreeTableCell<Entry, Number> implements ConfirmationsList
private static class CoinContextMenu extends ContextMenu { private static class CoinContextMenu extends ContextMenu {
private Number amount; private Number amount;
public CoinContextMenu() {
}
public void updateAmount(Number amount) { public void updateAmount(Number amount) {
if (amount.equals(this.amount)) { if(amount.equals(this.amount)) {
return; return;
} }
this.amount = amount; this.amount = amount;
getItems().clear(); getItems().clear();