Commit 12fac19f authored by Stefan Michel's avatar Stefan Michel

- kleinere Code-verbesserungen

parent 75c6b575
......@@ -118,9 +118,11 @@ public class MainViewCreationFX extends VBox {
String returnType = method.getReturnType().getSimpleName();
String methodName = method.getName();
Class<?>[] parameterTypes = method.getParameterTypes();
StringBuffer result = new StringBuffer();
// StringBuilder, da schneller
StringBuilder result = new StringBuilder();
result.append(returnType + " " + methodName + "(");
// mehrere append calls, da schneller als String concatenation
result.append(returnType).append(" ").append(methodName).append("(");
for (int i = 0; i < parameterTypes.length; i++) {
result.append(parameterTypes[i].getSimpleName());
if (i < parameterTypes.length - 1) {
......@@ -136,9 +138,8 @@ public class MainViewCreationFX extends VBox {
}
});
territoriumPanel.getHamster().setOnContextMenuRequested(event -> {
contextMenu.show(territoriumPanel.getHamster(), Side.RIGHT, 0, 0);
});
territoriumPanel.getHamster().setOnContextMenuRequested(event ->
contextMenu.show(territoriumPanel.getHamster(), Side.RIGHT, 0, 0));
}
public void setUpTextArea() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment