mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Use scroll pane in all DAO views
This commit is contained in:
parent
84173fd106
commit
cb6de8cad0
27 changed files with 122 additions and 146 deletions
|
@ -21,7 +21,7 @@
|
|||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<AnchorPane fx:id="root" prefHeight="660.0" prefWidth="1000.0" xmlns="http://javafx.com/javafx/8"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="bisq.desktop.main.account.settings.AccountSettingsView">
|
||||
|
||||
<VBox fx:id="leftVBox" prefWidth="240" spacing="5" AnchorPane.bottomAnchor="20" AnchorPane.leftAnchor="15"
|
||||
|
|
|
@ -147,6 +147,7 @@ public abstract class BaseProposalView extends ActivatableView<GridPane, Void> {
|
|||
proposalTableView = new TableView<>();
|
||||
proposalTableView.setPlaceholder(new AutoTooltipLabel(Res.get("table.placeholder.noData")));
|
||||
proposalTableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
|
||||
proposalTableView.setPrefHeight(200);
|
||||
|
||||
createProposalColumns(proposalTableView);
|
||||
GridPane.setRowIndex(proposalTableView, gridRow);
|
||||
|
|
|
@ -17,15 +17,22 @@
|
|||
~ along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<AnchorPane fx:id="root" fx:controller="bisq.desktop.main.dao.bonding.BondingView"
|
||||
prefHeight="660.0" prefWidth="1000.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<VBox fx:id="leftVBox" spacing="5" prefWidth="240" AnchorPane.bottomAnchor="20" AnchorPane.leftAnchor="15"
|
||||
<VBox fx:id="leftVBox" prefWidth="240" spacing="5" AnchorPane.bottomAnchor="20" AnchorPane.leftAnchor="15"
|
||||
AnchorPane.topAnchor="20"/>
|
||||
<AnchorPane fx:id="content" AnchorPane.bottomAnchor="10" AnchorPane.rightAnchor="25" AnchorPane.leftAnchor="290"
|
||||
AnchorPane.topAnchor="30"/>
|
||||
|
||||
<ScrollPane fx:id="scrollPane"
|
||||
fitToWidth="true" hbarPolicy="NEVER"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="270.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<AnchorPane fx:id="content" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"/>
|
||||
</ScrollPane>
|
||||
|
||||
</AnchorPane>
|
||||
|
||||
|
|
|
@ -18,14 +18,13 @@
|
|||
-->
|
||||
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.bonding.dashboard.BondingDashboardView"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.bonding.lockup.LockupBSQView"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
</columnConstraints>
|
||||
</GridPane>
|
||||
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.bonding.unlock.UnlockBSQView"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
</columnConstraints>
|
||||
</GridPane>
|
||||
|
||||
|
|
|
@ -65,9 +65,7 @@ import javafx.scene.layout.VBox;
|
|||
|
||||
import javafx.geometry.Insets;
|
||||
|
||||
import javafx.beans.property.DoubleProperty;
|
||||
import javafx.beans.property.ReadOnlyObjectWrapper;
|
||||
import javafx.beans.property.SimpleDoubleProperty;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
|
@ -109,8 +107,7 @@ public class UnlockBSQView extends ActivatableView<GridPane, Void> implements Bs
|
|||
|
||||
private ListChangeListener<Transaction> walletBsqTransactionsListener;
|
||||
private ChangeListener<Number> walletChainHeightListener;
|
||||
private final DoubleProperty initialOccupiedHeight = new SimpleDoubleProperty(-1);
|
||||
private ChangeListener<Number> parentHeightListener;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Constructor, lifecycle
|
||||
|
@ -148,15 +145,15 @@ public class UnlockBSQView extends ActivatableView<GridPane, Void> implements Bs
|
|||
|
||||
tableView = new TableView<>();
|
||||
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
|
||||
tableView.setPrefHeight(300);
|
||||
addTxIdColumn();
|
||||
addAmountColumn();
|
||||
addLockTimeColumn();
|
||||
addUnlockColumn();
|
||||
|
||||
lockedTxs.setPredicate(item -> item.isLockedAndUnspent());
|
||||
lockedTxs.setPredicate(LockedBsqTxListItem::isLockedAndUnspent);
|
||||
walletBsqTransactionsListener = change -> updateList();
|
||||
walletChainHeightListener = (observable, oldValue, newValue) -> onUpdateAnyChainHeight();
|
||||
parentHeightListener = (observable, oldValue, newValue) -> layout();
|
||||
|
||||
VBox vBox = new VBox();
|
||||
vBox.setSpacing(10);
|
||||
|
@ -388,14 +385,8 @@ public class UnlockBSQView extends ActivatableView<GridPane, Void> implements Bs
|
|||
|
||||
daoFacade.addBlockListener(this);
|
||||
|
||||
if (root.getParent() instanceof Pane) {
|
||||
rootParent = (Pane) root.getParent();
|
||||
rootParent.heightProperty().addListener(parentHeightListener);
|
||||
}
|
||||
|
||||
updateList();
|
||||
onUpdateAnyChainHeight();
|
||||
layout();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -431,10 +422,6 @@ public class UnlockBSQView extends ActivatableView<GridPane, Void> implements Bs
|
|||
observableList.setAll(items);
|
||||
}
|
||||
|
||||
private void layout() {
|
||||
GUIUtil.fillAvailableHeight(root, tableView, initialOccupiedHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deactivate() {
|
||||
bsqBalanceUtil.deactivate();
|
||||
|
@ -447,9 +434,6 @@ public class UnlockBSQView extends ActivatableView<GridPane, Void> implements Bs
|
|||
daoFacade.removeBlockListener(this);
|
||||
|
||||
observableList.forEach(LockedBsqTxListItem::cleanup);
|
||||
|
||||
if (rootParent != null)
|
||||
rootParent.heightProperty().removeListener(parentHeightListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,15 +17,21 @@
|
|||
~ along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<AnchorPane fx:id="root" fx:controller="bisq.desktop.main.dao.proposal.ProposalView"
|
||||
prefHeight="660.0" prefWidth="1000.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<VBox fx:id="leftVBox" spacing="5" prefWidth="240" AnchorPane.bottomAnchor="20" AnchorPane.leftAnchor="15"
|
||||
<VBox fx:id="leftVBox" prefWidth="240" spacing="5" AnchorPane.bottomAnchor="20" AnchorPane.leftAnchor="15"
|
||||
AnchorPane.topAnchor="20"/>
|
||||
<AnchorPane fx:id="content" AnchorPane.bottomAnchor="10" AnchorPane.rightAnchor="25" AnchorPane.leftAnchor="290"
|
||||
AnchorPane.topAnchor="30"/>
|
||||
</AnchorPane>
|
||||
|
||||
<ScrollPane fx:id="scrollPane"
|
||||
fitToWidth="true" hbarPolicy="NEVER"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="270.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<AnchorPane fx:id="content" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"/>
|
||||
</ScrollPane>
|
||||
|
||||
</AnchorPane>
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.proposal.active.ActiveProposalsView"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0" AnchorPane.topAnchor="0.0"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
|
|
|
@ -22,11 +22,12 @@
|
|||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.proposal.closed.ClosedProposalsView"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0" AnchorPane.topAnchor="0.0"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
</columnConstraints>
|
||||
</GridPane>
|
||||
|
|
|
@ -18,9 +18,15 @@
|
|||
-->
|
||||
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.proposal.dashboard.ProposalDashboardView"
|
||||
AnchorPane.bottomAnchor="-20.0" AnchorPane.leftAnchor="-10.0"
|
||||
AnchorPane.rightAnchor="-10.0" AnchorPane.topAnchor="-20.0"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
</columnConstraints>
|
||||
</GridPane>
|
||||
|
|
|
@ -33,12 +33,8 @@ import bisq.common.UserThread;
|
|||
import javax.inject.Inject;
|
||||
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.ColumnConstraints;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.Priority;
|
||||
|
||||
import javafx.geometry.HPos;
|
||||
import javafx.geometry.Insets;
|
||||
|
||||
import org.fxmisc.easybind.EasyBind;
|
||||
|
@ -63,7 +59,6 @@ public class ProposalDashboardView extends ActivatableView<GridPane, Void> imple
|
|||
private List<SeparatedPhaseBars.SeparatedPhaseBarsItem> phaseBarsItems;
|
||||
private DaoPhase.Phase currentPhase;
|
||||
private Subscription phaseSubscription;
|
||||
private GridPane gridPane;
|
||||
private int gridRow = 0;
|
||||
private SeparatedPhaseBars separatedPhaseBars;
|
||||
private TextField currentPhaseTextField, currentBlockHeightTextField, proposalTextField, blindVoteTextField, voteRevealTextField, voteResultTextField;
|
||||
|
@ -81,46 +76,26 @@ public class ProposalDashboardView extends ActivatableView<GridPane, Void> imple
|
|||
|
||||
@Override
|
||||
public void initialize() {
|
||||
root.getStyleClass().add("compensation-root");
|
||||
AnchorPane topAnchorPane = new AnchorPane();
|
||||
root.getChildren().add(topAnchorPane);
|
||||
|
||||
gridPane = new GridPane();
|
||||
gridPane.setHgap(5);
|
||||
gridPane.setVgap(5);
|
||||
AnchorPane.setBottomAnchor(gridPane, 10d);
|
||||
AnchorPane.setRightAnchor(gridPane, 10d);
|
||||
AnchorPane.setLeftAnchor(gridPane, 10d);
|
||||
AnchorPane.setTopAnchor(gridPane, 10d);
|
||||
ColumnConstraints columnConstraints1 = new ColumnConstraints();
|
||||
columnConstraints1.setHalignment(HPos.RIGHT);
|
||||
columnConstraints1.setHgrow(Priority.SOMETIMES);
|
||||
columnConstraints1.setMinWidth(200);
|
||||
ColumnConstraints columnConstraints2 = new ColumnConstraints();
|
||||
columnConstraints2.setHgrow(Priority.ALWAYS);
|
||||
gridPane.getColumnConstraints().addAll(columnConstraints1, columnConstraints2);
|
||||
topAnchorPane.getChildren().add(gridPane);
|
||||
|
||||
// cycle bar
|
||||
addTitledGroupBg(gridPane, gridRow, 1, Res.get("dao.cycle.headline"));
|
||||
addTitledGroupBg(root, gridRow, 1, Res.get("dao.cycle.headline"));
|
||||
separatedPhaseBars = createSeparatedPhaseBars();
|
||||
GridPane.setColumnSpan(separatedPhaseBars, 2);
|
||||
GridPane.setColumnIndex(separatedPhaseBars, 0);
|
||||
GridPane.setMargin(separatedPhaseBars, new Insets(Layout.FIRST_ROW_DISTANCE - 6, 0, 0, 0));
|
||||
GridPane.setRowIndex(separatedPhaseBars, gridRow);
|
||||
gridPane.getChildren().add(separatedPhaseBars);
|
||||
root.getChildren().add(separatedPhaseBars);
|
||||
|
||||
addTitledGroupBg(gridPane, ++gridRow, 6, Res.get("dao.cycle.overview.headline"), Layout.GROUP_DISTANCE);
|
||||
currentBlockHeightTextField = addLabelTextField(gridPane, gridRow, Res.get("dao.cycle.currentBlockHeight"),
|
||||
addTitledGroupBg(root, ++gridRow, 6, Res.get("dao.cycle.overview.headline"), Layout.GROUP_DISTANCE);
|
||||
currentBlockHeightTextField = addLabelTextField(root, gridRow, Res.get("dao.cycle.currentBlockHeight"),
|
||||
"", Layout.FIRST_ROW_AND_GROUP_DISTANCE).second;
|
||||
currentPhaseTextField = addLabelTextField(gridPane, ++gridRow, Res.get("dao.cycle.currentPhase"), "").second;
|
||||
proposalTextField = addLabelTextField(gridPane, ++gridRow, Res.get("dao.cycle.proposal"), "").second;
|
||||
blindVoteTextField = addLabelTextField(gridPane, ++gridRow, Res.get("dao.cycle.blindVote"), "").second;
|
||||
voteRevealTextField = addLabelTextField(gridPane, ++gridRow, Res.get("dao.cycle.voteReveal"), "").second;
|
||||
voteResultTextField = addLabelTextField(gridPane, ++gridRow, Res.get("dao.cycle.voteResult"), "").second;
|
||||
currentPhaseTextField = addLabelTextField(root, ++gridRow, Res.get("dao.cycle.currentPhase"), "").second;
|
||||
proposalTextField = addLabelTextField(root, ++gridRow, Res.get("dao.cycle.proposal"), "").second;
|
||||
blindVoteTextField = addLabelTextField(root, ++gridRow, Res.get("dao.cycle.blindVote"), "").second;
|
||||
voteRevealTextField = addLabelTextField(root, ++gridRow, Res.get("dao.cycle.voteReveal"), "").second;
|
||||
voteResultTextField = addLabelTextField(root, ++gridRow, Res.get("dao.cycle.voteResult"), "").second;
|
||||
|
||||
addTitledGroupBg(gridPane, ++gridRow, 1, Res.get("dao.cycle.info.headline"), Layout.GROUP_DISTANCE);
|
||||
addMultilineLabel(gridPane, gridRow, Res.get("dao.cycle.info.details"), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
addTitledGroupBg(root, ++gridRow, 1, Res.get("dao.cycle.info.headline"), Layout.GROUP_DISTANCE);
|
||||
addMultilineLabel(root, gridRow, Res.get("dao.cycle.info.details"), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,13 +22,11 @@
|
|||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.proposal.make.MakeProposalView"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="140.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
</columnConstraints>
|
||||
|
||||
</GridPane>
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.proposal.myvotes.MyVotesView"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.proposal.votes.VotesView"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
|
|
|
@ -17,15 +17,21 @@
|
|||
~ along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<AnchorPane fx:id="root" fx:controller="bisq.desktop.main.dao.voting.VotingView"
|
||||
prefHeight="660.0" prefWidth="1000.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<VBox fx:id="leftVBox" spacing="5" prefWidth="240" AnchorPane.bottomAnchor="20" AnchorPane.leftAnchor="15"
|
||||
<VBox fx:id="leftVBox" prefWidth="240" spacing="5" AnchorPane.bottomAnchor="20" AnchorPane.leftAnchor="15"
|
||||
AnchorPane.topAnchor="20"/>
|
||||
<AnchorPane fx:id="content" AnchorPane.bottomAnchor="10" AnchorPane.rightAnchor="25" AnchorPane.leftAnchor="290"
|
||||
AnchorPane.topAnchor="30"/>
|
||||
</AnchorPane>
|
||||
|
||||
<ScrollPane fx:id="scrollPane"
|
||||
fitToWidth="true" hbarPolicy="NEVER"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="270.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<AnchorPane fx:id="content" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"/>
|
||||
</ScrollPane>
|
||||
|
||||
</AnchorPane>
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.voting.active.ActiveBallotsView"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0" AnchorPane.topAnchor="0.0"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
|
|
|
@ -22,12 +22,13 @@
|
|||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.voting.closed.ClosedBallotsView"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0" AnchorPane.topAnchor="0.0"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
</columnConstraints>
|
||||
</GridPane>
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.voting.closed.VotingHistoryView"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
|
|
|
@ -18,9 +18,15 @@
|
|||
-->
|
||||
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.proposal.dashboard.ProposalDashboardView"
|
||||
AnchorPane.bottomAnchor="-20.0" AnchorPane.leftAnchor="-10.0"
|
||||
AnchorPane.rightAnchor="-10.0" AnchorPane.topAnchor="-20.0"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
</columnConstraints>
|
||||
</GridPane>
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.voting.vote.VoteView"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
|
|
|
@ -18,15 +18,21 @@
|
|||
-->
|
||||
|
||||
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<AnchorPane fx:id="root" fx:controller="bisq.desktop.main.dao.wallet.BsqWalletView"
|
||||
prefHeight="660.0" prefWidth="1000.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<VBox fx:id="leftVBox" spacing="5" prefWidth="240" AnchorPane.bottomAnchor="20" AnchorPane.leftAnchor="15"
|
||||
<VBox fx:id="leftVBox" prefWidth="240" spacing="5" AnchorPane.bottomAnchor="20" AnchorPane.leftAnchor="15"
|
||||
AnchorPane.topAnchor="20"/>
|
||||
<AnchorPane fx:id="content" AnchorPane.bottomAnchor="10" AnchorPane.rightAnchor="25" AnchorPane.leftAnchor="290"
|
||||
AnchorPane.topAnchor="30"/>
|
||||
</AnchorPane>
|
||||
|
||||
<ScrollPane fx:id="scrollPane"
|
||||
fitToWidth="true" hbarPolicy="NEVER"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="270.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<AnchorPane fx:id="content" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"/>
|
||||
</ScrollPane>
|
||||
|
||||
</AnchorPane>
|
||||
|
|
|
@ -22,13 +22,11 @@
|
|||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.wallet.dashboard.BsqDashboardView"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="140.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
</columnConstraints>
|
||||
|
||||
</GridPane>
|
||||
|
|
|
@ -23,11 +23,12 @@
|
|||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.wallet.receive.BsqReceiveView"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
</columnConstraints>
|
||||
</GridPane>
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.wallet.send.BsqSendView"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
|
|
|
@ -22,13 +22,12 @@
|
|||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane fx:id="root" fx:controller="bisq.desktop.main.dao.wallet.tx.BsqTxView"
|
||||
hgap="5.0" vgap="5.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-10.0"
|
||||
AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0"
|
||||
AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="20.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="140.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="160.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="300.0"/>
|
||||
</columnConstraints>
|
||||
|
||||
</GridPane>
|
||||
|
||||
|
|
|
@ -60,9 +60,7 @@ import javafx.scene.layout.VBox;
|
|||
|
||||
import javafx.geometry.Insets;
|
||||
|
||||
import javafx.beans.property.DoubleProperty;
|
||||
import javafx.beans.property.ReadOnlyObjectWrapper;
|
||||
import javafx.beans.property.SimpleDoubleProperty;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
|
@ -93,9 +91,7 @@ public class BsqTxView extends ActivatableView<GridPane, Void> implements BsqBal
|
|||
|
||||
private final ObservableList<BsqTxListItem> observableList = FXCollections.observableArrayList();
|
||||
// Need to be DoubleProperty as we pass it as reference
|
||||
private final DoubleProperty initialOccupiedHeight = new SimpleDoubleProperty(-1);
|
||||
private final SortedList<BsqTxListItem> sortedList = new SortedList<>(observableList);
|
||||
private ChangeListener<Number> parentHeightListener;
|
||||
private ListChangeListener<Transaction> walletBsqTransactionsListener;
|
||||
private int gridRow = 0;
|
||||
private Label chainHeightLabel;
|
||||
|
@ -161,7 +157,6 @@ public class BsqTxView extends ActivatableView<GridPane, Void> implements BsqBal
|
|||
root.getChildren().add(vBox);
|
||||
|
||||
walletBsqTransactionsListener = change -> updateList();
|
||||
parentHeightListener = (observable, oldValue, newValue) -> layout();
|
||||
//TODO do we want to get notified from wallet side?
|
||||
walletChainHeightListener = (observable, oldValue, newValue) -> onUpdateAnyChainHeight();
|
||||
}
|
||||
|
@ -178,14 +173,8 @@ public class BsqTxView extends ActivatableView<GridPane, Void> implements BsqBal
|
|||
|
||||
daoFacade.addBlockListener(this);
|
||||
|
||||
if (root.getParent() instanceof Pane) {
|
||||
rootParent = (Pane) root.getParent();
|
||||
rootParent.heightProperty().addListener(parentHeightListener);
|
||||
}
|
||||
|
||||
updateList();
|
||||
onUpdateAnyChainHeight();
|
||||
layout();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -198,9 +187,6 @@ public class BsqTxView extends ActivatableView<GridPane, Void> implements BsqBal
|
|||
daoFacade.removeBlockListener(this);
|
||||
|
||||
observableList.forEach(BsqTxListItem::cleanup);
|
||||
|
||||
if (rootParent != null)
|
||||
rootParent.heightProperty().removeListener(parentHeightListener);
|
||||
}
|
||||
|
||||
|
||||
|
@ -270,10 +256,6 @@ public class BsqTxView extends ActivatableView<GridPane, Void> implements BsqBal
|
|||
observableList.setAll(items);
|
||||
}
|
||||
|
||||
private void layout() {
|
||||
GUIUtil.fillAvailableHeight(root, tableView, initialOccupiedHeight);
|
||||
}
|
||||
|
||||
private void addDateColumn() {
|
||||
TableColumn<BsqTxListItem, BsqTxListItem> column = new AutoTooltipTableColumn<>(Res.get("shared.dateTime"));
|
||||
column.setCellValueFactory(item -> new ReadOnlyObjectWrapper<>(item.getValue()));
|
||||
|
|
Loading…
Add table
Reference in a new issue