Skip to content

Commit

Permalink
Minor whitespace/style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ad1217 committed Mar 3, 2017
1 parent 9d74f75 commit 4775c3d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 39 deletions.
40 changes: 7 additions & 33 deletions src/main/java/app/display/MapAdminController.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public enum State {
}

State currentState = State.NONE;
// MapAdminDisplay display;
GraphNode selectedNode;
List<GraphNode> highlightedNodes;
GraphNode secondaryNode;
Expand Down Expand Up @@ -1042,10 +1041,11 @@ public void selectNode(GraphNode node) {
buttonDeleteElevator.setDisable(selectedNode == null ||
!selectedNode.doesCrossFloor());

defaultKioskButton.setDisable(selectedNode == null ||
map.getRoomFromNode(selectedNode) == null ||
(map.getKioskLocation() != null &&
selectedNode.getLocation().equals(map.getKioskLocation().getLocation())));
defaultKioskButton.setDisable(
selectedNode == null ||
map.getRoomFromNode(selectedNode) == null ||
(map.getKioskLocation() != null &&
selectedNode.getLocation().equals(map.getKioskLocation().getLocation())));
}

/**
Expand Down Expand Up @@ -1360,40 +1360,14 @@ private void setMap(String loc){
public void showContextMenu(ContextMenuEvent event){
contextEvent = event;
selectNode(nearbyNodeContext(contextEvent));


// ContextMenu contextMenu = new ContextMenu();
//
// contextMenu.setOnShowing(new EventHandler<WindowEvent>() {
// public void handle(WindowEvent e) {
// }
// });
// contextMenu.setOnShown(new EventHandler<WindowEvent>() {
// public void handle(WindowEvent e) {
// }
// });
//
// MenuItem item1 = new MenuItem("About");
// item1.setStyle("MapAdminContextMenu");
// item1.setOnAction(new EventHandler<ActionEvent>() {
// public void handle(ActionEvent e) {
// }
// });
// MenuItem item2 = new MenuItem("Preferences");
// item2.setStyle("fx-background-image: red");
// item2.setOnAction(new EventHandler<ActionEvent>() {
// public void handle(ActionEvent e) {
// }
// });
// contextMenu.getItems().addAll(item1, item2);
Shape circle = new Circle(event.getX(), event.getY(), 10);
circle.setVisible(false);
mapPane.getChildren().add(circle);
if(selectedNode != null){
nodeMenu.show(circle,event.getScreenX(), event.getScreenY());
}else{
}
else{
screenMenu.show(circle, event.getScreenX(), event.getScreenY());
}

}
}
11 changes: 5 additions & 6 deletions src/main/java/app/display/PatientController.java
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public void exitSearch(){
mapTabs.setVisible(true);
searchBar.setPromptText("Search");
this.displayState = state.PATIENT_DEFAULT;
revertState(new PatientMemento(defaultFloor));
revertState(new PatientMemento(defaultFloor));
}
}

Expand Down Expand Up @@ -339,8 +339,8 @@ public List<String> search(String searchTerm) {
if (((int)searchTerm.charAt(0)) < 58 && ((int)searchTerm.charAt(0)) > 47){
return map.searchRoom(searchTerm);
}
// if the first letter is not a number, search for entries first, then add all the rooms
// to the bottom of the list
// if the first letter is not a number, search for entries first, then add all the rooms
// to the bottom of the list
else{
String lowerCaseSearch = searchTerm.toLowerCase();
List<String> results = map.searchEntry(lowerCaseSearch) ;
Expand Down Expand Up @@ -410,7 +410,7 @@ public void selectPatientImage(MouseEvent e){
if (e.getSource() instanceof Button) {
Button temp = (Button) e.getSource();
currentMap = temp.getId();
displayPatientMap(currentMap, temp);
displayPatientMap(currentMap, temp);
}
}

Expand Down Expand Up @@ -755,8 +755,7 @@ public void drawRoomLabel (String floorName, ImageView imageView) {
List<String> roomNames= map.getAllRooms();
String kiosk = map.getKiosk();
for (String roomName : roomNames) {
Room
cur = map.getRoomFromName(roomName);
Room cur = map.getRoomFromName(roomName);
GraphNode loc = cur.getLocation();
// skip rooms without locations
if (loc == null || ! loc.getLocation().getFloor().equals(floorName)) {
Expand Down

0 comments on commit 4775c3d

Please sign in to comment.