Code formating

This commit is contained in:
Laurent Clouet
2017-01-05 09:35:59 +01:00
parent 52e5f190c7
commit 2f00d7816d
12 changed files with 27 additions and 28 deletions

View File

@@ -31,9 +31,9 @@ public class GuiText implements Gui {
public static final String type = "text";
private int framesRendered;
private int sigIntCount = 0;
private Log log;
private Client client;
@@ -46,12 +46,12 @@ public class GuiText implements Gui {
@Override
public void start() {
if (client != null) {
Signal.handle(new Signal("INT"), new SignalHandler() {
@Override
public void handle(Signal signal) {
sigIntCount++;
if (sigIntCount == 4) {
// This is only for ugly issues that might occur
System.out.println("WARNING: Hitting Ctrl-C again will force close the application.");
@@ -70,7 +70,7 @@ public class GuiText implements Gui {
}
}
});
client.run();
client.stop();
}

View File

@@ -34,10 +34,10 @@ public class GuiTextOneLine implements Gui {
private int remaining;
private String creditsEarned;
private int sigIntCount = 0;
private String status;
private String line;
private boolean exiting = false;
private Client client;
@@ -54,12 +54,12 @@ public class GuiTextOneLine implements Gui {
@Override
public void start() {
if (client != null) {
Signal.handle(new Signal("INT"), new SignalHandler() {
@Override
public void handle(Signal signal) {
sigIntCount++;
if (sigIntCount == 5) {
Signal.raise(new Signal("INT"));
Runtime.getRuntime().halt(0);
@@ -74,7 +74,7 @@ public class GuiTextOneLine implements Gui {
}
}
});
client.run();
client.stop();
}

View File

@@ -185,7 +185,6 @@ public class Working implements Activity {
buttonsPanel.add(blockJob);
buttonsPanel.add(exitAfterFrame);
parent.getContentPane().setLayout(new GridBagLayout());
GridBagConstraints global_constraints = new GridBagConstraints();
global_constraints.fill = GridBagConstraints.HORIZONTAL;