server, refactor: added client side info about current table and parent table (tourney's sub-tables with matches);

This commit is contained in:
Oleg Agafonov 2024-08-11 19:29:42 +04:00
parent bd7aaa34ee
commit 7916af0e52
21 changed files with 315 additions and 161 deletions

View file

@ -72,9 +72,8 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.SocketException;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
import java.util.List;
import java.util.*;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
@ -757,19 +756,16 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
/**
* Shows a game for a player of the game
*
* @param gameId
* @param playerId
*/
public void showGame(UUID gameId, UUID playerId) {
public void showGame(UUID currentTableId, UUID parentTableId, UUID gameId, UUID playerId) {
GamePane gamePane = new GamePane();
desktopPane.add(gamePane, JLayeredPane.DEFAULT_LAYER);
gamePane.setVisible(true);
gamePane.showGame(gameId, playerId);
gamePane.showGame(currentTableId, parentTableId, gameId, playerId);
setActive(gamePane);
}
public void watchGame(UUID gameId) {
public void watchGame(UUID currentTableId, UUID parentTableId, UUID gameId) {
for (Component component : desktopPane.getComponents()) {
if (component instanceof GamePane
&& ((GamePane) component).getGameId().equals(gameId)) {
@ -780,7 +776,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
GamePane gamePane = new GamePane();
desktopPane.add(gamePane, JLayeredPane.DEFAULT_LAYER);
gamePane.setVisible(true);
gamePane.watchGame(gameId);
gamePane.watchGame(currentTableId, parentTableId, gameId);
setActive(gamePane);
}
@ -792,11 +788,11 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
setActive(gamePane);
}
public void showDraft(UUID draftId) {
public void showDraft(UUID tableId, UUID draftId) {
DraftPane draftPane = new DraftPane();
desktopPane.add(draftPane, JLayeredPane.DEFAULT_LAYER);
draftPane.setVisible(true);
draftPane.showDraft(draftId);
draftPane.showDraft(tableId, draftId);
setActive(draftPane);
}
@ -810,7 +806,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
}
}
public void showTournament(UUID tournamentId) {
public void showTournament(UUID tableId, UUID tournamentId) {
// existing tourney
TournamentPane tournamentPane = null;
for (Component component : desktopPane.getComponents()) {
@ -825,7 +821,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
tournamentPane = new TournamentPane();
desktopPane.add(tournamentPane, JLayeredPane.DEFAULT_LAYER);
tournamentPane.setVisible(true);
tournamentPane.showTournament(tournamentId);
tournamentPane.showTournament(tableId, tournamentId);
}
// if user connects on startup then there are possible multiple tables open, so keep only actual
@ -1109,23 +1105,23 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 838, Short.MAX_VALUE)
.addComponent(mageToolbar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 838, Short.MAX_VALUE)
.addComponent(mageToolbar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(mageToolbar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(2, 2, 2)
.addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE))
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(mageToolbar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(2, 2, 2)
.addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void btnDeckEditorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeckEditorActionPerformed
showDeckEditor(DeckEditorMode.FREE_BUILDING, null, null, 0);
showDeckEditor(DeckEditorMode.FREE_BUILDING, null, null, null, 0);
}//GEN-LAST:event_btnDeckEditorActionPerformed
private void btnConnectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConnectActionPerformed
@ -1340,9 +1336,9 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
return name;
}
public void showDeckEditor(DeckEditorMode mode, Deck deck, UUID tableId, int visibleTimer) {
public void showDeckEditor(DeckEditorMode mode, Deck deck, UUID currentTableId, UUID parentTableId, int visibleTimer) {
// create or open new editor
String name = prepareDeckEditorName(mode, deck, tableId);
String name = prepareDeckEditorName(mode, deck, currentTableId);
// already exists
Component[] windows = desktopPane.getComponentsInLayer(JLayeredPane.DEFAULT_LAYER);
@ -1357,7 +1353,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
DeckEditorPane deckEditor = new DeckEditorPane();
desktopPane.add(deckEditor, JLayeredPane.DEFAULT_LAYER);
deckEditor.setVisible(false);
deckEditor.show(mode, deck, name, tableId, visibleTimer);
deckEditor.show(mode, deck, name, currentTableId, parentTableId, visibleTimer);
setActive(deckEditor);
}

View file

@ -14,11 +14,12 @@ import java.util.UUID;
/**
* GUI: deck editor, used all around the app
*
* @author BetaSteward_at_googlemail.com
* @author BetaSteward_at_googlemail.com, JayDi85
*/
public class DeckEditorPane extends MagePane {
private UUID tableId = null;
private UUID currentTableId = null;
private UUID parentTableId = null;
public DeckEditorPane() {
boolean initialized = false;
@ -45,22 +46,28 @@ public class DeckEditorPane extends MagePane {
deckEditorPanel1.changeGUISize();
}
public void show(DeckEditorMode mode, Deck deck, String name, UUID tableId, int visibleTimer) {
this.tableId = tableId;
public void show(DeckEditorMode mode, Deck deck, String name, UUID currentTableId, UUID parentTableId, int visibleTimer) {
this.currentTableId = currentTableId;
this.parentTableId = parentTableId;
this.setTitle(name);
this.deckEditorPanel1.showDeckEditor(mode, deck, tableId, visibleTimer);
this.deckEditorPanel1.showDeckEditor(mode, deck, currentTableId, parentTableId, visibleTimer);
this.repaint();
}
@Override
public boolean isActiveTable() {
return this.tableId != null;
return this.currentTableId != null;
}
public DeckEditorMode getDeckEditorMode() {
return this.deckEditorPanel1.getDeckEditorMode();
}
@Override
public UUID getSortTableId() {
return parentTableId != null ? parentTableId : currentTableId;
}
/**
* 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

View file

@ -58,7 +58,8 @@ public class DeckEditorPanel extends javax.swing.JPanel {
private final Map<UUID, Card> temporaryCards = new HashMap<>(); // Cards dragged out of one part of the view into another
private final String LAST_DECK_FOLDER = "lastDeckFolder";
private Deck deck = new Deck();
private UUID tableId;
private UUID currentTableId;
private UUID parentTableId;
private DeckEditorMode mode;
private int timeout;
private javax.swing.Timer countdown;
@ -202,11 +203,12 @@ public class DeckEditorPanel extends javax.swing.JPanel {
this.deckArea.changeGUISize();
}
public void showDeckEditor(DeckEditorMode mode, Deck deck, UUID tableId, int visibleTimer) {
public void showDeckEditor(DeckEditorMode mode, Deck deck, UUID currentTableId, UUID parentTableId, int visibleTimer) {
if (deck != null) {
this.deck = deck;
}
this.tableId = tableId;
this.currentTableId = currentTableId;
this.parentTableId = parentTableId;
this.mode = mode;
this.btnAddLand.setVisible(false);
@ -243,7 +245,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
if (timeout != 0) {
countdown.start();
if (updateDeckTask == null || updateDeckTask.isDone()) {
updateDeckTask = new UpdateDeckTask(SessionHandler.getSession(), tableId, deck);
updateDeckTask = new UpdateDeckTask(SessionHandler.getSession(), currentTableId, deck);
updateDeckTask.execute();
}
}
@ -1488,7 +1490,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
updateDeckTask.cancel(true);
}
if (SessionHandler.submitDeck(mode, tableId, deck.prepareCardsOnlyDeck())) {
if (SessionHandler.submitDeck(mode, currentTableId, deck.prepareCardsOnlyDeck())) {
removeDeckEditor();
}
}//GEN-LAST:event_btnSubmitActionPerformed
@ -1507,7 +1509,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
updateDeckTask.cancel(true);
}
if (SessionHandler.submitDeck(mode, tableId, deck.prepareCardsOnlyDeck())) {
if (SessionHandler.submitDeck(mode, currentTableId, deck.prepareCardsOnlyDeck())) {
SwingUtilities.invokeLater(this::removeDeckEditor);
}
return null;

View file

@ -8,9 +8,10 @@ import javax.swing.*;
import java.awt.*;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
* Collection viewer pane.
* GUI: card viewer pane.
* Contains background and components container.
*
* @author nantuko
@ -19,7 +20,7 @@ public class CollectionViewerPane extends MagePane {
public CollectionViewerPane() {
boolean initialized = false;
this.setTitle("Collection Viewer");
this.setTitle("Card Viewer");
if (Plugins.instance.isThemePluginLoaded()) {
Map<String, JComponent> uiComponents = new HashMap<>();
JComponent container = Plugins.instance.updateTablePanel(uiComponents);
@ -65,5 +66,10 @@ public class CollectionViewerPane extends MagePane {
}
}
@Override
public UUID getSortTableId() {
return null;
}
private CollectionViewerPanel collectionViewerPanel;
}

View file

@ -15,6 +15,7 @@ import mage.client.plugins.impl.Plugins;
*/
public class DraftPane extends MagePane {
UUID tableId = null;
UUID draftId = null;
public DraftPane() {
@ -42,7 +43,8 @@ public class DraftPane extends MagePane {
draftPanel1.changeGUISize();
}
public void showDraft(UUID draftId) {
public void showDraft(UUID tableId, UUID draftId) {
this.tableId = tableId;
this.draftId = draftId;
this.setTitle("Draft - " + draftId);
this.draftPanel1.showDraft(draftId);
@ -58,6 +60,11 @@ public class DraftPane extends MagePane {
this.removeFrame();
}
@Override
public UUID getSortTableId() {
return tableId;
}
/**
* 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

View file

@ -9,7 +9,7 @@ import mage.client.MagePane;
/**
* Game GUI: game frame (game panel with scrolls)
*
* @author BetaSteward_at_googlemail.com
* @author BetaSteward_at_googlemail.com, JayDi85
*/
public class GamePane extends MagePane {
@ -25,10 +25,12 @@ public class GamePane extends MagePane {
}
public void showGame(UUID gameId, UUID playerId) {
public void showGame(UUID currentTableId, UUID parentTableId, UUID gameId, UUID playerId) {
this.setTitle("Game " + gameId);
this.currentTableId = currentTableId;
this.parentTableId = parentTableId;
this.gameId = gameId;
gamePanel.showGame(gameId, playerId, this);
gamePanel.showGame(currentTableId, parentTableId, gameId, playerId, this);
}
@Override
@ -53,14 +55,18 @@ public class GamePane extends MagePane {
this.removeFrame();
}
public void watchGame(UUID gameId) {
public void watchGame(UUID currentTableId, UUID parentTableId, UUID gameId) {
this.setTitle("Watching " + gameId);
this.currentTableId = currentTableId;
this.parentTableId = parentTableId;
this.gameId = gameId;
gamePanel.watchGame(gameId, this);
gamePanel.watchGame(currentTableId, parentTableId, gameId, this);
}
public void replayGame(UUID gameId) {
this.setTitle("Replaying " + gameId);
this.currentTableId = null;
this.parentTableId = null;
this.gameId = gameId;
gamePanel.replayGame(gameId);
}
@ -108,7 +114,14 @@ public class GamePane extends MagePane {
gamePanel.handleEvent(event);
}
@Override
public UUID getSortTableId() {
return parentTableId != null ? parentTableId : currentTableId;
}
private mage.client.game.GamePanel gamePanel;
private javax.swing.JScrollPane jScrollPane1;
private UUID currentTableId;
private UUID parentTableId;
private UUID gameId;
}

View file

@ -92,6 +92,8 @@ public final class GamePanel extends javax.swing.JPanel {
private final ArrayList<PickPileDialog> pickPile = new ArrayList<>();
private final Map<String, CardHintsHelperDialog> cardHintsWindows = new LinkedHashMap<>();
private UUID currentTableId;
private UUID parentTableId;
private UUID gameId;
private UUID playerId; // playerId of the player
GamePane gamePane;
@ -693,7 +695,9 @@ public final class GamePanel extends javax.swing.JPanel {
DialogManager.getManager(gameId).setBounds(0, 0, rect.width, rect.height);
}
public synchronized void showGame(UUID gameId, UUID playerId, GamePane gamePane) {
public synchronized void showGame(UUID currentTableId, UUID parentTableId, UUID gameId, UUID playerId, GamePane gamePane) {
this.currentTableId = currentTableId;
this.parentTableId = parentTableId;
this.gameId = gameId;
this.gamePane = gamePane;
this.playerId = playerId;
@ -734,7 +738,9 @@ public final class GamePanel extends javax.swing.JPanel {
}
}
public synchronized void watchGame(UUID gameId, GamePane gamePane) {
public synchronized void watchGame(UUID currentTableId, UUID parentTableId, UUID gameId, GamePane gamePane) {
this.currentTableId = currentTableId;
this.parentTableId = parentTableId;
this.gameId = gameId;
this.gamePane = gamePane;
this.playerId = null;
@ -769,6 +775,8 @@ public final class GamePanel extends javax.swing.JPanel {
}
public synchronized void replayGame(UUID gameId) {
this.currentTableId = null;
this.parentTableId = null;
this.gameId = gameId;
this.playerId = null;
MageFrame.addGame(gameId, this);
@ -3136,6 +3144,7 @@ public final class GamePanel extends javax.swing.JPanel {
class ReplayTask extends SwingWorker<Void, Collection<MatchView>> {
// replay without table - just single game
private final UUID gameId;
private static final Logger logger = Logger.getLogger(ReplayTask.class);

View file

@ -113,7 +113,7 @@ public class CallbackClientImpl implements CallbackClient {
case START_GAME: {
TableClientMessage message = (TableClientMessage) callback.getData();
GameManager.instance.setCurrentPlayerUUID(message.getPlayerId());
gameStarted(callback.getMessageId(), message.getGameId(), message.getPlayerId());
gameStarted(callback.getMessageId(), message.getCurrentTableId(), message.getParentTableId(), message.getGameId(), message.getPlayerId());
// reconnect fix with miss data, part 2 of 2
// START_GAME event can come after GAME_INIT or any other, so must force update with first info
@ -137,7 +137,7 @@ public class CallbackClientImpl implements CallbackClient {
case START_TOURNAMENT: {
TableClientMessage message = (TableClientMessage) callback.getData();
tournamentStarted(callback.getMessageId(), message.getGameId(), message.getPlayerId());
tournamentStarted(callback.getMessageId(), callback.getObjectId(), message.getCurrentTableId(), message.getPlayerId());
break;
}
@ -147,12 +147,14 @@ public class CallbackClientImpl implements CallbackClient {
}
case SHOW_TOURNAMENT: {
showTournament(callback.getObjectId());
TableClientMessage message = (TableClientMessage) callback.getData();
showTournament(message.getCurrentTableId(), callback.getObjectId());
break;
}
case WATCHGAME: {
watchGame(callback.getObjectId());
TableClientMessage message = (TableClientMessage) callback.getData();
watchGame(message.getCurrentTableId(), message.getParentTableId(), callback.getObjectId());
break;
}
@ -214,7 +216,7 @@ public class CallbackClientImpl implements CallbackClient {
case JOINED_TABLE: {
TableClientMessage message = (TableClientMessage) callback.getData();
joinedTable(message.getRoomId(), message.getTableId(), message.getFlag());
joinedTable(message.getRoomId(), message.getCurrentTableId(), message.getFlag());
break;
}
@ -431,9 +433,9 @@ public class CallbackClientImpl implements CallbackClient {
DeckView deckView = message.getDeck();
Deck deck = DeckUtil.construct(deckView);
if (message.getFlag()) {
construct_sideboard(deck, message.getTableId(), message.getTime());
construct_sideboard(deck, message.getCurrentTableId(), message.getParentTableId(), message.getTime());
} else {
sideboard(deck, message.getTableId(), message.getTime());
sideboard(deck, message.getCurrentTableId(), message.getParentTableId(), message.getTime());
}
break;
}
@ -442,7 +444,7 @@ public class CallbackClientImpl implements CallbackClient {
TableClientMessage message = (TableClientMessage) callback.getData();
DeckView deckView = message.getDeck();
Deck deck = DeckUtil.construct(deckView);
viewLimitedDeck(deck, message.getTableId(), message.getTime());
viewLimitedDeck(deck, message.getCurrentTableId(), message.getParentTableId(), message.getTime());
break;
}
@ -456,13 +458,13 @@ public class CallbackClientImpl implements CallbackClient {
TableClientMessage message = (TableClientMessage) callback.getData();
DeckView deckView = message.getDeck();
Deck deck = DeckUtil.construct(deckView);
construct(deck, message.getTableId(), message.getTime());
construct(deck, message.getCurrentTableId(), message.getParentTableId(), message.getTime());
break;
}
case START_DRAFT: {
TableClientMessage message = (TableClientMessage) callback.getData();
draftStarted(callback.getMessageId(), message.getGameId(), message.getPlayerId());
draftStarted(callback.getMessageId(), message.getCurrentTableId(), callback.getObjectId(), message.getPlayerId());
break;
}
@ -606,10 +608,10 @@ public class CallbackClientImpl implements CallbackClient {
}
}
protected void gameStarted(final int messageId, final UUID gameId, final UUID playerId) {
protected void gameStarted(final int messageId, final UUID currentTableId, final UUID parentTableId, final UUID gameId, final UUID playerId) {
try {
frame.showGame(gameId, playerId);
logger.info("Game " + gameId + " started for player " + playerId);
frame.showGame(currentTableId, parentTableId, gameId, playerId);
} catch (Exception ex) {
handleException(ex);
}
@ -619,20 +621,20 @@ public class CallbackClientImpl implements CallbackClient {
}
}
protected void draftStarted(int messageId, UUID draftId, UUID playerId) {
protected void draftStarted(int messageId, UUID tableId, UUID draftId, UUID playerId) {
try {
frame.showDraft(draftId);
logger.info("Draft " + draftId + " started for player " + playerId);
frame.showDraft(tableId, draftId);
} catch (Exception ex) {
handleException(ex);
}
}
protected void tournamentStarted(int messageId, UUID tournamentId, UUID playerId) {
protected void tournamentStarted(int messageId, UUID tournamentId, UUID tableId, UUID playerId) {
try {
frame.showTournament(tournamentId);
AudioManager.playTournamentStarted();
logger.info("Tournament " + tournamentId + " started for player " + playerId);
frame.showTournament(tableId, tournamentId);
AudioManager.playTournamentStarted();
} catch (Exception ex) {
handleException(ex);
}
@ -640,22 +642,20 @@ public class CallbackClientImpl implements CallbackClient {
/**
* Shows the tournament info panel for a tournament
*
* @param tournamentId
*/
protected void showTournament(UUID tournamentId) {
protected void showTournament(UUID tableId, UUID tournamentId) {
try {
frame.showTournament(tournamentId);
logger.info("Showing tournament " + tournamentId);
frame.showTournament(tableId, tournamentId);
} catch (Exception ex) {
handleException(ex);
}
}
protected void watchGame(UUID gameId) {
protected void watchGame(UUID currentTableId, UUID parentTableId, UUID gameId) {
try {
frame.watchGame(gameId);
logger.info("Watching game " + gameId);
frame.watchGame(currentTableId, parentTableId, gameId);
} catch (Exception ex) {
handleException(ex);
}
@ -663,27 +663,27 @@ public class CallbackClientImpl implements CallbackClient {
protected void replayGame(UUID gameId) {
try {
logger.info("Replaying game " + gameId);
frame.replayGame(gameId);
logger.info("Replaying game");
} catch (Exception ex) {
handleException(ex);
}
}
protected void sideboard(Deck deck, UUID tableId, int time) {
frame.showDeckEditor(DeckEditorMode.SIDEBOARDING, deck, tableId, time);
protected void sideboard(Deck deck, UUID currentTableId, UUID parentTableId, int time) {
frame.showDeckEditor(DeckEditorMode.SIDEBOARDING, deck, currentTableId, parentTableId, time);
}
protected void construct(Deck deck, UUID tableId, int time) {
frame.showDeckEditor(DeckEditorMode.LIMITED_BUILDING, deck, tableId, time);
protected void construct(Deck deck, UUID currentTableId, UUID parentTableId, int time) {
frame.showDeckEditor(DeckEditorMode.LIMITED_BUILDING, deck, currentTableId, parentTableId, time);
}
protected void construct_sideboard(Deck deck, UUID tableId, int time) {
frame.showDeckEditor(DeckEditorMode.LIMITED_SIDEBOARD_BUILDING, deck, tableId, time);
protected void construct_sideboard(Deck deck, UUID currentTableId, UUID parentTableId, int time) {
frame.showDeckEditor(DeckEditorMode.LIMITED_SIDEBOARD_BUILDING, deck, currentTableId, parentTableId, time);
}
protected void viewLimitedDeck(Deck deck, UUID tableId, int time) {
frame.showDeckEditor(DeckEditorMode.VIEW_LIMITED_DECK, deck, tableId, time);
protected void viewLimitedDeck(Deck deck, UUID currentTableId, UUID parentTableId, int time) {
frame.showDeckEditor(DeckEditorMode.VIEW_LIMITED_DECK, deck, currentTableId, parentTableId, time);
}
protected void viewSideboard(UUID gameId, UUID playerId) {

View file

@ -10,13 +10,15 @@ import mage.client.MagePane;
*/
public class TournamentPane extends MagePane {
UUID tableId = null;
UUID tournamentId = null;
public TournamentPane() {
initComponents();
}
public void showTournament(UUID tournamentId) {
public void showTournament(UUID tableId, UUID tournamentId) {
this.tableId = tableId;
this.tournamentId = tournamentId;
this.setTitle("Tournament " + tournamentId);
this.tournamentPanel.showTournament(tournamentId);
@ -45,6 +47,11 @@ public class TournamentPane extends MagePane {
return tournamentPanel.getTournamentId();
}
@Override
public UUID getSortTableId() {
return tableId;
}
/**
* 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