Record game histories. Compute user stats and show them in the user panel.

This commit is contained in:
Me Car 2016-01-20 12:47:58 +09:00
parent 9f3e2aa4c4
commit 550648ccbe
22 changed files with 866 additions and 60 deletions

View file

@ -61,7 +61,7 @@ public class PlayersChatPanel extends javax.swing.JPanel {
private final List<String> players = new ArrayList<>();
private final UserTableModel userTableModel;
private static final int[] defaultColumnsWidth = {20, 100, 100, 80, 80};
private static final int[] defaultColumnsWidth = {20, 100, 100, 100, 80, 80};
/*
@ -118,7 +118,7 @@ public class PlayersChatPanel extends javax.swing.JPanel {
class UserTableModel extends AbstractTableModel {
private final String[] columnNames = new String[]{"Loc", "Players", "Info", "Games", "Connection"};
private final String[] columnNames = new String[]{"Loc", "Players", "History", "Info", "Games", "Connection"};
private UsersView[] players = new UsersView[0];
public void loadData(Collection<RoomUsersView> roomUserInfoList) throws MageRemoteException {
@ -154,10 +154,12 @@ public class PlayersChatPanel extends javax.swing.JPanel {
case 1:
return players[arg0].getUserName();
case 2:
return players[arg0].getInfoState();
return players[arg0].getHistory();
case 3:
return players[arg0].getInfoGames();
return players[arg0].getInfoState();
case 4:
return players[arg0].getInfoGames();
case 5:
return players[arg0].getInfoPing();
}
return "";