javafx.beans.property.ReadOnlyObjectWrapper Java Examples

The following examples show how to use javafx.beans.property.ReadOnlyObjectWrapper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AppController.java    From curly with Apache License 2.0 7 votes vote down vote up
private void loadData(List<Map<String, String>> data) {
    batchDataTable.getColumns().clear();

    TableColumn<Map<String, String>, String> numberCol = new TableColumn("");
    numberCol.setCellValueFactory(row -> new ReadOnlyObjectWrapper(
            (row.getTableView().getItems().indexOf(row.getValue()) + 1) + ""));
    batchDataTable.getColumns().add(numberCol);
    numberCol.setMinWidth(50);

    data.get(0).keySet().forEach(varName -> {
        TableColumn<Map<String, String>, String> varCol = new TableColumn(varName);
        varCol.setCellValueFactory(row -> new ReadOnlyObjectWrapper(row.getValue().get(varName)));
        batchDataTable.getColumns().add(varCol);
    });

    batchDataTable.setItems(new ObservableListWrapper<>(data));
}
 
Example #2
Source File: ClosedTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setTxFeeColumnCellFactory() {
	txFeeColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
	txFeeColumn.setCellFactory(
               new Callback<>() {
                   @Override
                   public TableCell<ClosedTradableListItem, ClosedTradableListItem> call(
                           TableColumn<ClosedTradableListItem, ClosedTradableListItem> column) {
                       return new TableCell<>() {
                           @Override
                           public void updateItem(final ClosedTradableListItem item, boolean empty) {
                               super.updateItem(item, empty);
                               setGraphic(new AutoTooltipLabel(model.getTxFee(item)));
                           }
                       };
                   }
               });
}
 
Example #3
Source File: AndroidPositionService.java    From attach with GNU General Public License v3.0 6 votes vote down vote up
public AndroidPositionService() {
    position = new ReadOnlyObjectWrapper<>();

    LifecycleService.create().ifPresent(l -> {
        l.addListener(LifecycleEvent.PAUSE, () -> {
            if (! parameters.isBackgroundModeEnabled()) {
                stopObserver();
            }
        });
        l.addListener(LifecycleEvent.RESUME, () -> {
            if (! parameters.isBackgroundModeEnabled()) {
                startObserver(parameters.getTimeInterval(),
                        parameters.getDistanceFilter(), parameters.isBackgroundModeEnabled());
            }
        });
    });

    gh = new EarthGravitationalModel();
    try {
        gh.load("/egm180.nor");
    } catch (IOException e) {
        LOG.log(Level.WARNING, "Failed to load nor file", e);
        e.printStackTrace();
    }
}
 
Example #4
Source File: HexTableView.java    From mokka7 with Eclipse Public License 1.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
private void init() {
    getStyleClass().add("hex-table-view");
    // setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);

    TableColumn<Integer, String> count = new TableColumn<>("OFFSET");
    count.setId("count-column");
    count.setCellValueFactory(cellData -> new ReadOnlyObjectWrapper<String>(createCountItem(cellData.getValue())));

    TableColumn<Integer, String> hex = new TableColumn<>("00 01 02 03 04 05 06 07  08 09 0A 0B 0C 0D 0E 0F");
    hex.setId("hex-column");
    hex.setCellValueFactory(cellData -> new ReadOnlyObjectWrapper<String>(createHexItem(cellData.getValue())));

    TableColumn<Integer, String> text = new TableColumn<>("TEXT");
    text.setId("text-column");
    text.setCellValueFactory(cellData -> new ReadOnlyObjectWrapper<String>(createItem(cellData.getValue())));

    getColumns().addAll(count, hex, text);
    sortPolicyProperty().set(t -> false);
    setColumnResizePolicy((param) -> true);
}
 
Example #5
Source File: FailedTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setStateColumnCellFactory() {
    stateColumn.getStyleClass().add("last-column");
    stateColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    stateColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<FailedTradesListItem, FailedTradesListItem> call(
                        TableColumn<FailedTradesListItem, FailedTradesListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final FailedTradesListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            if (item != null)
                                setGraphic(new AutoTooltipLabel(model.getState(item)));
                            else
                                setGraphic(null);
                        }
                    };
                }
            });
}
 
Example #6
Source File: FailedTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setAmountColumnCellFactory() {
    amountColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    amountColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<FailedTradesListItem, FailedTradesListItem> call(
                        TableColumn<FailedTradesListItem, FailedTradesListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final FailedTradesListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            setGraphic(new AutoTooltipLabel(model.getAmount(item)));
                        }
                    };
                }
            });
}
 
