mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Add types for addLabelComboBox
This commit is contained in:
parent
84664006a4
commit
149c5a2fc0
2 changed files with 7 additions and 6 deletions
|
@ -22,6 +22,7 @@ import bisq.desktop.common.view.FxmlView;
|
|||
import bisq.desktop.components.InputTextField;
|
||||
import bisq.desktop.main.dao.bonding.BondingViewUtils;
|
||||
import bisq.desktop.main.dao.wallet.BsqBalanceUtil;
|
||||
import bisq.desktop.util.FormBuilder;
|
||||
import bisq.desktop.util.Layout;
|
||||
import bisq.desktop.util.validation.BsqValidator;
|
||||
|
||||
|
@ -53,7 +54,6 @@ import javafx.util.StringConverter;
|
|||
import java.util.Arrays;
|
||||
|
||||
import static bisq.desktop.util.FormBuilder.addButtonAfterGroup;
|
||||
import static bisq.desktop.util.FormBuilder.addLabelComboBox;
|
||||
import static bisq.desktop.util.FormBuilder.addLabelInputTextField;
|
||||
import static bisq.desktop.util.FormBuilder.addTitledGroupBg;
|
||||
|
||||
|
@ -118,7 +118,7 @@ public class LockupView extends ActivatableView<GridPane, Void> implements BsqBa
|
|||
String.valueOf(BondingConsensus.getMinLockTime()), String.valueOf(BondingConsensus.getMaxLockTime())));
|
||||
timeInputTextField.setValidator(timeInputTextFieldValidator);
|
||||
|
||||
lockupTypeComboBox = addLabelComboBox(root, ++gridRow, Res.get("dao.bonding.lock.type")).second;
|
||||
lockupTypeComboBox = FormBuilder.<LockupType>addLabelComboBox(root, ++gridRow, Res.get("dao.bonding.lock.type")).second;
|
||||
lockupTypeComboBox.setPromptText(Res.get("shared.select"));
|
||||
lockupTypeComboBox.setConverter(new StringConverter<LockupType>() {
|
||||
@Override
|
||||
|
@ -140,7 +140,7 @@ public class LockupView extends ActivatableView<GridPane, Void> implements BsqBa
|
|||
//TODO handle trade type
|
||||
lockupTypeComboBox.getSelectionModel().select(0);
|
||||
|
||||
bondedRolesComboBox = addLabelComboBox(root, ++gridRow, Res.get("dao.bonding.lock.bondedRoles")).second;
|
||||
bondedRolesComboBox = FormBuilder.<BondedRole>addLabelComboBox(root, ++gridRow, Res.get("dao.bonding.lock.bondedRoles")).second;
|
||||
bondedRolesComboBox.setPromptText(Res.get("shared.select"));
|
||||
bondedRolesComboBox.setConverter(new StringConverter<BondedRole>() {
|
||||
@Override
|
||||
|
|
|
@ -20,6 +20,7 @@ package bisq.desktop.main.dao.proposal;
|
|||
import bisq.desktop.components.HyperlinkWithIcon;
|
||||
import bisq.desktop.components.InputTextField;
|
||||
import bisq.desktop.components.TxIdTextField;
|
||||
import bisq.desktop.util.FormBuilder;
|
||||
import bisq.desktop.util.GUIUtil;
|
||||
import bisq.desktop.util.Layout;
|
||||
import bisq.desktop.util.validation.BsqAddressValidator;
|
||||
|
@ -214,7 +215,7 @@ public class ProposalDisplay {
|
|||
inputControls.add(bsqAddressTextField);
|
||||
break;
|
||||
case BONDED_ROLE:
|
||||
bondedRoleTypeComboBox = addLabelComboBox(gridPane, ++gridRow,
|
||||
bondedRoleTypeComboBox = FormBuilder.<BondedRoleType>addLabelComboBox(gridPane, ++gridRow,
|
||||
Res.getWithCol("dao.proposal.display.bondedRoleComboBox.label")).second;
|
||||
checkNotNull(bondedRoleTypeComboBox, "bondedRoleTypeComboBox must not be null");
|
||||
bondedRoleTypeComboBox.setPromptText(Res.get("shared.select"));
|
||||
|
@ -236,7 +237,7 @@ public class ProposalDisplay {
|
|||
break;
|
||||
case CHANGE_PARAM:
|
||||
checkNotNull(gridPane, "gridPane must not be null");
|
||||
paramComboBox = addLabelComboBox(gridPane, ++gridRow,
|
||||
paramComboBox = FormBuilder.<Param>addLabelComboBox(gridPane, ++gridRow,
|
||||
Res.getWithCol("dao.proposal.display.paramComboBox.label")).second;
|
||||
checkNotNull(paramComboBox, "paramComboBox must not be null");
|
||||
paramComboBox.setPromptText(Res.get("shared.select"));
|
||||
|
@ -264,7 +265,7 @@ public class ProposalDisplay {
|
|||
case GENERIC:
|
||||
break;
|
||||
case CONFISCATE_BOND:
|
||||
confiscateBondComboBox = addLabelComboBox(gridPane, ++gridRow,
|
||||
confiscateBondComboBox = FormBuilder.<BondedRole>addLabelComboBox(gridPane, ++gridRow,
|
||||
Res.getWithCol("dao.proposal.display.confiscateBondComboBox.label")).second;
|
||||
checkNotNull(confiscateBondComboBox, "confiscateBondComboBox must not be null");
|
||||
confiscateBondComboBox.setPromptText(Res.get("shared.select"));
|
||||
|
|
Loading…
Add table
Reference in a new issue