mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
add copyable label controls
This commit is contained in:
parent
fdc31b8719
commit
07c5356021
13 changed files with 140 additions and 52 deletions
|
@ -0,0 +1,16 @@
|
||||||
|
package com.sparrowwallet.sparrow.control;
|
||||||
|
|
||||||
|
import javafx.scene.text.Font;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
|
||||||
|
public class CopyableIdLabel extends CopyableLabel {
|
||||||
|
public CopyableIdLabel() {
|
||||||
|
this("");
|
||||||
|
}
|
||||||
|
|
||||||
|
public CopyableIdLabel(String text) {
|
||||||
|
super(text);
|
||||||
|
setFont(Font.font("Courier"));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.sparrowwallet.sparrow.control;
|
||||||
|
|
||||||
|
import javafx.scene.control.TextField;
|
||||||
|
|
||||||
|
public class CopyableLabel extends TextField {
|
||||||
|
public CopyableLabel() {
|
||||||
|
this("");
|
||||||
|
}
|
||||||
|
|
||||||
|
public CopyableLabel(String text) {
|
||||||
|
super(text);
|
||||||
|
|
||||||
|
this.setEditable(false);
|
||||||
|
this.getStyleClass().add("copyable-label");
|
||||||
|
this.setPrefWidth(10);
|
||||||
|
this.textProperty().addListener((ob, o, n) -> {
|
||||||
|
// expand the textfield
|
||||||
|
double width = TextUtils.computeTextWidth(this.getFont(), this.getText(), 0.0D) + 2;
|
||||||
|
this.setPrefWidth(width);
|
||||||
|
this.setMaxWidth(width);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.sparrowwallet.sparrow.control;
|
||||||
|
|
||||||
|
import javafx.scene.text.Font;
|
||||||
|
import javafx.scene.text.Text;
|
||||||
|
import javafx.scene.text.TextBoundsType;
|
||||||
|
|
||||||
|
public class TextUtils {
|
||||||
|
static final Text helper;
|
||||||
|
static final double DEFAULT_WRAPPING_WIDTH;
|
||||||
|
static final double DEFAULT_LINE_SPACING;
|
||||||
|
static final String DEFAULT_TEXT;
|
||||||
|
static final TextBoundsType DEFAULT_BOUNDS_TYPE;
|
||||||
|
|
||||||
|
static {
|
||||||
|
helper = new Text();
|
||||||
|
DEFAULT_WRAPPING_WIDTH = helper.getWrappingWidth();
|
||||||
|
DEFAULT_LINE_SPACING = helper.getLineSpacing();
|
||||||
|
DEFAULT_TEXT = helper.getText();
|
||||||
|
DEFAULT_BOUNDS_TYPE = helper.getBoundsType();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double computeTextWidth(Font font, String text, double help0) {
|
||||||
|
helper.setText(text);
|
||||||
|
helper.setFont(font);
|
||||||
|
|
||||||
|
helper.setWrappingWidth(0.0D);
|
||||||
|
helper.setLineSpacing(0.0D);
|
||||||
|
double d = Math.min(helper.prefWidth(-1.0D), help0);
|
||||||
|
helper.setWrappingWidth((int) Math.ceil(d));
|
||||||
|
d = Math.ceil(helper.getLayoutBounds().getWidth());
|
||||||
|
|
||||||
|
helper.setWrappingWidth(DEFAULT_WRAPPING_WIDTH);
|
||||||
|
helper.setLineSpacing(DEFAULT_LINE_SPACING);
|
||||||
|
helper.setText(DEFAULT_TEXT);
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,6 +2,8 @@ package com.sparrowwallet.sparrow.transaction;
|
||||||
|
|
||||||
import com.sparrowwallet.drongo.protocol.Transaction;
|
import com.sparrowwallet.drongo.protocol.Transaction;
|
||||||
import com.sparrowwallet.sparrow.EventManager;
|
import com.sparrowwallet.sparrow.EventManager;
|
||||||
|
import com.sparrowwallet.sparrow.control.CopyableIdLabel;
|
||||||
|
import com.sparrowwallet.sparrow.control.CopyableLabel;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.*;
|
||||||
|
@ -19,13 +21,13 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
private HeadersForm headersForm;
|
private HeadersForm headersForm;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField id;
|
private CopyableIdLabel id;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Spinner<Integer> version;
|
private Spinner<Integer> version;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField segwit;
|
private CopyableLabel segwit;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ToggleGroup locktimeToggleGroup;
|
private ToggleGroup locktimeToggleGroup;
|
||||||
|
@ -61,16 +63,16 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
private DateTimePicker locktimeDate;
|
private DateTimePicker locktimeDate;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField fee;
|
private CopyableLabel size;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField size;
|
private CopyableLabel virtualSize;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField virtualSize;
|
private CopyableLabel fee;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField feeRateField;
|
private CopyableLabel feeRate;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL location, ResourceBundle resources) {
|
public void initialize(URL location, ResourceBundle resources) {
|
||||||
|
@ -175,8 +177,8 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
|
|
||||||
if(feeAmt != null) {
|
if(feeAmt != null) {
|
||||||
fee.setText(feeAmt + " sats");
|
fee.setText(feeAmt + " sats");
|
||||||
double feeRate = feeAmt.doubleValue() / tx.getVirtualSize();
|
double feeRateAmt = feeAmt.doubleValue() / tx.getVirtualSize();
|
||||||
feeRateField.setText(String.format("%.2f", feeRate) + " sats/vByte");
|
feeRate.setText(String.format("%.2f", feeRateAmt) + " sats/vByte");
|
||||||
} else {
|
} else {
|
||||||
fee.setText("Unknown");
|
fee.setText("Unknown");
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ import com.sparrowwallet.drongo.crypto.ECKey;
|
||||||
import com.sparrowwallet.drongo.protocol.*;
|
import com.sparrowwallet.drongo.protocol.*;
|
||||||
import com.sparrowwallet.drongo.psbt.PSBTInput;
|
import com.sparrowwallet.drongo.psbt.PSBTInput;
|
||||||
import com.sparrowwallet.sparrow.EventManager;
|
import com.sparrowwallet.sparrow.EventManager;
|
||||||
|
import com.sparrowwallet.sparrow.control.CopyableIdLabel;
|
||||||
|
import com.sparrowwallet.sparrow.control.CopyableLabel;
|
||||||
import com.sparrowwallet.sparrow.control.RelativeTimelockSpinner;
|
import com.sparrowwallet.sparrow.control.RelativeTimelockSpinner;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
|
@ -32,19 +34,19 @@ public class InputController extends TransactionFormController implements Initia
|
||||||
private Fieldset inputFieldset;
|
private Fieldset inputFieldset;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField outpoint;
|
private CopyableIdLabel outpoint;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Button outpointSelect;
|
private Button outpointSelect;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField spends;
|
private CopyableLabel spends;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label from;
|
private CopyableLabel from;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField address;
|
private CopyableIdLabel address;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private CodeArea scriptSigArea;
|
private CodeArea scriptSigArea;
|
||||||
|
@ -68,7 +70,7 @@ public class InputController extends TransactionFormController implements Initia
|
||||||
private CodeArea witnessesArea;
|
private CodeArea witnessesArea;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField signatures;
|
private CopyableLabel signatures;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ToggleSwitch rbf;
|
private ToggleSwitch rbf;
|
||||||
|
@ -95,7 +97,7 @@ public class InputController extends TransactionFormController implements Initia
|
||||||
private Field locktimeRelativeField;
|
private Field locktimeRelativeField;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField locktimeAbsolute;
|
private CopyableLabel locktimeAbsolute;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Spinner<Integer> locktimeRelativeBlocks;
|
private Spinner<Integer> locktimeRelativeBlocks;
|
||||||
|
|
|
@ -2,10 +2,10 @@ package com.sparrowwallet.sparrow.transaction;
|
||||||
|
|
||||||
import com.sparrowwallet.drongo.protocol.*;
|
import com.sparrowwallet.drongo.protocol.*;
|
||||||
import com.sparrowwallet.drongo.psbt.PSBTInput;
|
import com.sparrowwallet.drongo.psbt.PSBTInput;
|
||||||
|
import com.sparrowwallet.sparrow.control.CopyableLabel;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
import javafx.scene.chart.PieChart;
|
import javafx.scene.chart.PieChart;
|
||||||
import javafx.scene.control.TextField;
|
|
||||||
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -16,13 +16,13 @@ public class InputsController extends TransactionFormController implements Initi
|
||||||
private InputsForm inputsForm;
|
private InputsForm inputsForm;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField count;
|
private CopyableLabel count;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField total;
|
private CopyableLabel total;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField signatures;
|
private CopyableLabel signatures;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private PieChart inputsPie;
|
private PieChart inputsPie;
|
||||||
|
|
|
@ -3,10 +3,10 @@ package com.sparrowwallet.sparrow.transaction;
|
||||||
import com.sparrowwallet.drongo.address.Address;
|
import com.sparrowwallet.drongo.address.Address;
|
||||||
import com.sparrowwallet.drongo.protocol.NonStandardScriptException;
|
import com.sparrowwallet.drongo.protocol.NonStandardScriptException;
|
||||||
import com.sparrowwallet.drongo.protocol.TransactionOutput;
|
import com.sparrowwallet.drongo.protocol.TransactionOutput;
|
||||||
|
import com.sparrowwallet.sparrow.control.CopyableIdLabel;
|
||||||
|
import com.sparrowwallet.sparrow.control.CopyableLabel;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
import javafx.scene.control.Label;
|
|
||||||
import javafx.scene.control.TextField;
|
|
||||||
import org.fxmisc.richtext.CodeArea;
|
import org.fxmisc.richtext.CodeArea;
|
||||||
import tornadofx.control.Fieldset;
|
import tornadofx.control.Fieldset;
|
||||||
|
|
||||||
|
@ -20,13 +20,13 @@ public class OutputController extends TransactionFormController implements Initi
|
||||||
private Fieldset outputFieldset;
|
private Fieldset outputFieldset;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField value;
|
private CopyableLabel value;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label to;
|
private CopyableLabel to;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField address;
|
private CopyableIdLabel address;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private CodeArea scriptPubKeyArea;
|
private CodeArea scriptPubKeyArea;
|
||||||
|
@ -42,7 +42,7 @@ public class OutputController extends TransactionFormController implements Initi
|
||||||
outputFieldset.setText("Output #" + txOutput.getIndex());
|
outputFieldset.setText("Output #" + txOutput.getIndex());
|
||||||
|
|
||||||
value.setText(txOutput.getValue() + " sats");
|
value.setText(txOutput.getValue() + " sats");
|
||||||
|
to.setVisible(false);
|
||||||
try {
|
try {
|
||||||
Address[] addresses = txOutput.getScript().getToAddresses();
|
Address[] addresses = txOutput.getScript().getToAddresses();
|
||||||
to.setVisible(true);
|
to.setVisible(true);
|
||||||
|
|
|
@ -2,10 +2,10 @@ package com.sparrowwallet.sparrow.transaction;
|
||||||
|
|
||||||
import com.sparrowwallet.drongo.protocol.Transaction;
|
import com.sparrowwallet.drongo.protocol.Transaction;
|
||||||
import com.sparrowwallet.drongo.protocol.TransactionOutput;
|
import com.sparrowwallet.drongo.protocol.TransactionOutput;
|
||||||
|
import com.sparrowwallet.sparrow.control.CopyableLabel;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
import javafx.scene.chart.PieChart;
|
import javafx.scene.chart.PieChart;
|
||||||
import javafx.scene.control.TextField;
|
|
||||||
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
@ -14,10 +14,10 @@ public class OutputsController extends TransactionFormController implements Init
|
||||||
private OutputsForm outputsForm;
|
private OutputsForm outputsForm;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField count;
|
private CopyableLabel count;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField total;
|
private CopyableLabel total;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private PieChart outputsPie;
|
private PieChart outputsPie;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
<?import javafx.geometry.*?>
|
<?import javafx.geometry.*?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
<?import javafx.scene.control.TextField?>
|
|
||||||
<?import javafx.scene.control.Spinner?>
|
<?import javafx.scene.control.Spinner?>
|
||||||
<?import javafx.scene.control.ToggleButton?>
|
<?import javafx.scene.control.ToggleButton?>
|
||||||
<?import javafx.scene.control.ToggleGroup?>
|
<?import javafx.scene.control.ToggleGroup?>
|
||||||
|
@ -11,8 +10,10 @@
|
||||||
<?import tornadofx.control.Form?>
|
<?import tornadofx.control.Form?>
|
||||||
<?import tornadofx.control.Fieldset?>
|
<?import tornadofx.control.Fieldset?>
|
||||||
<?import tornadofx.control.Field?>
|
<?import tornadofx.control.Field?>
|
||||||
|
|
||||||
<?import org.controlsfx.control.SegmentedButton?>
|
<?import org.controlsfx.control.SegmentedButton?>
|
||||||
|
<?import com.sparrowwallet.sparrow.control.CopyableLabel?>
|
||||||
|
<?import com.sparrowwallet.sparrow.control.CopyableIdLabel?>
|
||||||
|
|
||||||
<GridPane hgap="10.0" prefHeight="350.0" prefWidth="600.0" vgap="10.0" alignment="TOP_CENTER" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.sparrowwallet.sparrow.transaction.HeadersController" stylesheets="@headers.css, @../general.css">
|
<GridPane hgap="10.0" prefHeight="350.0" prefWidth="600.0" vgap="10.0" alignment="TOP_CENTER" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.sparrowwallet.sparrow.transaction.HeadersController" stylesheets="@headers.css, @../general.css">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets bottom="25.0" left="25.0" right="25.0" top="25.0" />
|
<Insets bottom="25.0" left="25.0" right="25.0" top="25.0" />
|
||||||
|
@ -31,7 +32,7 @@
|
||||||
<Form GridPane.columnIndex="0" GridPane.rowIndex="0" GridPane.columnSpan="2">
|
<Form GridPane.columnIndex="0" GridPane.rowIndex="0" GridPane.columnSpan="2">
|
||||||
<Fieldset text="Transaction" inputGrow="SOMETIMES">
|
<Fieldset text="Transaction" inputGrow="SOMETIMES">
|
||||||
<Field text="Txid:">
|
<Field text="Txid:">
|
||||||
<TextField fx:id="id" editable="false" styleClass="copyable-label, id" prefWidth="520" minWidth="520"/>
|
<CopyableIdLabel fx:id="id"/>
|
||||||
</Field>
|
</Field>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -44,7 +45,7 @@
|
||||||
<Spinner fx:id="version" prefWidth="60" editable="true" />
|
<Spinner fx:id="version" prefWidth="60" editable="true" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field text="Type:">
|
<Field text="Type:">
|
||||||
<TextField fx:id="segwit" editable="false" styleClass="copyable-label"/>
|
<CopyableLabel fx:id="segwit" />
|
||||||
</Field>
|
</Field>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -80,10 +81,10 @@
|
||||||
<Form GridPane.columnIndex="0" GridPane.rowIndex="4">
|
<Form GridPane.columnIndex="0" GridPane.rowIndex="4">
|
||||||
<Fieldset text="Size" inputGrow="SOMETIMES">
|
<Fieldset text="Size" inputGrow="SOMETIMES">
|
||||||
<Field text="Bytes:">
|
<Field text="Bytes:">
|
||||||
<TextField fx:id="size" editable="false" styleClass="copyable-label" prefWidth="120"/>
|
<CopyableLabel fx:id="size" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field text="vBytes:">
|
<Field text="vBytes:">
|
||||||
<TextField fx:id="virtualSize" editable="false" styleClass="copyable-label" prefWidth="120"/>
|
<CopyableLabel fx:id="virtualSize" />
|
||||||
</Field>
|
</Field>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -91,10 +92,10 @@
|
||||||
<Form GridPane.columnIndex="1" GridPane.rowIndex="4">
|
<Form GridPane.columnIndex="1" GridPane.rowIndex="4">
|
||||||
<Fieldset text="Fee" inputGrow="SOMETIMES">
|
<Fieldset text="Fee" inputGrow="SOMETIMES">
|
||||||
<Field text="Amount:">
|
<Field text="Amount:">
|
||||||
<TextField fx:id="fee" editable="false" styleClass="copyable-label" prefWidth="120"/>
|
<CopyableLabel fx:id="fee" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field text="Rate:">
|
<Field text="Rate:">
|
||||||
<TextField fx:id="feeRateField" editable="false" styleClass="copyable-label" prefWidth="120"/>
|
<CopyableLabel fx:id="feeRate" />
|
||||||
</Field>
|
</Field>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -104,10 +105,10 @@
|
||||||
<Form GridPane.columnIndex="0" GridPane.rowIndex="6">
|
<Form GridPane.columnIndex="0" GridPane.rowIndex="6">
|
||||||
<Fieldset text="Blockchain" inputGrow="SOMETIMES">
|
<Fieldset text="Blockchain" inputGrow="SOMETIMES">
|
||||||
<Field text="Status:">
|
<Field text="Status:">
|
||||||
<TextField fx:id="blockStatusField" editable="false" styleClass="copyable-label" prefWidth="120"/>
|
<CopyableLabel fx:id="blockStatusField" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field text="Block:">
|
<Field text="Block:">
|
||||||
<TextField fx:id="blockField" editable="false" styleClass="copyable-label" prefWidth="120"/>
|
<CopyableLabel fx:id="blockField" />
|
||||||
</Field>
|
</Field>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
<?import java.lang.String?>
|
<?import java.lang.String?>
|
||||||
<?import org.controlsfx.control.ToggleSwitch?>
|
<?import org.controlsfx.control.ToggleSwitch?>
|
||||||
<?import com.sparrowwallet.sparrow.control.RelativeTimelockSpinner?>
|
<?import com.sparrowwallet.sparrow.control.RelativeTimelockSpinner?>
|
||||||
|
<?import com.sparrowwallet.sparrow.control.CopyableLabel?>
|
||||||
|
<?import com.sparrowwallet.sparrow.control.CopyableIdLabel?>
|
||||||
|
|
||||||
<GridPane alignment="TOP_CENTER" hgap="10.0" prefHeight="500.0" prefWidth="620.0" stylesheets="@input.css, @script.css, @../general.css" vgap="10.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.sparrowwallet.sparrow.transaction.InputController">
|
<GridPane alignment="TOP_CENTER" hgap="10.0" prefHeight="500.0" prefWidth="620.0" stylesheets="@input.css, @script.css, @../general.css" vgap="10.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.sparrowwallet.sparrow.transaction.InputController">
|
||||||
<padding>
|
<padding>
|
||||||
|
@ -30,7 +32,7 @@
|
||||||
<Form GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="0">
|
<Form GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="0">
|
||||||
<Fieldset fx:id="inputFieldset" inputGrow="SOMETIMES" text="Input">
|
<Fieldset fx:id="inputFieldset" inputGrow="SOMETIMES" text="Input">
|
||||||
<Field text="Outpoint:">
|
<Field text="Outpoint:">
|
||||||
<TextField fx:id="outpoint" editable="false" minWidth="520" prefWidth="520" styleClass="copyable-label, id" />
|
<CopyableIdLabel fx:id="outpoint" />
|
||||||
<Button fx:id="outpointSelect" maxWidth="25" minWidth="-Infinity" prefWidth="30" text="Ed">
|
<Button fx:id="outpointSelect" maxWidth="25" minWidth="-Infinity" prefWidth="30" text="Ed">
|
||||||
<graphic>
|
<graphic>
|
||||||
<Glyph fontFamily="FontAwesome" icon="EDIT" prefWidth="15" />
|
<Glyph fontFamily="FontAwesome" icon="EDIT" prefWidth="15" />
|
||||||
|
@ -38,9 +40,9 @@
|
||||||
</Button>
|
</Button>
|
||||||
</Field>
|
</Field>
|
||||||
<Field text="Spends:">
|
<Field text="Spends:">
|
||||||
<TextField fx:id="spends" editable="false" styleClass="copyable-label" maxWidth="80" />
|
<CopyableLabel fx:id="spends" />
|
||||||
<Label fx:id="from" text="from" maxWidth="30" style="-fx-padding: 0" />
|
<CopyableLabel fx:id="from" text="from" />
|
||||||
<TextField fx:id="address" editable="false" styleClass="copyable-label, id" />
|
<CopyableIdLabel fx:id="address" />
|
||||||
</Field>
|
</Field>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -93,7 +95,7 @@
|
||||||
<Form GridPane.columnIndex="0" GridPane.rowIndex="4">
|
<Form GridPane.columnIndex="0" GridPane.rowIndex="4">
|
||||||
<Fieldset text="Status" inputGrow="SOMETIMES">
|
<Fieldset text="Status" inputGrow="SOMETIMES">
|
||||||
<Field text="Signatures:">
|
<Field text="Signatures:">
|
||||||
<TextField fx:id="signatures" editable="false" prefWidth="120" styleClass="copyable-label"/>
|
<CopyableLabel fx:id="signatures" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field text="RBF:">
|
<Field text="RBF:">
|
||||||
<ToggleSwitch fx:id="rbf"/>
|
<ToggleSwitch fx:id="rbf"/>
|
||||||
|
@ -128,7 +130,7 @@
|
||||||
</SegmentedButton>
|
</SegmentedButton>
|
||||||
</Field>
|
</Field>
|
||||||
<Field fx:id="locktimeAbsoluteField" text="Block:">
|
<Field fx:id="locktimeAbsoluteField" text="Block:">
|
||||||
<TextField fx:id="locktimeAbsolute" editable="false" prefWidth="120" styleClass="copyable-label"/>
|
<CopyableLabel fx:id="locktimeAbsolute" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field fx:id="locktimeRelativeField" text="Value:">
|
<Field fx:id="locktimeRelativeField" text="Value:">
|
||||||
<Spinner fx:id="locktimeRelativeBlocks" editable="true" prefWidth="110"/>
|
<Spinner fx:id="locktimeRelativeBlocks" editable="true" prefWidth="110"/>
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
<?import tornadofx.control.*?>
|
<?import tornadofx.control.*?>
|
||||||
<?import javafx.scene.chart.PieChart?>
|
<?import javafx.scene.chart.PieChart?>
|
||||||
|
<?import com.sparrowwallet.sparrow.control.CopyableLabel?>
|
||||||
|
|
||||||
<GridPane alignment="TOP_CENTER" hgap="10.0" prefHeight="500.0" prefWidth="600.0" stylesheets="@inputs.css, @../general.css" vgap="10.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.sparrowwallet.sparrow.transaction.InputsController">
|
<GridPane alignment="TOP_CENTER" hgap="10.0" prefHeight="500.0" prefWidth="600.0" stylesheets="@inputs.css, @../general.css" vgap="10.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.sparrowwallet.sparrow.transaction.InputsController">
|
||||||
<padding>
|
<padding>
|
||||||
|
@ -22,10 +23,10 @@
|
||||||
<Form GridPane.columnIndex="0" GridPane.rowIndex="0">
|
<Form GridPane.columnIndex="0" GridPane.rowIndex="0">
|
||||||
<Fieldset inputGrow="SOMETIMES" text="Inputs">
|
<Fieldset inputGrow="SOMETIMES" text="Inputs">
|
||||||
<Field text="Count:">
|
<Field text="Count:">
|
||||||
<TextField fx:id="count" editable="false" minWidth="520" prefWidth="520" styleClass="copyable-label" />
|
<CopyableLabel fx:id="count" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field text="Total:">
|
<Field text="Total:">
|
||||||
<TextField fx:id="total" editable="false" minWidth="520" prefWidth="520" styleClass="copyable-label" />
|
<CopyableLabel fx:id="total" />
|
||||||
</Field>
|
</Field>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -33,7 +34,7 @@
|
||||||
<Form GridPane.columnIndex="1" GridPane.rowIndex="0">
|
<Form GridPane.columnIndex="1" GridPane.rowIndex="0">
|
||||||
<Fieldset inputGrow="SOMETIMES" text="Signatures">
|
<Fieldset inputGrow="SOMETIMES" text="Signatures">
|
||||||
<Field text="Status:">
|
<Field text="Status:">
|
||||||
<TextField fx:id="signatures" editable="false" minWidth="520" prefWidth="520" styleClass="copyable-label" />
|
<CopyableLabel fx:id="signatures" />
|
||||||
</Field>
|
</Field>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
<?import tornadofx.control.Fieldset?>
|
<?import tornadofx.control.Fieldset?>
|
||||||
<?import tornadofx.control.Form?>
|
<?import tornadofx.control.Form?>
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
|
<?import com.sparrowwallet.sparrow.control.CopyableLabel?>
|
||||||
|
<?import com.sparrowwallet.sparrow.control.CopyableIdLabel?>
|
||||||
|
|
||||||
<GridPane alignment="TOP_CENTER" hgap="10.0" prefHeight="500.0" prefWidth="600.0" stylesheets="@output.css, @script.css, @../general.css" vgap="10.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.sparrowwallet.sparrow.transaction.OutputController">
|
<GridPane alignment="TOP_CENTER" hgap="10.0" prefHeight="500.0" prefWidth="600.0" stylesheets="@output.css, @script.css, @../general.css" vgap="10.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.sparrowwallet.sparrow.transaction.OutputController">
|
||||||
<padding>
|
<padding>
|
||||||
|
@ -29,9 +31,9 @@
|
||||||
<Form GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="0">
|
<Form GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="0">
|
||||||
<Fieldset fx:id="outputFieldset" inputGrow="SOMETIMES" text="Output">
|
<Fieldset fx:id="outputFieldset" inputGrow="SOMETIMES" text="Output">
|
||||||
<Field text="Sends:">
|
<Field text="Sends:">
|
||||||
<TextField fx:id="value" editable="false" styleClass="copyable-label" maxWidth="80"/>
|
<CopyableLabel fx:id="value"/>
|
||||||
<Label fx:id="to" text="to" />
|
<CopyableLabel fx:id="to" text="to" />
|
||||||
<TextField fx:id="address" editable="false" styleClass="copyable-label, id" />
|
<CopyableIdLabel fx:id="address" />
|
||||||
</Field>
|
</Field>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
|
@ -4,8 +4,9 @@
|
||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.control.*?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
<?import tornadofx.control.*?>
|
<?import tornadofx.control.*?>
|
||||||
|
|
||||||
<?import javafx.scene.chart.PieChart?>
|
<?import javafx.scene.chart.PieChart?>
|
||||||
|
<?import com.sparrowwallet.sparrow.control.CopyableLabel?>
|
||||||
|
|
||||||
<GridPane alignment="TOP_CENTER" hgap="10.0" prefHeight="500.0" prefWidth="600.0" stylesheets="@outputs.css, @../general.css" vgap="10.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.sparrowwallet.sparrow.transaction.OutputsController">
|
<GridPane alignment="TOP_CENTER" hgap="10.0" prefHeight="500.0" prefWidth="600.0" stylesheets="@outputs.css, @../general.css" vgap="10.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.sparrowwallet.sparrow.transaction.OutputsController">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets bottom="25.0" left="25.0" right="25.0" top="25.0" />
|
<Insets bottom="25.0" left="25.0" right="25.0" top="25.0" />
|
||||||
|
@ -22,10 +23,10 @@
|
||||||
<Form GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="0">
|
<Form GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="0">
|
||||||
<Fieldset inputGrow="SOMETIMES" text="Outputs">
|
<Fieldset inputGrow="SOMETIMES" text="Outputs">
|
||||||
<Field text="Count:">
|
<Field text="Count:">
|
||||||
<TextField fx:id="count" editable="false" minWidth="520" prefWidth="520" styleClass="copyable-label" />
|
<CopyableLabel fx:id="count" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field text="Total:">
|
<Field text="Total:">
|
||||||
<TextField fx:id="total" editable="false" minWidth="520" prefWidth="520" styleClass="copyable-label" />
|
<CopyableLabel fx:id="total" />
|
||||||
</Field>
|
</Field>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
Loading…
Reference in a new issue