Guest User

Untitled

a guest
Dec 9th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.09 KB | None | 0 0
  1. if (btnPref1.isSelected()) {
  2. Timeline tl1 = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category1.prefWidthProperty(), 1610)));
  3. tl1.play();
  4. }
  5.  
  6. else {Timeline tlOne = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category1.prefWidthProperty(), 1900)));
  7. tlOne.play();
  8. }
  9.  
  10. package card;
  11.  
  12. import javafx.animation.*;
  13.  
  14. import javafx.scene.control.*;
  15. import javafx.fxml.FXML;
  16. import javafx.fxml.Initializable;
  17. import javafx.scene.layout.*;
  18. import javafx.event.ActionEvent;
  19. import javafx.util.Duration;
  20. import java.net.URL;
  21. import java.util.ResourceBundle;
  22.  
  23. public class Controller implements Initializable {
  24.  
  25.  
  26. @FXML private HBox anchorRow;
  27. @FXML private StackPane hBoxCat0;
  28. @FXML private Button btnPalette;
  29. @FXML private Button btnFont;
  30. @FXML private Button btnQuestCards;
  31. @FXML private Button btnNonQuestCards;
  32. @FXML private ToggleButton btnPref1;
  33. @FXML private ToggleButton btnPref2;
  34. @FXML private ToggleButton btnPref3;
  35. @FXML private ToggleButton btnPref4;
  36. @FXML private ToggleButton btnPref5;
  37. @FXML private ToggleButton btnPref6;
  38. @FXML private ToggleButton btnPref7;
  39. @FXML private ToggleButton btnPref8;
  40. @FXML private Label category1;
  41. @FXML private Label category2;
  42. @FXML private Label category3;
  43. @FXML private Label category4;
  44. @FXML private Label category5;
  45. @FXML private Label category6;
  46. @FXML private Label category7;
  47. @FXML private Label category8;
  48. @FXML private ToggleGroup group;
  49.  
  50.  
  51. @FXML
  52. public void initialize(URL location, ResourceBundle resources) {
  53.  
  54. }
  55.  
  56. //create animation timeline to show preference block
  57. public void showPrefAnimation() {
  58. Timeline tmHbox = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(hBoxCat0.prefWidthProperty(), 250)));
  59. tmHbox.play();
  60. TranslateTransition ttPalette = new TranslateTransition(Duration.millis(300), btnPalette);
  61. TranslateTransition ttFont = new TranslateTransition(Duration.millis(300), btnFont);
  62. TranslateTransition ttQuest = new TranslateTransition(Duration.millis(300), btnQuestCards);
  63. TranslateTransition ttNonQuest = new TranslateTransition(Duration.millis(300), btnNonQuestCards);
  64.  
  65. ttPalette.setFromX(0);
  66. ttFont.setFromX(0);
  67. ttQuest.setFromX(0);
  68. ttNonQuest.setFromX(0);
  69.  
  70. ttPalette.setToX(40);
  71. ttFont.setToX(93);
  72. ttQuest.setToX(143);
  73. ttNonQuest.setToX(195);
  74.  
  75. ttPalette.play();
  76. ttFont.play();
  77. ttQuest.play();
  78. ttNonQuest.play();
  79. }
  80.  
  81. //create animation timeline to hide preference block
  82. public void hidePrefAnimation() {
  83. Timeline tmHboxCat = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(hBoxCat0.prefWidthProperty(), 10)));
  84. tmHboxCat.play();
  85. TranslateTransition ttPalette = new TranslateTransition(Duration.millis(300), btnPalette);
  86. TranslateTransition ttFont = new TranslateTransition(Duration.millis(300), btnFont);
  87. TranslateTransition ttQuest = new TranslateTransition(Duration.millis(300), btnQuestCards);
  88. TranslateTransition ttNonQuest = new TranslateTransition(Duration.millis(300), btnNonQuestCards);
  89.  
  90. ttPalette.setFromX(40);
  91. ttFont.setFromX(93);
  92. ttQuest.setFromX(143);
  93. ttNonQuest.setFromX(195);
  94.  
  95. ttPalette.setToX(0);
  96. ttFont.setToX(0);
  97. ttQuest.setToX(0);
  98. ttNonQuest.setToX(0);
  99.  
  100. ttPalette.play();
  101. ttFont.play();
  102. ttQuest.play();
  103. ttNonQuest.play();
  104.  
  105. }
  106.  
  107.  
  108. //Open preference window and make width animation for category 1
  109. @FXML
  110. void openPreference1(ActionEvent event) {
  111.  
  112. if (btnPref1.isSelected()) {
  113. GridPane.setRowIndex(anchorRow, 0);
  114. Timeline tl1 = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category1.prefWidthProperty(), 1610)));
  115. showPrefAnimation();
  116. tl1.play();
  117. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> button.setDisable(true));
  118. btnPref1.setDisable(false);
  119. }
  120.  
  121. else {
  122. Timeline tlOne = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category1.prefWidthProperty(), 1900)));
  123. tlOne.play();
  124. hidePrefAnimation();
  125. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> {
  126. button.setDisable(false);
  127. });
  128. }
  129. }
  130.  
  131. //Open preference window and make width animation for category 2
  132. @FXML
  133. void openPreference2(ActionEvent event) {
  134.  
  135. if (btnPref2.isSelected()) {
  136. GridPane.setRowIndex(anchorRow, 1);
  137. Timeline tl2 = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category2.prefWidthProperty(), 1610)));
  138. tl2.play();
  139. showPrefAnimation();
  140. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> button.setDisable(true));
  141. btnPref2.setDisable(false);
  142.  
  143. }
  144.  
  145. else {
  146. Timeline tlTwo = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category2.prefWidthProperty(), 1900)));
  147. tlTwo.play();
  148. hidePrefAnimation();
  149. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> {
  150. button.setDisable(false);
  151. });
  152. }
  153.  
  154. }
  155.  
  156. //Open preference window and make width animation for category 3
  157. @FXML
  158. void openPreference3(ActionEvent event) {
  159.  
  160. if (btnPref3.isSelected()) {
  161. GridPane.setRowIndex(anchorRow, 2);
  162. Timeline tl3 = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category3.prefWidthProperty(), 1610)));
  163. tl3.play();
  164. showPrefAnimation();
  165. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> button.setDisable(true));
  166. btnPref3.setDisable(false);
  167. }
  168.  
  169. else {
  170. Timeline tlThree = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category3.prefWidthProperty(), 1900)));
  171. tlThree.play();
  172. hidePrefAnimation();
  173. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> {
  174. button.setDisable(false);
  175. });
  176. }
  177.  
  178. }
  179.  
  180. //Open preference window and make width animation for category 4
  181. @FXML
  182. void openPreference4(ActionEvent event) {
  183.  
  184. if (btnPref4.isSelected()) {
  185. GridPane.setRowIndex(anchorRow, 3);
  186. Timeline tl4 = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category4.prefWidthProperty(), 1610)));
  187. tl4.play();
  188. showPrefAnimation();
  189. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> button.setDisable(true));
  190. btnPref4.setDisable(false);
  191. }
  192.  
  193. else {
  194. Timeline tlFour = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category4.prefWidthProperty(), 1900)));
  195. tlFour.play();
  196. hidePrefAnimation();
  197. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> {
  198. button.setDisable(false);
  199. });
  200. }
  201. }
  202.  
  203. //Open preference window and make width animation for category 5
  204. @FXML
  205. void openPreference5(ActionEvent event) {
  206.  
  207. if (btnPref5.isSelected()) {
  208. GridPane.setRowIndex(anchorRow, 4);
  209. Timeline tl5 = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category5.prefWidthProperty(), 1610)));
  210. tl5.play();
  211. showPrefAnimation();
  212. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> button.setDisable(true));
  213. btnPref5.setDisable(false);
  214. }
  215.  
  216. else {
  217. Timeline tlFive = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category5.prefWidthProperty(), 1900)));
  218. tlFive.play();
  219. hidePrefAnimation();
  220. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> {
  221. button.setDisable(false);
  222. });
  223. }
  224. }
  225.  
  226. //Open preference window and make width animation for category 6
  227. @FXML
  228. void openPreference6(ActionEvent event) {
  229.  
  230. if (btnPref6.isSelected()) {
  231. GridPane.setRowIndex(anchorRow, 5);
  232. Timeline tl6 = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category6.prefWidthProperty(), 1610)));
  233. tl6.play();
  234. showPrefAnimation();
  235. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> button.setDisable(true));
  236. btnPref6.setDisable(false);
  237. }
  238.  
  239. else {
  240. Timeline tlSix = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category6.prefWidthProperty(), 1900)));
  241. tlSix.play();
  242. hidePrefAnimation();
  243. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> {
  244. button.setDisable(false);
  245. });
  246. }
  247. }
  248.  
  249. //Open preference window and make width animation for category 7
  250. @FXML
  251. void openPreference7(ActionEvent event) {
  252.  
  253. if (btnPref7.isSelected()) {
  254. GridPane.setRowIndex(anchorRow, 6);
  255. Timeline tl7 = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category7.prefWidthProperty(), 1610)));
  256. tl7.play();
  257. showPrefAnimation();
  258. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> button.setDisable(true));
  259. btnPref7.setDisable(false);
  260. }
  261.  
  262. else {
  263. Timeline tlSeven = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category7.prefWidthProperty(), 1900)));
  264. tlSeven.play();
  265. hidePrefAnimation();
  266. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> {
  267. button.setDisable(false);
  268. });
  269. }
  270. }
  271.  
  272. //Open preference window and make width animation for category 8
  273. @FXML
  274. void openPreference8(ActionEvent event) {
  275.  
  276. if (btnPref8.isSelected()) {
  277. GridPane.setRowIndex(anchorRow, 7);
  278. Timeline tl8 = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category8.prefWidthProperty(), 1610)));
  279. tl8.play();
  280. showPrefAnimation();
  281. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> button.setDisable(true));
  282. btnPref8.setDisable(false);
  283. }
  284.  
  285. else {
  286. Timeline tlEight = new Timeline(new KeyFrame(Duration.millis(300), new KeyValue(category8.prefWidthProperty(), 1900)));
  287. tlEight.play();
  288. hidePrefAnimation();
  289. group.getToggles().stream().map((toggle) -> (ToggleButton)toggle).forEach((button) -> {
  290. button.setDisable(false);
  291. });
  292. }
  293.  
  294. }
  295.  
  296.  
  297. }
  298.  
  299. <?xml version="1.0" encoding="UTF-8"?>
  300.  
  301. <?import java.lang.String?>
  302. <?import javafx.geometry.Insets?>
  303. <?import javafx.scene.control.Button?>
  304. <?import javafx.scene.control.Label?>
  305. <?import javafx.scene.control.ToggleButton?>
  306. <?import javafx.scene.control.ToggleGroup?>
  307. <?import javafx.scene.layout.AnchorPane?>
  308. <?import javafx.scene.layout.ColumnConstraints?>
  309. <?import javafx.scene.layout.GridPane?>
  310. <?import javafx.scene.layout.HBox?>
  311. <?import javafx.scene.layout.RowConstraints?>
  312. <?import javafx.scene.layout.StackPane?>
  313.  
  314. <AnchorPane fx:id="mainAnchor" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="900.0" prefWidth="1900.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="card.Controller">
  315.  
  316.  
  317. <children>
  318. <GridPane alignment="CENTER" layoutY="19.0" maxHeight="1.7976931348623157E308" maxWidth="-Infinity" styleClass="background" stylesheets="@style.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
  319. <columnConstraints>
  320. <ColumnConstraints maxWidth="1.7976931348623157E308" prefWidth="70.0" />
  321. <ColumnConstraints maxWidth="1.7976931348623157E308" prefWidth="70.0" />
  322. <ColumnConstraints maxWidth="1.7976931348623157E308" prefWidth="70.0" />
  323. <ColumnConstraints hgrow="NEVER" maxWidth="1.7976931348623157E308" prefWidth="70.0" />
  324. <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" prefWidth="1419.0" />
  325. </columnConstraints>
  326. <rowConstraints>
  327. <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
  328. <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
  329. <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
  330. <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
  331. <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
  332. <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
  333. <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
  334. <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
  335. </rowConstraints>
  336. <children>
  337. <HBox fx:id="anchorRow" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" GridPane.columnSpan="4" GridPane.hgrow="ALWAYS">
  338. <children>
  339. <StackPane fx:id="hBoxCat0" alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="10.0" styleClass="anchor-pref" stylesheets="@style.css">
  340. <children>
  341. <Button fx:id="btnPalette" mnemonicParsing="false" prefHeight="73.0" prefWidth="45.0" stylesheets="@style.css">
  342. <styleClass>
  343. <String fx:value="btnPalette" />
  344. <String fx:value="icon-image-pref" />
  345. </styleClass>
  346. </Button>
  347. <Button fx:id="btnFont" contentDisplay="CENTER" mnemonicParsing="false" prefHeight="73.0" prefWidth="45.0" stylesheets="@style.css">
  348. <styleClass>
  349. <String fx:value="btnFonts" />
  350. <String fx:value="icon-image-pref" />
  351. </styleClass>
  352. </Button>
  353. <Button fx:id="btnQuestCards" contentDisplay="CENTER" mnemonicParsing="false" prefHeight="73.0" prefWidth="45.0" stylesheets="@style.css">
  354. <styleClass>
  355. <String fx:value="btnQuestCards" />
  356. <String fx:value="icon-image-pref" />
  357. </styleClass>
  358. </Button>
  359. <Button fx:id="btnNonQuestCards" contentDisplay="CENTER" mnemonicParsing="false" prefHeight="73.0" prefWidth="45.0" stylesheets="@style.css">
  360. <styleClass>
  361. <String fx:value="btnNonQuestCards" />
  362. <String fx:value="icon-image-pref" />
  363. </styleClass>
  364. </Button>
  365. </children>
  366. </StackPane>
  367. </children>
  368. <GridPane.margin>
  369. <Insets bottom="20.0" left="20.0" right="10.0" top="20.0" />
  370. </GridPane.margin>
  371. </HBox>
  372. <AnchorPane>
  373. <children>
  374. <ToggleButton fx:id="btnPref1" graphicTextGap="1.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#openPreference1" prefHeight="100.0" prefWidth="70.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="20.0">
  375. <toggleGroup>
  376. <ToggleGroup fx:id="group" />
  377. </toggleGroup></ToggleButton>
  378. </children>
  379. </AnchorPane>
  380. <AnchorPane layoutX="10.0" layoutY="10.0" GridPane.rowIndex="1">
  381. <children>
  382. <ToggleButton fx:id="btnPref2" graphicTextGap="1.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#openPreference2" prefHeight="100.0" prefWidth="70.0" toggleGroup="$group" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="20.0" />
  383. </children>
  384. </AnchorPane>
  385. <AnchorPane layoutX="10.0" layoutY="123.0" GridPane.rowIndex="2">
  386. <children>
  387. <ToggleButton fx:id="btnPref3" graphicTextGap="1.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#openPreference3" prefHeight="100.0" prefWidth="70.0" toggleGroup="$group" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="20.0" />
  388. </children>
  389. </AnchorPane>
  390. <AnchorPane layoutX="10.0" layoutY="236.0" GridPane.rowIndex="3">
  391. <children>
  392. <ToggleButton fx:id="btnPref4" graphicTextGap="1.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#openPreference4" prefHeight="100.0" prefWidth="70.0" toggleGroup="$group" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="20.0" />
  393. </children>
  394. </AnchorPane>
  395. <AnchorPane layoutX="10.0" layoutY="349.0" GridPane.rowIndex="4">
  396. <children>
  397. <ToggleButton fx:id="btnPref5" graphicTextGap="1.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#openPreference5" prefHeight="100.0" prefWidth="70.0" toggleGroup="$group" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="20.0" />
  398. </children>
  399. </AnchorPane>
  400. <AnchorPane layoutX="10.0" layoutY="10.0" GridPane.rowIndex="5">
  401. <children>
  402. <ToggleButton fx:id="btnPref6" graphicTextGap="1.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#openPreference6" prefHeight="100.0" prefWidth="70.0" toggleGroup="$group" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="20.0" />
  403. </children>
  404. </AnchorPane>
  405. <AnchorPane layoutX="10.0" layoutY="574.0" GridPane.rowIndex="6">
  406. <children>
  407. <ToggleButton fx:id="btnPref7" graphicTextGap="1.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#openPreference7" prefHeight="100.0" prefWidth="70.0" toggleGroup="$group" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="20.0" />
  408. </children>
  409. </AnchorPane>
  410. <AnchorPane layoutX="10.0" layoutY="686.0" GridPane.rowIndex="7">
  411. <children>
  412. <ToggleButton fx:id="btnPref8" graphicTextGap="1.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#openPreference8" prefHeight="100.0" prefWidth="70.0" toggleGroup="$group" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="20.0" />
  413. </children>
  414. </AnchorPane>
  415. <HBox layoutX="90.0" layoutY="818.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1" GridPane.columnSpan="4" GridPane.hgrow="ALWAYS">
  416. <children>
  417. <Label fx:id="category1" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="LEFT_TO_RIGHT" prefHeight="73.0" prefWidth="1900.0" snapToPixel="false" text="Category 1">
  418. <HBox.margin>
  419. <Insets />
  420. </HBox.margin>
  421. </Label>
  422. </children>
  423. <GridPane.margin>
  424. <Insets bottom="20.0" left="10.0" right="20.0" top="20.0" />
  425. </GridPane.margin>
  426. </HBox>
  427. <HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1" GridPane.columnSpan="4" GridPane.rowIndex="1">
  428. <children>
  429. <Label fx:id="category2" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="LEFT_TO_RIGHT" prefHeight="75.0" prefWidth="1900.0" snapToPixel="false" text="Category 2" />
  430. </children>
  431. <GridPane.margin>
  432. <Insets bottom="20.0" left="10.0" right="20.0" top="20.0" />
  433. </GridPane.margin>
  434. </HBox>
  435. <HBox layoutX="90.0" layoutY="142.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1" GridPane.columnSpan="4" GridPane.rowIndex="2">
  436. <children>
  437. <Label fx:id="category3" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="LEFT_TO_RIGHT" prefHeight="75.0" prefWidth="1900.0" snapToPixel="false" text="Category 3" />
  438. </children>
  439. <GridPane.margin>
  440. <Insets bottom="20.0" left="10.0" right="20.0" top="20.0" />
  441. </GridPane.margin>
  442. </HBox>
  443. <HBox layoutX="90.0" layoutY="255.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1" GridPane.columnSpan="4" GridPane.rowIndex="3">
  444. <children>
  445. <Label fx:id="category4" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="LEFT_TO_RIGHT" prefHeight="75.0" prefWidth="1900.0" snapToPixel="false" text="Category 4" />
  446. </children>
  447. <GridPane.margin>
  448. <Insets bottom="20.0" left="10.0" right="20.0" top="20.0" />
  449. </GridPane.margin>
  450. </HBox>
  451. <HBox layoutX="90.0" layoutY="368.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1" GridPane.columnSpan="4" GridPane.rowIndex="4">
  452. <children>
  453. <Label fx:id="category5" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="LEFT_TO_RIGHT" prefHeight="75.0" prefWidth="1900.0" snapToPixel="false" text="Category 5" />
  454. </children>
  455. <GridPane.margin>
  456. <Insets bottom="20.0" left="10.0" right="20.0" top="20.0" />
  457. </GridPane.margin>
  458. </HBox>
  459. <HBox layoutX="90.0" layoutY="481.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1" GridPane.columnSpan="4" GridPane.rowIndex="5">
  460. <children>
  461. <Label fx:id="category6" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="LEFT_TO_RIGHT" prefHeight="75.0" prefWidth="1900.0" snapToPixel="false" text="Category 6" />
  462. </children>
  463. <GridPane.margin>
  464. <Insets bottom="20.0" left="10.0" right="20.0" top="20.0" />
  465. </GridPane.margin>
  466. </HBox>
  467. <HBox layoutX="90.0" layoutY="593.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1" GridPane.columnSpan="4" GridPane.rowIndex="6">
  468. <children>
  469. <Label fx:id="category7" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="LEFT_TO_RIGHT" prefHeight="75.0" prefWidth="1900.0" snapToPixel="false" text="Category 7" />
  470. </children>
  471. <GridPane.margin>
  472. <Insets bottom="20.0" left="10.0" right="20.0" top="20.0" />
  473. </GridPane.margin>
  474. </HBox>
  475. <HBox layoutX="90.0" layoutY="705.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1" GridPane.columnSpan="4" GridPane.rowIndex="7">
  476. <children>
  477. <Label fx:id="category8" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="LEFT_TO_RIGHT" prefHeight="75.0" prefWidth="1900.0" snapToPixel="false" text="Category 8" />
  478. </children>
  479. <GridPane.margin>
  480. <Insets bottom="20.0" left="10.0" right="20.0" top="20.0" />
  481. </GridPane.margin>
  482. </HBox>
  483. </children>
  484. </GridPane>
  485. </children>
  486. </AnchorPane>
  487.  
  488. sizeX = button1.getParent().getLayoutBounds().getWidth();
  489. sizeY = button1.getParent().getLayoutBounds().getHeight();
Add Comment
Please, Sign In to add comment