Example #7
Source File: LockedView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setBalanceColumnCellFactory() {
    balanceColumn.getStyleClass().add("last-column");
    balanceColumn.setCellValueFactory((addressListItem) -> new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
    balanceColumn.setCellFactory(
            new Callback<>() {

                @Override
                public TableCell<LockedListItem, LockedListItem> call(TableColumn<LockedListItem,
                        LockedListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final LockedListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            setGraphic((item != null && !empty) ? item.getBalanceLabel() : null);
                        }
                    };
                }
            });
}
 
Example #8
Source File: FailedTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setVolumeColumnCellFactory() {
    volumeColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    volumeColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<FailedTradesListItem, FailedTradesListItem> call(
                        TableColumn<FailedTradesListItem, FailedTradesListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final FailedTradesListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            if (item != null)
                                setGraphic(new AutoTooltipLabel(model.getVolume(item)));
                            else
                                setGraphic(null);
                        }
                    };
                }
            });
}
 
Example #9
Source File: FailedTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setDirectionColumnCellFactory() {
    directionColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    directionColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<FailedTradesListItem, FailedTradesListItem> call(
                        TableColumn<FailedTradesListItem, FailedTradesListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final FailedTradesListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            setGraphic(new AutoTooltipLabel(model.getDirectionLabel(item)));
                        }
                    };
                }
            });
}
 
Example #10
Source File: FailedTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setDateColumnCellFactory() {
    dateColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    dateColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<FailedTradesListItem, FailedTradesListItem> call(
                        TableColumn<FailedTradesListItem, FailedTradesListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final FailedTradesListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            if (item != null)
                                setGraphic(new AutoTooltipLabel(model.getDate(item)));
                            else
                                setGraphic(null);
                        }
                    };
                }
            });
}
 
Example #11
Source File: OpenOffersView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setVolumeColumnCellFactory() {
    volumeColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    volumeColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<OpenOfferListItem, OpenOfferListItem> call(
                        TableColumn<OpenOfferListItem, OpenOfferListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final OpenOfferListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            getStyleClass().removeAll("offer-disabled");

                            if (item != null) {
                                if (model.isDeactivated(item)) getStyleClass().add("offer-disabled");
                                setGraphic(new AutoTooltipLabel(model.getVolume(item)));
                            } else {
                                setGraphic(null);
                            }
                        }
                    };
                }
            });
}
 
Example #12
Source File: OpenOffersView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setAmountColumnCellFactory() {
    amountColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    amountColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<OpenOfferListItem, OpenOfferListItem> call(
                        TableColumn<OpenOfferListItem, OpenOfferListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final OpenOfferListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            getStyleClass().removeAll("offer-disabled");

                            if (item != null) {
                                if (model.isDeactivated(item)) getStyleClass().add("offer-disabled");
                                setGraphic(new AutoTooltipLabel(model.getAmount(item)));
                            } else {
                                setGraphic(null);
                            }
                        }
                    };
                }
            });
}
 
Example #13
Source File: OpenOffersView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setDateColumnCellFactory() {
    dateColumn.setCellValueFactory((openOfferListItem) -> new ReadOnlyObjectWrapper<>(openOfferListItem.getValue()));
    dateColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<OpenOfferListItem, OpenOfferListItem> call(
                        TableColumn<OpenOfferListItem, OpenOfferListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final OpenOfferListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            getStyleClass().removeAll("offer-disabled");
                            if (item != null) {
                                if (model.isDeactivated(item)) getStyleClass().add("offer-disabled");
                                setGraphic(new AutoTooltipLabel(model.getDate(item)));
                            } else {
                                setGraphic(null);
                            }
                        }
                    };
                }
            });
}
 
Example #14
Source File: ClosedTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setSellerSecurityDepositColumnCellFactory() {
	sellerSecurityDepositColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
	sellerSecurityDepositColumn.setCellFactory(
               new Callback<>() {
                   @Override
                   public TableCell<ClosedTradableListItem, ClosedTradableListItem> call(
                           TableColumn<ClosedTradableListItem, ClosedTradableListItem> column) {
                       return new TableCell<>() {
                           @Override
                           public void updateItem(final ClosedTradableListItem item, boolean empty) {
                               super.updateItem(item, empty);
                               setGraphic(new AutoTooltipLabel(model.getSellerSecurityDeposit(item)));
                           }
                       };
                   }
               });
}
 
Example #15
Source File: TransactionsView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setConfidenceColumnCellFactory() {
    confidenceColumn.getStyleClass().add("last-column");
    confidenceColumn.setCellValueFactory((addressListItem) ->
            new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
    confidenceColumn.setCellFactory(
            new Callback<>() {

                @Override
                public TableCell<TransactionsListItem, TransactionsListItem> call(TableColumn<TransactionsListItem,
                        TransactionsListItem> column) {
                    return new TableCell<>() {

                        @Override
                        public void updateItem(final TransactionsListItem item, boolean empty) {
                            super.updateItem(item, empty);

                            if (item != null && !empty) {
                                setGraphic(item.getTxConfidenceIndicator());
                            } else {
                                setGraphic(null);
                            }
                        }
                    };
                }
            });
}
 
Example #16
Source File: ClosedTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setTradeFeeColumnCellFactory() {
	tradeFeeColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
	tradeFeeColumn.setCellFactory(
               new Callback<>() {
                   @Override
                   public TableCell<ClosedTradableListItem, ClosedTradableListItem> call(
                           TableColumn<ClosedTradableListItem, ClosedTradableListItem> column) {
                       return new TableCell<>() {
                           @Override
                           public void updateItem(final ClosedTradableListItem item, boolean empty) {
                               super.updateItem(item, empty);
                               setGraphic(new AutoTooltipLabel(model.getMakerFee(item)));
                           }
                       };
                   }
               });
}
 
Example #17
Source File: OpenOffersView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setPriceColumnCellFactory() {
    priceColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    priceColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<OpenOfferListItem, OpenOfferListItem> call(
                        TableColumn<OpenOfferListItem, OpenOfferListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final OpenOfferListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            getStyleClass().removeAll("offer-disabled");

                            if (item != null) {
                                if (model.isDeactivated(item)) getStyleClass().add("offer-disabled");
                                setGraphic(new AutoTooltipLabel(model.getPrice(item)));
                            } else {
                                setGraphic(null);
                            }
                        }
                    };
                }
            });
}
 
Example #18
Source File: ClosedTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setDirectionColumnCellFactory() {
    directionColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    directionColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<ClosedTradableListItem, ClosedTradableListItem> call(
                        TableColumn<ClosedTradableListItem, ClosedTradableListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final ClosedTradableListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            setGraphic(new AutoTooltipLabel(model.getDirectionLabel(item)));
                        }
                    };
                }
            });
}
 
Example #19
Source File: TransactionsView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setAmountColumnCellFactory() {
    amountColumn.setCellValueFactory((addressListItem) ->
            new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
    amountColumn.setCellFactory(
            new Callback<>() {

                @Override
                public TableCell<TransactionsListItem, TransactionsListItem> call(TableColumn<TransactionsListItem,
                        TransactionsListItem> column) {
                    return new TableCell<>() {

                        @Override
                        public void updateItem(final TransactionsListItem item, boolean empty) {
                            super.updateItem(item, empty);

                            if (item != null && !empty) {
                                setGraphic(new AutoTooltipLabel(item.getAmount()));
                            } else {
                                setGraphic(null);
                            }
                        }
                    };
                }
            });
}
 
Example #20
Source File: DepositView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setConfidenceColumnCellFactory() {
    confirmationsColumn.setCellValueFactory((addressListItem) ->
            new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
    confirmationsColumn.setCellFactory(
            new Callback<>() {

                @Override
                public TableCell<DepositListItem, DepositListItem> call(TableColumn<DepositListItem,
                        DepositListItem> column) {
                    return new TableCell<>() {

                        @Override
                        public void updateItem(final DepositListItem item, boolean empty) {
                            super.updateItem(item, empty);

                            if (item != null && !empty) {
                                setGraphic(item.getTxConfidenceIndicator());
                            } else {
                                setGraphic(null);
                            }
                        }
                    };
                }
            });
}
 
Example #21
Source File: DockNode.java    From AnchorFX with GNU Lesser General Public License v3.0 6 votes vote down vote up
private DockNode() {

        station = new SimpleObjectProperty<>(null);

        floatableProperty = new SimpleBooleanProperty(true);
        closeableProperty = new SimpleBooleanProperty(true);
        resizableProperty = new SimpleBooleanProperty(true);
        maximizableProperty = new SimpleBooleanProperty(true);

        floatingProperty = new ReadOnlyBooleanWrapper(false);
        draggingProperty = new ReadOnlyBooleanWrapper(false);
        resizingProperty = new ReadOnlyBooleanWrapper(false);
        maximizingProperty = new ReadOnlyBooleanWrapper(false);

        container = new ReadOnlyObjectWrapper<>(null);

    }
 
Example #22
Source File: ClosedTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setStateColumnCellFactory() {
    stateColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    stateColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<ClosedTradableListItem, ClosedTradableListItem> call(
                        TableColumn<ClosedTradableListItem, ClosedTradableListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final ClosedTradableListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            if (item != null)
                                setGraphic(new AutoTooltipLabel(model.getState(item)));
                            else
                                setGraphic(null);
                        }
                    };
                }
            });
}
 
