Modified key bindings can be saved to use in a race.

- new key bindings replace old new bindings on save
- javadoc save method and small updates

#story[1197]
main
Jessica Syder 8 years ago
parent 278fb65852
commit 3e720a9e16

@ -91,7 +91,7 @@ public class KeyBindingsController {
}
/**
* Makes a copy of the keyfactory that does not modify the original.
* Makes a copy of the {@link KeyFactory} that does not modify the original.
* @return new keyfactory to be modified
*/
public KeyFactory copyExistingFactory(){
@ -109,7 +109,8 @@ public class KeyBindingsController {
/**
* Creates a listener for the base anchorpane for key presses.
* It updates the current key bindings if required.
* It updates the current key bindings of the {@link KeyFactory} if
* required.
*/
public void setKeyListener(){
anchor.addEventFilter(KeyEvent.KEY_PRESSED, event -> {
@ -150,8 +151,11 @@ public class KeyBindingsController {
System.out.println("reset clicked");
}
/**
* Replace existing {@link KeyFactory} with the modified key bindings.
*/
public void save(){
System.out.println("save clicked");
keyFactory = newKeyFactory;
}
}

Loading…
Cancel
Save