Added the URLHandler which makes the URL's in the message of the day clickable.

At the moment when there are 2 URL's in 1 message, it only makes the last one clickable.
This commit is contained in:
Danny Plenge 2018-03-28 13:49:04 +02:00
parent 7d7cd64b1e
commit 98c2b171de
2 changed files with 124 additions and 2 deletions

View file

@ -60,6 +60,7 @@ import mage.client.util.ButtonColumn;
import mage.client.util.GUISizeHelper;
import mage.client.util.IgnoreList;
import mage.client.util.MageTableRowSorter;
import mage.client.util.URLHandler;
import mage.client.util.gui.GuiDisplayUtil;
import mage.client.util.gui.TableUtil;
import mage.constants.*;
@ -579,7 +580,7 @@ public class TablesPanel extends javax.swing.JPanel {
this.jPanelBottom.setVisible(false);
} else {
this.jPanelBottom.setVisible(true);
this.jLabelFooterText.setText(serverMessages.get(0));
URLHandler.handleMessage(serverMessages.get(0), this.jLabelFooterText);
this.jButtonFooterNext.setVisible(serverMessages.size() > 1);
}
}
@ -1283,7 +1284,9 @@ public class TablesPanel extends javax.swing.JPanel {
if (currentMessage >= messages.size()) {
currentMessage = 0;
}
this.jLabelFooterText.setText(messages.get(currentMessage));
URLHandler.RemoveMouseAdapter(jLabelFooterText);
URLHandler.handleMessage(messages.get(currentMessage), this.jLabelFooterText);
}
}
}//GEN-LAST:event_jButtonFooterNextActionPerformed