Merged with remote changes

This commit is contained in:
Calum
2017-09-04 23:42:10 +12:00
parent a1e3ec54c7
commit e4dbbd05c7
7 changed files with 86 additions and 54 deletions
@@ -24,9 +24,18 @@ public class ChatHistory extends ScrollPane {
this.setMaxWidth(Double.MAX_VALUE);
this.setVbarPolicy(ScrollBarPolicy.ALWAYS);
this.setHbarPolicy(ScrollBarPolicy.NEVER);
textFlow.getChildren().addListener((ListChangeListener<Node>) c -> {
this.setVvalue(1.0);
});
//This makes the window auto scroll.
textFlow.getChildren().addListener((ListChangeListener<Node>) c ->
this.setVvalue(1.0)
);
//This just makes it so that the ChatHistory is on focus it passes it off to the parent.
this.parentProperty().addListener((obs, old, parent) ->
this.focusedProperty().addListener((obsVal, oldVal, onFocus) -> {
if (onFocus) {
parent.requestFocus();
}
})
);
}
/**