Implemented ContactSearchScene completely
additionally added default keyboard shortcuts for all buttons
This commit is contained in:
		@@ -24,14 +24,17 @@
 | 
			
		||||
	<children>
 | 
			
		||||
		<ListView fx:id="userList" onMouseClicked="#userListClicked" prefHeight="211.0" prefWidth="300.0" GridPane.rowIndex="1" GridPane.rowSpan="2147483647" />
 | 
			
		||||
		<Label fx:id="contactLabel" prefHeight="16.0" prefWidth="250.0" text="Select a contact to chat with" GridPane.columnSpan="2" />
 | 
			
		||||
		<Button fx:id="settingsButton" mnemonicParsing="false" onAction="#settingsButtonClicked" text="Settings" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER"/>
 | 
			
		||||
		<Button fx:id="settingsButton" mnemonicParsing="true" onAction="#settingsButtonClicked" text="_Settings" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
 | 
			
		||||
		<ListView fx:id="messageList" prefHeight="257.0" prefWidth="155.0" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="1" GridPane.rowSpan="2" />
 | 
			
		||||
		<Button fx:id="postButton" defaultButton="true" disable="true" mnemonicParsing="false" onAction="#postButtonClicked" prefHeight="10.0" prefWidth="65.0" text="Post" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER" />
 | 
			
		||||
      	<TextArea fx:id="messageTextArea" onKeyReleased="#messageTextUpdated" onInputMethodTextChanged="#messageTextUpdated" prefHeight="200.0" prefWidth="200.0" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="3" />
 | 
			
		||||
      <Button mnemonicParsing="false" text="Add Contacts" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER">
 | 
			
		||||
		<Button fx:id="postButton" defaultButton="true" disable="true" mnemonicParsing="true" onAction="#postButtonClicked" prefHeight="10.0" prefWidth="65.0" text="_Post" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER" />
 | 
			
		||||
      	<TextArea fx:id="messageTextArea" disable="true" onInputMethodTextChanged="#messageTextUpdated" onKeyReleased="#messageTextUpdated" prefHeight="200.0" prefWidth="200.0" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="3" />
 | 
			
		||||
      <Button mnemonicParsing="true" onAction="#addContactButtonClicked" text="_Add Contacts" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER">
 | 
			
		||||
         <padding>
 | 
			
		||||
            <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
 | 
			
		||||
         </padding>
 | 
			
		||||
         <GridPane.margin>
 | 
			
		||||
            <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
 | 
			
		||||
         </GridPane.margin>
 | 
			
		||||
      </Button>
 | 
			
		||||
	</children>
 | 
			
		||||
</GridPane>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,67 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
 | 
			
		||||
<?import javafx.geometry.Insets?>
 | 
			
		||||
<?import javafx.scene.control.Button?>
 | 
			
		||||
<?import javafx.scene.control.ListView?>
 | 
			
		||||
<?import javafx.scene.control.TextField?>
 | 
			
		||||
<?import javafx.scene.control.Tooltip?>
 | 
			
		||||
<?import javafx.scene.layout.HBox?>
 | 
			
		||||
<?import javafx.scene.layout.Pane?>
 | 
			
		||||
<?import javafx.scene.layout.VBox?>
 | 
			
		||||
 | 
			
		||||
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="envoy.client.ui.ContactSearchSceneController"
 | 
			
		||||
	<!-- TODO Add Nodes -->
 | 
			
		||||
</VBox>
 | 
			
		||||
 | 
			
		||||
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="envoy.client.ui.ContactSearchSceneController">
 | 
			
		||||
   <children>
 | 
			
		||||
      <HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
 | 
			
		||||
         <children>
 | 
			
		||||
            <TextField fx:id="searchBar" onInputMethodTextChanged="#checkClearButton" onKeyTyped="#checkClearButton" prefColumnCount="22" promptText="Enter username to search for">
 | 
			
		||||
               <HBox.margin>
 | 
			
		||||
                  <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
 | 
			
		||||
               </HBox.margin>
 | 
			
		||||
               <padding>
 | 
			
		||||
                  <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
 | 
			
		||||
               </padding>
 | 
			
		||||
               <tooltip>
 | 
			
		||||
                  <Tooltip text="Enter a name. If an account by that name exists, it will be displayed below." wrapText="true" />
 | 
			
		||||
               </tooltip>
 | 
			
		||||
            </TextField>
 | 
			
		||||
            <Button fx:id="clearButton" disable="true" mnemonicParsing="true" onAction="#clear" text="Clea_r">
 | 
			
		||||
               <tooltip>
 | 
			
		||||
                  <Tooltip autoHide="true" text="Clears the text to the left and the elements below" wrapText="true" />
 | 
			
		||||
               </tooltip>
 | 
			
		||||
            </Button>
 | 
			
		||||
            <Pane disable="true" maxWidth="20.0" prefWidth="20.0" visible="false">
 | 
			
		||||
               <HBox.margin>
 | 
			
		||||
                  <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
 | 
			
		||||
               </HBox.margin>
 | 
			
		||||
               <padding>
 | 
			
		||||
                  <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
 | 
			
		||||
               </padding>
 | 
			
		||||
            </Pane>
 | 
			
		||||
            <Button fx:id="searchButton" disable="true" defaultButton="true" mnemonicParsing="true" onAction="#suggestContacts" prefHeight="26.0" prefWidth="71.0" text="_Search" textOverrun="LEADING_WORD_ELLIPSIS">
 | 
			
		||||
               <padding>
 | 
			
		||||
                  <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
 | 
			
		||||
               </padding>
 | 
			
		||||
               <HBox.margin>
 | 
			
		||||
                  <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
 | 
			
		||||
               </HBox.margin>
 | 
			
		||||
               <tooltip>
 | 
			
		||||
                  <Tooltip autoHide="true" text="Search for accounts with the name entered to the left" wrapText="true" />
 | 
			
		||||
               </tooltip>
 | 
			
		||||
            </Button>
 | 
			
		||||
         </children>
 | 
			
		||||
      </HBox>
 | 
			
		||||
      <ListView fx:id="contactList" onMouseClicked="#contactListClicked" prefHeight="314.0" prefWidth="600.0" />
 | 
			
		||||
      <Button fx:id="backButton" cancelButton="true" mnemonicParsing="true" onAction="#backButtonClicked" text="_Back">
 | 
			
		||||
         <VBox.margin>
 | 
			
		||||
            <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
 | 
			
		||||
         </VBox.margin>
 | 
			
		||||
         <padding>
 | 
			
		||||
            <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
 | 
			
		||||
         </padding>
 | 
			
		||||
         <tooltip>
 | 
			
		||||
            <Tooltip autoHide="true" text="Takes you back to the screen where you can chat with others" wrapText="true" />
 | 
			
		||||
         </tooltip>
 | 
			
		||||
      </Button>
 | 
			
		||||
   </children>
 | 
			
		||||
</VBox>
 | 
			
		||||
 
 | 
			
		||||
@@ -36,12 +36,12 @@
 | 
			
		||||
						<Label fx:id="repeatPasswordLabel" text="Repeat Password:" visible="false" GridPane.rowIndex="2" />
 | 
			
		||||
						<TextField fx:id="userTextField" GridPane.columnIndex="1" />
 | 
			
		||||
						<PasswordField fx:id="passwordField" GridPane.columnIndex="1" GridPane.rowIndex="1" />
 | 
			
		||||
						<PasswordField fx:id="repeatPasswordField" visible="false" GridPane.columnIndex="1" GridPane.rowIndex="2" />
 | 
			
		||||
						<PasswordField fx:id="repeatPasswordField" promptText="Repeat the chosen password" visible="false" GridPane.columnIndex="1" GridPane.rowIndex="2" />
 | 
			
		||||
					</children>
 | 
			
		||||
				</GridPane>
 | 
			
		||||
				<CheckBox fx:id="registerCheckBox" mnemonicParsing="false" onAction="#registerCheckboxChanged" prefHeight="17.0" prefWidth="181.0" text="Register" />
 | 
			
		||||
				<CheckBox fx:id="registerCheckBox" mnemonicParsing="true" onAction="#registerCheckboxChanged" prefHeight="17.0" prefWidth="181.0" text="_Register" />
 | 
			
		||||
            <Label fx:id="connectionLabel" />
 | 
			
		||||
            <CheckBox fx:id="offlineCheckBox" layoutX="20.0" layoutY="144.0" mnemonicParsing="false" prefHeight="17.0" prefWidth="181.0" text="Offline mode" />
 | 
			
		||||
            <CheckBox fx:id="offlineCheckBox" layoutX="20.0" layoutY="144.0" mnemonicParsing="true" prefHeight="17.0" prefWidth="181.0" text="_Offline mode" />
 | 
			
		||||
			</children>
 | 
			
		||||
		</VBox>
 | 
			
		||||
	</content>
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@
 | 
			
		||||
            <TitledPane fx:id="titledPane" collapsible="false" prefHeight="200.0" prefWidth="200.0" />
 | 
			
		||||
         </children>
 | 
			
		||||
		</HBox>
 | 
			
		||||
      <Button defaultButton="true" mnemonicParsing="false" onMouseClicked="#backButtonClicked" text="Back">
 | 
			
		||||
      <Button defaultButton="true" mnemonicParsing="true" onMouseClicked="#backButtonClicked" text="_Back">
 | 
			
		||||
         <opaqueInsets>
 | 
			
		||||
            <Insets />
 | 
			
		||||
         </opaqueInsets>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user