BrowserWindow.fxml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (c) 2015, 2019, Gluon and/or its affiliates.
  4. All rights reserved. Use is subject to license terms.
  5. This file is available and licensed under the following license:
  6. Redistribution and use in source and binary forms, with or without
  7. modification, are permitted provided that the following conditions
  8. are met:
  9. - Redistributions of source code must retain the above copyright
  10. notice, this list of conditions and the following disclaimer.
  11. - Redistributions in binary form must reproduce the above copyright
  12. notice, this list of conditions and the following disclaimer in
  13. the documentation and/or other materials provided with the distribution.
  14. - Neither the name of Oracle Corporation nor the names of its
  15. contributors may be used to endorse or promote products derived
  16. from this software without specific prior written permission.
  17. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  20. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  21. OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  22. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  23. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  24. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  25. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  27. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. -->
  29. <?import java.lang.String?>
  30. <?import javafx.geometry.Insets?>
  31. <?import javafx.scene.Cursor?>
  32. <?import javafx.scene.control.Label?>
  33. <?import javafx.scene.control.Menu?>
  34. <?import javafx.scene.control.MenuBar?>
  35. <?import javafx.scene.control.MenuItem?>
  36. <?import javafx.scene.control.ScrollPane?>
  37. <?import javafx.scene.control.SplitPane?>
  38. <?import javafx.scene.control.TextArea?>
  39. <?import javafx.scene.control.TextField?>
  40. <?import javafx.scene.image.ImageView?>
  41. <?import javafx.scene.layout.AnchorPane?>
  42. <?import javafx.scene.layout.FlowPane?>
  43. <?import javafx.scene.layout.HBox?>
  44. <?import javafx.scene.layout.Pane?>
  45. <?import javafx.scene.layout.VBox?>
  46. <?import javafx.scene.paint.Color?>
  47. <?import javafx.scene.shape.Polyline?>
  48. <?import javafx.scene.text.Font?>
  49. <?import javafx.scene.text.TextFlow?>
  50. <VBox prefHeight="600.0" prefWidth="900.0" style="-fx-background-color: #121212;" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.moviesdb.BrowserController">
  51. <children>
  52. <AnchorPane prefHeight="25.0" prefWidth="900.0">
  53. <children>
  54. <MenuBar fx:id="menuPane" prefHeight="25.0" prefWidth="827.0" style="-fx-background-color: #121212; -fx-text-fill: #9f9f9f;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="73.0">
  55. <menus>
  56. <Menu mnemonicParsing="false" text="File">
  57. <items>
  58. <MenuItem mnemonicParsing="false" onAction="#openStatsStudioForm" text="Studio stats" />
  59. <MenuItem fx:id="statsMenu" mnemonicParsing="false" onAction="#openStatsGenreForm" text="Genre stats" />
  60. <MenuItem fx:id="reloadMenu" mnemonicParsing="false" onAction="#loadPosters" text="Reload" />
  61. <MenuItem mnemonicParsing="false" onAction="#closeStage" text="Close" />
  62. </items>
  63. </Menu>
  64. <Menu mnemonicParsing="false" text="Edit">
  65. <items>
  66. <MenuItem fx:id="addMenu" mnemonicParsing="false" onAction="#openAddForm" text="Add" />
  67. </items>
  68. </Menu>
  69. <Menu mnemonicParsing="false" text="Help">
  70. <items>
  71. <MenuItem mnemonicParsing="false" text="About" />
  72. </items>
  73. </Menu>
  74. </menus>
  75. </MenuBar>
  76. <Label fx:id="closeButton" layoutX="876.0" layoutY="4.0" onMouseClicked="#closeStage" prefHeight="16.0" prefWidth="16.0" AnchorPane.rightAnchor="8.0" AnchorPane.topAnchor="4.0" />
  77. <Label fx:id="maximizeButton" layoutX="854.0" layoutY="4.0" onMouseClicked="#maximizeStageChange" prefHeight="16.0" prefWidth="16.0" AnchorPane.rightAnchor="30.0" AnchorPane.topAnchor="4.0" />
  78. <Label fx:id="minimizeButton" layoutX="832.0" layoutY="4.0" onMouseClicked="#minimizeStage" prefHeight="16.0" prefWidth="16.0" AnchorPane.rightAnchor="52.0" AnchorPane.topAnchor="4.0" />
  79. </children>
  80. </AnchorPane>
  81. <SplitPane dividerPositions="0.3392857142857143, 0.9955357142857143" focusTraversable="true" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="-1.0" prefWidth="-1.0" style="-fx-background-color: #121212; -fx-border-color: #121212;" stylesheets="@style.css" VBox.vgrow="ALWAYS">
  82. <items>
  83. <AnchorPane fx:id="filterPane" maxWidth="0.0" minWidth="300.0" prefHeight="550.0" prefWidth="120.0" style="-fx-background-color: #212121;" SplitPane.resizableWithParent="false">
  84. <children>
  85. <Label alignment="CENTER" layoutX="14.0" layoutY="14.0" minWidth="60.0" prefWidth="-1.0" style="&#10;" text="Filter" textAlignment="CENTER" wrapText="false">
  86. <font>
  87. <Font size="18.0" fx:id="x1" />
  88. </font>
  89. <textFill>
  90. <Color red="0.624" green="0.624" blue="0.624" fx:id="x2" />
  91. </textFill>
  92. </Label>
  93. <Label layoutX="24.0" layoutY="50.0" text="Name" textFill="#9f9f9f">
  94. <font>
  95. <Font size="14.0" />
  96. </font>
  97. </Label>
  98. <TextField fx:id="titleTextBox" layoutX="82.0" layoutY="48.0" onKeyTyped="#getFilterMovies" prefHeight="25.0" prefWidth="205.0" style="-fx-text-fill: #9f9f9f; -fx-background-color: #212121; -fx-border-color: #121212;" />
  99. <Label layoutX="24.0" layoutY="84.0" text="Genre" textFill="#9f9f9f">
  100. <font>
  101. <Font size="14.0" />
  102. </font>
  103. </Label>
  104. <TextField fx:id="genreTextBox" layoutX="82.0" layoutY="82.0" onKeyTyped="#getFilterMovies" prefHeight="25.0" prefWidth="205.0" style="-fx-text-fill: #9f9f9f; -fx-background-color: #212121; -fx-border-color: #121212;" />
  105. <Label layoutX="24.0" layoutY="118.0" text="Year" textFill="#9f9f9f">
  106. <font>
  107. <Font size="14.0" />
  108. </font>
  109. </Label>
  110. <TextField fx:id="yearTextBox" layoutX="82.0" layoutY="116.0" onKeyTyped="#getFilterMovies" prefHeight="25.0" prefWidth="205.0" style="-fx-text-fill: #9f9f9f; -fx-background-color: #212121; -fx-border-color: #121212;" />
  111. <Label layoutX="24.0" layoutY="152.0" text="Duration" textFill="#9f9f9f">
  112. <font>
  113. <Font size="14.0" />
  114. </font>
  115. </Label>
  116. <TextField fx:id="timeTextBox" layoutX="82.0" layoutY="150.0" onKeyTyped="#getFilterMovies" prefHeight="25.0" prefWidth="205.0" style="-fx-text-fill: #9f9f9f; -fx-background-color: #212121; -fx-border-color: #121212;" />
  117. <Label layoutX="24.0" layoutY="186.0" text="Studio" textFill="#9f9f9f">
  118. <font>
  119. <Font size="14.0" />
  120. </font>
  121. </Label>
  122. <TextField fx:id="studioTextBox" layoutX="82.0" layoutY="184.0" onKeyTyped="#getFilterMovies" prefHeight="25.0" prefWidth="205.0" style="-fx-text-fill: #9f9f9f; -fx-background-color: #212121; -fx-border-color: #121212;" />
  123. <Label layoutX="24.0" layoutY="220.0" text="Director" textFill="#9f9f9f">
  124. <font>
  125. <Font size="14.0" />
  126. </font>
  127. </Label>
  128. <TextField fx:id="directorTextBox" layoutX="82.0" layoutY="218.0" onKeyTyped="#getFilterMovies" prefHeight="25.0" prefWidth="205.0" style="-fx-text-fill: #9f9f9f; -fx-background-color: #212121; -fx-border-color: #121212;" />
  129. <Label layoutX="24.0" layoutY="254.0" text="Actor" textFill="#9f9f9f">
  130. <font>
  131. <Font size="14.0" />
  132. </font>
  133. </Label>
  134. <Label layoutX="24.0" layoutY="288.0" text="Role" textFill="#9f9f9f">
  135. <font>
  136. <Font size="14.0" />
  137. </font>
  138. </Label>
  139. <TextField fx:id="roleTextBox" layoutX="82.0" layoutY="286.0" onKeyTyped="#getFilterMovies" prefHeight="25.0" prefWidth="205.0" style="-fx-text-fill: #9f9f9f; -fx-background-color: #212121; -fx-border-color: #121212;" />
  140. <Label layoutX="24.0" layoutY="322.0" text="Rating" textFill="#9f9f9f">
  141. <font>
  142. <Font size="14.0" />
  143. </font>
  144. </Label>
  145. <TextField fx:id="rateTextBox" layoutX="82.0" layoutY="320.0" onKeyTyped="#getFilterMovies" prefHeight="25.0" prefWidth="205.0" style="-fx-text-fill: #9f9f9f; -fx-background-color: #212121; -fx-border-color: #121212;" />
  146. <Label layoutX="24.0" layoutY="353.0" text="Desc" textFill="#9f9f9f">
  147. <font>
  148. <Font size="14.0" />
  149. </font>
  150. </Label>
  151. <TextArea fx:id="descriptionTextBox" layoutX="80.0" layoutY="353.0" minHeight="70.0" onKeyTyped="#getFilterMovies" prefHeight="162.0" prefWidth="209.0" style="-fx-text-fill: #9f9f9f; -fx-background-color: #212121; -fx-border-color: #212121;" stylesheets="@FilterBlockStyle.css" wrapText="true" AnchorPane.bottomAnchor="36.0" AnchorPane.topAnchor="353.0">
  152. <font>
  153. <Font size="14.0" />
  154. </font>
  155. </TextArea>
  156. <Label fx:id="filterButton" alignment="CENTER" layoutX="252.0" layoutY="519.0" onMouseClicked="#getFilterMovies" style="&#10;" text="Filter" textAlignment="CENTER" wrapText="false" AnchorPane.bottomAnchor="5.0" AnchorPane.rightAnchor="15.0">
  157. <font>
  158. <Font size="16.0" fx:id="x1111" />
  159. </font>
  160. <textFill>
  161. <Color red="0.624" green="0.624" blue="0.624" fx:id="x2111" />
  162. </textFill>
  163. </Label>
  164. <TextField fx:id="actorTextBox" layoutX="82.0" layoutY="252.0" onKeyTyped="#getFilterMovies" prefHeight="25.0" prefWidth="205.0" style="-fx-text-fill: #9f9f9f; -fx-background-color: #212121; -fx-border-color: #121212;" />
  165. </children>
  166. </AnchorPane>
  167. <AnchorPane id="Content" fx:id="browserPane" minHeight="-1.0" minWidth="-1.0" prefHeight="551.0" prefWidth="566.0" style="-fx-background-color: #212121;">
  168. <children>
  169. <Label alignment="CENTER" layoutX="11.0" layoutY="14.0" prefWidth="80.0" style="&#10;" text="Browser" textAlignment="CENTER" wrapText="false" AnchorPane.topAnchor="14.0">
  170. <font>
  171. <Font size="18.0" fx:id="x11" />
  172. </font>
  173. <textFill>
  174. <Color red="0.624" green="0.624" blue="0.624" fx:id="x21" />
  175. </textFill>
  176. </Label>
  177. <ScrollPane fx:id="scrollPane" fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" layoutX="14.0" layoutY="48.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="400.0" prefHeight="470.0" prefWidth="858.0" style="-fx-background-color: transparent; -fx-border-color: #212121;" vbarPolicy="NEVER" AnchorPane.bottomAnchor="31.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="8.0" AnchorPane.topAnchor="48.0">
  178. <styleClass>
  179. <String fx:value="split-pane" />
  180. <String fx:value="split-pane-divider" />
  181. </styleClass>
  182. <content>
  183. <AnchorPane prefHeight="200.0" prefWidth="200.0">
  184. <children>
  185. <FlowPane fx:id="moviesGrid" prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: #212121;" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0" />
  186. </children>
  187. </AnchorPane>
  188. </content>
  189. </ScrollPane>
  190. <Label alignment="CENTER" layoutX="11.0" layoutY="520.0" onMouseClicked="#openFilter" style="&#10;" text="Search" textAlignment="CENTER" wrapText="false" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="11.0">
  191. <font>
  192. <Font size="16.0" fx:id="x111" />
  193. </font>
  194. <textFill>
  195. <Color red="0.624" green="0.624" blue="0.624" fx:id="x211" />
  196. </textFill>
  197. </Label>
  198. </children>
  199. </AnchorPane>
  200. <AnchorPane fx:id="detailsPane" maxWidth="0.0" minWidth="0.0" prefHeight="550.0" prefWidth="318.0" style="-fx-background-color: #212121;" SplitPane.resizableWithParent="false">
  201. <children>
  202. <Label alignment="CENTER" font="$x1" layoutX="14.0" layoutY="14.0" style="&#10;" text="Details" textAlignment="CENTER" textFill="#9f9f9f" wrapText="false" />
  203. <ImageView fx:id="detailsPicPane" fitHeight="222.0" fitWidth="150.0" layoutX="14.0" layoutY="41.0" pickOnBounds="true" AnchorPane.bottomAnchor="287.0" AnchorPane.leftAnchor="75.0" AnchorPane.rightAnchor="75.0" AnchorPane.topAnchor="41.0" />
  204. <Label fx:id="detailsNameLabel" layoutX="14.0" layoutY="265.0" text="Info" textFill="#9f9f9f">
  205. <font>
  206. <Font size="16.0" />
  207. </font>
  208. </Label>
  209. <Label fx:id="deleteMovieButton" layoutX="-14.0" layoutY="528.0" onMouseClicked="#openDeleteForm" text="Delete" textFill="#9f9f9f" AnchorPane.bottomAnchor="14.0" AnchorPane.rightAnchor="14.0">
  210. <font>
  211. <Font size="16.0" />
  212. </font>
  213. </Label>
  214. <Label fx:id="editMovieButton" layoutX="212.0" layoutY="534.0" text="Edit" textFill="#9f9f9f" AnchorPane.bottomAnchor="14.0" AnchorPane.rightAnchor="71.0">
  215. <font>
  216. <Font size="16.0" />
  217. </font>
  218. </Label>
  219. <ScrollPane fitToHeight="true" fitToWidth="true" layoutX="14.0" layoutY="290.0" prefHeight="222.0" prefWidth="277.0" style="-fx-background-color: transparent;" AnchorPane.bottomAnchor="39.0" AnchorPane.topAnchor="290.0">
  220. <content>
  221. <TextFlow fx:id="detailsContent" prefHeight="222.0" prefWidth="277.0" style="-fx-background-color: #212121;" />
  222. </content>
  223. </ScrollPane>
  224. </children>
  225. </AnchorPane>
  226. </items>
  227. </SplitPane>
  228. <HBox id="HBox" alignment="CENTER_LEFT" spacing="5.0" VBox.vgrow="NEVER">
  229. <children>
  230. <Label fx:id="userLabel" maxHeight="1.7976931348623157E308" maxWidth="-1.0" style="-fx-background-color: #121212;" text="Logged in as Guest" HBox.hgrow="ALWAYS">
  231. <font>
  232. <Font size="11.0" fx:id="x3" />
  233. </font>
  234. <textFill>
  235. <Color red="0.625" green="0.625" blue="0.625" fx:id="x4" />
  236. </textFill>
  237. </Label>
  238. <Pane prefHeight="-1.0" prefWidth="-1.0" style="-fx-background-color: #121212;" HBox.hgrow="ALWAYS" />
  239. <Label fx:id="logInButton" font="$x3" maxWidth="-1.0" onMouseClicked="#openLoginForm" style="-fx-background-color: #121212;" text="Log in" textFill="$x4" HBox.hgrow="NEVER" />
  240. <Polyline fx:id="resizerPoly" fill="#9f9f9f" points="233.0, -3.0, 251.0, -20.0, 251.0, -3.0, 233.0, -3.0" strokeType="INSIDE">
  241. <cursor>
  242. <Cursor fx:constant="SE_RESIZE" />
  243. </cursor>
  244. </Polyline>
  245. </children>
  246. <padding>
  247. <Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
  248. </padding>
  249. </HBox>
  250. </children>
  251. </VBox>