merged updateInfo and update in GamePanel

master
melvin 2011-07-26 11:27:31 +08:00
parent 6eaaac3eb3
commit 01f7dfbf85
2 changed files with 10 additions and 13 deletions

View File

@ -291,7 +291,6 @@ public class GameController {
//SwingUtilities.invokeLater(new Runnable() {
invokeAndWait(new Runnable() {
public void run() {
gamePanel.updateInfo();
gamePanel.update();
}
});
@ -300,7 +299,9 @@ public class GameController {
public void invokeAndWait(final Runnable task) {
if (SwingUtilities.isEventDispatchThread()) {
task.run();
} else {
return;
}
try {
SwingUtilities.invokeAndWait(task);
} catch (InterruptedException err) {
@ -309,7 +310,6 @@ public class GameController {
throw new RuntimeException(err.getMessage());
}
}
}
public String getMessageWithSource(final MagicSource source,final String message) {
if (source==null) {

View File

@ -306,11 +306,8 @@ public final class GamePanel extends JPanel {
}
}
public void updateInfo() {
viewerInfo.update(game);
}
public void update() {
viewerInfo.update(game);
playerViewer.update();
opponentViewer.update();
gameTournamentViewer.update();