mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
Added some tooltips to user table headers. History is shown in tournament player table now. Changed ratio column to numberic format.
This commit is contained in:
parent
82fed1ed87
commit
687ab7ec6b
18 changed files with 239 additions and 89 deletions
|
|
@ -128,6 +128,9 @@ import mage.remote.SessionImpl;
|
|||
import mage.utils.MageVersion;
|
||||
import mage.view.GameEndView;
|
||||
import mage.view.UserRequestMessage;
|
||||
import net.java.balloontip.BalloonTip;
|
||||
import net.java.balloontip.positioners.LeftAbovePositioner;
|
||||
import net.java.balloontip.styles.EdgedBalloonStyle;
|
||||
import net.java.truevfs.access.TArchiveDetector;
|
||||
import net.java.truevfs.access.TConfig;
|
||||
import net.java.truevfs.kernel.spec.FsAccessOption;
|
||||
|
|
@ -176,6 +179,8 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
|
||||
private static long startTime;
|
||||
|
||||
private BalloonTip balloonTip;
|
||||
|
||||
/**
|
||||
* @return the session
|
||||
*/
|
||||
|
|
@ -298,6 +303,10 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
}
|
||||
});
|
||||
|
||||
// balloonTip = new BalloonTip(desktopPane, "", new ModernBalloonStyle(0, 0, Color.WHITE, Color.YELLOW, Color.BLUE), false);
|
||||
balloonTip = new BalloonTip(desktopPane, "", new EdgedBalloonStyle(Color.WHITE, Color.BLUE), false);
|
||||
balloonTip.setPositioner(new LeftAbovePositioner(0, 0));
|
||||
|
||||
mageToolbar.add(new javax.swing.JToolBar.Separator());
|
||||
mageToolbar.add(createWindowsButton());
|
||||
|
||||
|
|
@ -352,6 +361,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
if (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_CHECK, "false").equals("true")) {
|
||||
checkForNewImages();
|
||||
}
|
||||
|
||||
updateMemUsageTask.execute();
|
||||
LOGGER.info("Client start up time: " + ((System.currentTimeMillis() - startTime) / 1000 + " seconds"));
|
||||
if (autoConnect()) {
|
||||
|
|
@ -360,6 +370,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
connectDialog.showDialog();
|
||||
}
|
||||
setWindowTitle();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -1043,11 +1054,9 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
if (setActive) {
|
||||
setActive(tablesPane);
|
||||
} else // if other panel was already shown, mamke sure it's topmost again
|
||||
{
|
||||
if (topPanebefore != null) {
|
||||
if (topPanebefore != null) {
|
||||
setActive(topPanebefore);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void hideGames() {
|
||||
|
|
@ -1291,6 +1300,10 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
DRAFTS.put(draftId, draftPanel);
|
||||
}
|
||||
|
||||
public BalloonTip getBalloonTip() {
|
||||
return balloonTip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connected(final String message) {
|
||||
if (SwingUtilities.isEventDispatchThread()) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.1" encoding="UTF-8" ?>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
|
||||
<Properties>
|
||||
|
|
|
|||
|
|
@ -24,14 +24,13 @@
|
|||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
* MagePane.java
|
||||
*
|
||||
* Created on 15-Dec-2009, 9:34:25 PM
|
||||
*/
|
||||
|
||||
package mage.client;
|
||||
|
||||
import java.awt.KeyboardFocusManager;
|
||||
|
|
@ -46,9 +45,11 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public abstract class MagePane extends javax.swing.JInternalFrame {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(MagePane.class);
|
||||
private static final Logger LOGGER = Logger.getLogger(MagePane.class);
|
||||
|
||||
/** Creates new form MagePane */
|
||||
/**
|
||||
* Creates new form MagePane
|
||||
*/
|
||||
public MagePane() {
|
||||
this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
||||
initComponents();
|
||||
|
|
@ -90,10 +91,10 @@ public abstract class MagePane extends javax.swing.JInternalFrame {
|
|||
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
* always regenerated by the Form Editor.
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
|
|
@ -115,8 +116,6 @@ public abstract class MagePane extends javax.swing.JInternalFrame {
|
|||
pack();
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class TableWaitingDialog extends MageDialog {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(TableWaitingDialog.class);
|
||||
private static final Logger LOGGER = Logger.getLogger(TableWaitingDialog.class);
|
||||
private static final int[] DEFAULT_COLUMS_WIDTH = {20, 50, 100, 100, 100};
|
||||
|
||||
private UUID tableId;
|
||||
private UUID roomId;
|
||||
|
|
@ -68,7 +69,6 @@ public class TableWaitingDialog extends MageDialog {
|
|||
private Session session;
|
||||
private final TableWaitModel tableWaitModel;
|
||||
private UpdateSeatsTask updateTask;
|
||||
private static final int[] defaultColumnsWidth = {20, 50, 100, 100, 100};
|
||||
|
||||
/**
|
||||
* Creates new form TableWaitingDialog
|
||||
|
|
@ -88,7 +88,7 @@ public class TableWaitingDialog extends MageDialog {
|
|||
|
||||
chatPanel.useExtendedView(ChatPanelBasic.VIEW_MODE.NONE);
|
||||
tableSeats.createDefaultColumnsFromModel();
|
||||
TableUtil.setColumnWidthAndOrder(tableSeats, defaultColumnsWidth, KEY_TABLE_WAITING_COLUMNS_WIDTH, KEY_TABLE_WAITING_COLUMNS_ORDER);
|
||||
TableUtil.setColumnWidthAndOrder(tableSeats, DEFAULT_COLUMS_WIDTH, KEY_TABLE_WAITING_COLUMNS_WIDTH, KEY_TABLE_WAITING_COLUMNS_ORDER);
|
||||
tableSeats.setDefaultRenderer(Icon.class, new CountryCellRenderer());
|
||||
|
||||
MageFrame.getUI().addButton(MageComponents.TABLE_WAITING_START_BUTTON, btnStart);
|
||||
|
|
@ -280,7 +280,7 @@ public class TableWaitingDialog extends MageDialog {
|
|||
}
|
||||
} catch (Exception e) {
|
||||
//swallow exception
|
||||
logger.error(e);
|
||||
LOGGER.error(e);
|
||||
}
|
||||
closeDialog();
|
||||
}//GEN-LAST:event_btnCancelActionPerformed
|
||||
|
|
|
|||
|
|
@ -34,14 +34,21 @@
|
|||
package mage.client.table;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseMotionAdapter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import javax.swing.table.JTableHeader;
|
||||
import javax.swing.table.TableColumn;
|
||||
import javax.swing.table.TableColumnModel;
|
||||
import mage.client.MageFrame;
|
||||
import mage.client.chat.ChatPanelBasic;
|
||||
import static mage.client.chat.ChatPanelBasic.CHAT_ALPHA;
|
||||
import static mage.client.dialog.PreferencesDialog.KEY_USERS_COLUMNS_ORDER;
|
||||
|
|
@ -52,6 +59,7 @@ import mage.client.util.gui.countryBox.CountryCellRenderer;
|
|||
import mage.remote.MageRemoteException;
|
||||
import mage.view.RoomUsersView;
|
||||
import mage.view.UsersView;
|
||||
import net.java.balloontip.utils.ToolTipUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -79,6 +87,8 @@ public class PlayersChatPanel extends javax.swing.JPanel {
|
|||
jTablePlayers.setRowSorter(new MageTableRowSorter(userTableModel));
|
||||
|
||||
TableUtil.setColumnWidthAndOrder(jTablePlayers, DEFAULT_COLUMNS_WIDTH, KEY_USERS_COLUMNS_WIDTH, KEY_USERS_COLUMNS_ORDER);
|
||||
userTableModel.initHeaderTooltips();
|
||||
|
||||
jTablePlayers.setDefaultRenderer(Icon.class, new CountryCellRenderer());
|
||||
|
||||
jScrollPaneTalk.setSystemMessagesPane(colorPaneSystem);
|
||||
|
|
@ -169,10 +179,61 @@ public class PlayersChatPanel extends javax.swing.JPanel {
|
|||
return "";
|
||||
}
|
||||
|
||||
public void initHeaderTooltips() {
|
||||
ColumnHeaderToolTips tips = new ColumnHeaderToolTips();
|
||||
for (int c = 0; c < jTablePlayers.getColumnCount(); c++) {
|
||||
String tooltipText = "";
|
||||
switch (c) {
|
||||
case 0:
|
||||
tooltipText = "<HTML><b>The flag the user has assigned to his profile</b>"
|
||||
+ "<br>You can assign the flag in the connect to server dialog window";
|
||||
break;
|
||||
case 1:
|
||||
tooltipText = "<HTML><b>Name of the user</b>"
|
||||
+ "<br>(the number behind the header text is the number of currently connected users to the server)";
|
||||
break;
|
||||
case 2:
|
||||
tooltipText = "<HTML><b>Number of matches the user played so far</b>"
|
||||
+ "<br>Q = number of matches quit"
|
||||
+ "<br>I = number of matches lost because of idle timeout"
|
||||
+ "<br>T = number of matches lost because of match timeout";
|
||||
break;
|
||||
case 3:
|
||||
tooltipText = "<HTML><b>%-Ratio of matches played to matches quit</b>"
|
||||
+ "<br>this calculation does not include tournament matches";
|
||||
break;
|
||||
case 4:
|
||||
tooltipText = "<HTML><b>Number of tournaments the user played so far</b>"
|
||||
+ "<br>D = number of tournaments left during draft phase"
|
||||
+ "<br>C = number of tournaments left during constructing phase"
|
||||
+ "<br>R = number of tournaments left during rounds";
|
||||
break;
|
||||
case 5:
|
||||
tooltipText = "<HTML><b>%-Ratio of tournament matches played to tournament matches quit</b>"
|
||||
+ "<br>this calculation does not include non tournament matches";
|
||||
break;
|
||||
case 6:
|
||||
tooltipText = "<HTML><b>Current activities of the player</b>"
|
||||
+ "<BR>the header itself shows the number of currently active games"
|
||||
+ "<BR>T: = number of games threads "
|
||||
+ "<BR><i>(that can vary from active games because of sideboarding or crashed games)</i>"
|
||||
+ "<BR>limt: the maximum of games the server is configured to"
|
||||
+ "<BR><i>(if the number of started games exceed that limit, the games have to wait"
|
||||
+ "<BR>until active games end)</i>";
|
||||
break;
|
||||
case 7:
|
||||
tooltipText = "<HTML><b>Latency of the user's connection to the server</b>";
|
||||
break;
|
||||
}
|
||||
tips.setToolTip(c, tooltipText);
|
||||
}
|
||||
JTableHeader header = jTablePlayers.getTableHeader();
|
||||
header.addMouseMotionListener(tips);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getColumnName(int columnIndex) {
|
||||
String colName = "";
|
||||
|
||||
if (columnIndex <= getColumnCount()) {
|
||||
colName = columnNames[columnIndex];
|
||||
}
|
||||
|
|
@ -185,6 +246,9 @@ public class PlayersChatPanel extends javax.swing.JPanel {
|
|||
switch (columnIndex) {
|
||||
case 0:
|
||||
return Icon.class;
|
||||
case 3:
|
||||
case 5:
|
||||
return Integer.class;
|
||||
default:
|
||||
return String.class;
|
||||
}
|
||||
|
|
@ -290,4 +354,41 @@ public class PlayersChatPanel extends javax.swing.JPanel {
|
|||
private javax.swing.JTabbedPane jTabbedPaneText;
|
||||
private javax.swing.JTable jTablePlayers;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
class ColumnHeaderToolTips extends MouseMotionAdapter {
|
||||
|
||||
int curCol;
|
||||
Map<Integer, String> tips = new HashMap<>();
|
||||
|
||||
public void setToolTip(Integer mCol, String tooltip) {
|
||||
if (tooltip == null) {
|
||||
tips.remove(mCol);
|
||||
} else {
|
||||
tips.put(mCol, tooltip);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseMoved(MouseEvent evt) {
|
||||
JTableHeader header = (JTableHeader) evt.getSource();
|
||||
JTable table = header.getTable();
|
||||
TableColumnModel colModel = table.getColumnModel();
|
||||
int vColIndex = colModel.getColumnIndexAtX(evt.getX());
|
||||
TableColumn col = null;
|
||||
if (vColIndex >= 0) {
|
||||
col = colModel.getColumn(table.convertColumnIndexToModel(vColIndex));
|
||||
}
|
||||
if (table.convertColumnIndexToModel(vColIndex) != curCol) {
|
||||
if (col != null) {
|
||||
MageFrame.getInstance().getBalloonTip().setAttachedComponent(header);
|
||||
MageFrame.getInstance().getBalloonTip().setTextContents(tips.get(table.convertColumnIndexToModel(vColIndex)));
|
||||
ToolTipUtils.balloonToToolTip(MageFrame.getInstance().getBalloonTip(), 600, 10000);
|
||||
} else {
|
||||
MageFrame.getInstance().getBalloonTip().setTextContents("");
|
||||
}
|
||||
curCol = table.convertColumnIndexToModel(vColIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -674,4 +674,4 @@
|
|||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
</Form>
|
||||
|
|
|
|||
|
|
@ -100,7 +100,8 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class TablesPanel extends javax.swing.JPanel {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(TablesPanel.class);
|
||||
private static final Logger LOGGER = Logger.getLogger(TablesPanel.class);
|
||||
private static final int[] DEFAULT_COLUMNS_WIDTH = {35, 150, 120, 180, 80, 120, 80, 60, 40, 60};
|
||||
|
||||
private TableTableModel tableModel;
|
||||
private MatchesTableModel matchesModel;
|
||||
|
|
@ -119,8 +120,6 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
|
||||
JToggleButton[] filterButtons;
|
||||
|
||||
private static final int[] defaultColumnsWidth = {35, 150, 120, 180, 80, 120, 80, 60, 40, 60};
|
||||
|
||||
/**
|
||||
* Creates new form TablesPanel
|
||||
*/
|
||||
|
|
@ -138,7 +137,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
activeTablesSorter = new MageTableRowSorter(tableModel);
|
||||
tableTables.setRowSorter(activeTablesSorter);
|
||||
|
||||
TableUtil.setColumnWidthAndOrder(tableTables, defaultColumnsWidth,
|
||||
TableUtil.setColumnWidthAndOrder(tableTables, DEFAULT_COLUMNS_WIDTH,
|
||||
PreferencesDialog.KEY_TABLES_COLUMNS_WIDTH, PreferencesDialog.KEY_TABLES_COLUMNS_ORDER);
|
||||
|
||||
tableCompleted.setRowSorter(new MageTableRowSorter(matchesModel));
|
||||
|
|
@ -187,18 +186,18 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
try {
|
||||
frame.setSelected(true);
|
||||
} catch (PropertyVetoException ve) {
|
||||
logger.error(ve);
|
||||
LOGGER.error(ve);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} catch (InterruptedException ex) {
|
||||
logger.error(ex);
|
||||
LOGGER.error(ex);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (isTournament) {
|
||||
logger.info("Joining tournament " + tableId);
|
||||
LOGGER.info("Joining tournament " + tableId);
|
||||
if (deckType.startsWith("Limited")) {
|
||||
if (!status.endsWith("PW")) {
|
||||
session.joinTournamentTable(roomId, tableId, session.getUserName(), "Human", 1, null, "");
|
||||
|
|
@ -209,7 +208,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
joinTableDialog.showDialog(roomId, tableId, true, deckType.startsWith("Limited"));
|
||||
}
|
||||
} else {
|
||||
logger.info("Joining table " + tableId);
|
||||
LOGGER.info("Joining table " + tableId);
|
||||
joinTableDialog.showDialog(roomId, tableId, false, false);
|
||||
}
|
||||
break;
|
||||
|
|
@ -220,18 +219,18 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
break;
|
||||
case "Show":
|
||||
if (isTournament) {
|
||||
logger.info("Showing tournament table " + tableId);
|
||||
LOGGER.info("Showing tournament table " + tableId);
|
||||
session.watchTable(roomId, tableId);
|
||||
}
|
||||
break;
|
||||
case "Watch":
|
||||
if (!isTournament) {
|
||||
logger.info("Watching table " + tableId);
|
||||
LOGGER.info("Watching table " + tableId);
|
||||
session.watchTable(roomId, tableId);
|
||||
}
|
||||
break;
|
||||
case "Replay":
|
||||
logger.info("Replaying game " + gameId);
|
||||
LOGGER.info("Replaying game " + gameId);
|
||||
session.replayGame(gameId);
|
||||
break;
|
||||
}
|
||||
|
|
@ -258,7 +257,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
break;
|
||||
case "Show":;
|
||||
if (matchesModel.isTournament(modelRow)) {
|
||||
logger.info("Showing tournament table " + matchesModel.getTableId(modelRow));
|
||||
LOGGER.info("Showing tournament table " + matchesModel.getTableId(modelRow));
|
||||
session.watchTable(roomId, matchesModel.getTableId(modelRow));
|
||||
}
|
||||
break;
|
||||
|
|
@ -1177,7 +1176,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
}//GEN-LAST:event_btnStateFinishedActionPerformed
|
||||
|
||||
private void handleError(Exception ex) {
|
||||
logger.fatal("Error loading deck: ", ex);
|
||||
LOGGER.fatal("Error loading deck: ", ex);
|
||||
JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Error loading deck.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
* TournamentPanel.java
|
||||
*
|
||||
* Created on 20-Jan-2011, 9:18:30 PM
|
||||
|
|
@ -72,7 +72,10 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class TournamentPanel extends javax.swing.JPanel {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(TournamentPanel.class);
|
||||
private static final Logger LOGGER = Logger.getLogger(TournamentPanel.class);
|
||||
|
||||
private static final int[] DEFAULT_COLUMNS_WIDTH_PLAYERS = {30, 150, 150, 60, 400, 100};
|
||||
private static final int[] DEFAULT_COLUMNS_WIDTH_MATCHES = {60, 140, 140, 400, 80};
|
||||
|
||||
private UUID tournamentId;
|
||||
private boolean firstInitDone = false;
|
||||
|
|
@ -82,9 +85,6 @@ public class TournamentPanel extends javax.swing.JPanel {
|
|||
private UpdateTournamentTask updateTask;
|
||||
private final DateFormat df;
|
||||
|
||||
private static final int[] defaultColumnsWidthPlayers = {30, 150, 150, 60, 400};
|
||||
private static final int[] defaultColumnsWidthMatches = {60, 140, 140, 400, 80};
|
||||
|
||||
/**
|
||||
* Creates new form TournamentPanel
|
||||
*/
|
||||
|
|
@ -99,11 +99,11 @@ public class TournamentPanel extends javax.swing.JPanel {
|
|||
df = DateFormat.getDateTimeInstance();
|
||||
|
||||
tablePlayers.createDefaultColumnsFromModel();
|
||||
TableUtil.setColumnWidthAndOrder(tablePlayers, defaultColumnsWidthPlayers, KEY_TOURNAMENT_PLAYER_COLUMNS_WIDTH, KEY_TOURNAMENT_PLAYER_COLUMNS_ORDER);
|
||||
TableUtil.setColumnWidthAndOrder(tablePlayers, DEFAULT_COLUMNS_WIDTH_PLAYERS, KEY_TOURNAMENT_PLAYER_COLUMNS_WIDTH, KEY_TOURNAMENT_PLAYER_COLUMNS_ORDER);
|
||||
tablePlayers.setDefaultRenderer(Icon.class, new CountryCellRenderer());
|
||||
|
||||
tableMatches.createDefaultColumnsFromModel();
|
||||
TableUtil.setColumnWidthAndOrder(tableMatches, defaultColumnsWidthMatches, KEY_TOURNAMENT_MATCH_COLUMNS_WIDTH, KEY_TOURNAMENT_MATCH_COLUMNS_ORDER);
|
||||
TableUtil.setColumnWidthAndOrder(tableMatches, DEFAULT_COLUMNS_WIDTH_MATCHES, KEY_TOURNAMENT_MATCH_COLUMNS_WIDTH, KEY_TOURNAMENT_MATCH_COLUMNS_ORDER);
|
||||
|
||||
chatPanel1.useExtendedView(ChatPanelBasic.VIEW_MODE.NONE);
|
||||
chatPanel1.setChatType(ChatPanelBasic.ChatType.TOURNAMENT);
|
||||
|
|
@ -123,7 +123,7 @@ public class TournamentPanel extends javax.swing.JPanel {
|
|||
// session.replayGame(gameId);
|
||||
// }
|
||||
if (state.startsWith("Dueling") && actionText.equals("Watch")) {
|
||||
logger.info("Watching game " + gameId);
|
||||
LOGGER.info("Watching game " + gameId);
|
||||
session.watchTournamentTable(tableId);
|
||||
}
|
||||
}
|
||||
|
|
@ -545,7 +545,7 @@ public class TournamentPanel extends javax.swing.JPanel {
|
|||
|
||||
class TournamentPlayersTableModel extends AbstractTableModel {
|
||||
|
||||
private final String[] columnNames = new String[]{"Loc", "Player Name", "State", "Points", "Results"};
|
||||
private final String[] columnNames = new String[]{"Loc", "Player Name", "State", "Points", "Results", "History"};
|
||||
private TournamentPlayerView[] players = new TournamentPlayerView[0];
|
||||
|
||||
public void loadData(TournamentView tournament) {
|
||||
|
|
@ -576,6 +576,8 @@ class TournamentPlayersTableModel extends AbstractTableModel {
|
|||
return Integer.toString(players[arg0].getPoints());
|
||||
case 4:
|
||||
return players[arg0].getResults();
|
||||
case 5:
|
||||
return players[arg0].getHistory();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue