Skip to content

Commit

Permalink
Merge pull request #80 from WPI-CS3733-C17-Gamma/fixInitialSearchState
Browse files Browse the repository at this point in the history
Fix initial search state
  • Loading branch information
ad1217 authored Feb 17, 2017
2 parents d237c43 + bb0c140 commit 3b8d93a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/main/java/PatientController.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public void displayImage() {
public void startSearch(){
if (this.displayState == state.PATIENT_DEFAULT){//switch state
searchAnchorPane.setVisible(true);
patientImageView.setImage(imageView.getImage());
this.displayState = state.PATIENT_SEARCH;
displayImage();
}
Expand All @@ -126,6 +127,7 @@ public void exitSearch(){
*/
public void search () {
clearSearchDisplay();
patientImageView.setImage(imageView.getImage());
String search = searchBar.getText();
if (!search.isEmpty()) {
options.setVisible(true);
Expand Down
9 changes: 7 additions & 2 deletions src/main/resources/PatientDisplay.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,19 @@
</ImageView>
<Button fx:id="help" layoutX="825.0" layoutY="14.0" mnemonicParsing="false" onAction="#help" onKeyPressed="#help" prefHeight="50.0" prefWidth="50.0" styleClass="helpButton" stylesheets="@design.css" />
<Button fx:id="adminButton" layoutX="915.0" layoutY="14.0" mnemonicParsing="false" onAction="#logIn" prefHeight="50.0" prefWidth="50.0" styleClass="adminMenuButton" stylesheets="@design.css" />
<AnchorPane fx:id="searchAnchorPane" layoutY="-4.0" prefHeight="607.0" prefWidth="1000.0" styleClass="patientBackground" stylesheets="@design.css" visible="false">
<AnchorPane fx:id="searchAnchorPane" prefHeight="600.0" prefWidth="1000.0" styleClass="patientBackground" stylesheets="@design.css" visible="false">
<children>
<ImageView fx:id="patientImageView" fitHeight="558.0" fitWidth="945.0" layoutX="20.0" layoutY="14.0" pickOnBounds="true" preserveRatio="true" />
<ImageView fx:id="patientImageView" fitHeight="454.0" fitWidth="800.0" layoutX="100.0" layoutY="103.0" pickOnBounds="true" preserveRatio="true" />
<Button fx:id="exitButton" layoutX="940.0" mnemonicParsing="false" onAction="#exitSearch" prefHeight="33.0" prefWidth="47.0" styleClass="exitButton" stylesheets="@design.css" text="X" />
<Label fx:id="textDirectionsTextBox" alignment="TOP_LEFT" layoutX="738.0" layoutY="65.0" prefHeight="390.0" prefWidth="248.0" styleClass="textDirection" stylesheets="@design.css" text="Test Directions Please Ignore" visible="false" wrapText="true" />
<Button layoutX="870.0" layoutY="544.0" mnemonicParsing="false" onAction="#hideMultiMapAnimation" text="Hide Menu" />
<Button fx:id="testtest" layoutX="868.0" layoutY="496.0" mnemonicParsing="false" onAction="#showMultiMapAnimation" text="Show Menu" />
<Button fx:id="TextDirection" layoutX="808.0" layoutY="437.0" mnemonicParsing="false" onMousePressed="#textDirection" text="Show Text Direction" visible="false" />
<ImageView fitHeight="57.0" fitWidth="374.0" layoutX="343.0" layoutY="22.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@BWFH_logo_rgb%20(1).png" />
</image>
</ImageView>
</children>
</AnchorPane>
<TextField fx:id="searchBar" layoutX="24.0" layoutY="26.0" onKeyReleased="#search" onMousePressed="#startSearch" prefHeight="47.0" prefWidth="248.0" promptText="Search!" style="-fx-border-radius: 20; -fx-background-radius: 20;" styleClass="search" stylesheets="@design.css">
Expand Down

0 comments on commit 3b8d93a

Please sign in to comment.