Example #23
Source File: PendingTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setAmountColumnCellFactory() {
    amountColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    amountColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<PendingTradesListItem, PendingTradesListItem> call(
                        TableColumn<PendingTradesListItem, PendingTradesListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final PendingTradesListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            if (item != null && !empty)
                                setGraphic(new AutoTooltipLabel(formatter.formatCoin(item.getTrade().getTradeAmount())));
                            else
                                setGraphic(null);
                        }
                    };
                }
            });
}
 
Example #24
Source File: PendingTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setPriceColumnCellFactory() {
    priceColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    priceColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<PendingTradesListItem, PendingTradesListItem> call(
                        TableColumn<PendingTradesListItem, PendingTradesListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final PendingTradesListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            if (item != null && !empty)
                                setGraphic(new AutoTooltipLabel(FormattingUtils.formatPrice(item.getPrice())));
                            else
                                setGraphic(null);
                        }
                    };
                }
            });
}
 
Example #25
Source File: PendingTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setVolumeColumnCellFactory() {
    volumeColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    volumeColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<PendingTradesListItem, PendingTradesListItem> call(
                        TableColumn<PendingTradesListItem, PendingTradesListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final PendingTradesListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            if (item != null && !empty)
                                setGraphic(new AutoTooltipLabel(DisplayUtils.formatVolumeWithCode(item.getTrade().getTradeVolume())));
                            else
                                setGraphic(null);
                        }
                    };
                }
            });
}
 
Example #26
Source File: PendingTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setPaymentMethodColumnCellFactory() {
    paymentMethodColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    paymentMethodColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<PendingTradesListItem, PendingTradesListItem> call(
                        TableColumn<PendingTradesListItem, PendingTradesListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final PendingTradesListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            if (item != null && !empty)
                                setGraphic(new AutoTooltipLabel(model.getPaymentMethod(item)));
                            else
                                setGraphic(null);
                        }
                    };
                }
            });
}
 
Example #27
Source File: PendingTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setMarketColumnCellFactory() {
    marketColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    marketColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<PendingTradesListItem, PendingTradesListItem> call(
                        TableColumn<PendingTradesListItem, PendingTradesListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final PendingTradesListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            setGraphic(new AutoTooltipLabel(model.getMarketLabel(item)));
                        }
                    };
                }
            });
}
 
Example #28
Source File: PendingTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setRoleColumnCellFactory() {
    roleColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    roleColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<PendingTradesListItem, PendingTradesListItem> call(
                        TableColumn<PendingTradesListItem, PendingTradesListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final PendingTradesListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            if (item != null && !empty)
                                setGraphic(new AutoTooltipLabel(model.getMyRole(item)));
                            else
                                setGraphic(null);
                        }
                    };
                }
            });
}
 
Example #29
Source File: ClosedTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setMarketColumnCellFactory() {
    marketColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    marketColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<ClosedTradableListItem, ClosedTradableListItem> call(
                        TableColumn<ClosedTradableListItem, ClosedTradableListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final ClosedTradableListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            setGraphic(new AutoTooltipLabel(model.getMarketLabel(item)));
                        }
                    };
                }
            });
}
 
Example #30
Source File: ClosedTradesView.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
private void setDateColumnCellFactory() {
    dateColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
    dateColumn.setCellFactory(
            new Callback<>() {
                @Override
                public TableCell<ClosedTradableListItem, ClosedTradableListItem> call(
                        TableColumn<ClosedTradableListItem, ClosedTradableListItem> column) {
                    return new TableCell<>() {
                        @Override
                        public void updateItem(final ClosedTradableListItem item, boolean empty) {
                            super.updateItem(item, empty);
                            if (item != null)
                                setGraphic(new AutoTooltipLabel(model.getDate(item)));
                            else
                                setGraphic(null);
                        }
                    };
                }
            });
}