-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImperial2Metric.fxml
133 lines (131 loc) · 7.39 KB
/
Imperial2Metric.fxml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<BorderPane prefHeight="144.0" prefWidth="481.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.imperial2metric.Controller">
<center>
<VBox prefHeight="68.0" prefWidth="417.0">
<children>
<HBox alignment="CENTER_LEFT" prefHeight="34.0" prefWidth="345.0">
<children>
<HBox alignment="CENTER_LEFT" prefHeight="25.0" prefWidth="446.0">
<children>
<RadioButton fx:id="src_realft" mnemonicParsing="false" onAction="#setSourceUnit" onKeyPressed="#radioButtonKeyPress" prefHeight="17.0" prefWidth="57.0" text="Real ft">
<toggleGroup>
<ToggleGroup fx:id="sourceUnit" />
</toggleGroup>
</RadioButton>
<Text strokeType="OUTSIDE" strokeWidth="0.0">
<HBox.margin>
<Insets right="2.0" />
</HBox.margin>
</Text>
<TextField fx:id="real_ft" onKeyPressed="#inputFieldKeyPress" onKeyReleased="#recalcByRealImperial" onKeyTyped="#keyTypedHandle" prefHeight="25.0" prefWidth="44.0">
<HBox.margin>
<Insets left="5.0" />
</HBox.margin>
</TextField>
<TextField fx:id="real_in" onKeyPressed="#inputFieldKeyPress" onKeyReleased="#recalcByRealImperial" onKeyTyped="#keyTypedHandle" prefHeight="25.0" prefWidth="31.0">
<HBox.margin>
<Insets left="3.0" right="5.0" />
</HBox.margin>
</TextField>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="in" />
<TextField fx:id="real_in_numerator" onKeyPressed="#inputFieldKeyPress" onKeyReleased="#recalcByRealImperial" onKeyTyped="#keyTypedHandle" prefHeight="25.0" prefWidth="31.0">
<HBox.margin>
<Insets right="5.0" />
</HBox.margin>
</TextField>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="/">
<font>
<Font size="18.0" />
</font>
<HBox.margin>
<Insets left="5.0" />
</HBox.margin>
</Text>
<TextField fx:id="real_in_denominator" onKeyPressed="#inputFieldKeyPress" onKeyReleased="#recalcByRealImperial" onKeyTyped="#keyTypedHandle" prefHeight="25.0" prefWidth="31.0">
<HBox.margin>
<Insets left="5.0" right="5.0" />
</HBox.margin>
</TextField>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="fraction">
<HBox.margin>
<Insets right="5.0" />
</HBox.margin></Text>
<Button fx:id="buttonClear" mnemonicParsing="false" onAction="#clearImperialInput" onKeyPressed="#clearImperialInputByKeyPress" text="C" />
</children>
</HBox>
<HBox alignment="CENTER_RIGHT" prefHeight="25.0" prefWidth="273.0">
<children>
<RadioButton fx:id="src_scalein" mnemonicParsing="false" onAction="#setSourceUnit" onKeyPressed="#radioButtonKeyPress" text="Scale in" toggleGroup="$sourceUnit">
<HBox.margin>
<Insets right="5.0" />
</HBox.margin>
</RadioButton>
<TextField fx:id="scale_in" editable="false" onKeyPressed="#inputFieldKeyPress" onKeyReleased="#recalcByScaleImperial" onKeyTyped="#keyTypedHandle" prefHeight="25.0" prefWidth="57.0" />
</children>
</HBox>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="25.0" prefWidth="444.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="1:">
<HBox.margin>
<Insets right="2.0" />
</HBox.margin>
</Text>
<TextField fx:id="scale" onKeyReleased="#recalcByScale" prefHeight="25.0" prefWidth="40.0" text="1">
<HBox.margin>
<Insets right="5.0" />
</HBox.margin>
</TextField>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="scale" />
</children>
<VBox.margin>
<Insets top="10.0" />
</VBox.margin>
</HBox>
<HBox prefHeight="100.0" prefWidth="200.0">
<children>
<HBox alignment="CENTER" prefHeight="32.0" prefWidth="425.0">
<children>
<RadioButton fx:id="src_realmm" mnemonicParsing="false" onAction="#setSourceUnit" onKeyPressed="#radioButtonKeyPress" text="Real mm" toggleGroup="$sourceUnit">
<HBox.margin>
<Insets right="5.0" />
</HBox.margin>
</RadioButton>
<TextField fx:id="real_mm" onKeyPressed="#inputFieldKeyPress" onKeyReleased="#recalcByRealMetric" onKeyTyped="#keyTypedHandle" prefHeight="25.0" prefWidth="57.0" />
</children>
</HBox>
<HBox alignment="CENTER_RIGHT" prefHeight="16.0" prefWidth="442.0">
<children>
<RadioButton fx:id="src_scalemm" mnemonicParsing="false" onAction="#setSourceUnit" onKeyPressed="#radioButtonKeyPress" text="Scale mm" toggleGroup="$sourceUnit">
<HBox.margin>
<Insets right="5.0" />
</HBox.margin>
</RadioButton>
<TextField fx:id="scale_mm" onKeyPressed="#inputFieldKeyPress" onKeyReleased="#recalcByScaleMetric" onKeyTyped="#keyTypedHandle" prefHeight="25.0" prefWidth="60.0" />
</children>
</HBox>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="525.0">
<children>
<Text fx:id="warn" strokeType="OUTSIDE" strokeWidth="0.0" text="Select source unit with the radio buttons" />
</children>
</HBox>
</children>
<BorderPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</BorderPane.margin>
</VBox>
</center>
</BorderPane>