use of javafx.scene.control.TextField in project trex-stateless-gui by cisco-system-traffic-generator.
the class TCPProtocolView method buildCustomProtocolView.
/**
* Build custom view
*/
@Override
protected void buildCustomProtocolView() {
// source port
srcPortCB = new CheckBox("Override source port");
addCheckBox(srcPortCB, 8, 15);
srcPort = new TextField();
addInput(srcPort, 5, 220, 170);
srcPort.disableProperty().bind(srcPortCB.selectedProperty().not());
// Dst port
dstPortCB = new CheckBox("Override destination port");
addCheckBox(dstPortCB, 43, 15);
dstPort = new TextField();
addInput(dstPort, 40, 220, 170);
dstPort.disableProperty().bind(dstPortCB.selectedProperty().not());
// add seq number
addLabel("Sequence number", 78, 38);
seqNumber = new TextField();
addInput(seqNumber, 75, 220, 170);
// add ack number
addLabel("Acknowledge number", 113, 38);
ackNumber = new TextField();
addInput(ackNumber, 110, 220, 170);
// add window
addLabel("Window", 148, 38);
window = new TextField();
addInput(window, 145, 220, 170);
// add header length
headerLengthCB = new CheckBox("Override header length(x4)");
headerLength = new TextField();
headerLength.disableProperty().bind(headerLengthCB.selectedProperty().not());
// add checksum
checkSumCB = new CheckBox("Override checksum");
addCheckBox(checkSumCB, 8, 500);
checksum = new TextField();
addInput(checksum, 5, 660, 170);
checksum.disableProperty().bind(checkSumCB.selectedProperty().not());
// add urgent pointer
addLabel("Urgent pointer", 43, 520);
urgentPointer = new TextField();
addInput(urgentPointer, 40, 660, 170);
addSeparator(80, 490, 350);
addLabel("Flags", 95, 500);
urg = new CheckBox("URG");
addCheckBox(urg, 125, 500);
ack = new CheckBox("ACK");
addCheckBox(ack, 125, 575);
psh = new CheckBox("PSH");
addCheckBox(psh, 125, 650);
rst = new CheckBox("RST");
addCheckBox(rst, 160, 500);
syn = new CheckBox("SYN");
addCheckBox(syn, 160, 575);
fin = new CheckBox("FIN");
addCheckBox(fin, 160, 650);
}
use of javafx.scene.control.TextField in project trex-stateless-gui by cisco-system-traffic-generator.
the class EthernetProtocolView method buildCustomProtocolView.
/**
* Build custom view
*/
@Override
protected void buildCustomProtocolView() {
AnchorPane container = new AnchorPane();
type = new CheckBox("Ethernet Type");
addCheckBox(type, 20, 10);
typeField = new TextField();
addInput(typeField, 20, 165, 220);
typeField.disableProperty().bind(type.selectedProperty().not());
setContent(container);
}
use of javafx.scene.control.TextField in project jgnash by ccavanaugh.
the class IncomeExpensePayeePieChartDialogController method insertAuxPayeeTextField.
private void insertAuxPayeeTextField() {
final TextField payeeField = new TextField();
payeeField.textProperty().addListener(payeeChangeListener);
filtersPane.getChildren().add(payeeField);
}
use of javafx.scene.control.TextField in project jgnash by ccavanaugh.
the class IncomeExpensePayeePieChartDialogController method trimAuxPayeeTextFields.
private void trimAuxPayeeTextFields() {
final List<TextField> empty = filtersPane.getChildren().stream().filter(TextField.class::isInstance).filter(node -> ((TextField) node).getText().isEmpty()).map(TextField.class::cast).collect(Collectors.toList());
// Reverse order so we leave the last empty at the bottom
Collections.reverse(empty);
for (int i = empty.size() - 1; i > 0; i--) {
final TextField textField = empty.get(i);
textField.textProperty().removeListener(payeeChangeListener);
filtersPane.getChildren().remove(textField);
}
}
use of javafx.scene.control.TextField in project jgnash by ccavanaugh.
the class IncomeExpensePayeePieChartDialogController method insertAuxPayeeTextField.
private void insertAuxPayeeTextField(final String filter) {
final TextField payeeField = new TextField(filter);
payeeField.textProperty().addListener(payeeChangeListener);
filtersPane.getChildren().add(0, payeeField);
}
Aggregations