Allow sorting in tables

This commit is contained in:
Manfred Karrer 2016-01-28 13:26:57 +01:00
parent fc74c46b3b
commit 87e2119b84
21 changed files with 40 additions and 37 deletions

View file

@ -100,6 +100,7 @@ public class PaymentAccountView extends ActivatableViewAndModel<GridPane, Paymen
onSelectAccount(paymentAccountsComboBox.getSelectionModel().getSelectedItem());
};
paymentAccountsComboBox.setOnAction(paymentAccountsComboBoxHandler);
paymentAccountsComboBox.setVisibleRowCount(20);
model.getPaymentAccounts().addListener(
(ListChangeListener<PaymentAccount>) c -> paymentAccountsComboBox.setDisable(model.getPaymentAccounts().size() == 0));

View file

@ -30,10 +30,10 @@
<columns>
<TableColumn text="Trade ID" fx:id="tradeIdColumn" minWidth="80" sortable="false"/>
<TableColumn text="Date/Time" fx:id="dateColumn" minWidth="150"/>
<TableColumn text="Trade amount in BTC" fx:id="amountColumn" minWidth="130" sortable="false"/>
<TableColumn text="Price" fx:id="priceColumn" minWidth="100" sortable="false"/>
<TableColumn text="Trade amount" fx:id="volumeColumn" minWidth="130" sortable="false"/>
<TableColumn text="Trade type" fx:id="directionColumn" minWidth="80" sortable="false"/>
<TableColumn text="Trade amount in BTC" fx:id="amountColumn" minWidth="130"/>
<TableColumn text="Price" fx:id="priceColumn" minWidth="100"/>
<TableColumn text="Trade amount" fx:id="volumeColumn" minWidth="130"/>
<TableColumn text="Trade type" fx:id="directionColumn" minWidth="80"/>
<TableColumn text="State" fx:id="stateColumn" minWidth="80" sortable="false"/>
</columns>
</TableView>

View file

@ -30,10 +30,10 @@
<columns>
<TableColumn text="Trade ID" fx:id="tradeIdColumn" minWidth="100" sortable="false"/>
<TableColumn text="Date" fx:id="dateColumn" minWidth="130"/>
<TableColumn text="Trade amount in BTC" fx:id="amountColumn" minWidth="130" sortable="false"/>
<TableColumn text="Price" fx:id="priceColumn" minWidth="100" sortable="false"/>
<TableColumn text="Trade amount in EUR" fx:id="volumeColumn" minWidth="130" sortable="false"/>
<TableColumn text="Trade type" fx:id="directionColumn" minWidth="80" sortable="false"/>
<TableColumn text="Trade amount in BTC" fx:id="amountColumn" minWidth="130"/>
<TableColumn text="Price" fx:id="priceColumn" minWidth="100"/>
<TableColumn text="Trade amount in EUR" fx:id="volumeColumn" minWidth="130"/>
<TableColumn text="Trade type" fx:id="directionColumn" minWidth="80"/>
<TableColumn text="State" fx:id="stateColumn" minWidth="80" sortable="false"/>
</columns>
</TableView>

View file

@ -30,10 +30,10 @@
<columns>
<TableColumn text="Offer ID" fx:id="offerIdColumn" minWidth="100" sortable="false"/>
<TableColumn text="Date/Time" fx:id="dateColumn" minWidth="130"/>
<TableColumn text="Amount in BTC (Min.)" fx:id="amountColumn" minWidth="130" sortable="false"/>
<TableColumn text="Price" fx:id="priceColumn" minWidth="80" sortable="false"/>
<TableColumn text="Amount (Min.)" fx:id="volumeColumn" minWidth="130" sortable="false"/>
<TableColumn text="Trade type" fx:id="directionColumn" minWidth="70" sortable="false"/>
<TableColumn text="Amount in BTC (Min.)" fx:id="amountColumn" minWidth="130"/>
<TableColumn text="Price" fx:id="priceColumn" minWidth="80"/>
<TableColumn text="Amount (Min.)" fx:id="volumeColumn" minWidth="130"/>
<TableColumn text="Trade type" fx:id="directionColumn" minWidth="70"/>
<TableColumn text="" fx:id="removeItemColumn" minWidth="100" sortable="false"/>
</columns>
</TableView>

View file

@ -39,22 +39,22 @@
<PropertyValueFactory property="date"/>
</cellValueFactory>
</TableColumn>
<TableColumn text="Trade amount in BTC" fx:id="tradeAmountColumn" minWidth="130" sortable="false">
<TableColumn text="Trade amount in BTC" fx:id="tradeAmountColumn" minWidth="130">
<cellValueFactory>
<PropertyValueFactory property="tradeAmount"/>
</cellValueFactory>
</TableColumn>
<TableColumn text="Price" fx:id="priceColumn" minWidth="100" sortable="false">
<TableColumn text="Price" fx:id="priceColumn" minWidth="100">
<cellValueFactory>
<PropertyValueFactory property="price"/>
</cellValueFactory>
</TableColumn>
<TableColumn text="Trade amount" fx:id="tradeVolumeColumn" minWidth="130" sortable="false">
<TableColumn text="Trade amount" fx:id="tradeVolumeColumn" minWidth="130">
<cellValueFactory>
<PropertyValueFactory property="tradeVolume"/>
</cellValueFactory>
</TableColumn>
<TableColumn text="Trade type" fx:id="directionColumn" minWidth="80" sortable="false"/>
<TableColumn text="Trade type" fx:id="directionColumn" minWidth="80"/>
</columns>
</TableView>
</VBox>