Java Doc and CodeStyle improvements
This commit is contained in:
parent
c9aed1affd
commit
6d6b9f1564
|
@ -17,21 +17,31 @@ import java.io.IOException;
|
|||
|
||||
import static ch.zhaw.pm2.multichat.protocol.ConnectionHandler.State.*;
|
||||
|
||||
|
||||
public class ChatWindowController {
|
||||
private ClientConnectionHandler connectionHandler;
|
||||
private ClientMessageList messages;
|
||||
|
||||
private final WindowCloseHandler windowCloseHandler = new WindowCloseHandler();
|
||||
|
||||
@FXML private Pane rootPane;
|
||||
@FXML private TextField serverAddressField;
|
||||
@FXML private TextField serverPortField;
|
||||
@FXML private TextField userNameField;
|
||||
@FXML private TextField messageField;
|
||||
@FXML private TextArea messageArea;
|
||||
@FXML private Button connectButton;
|
||||
@FXML private Button sendButton;
|
||||
@FXML private TextField filterValue;
|
||||
@FXML
|
||||
private Pane rootPane;
|
||||
@FXML
|
||||
private TextField serverAddressField;
|
||||
@FXML
|
||||
private TextField serverPortField;
|
||||
@FXML
|
||||
private TextField userNameField;
|
||||
@FXML
|
||||
private TextField messageField;
|
||||
@FXML
|
||||
private TextArea messageArea;
|
||||
@FXML
|
||||
private Button connectButton;
|
||||
@FXML
|
||||
private Button sendButton;
|
||||
@FXML
|
||||
private TextField filterValue;
|
||||
|
||||
|
||||
@FXML
|
||||
|
@ -64,6 +74,7 @@ public class ChatWindowController {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void connect() {
|
||||
try {
|
||||
messages.clear(); // clear message list
|
||||
|
@ -74,6 +85,9 @@ public class ChatWindowController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates disconnecting of the connectionHandler, also checks if connectionHandler is avaible.
|
||||
*/
|
||||
private void disconnect() {
|
||||
if (connectionHandler == null) {
|
||||
addError("No connection handler");
|
||||
|
@ -86,6 +100,9 @@ public class ChatWindowController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@FXML
|
||||
private void message() {
|
||||
String messageString = messageField.getText().strip();
|
||||
|
@ -205,6 +222,7 @@ public class ChatWindowController {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
private void messageListener() {
|
||||
messages.getChangedProperty().addListener(new ChangeListener<Boolean>() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue