fixed issue 228

This commit is contained in:
BetaSteward 2011-08-29 13:06:25 -04:00
parent 120468f8ca
commit 7926fc5004
8 changed files with 38 additions and 10 deletions

View file

@ -821,6 +821,14 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
GamePane gamePane = (GamePane) window;
gamePane.hideGame();
}
if (window instanceof DraftPane) {
DraftPane draftPane = (DraftPane) window;
draftPane.hideDraft();
}
if (window instanceof TournamentPane) {
TournamentPane tournamentPane = (TournamentPane) window;
tournamentPane.hideTournament();
}
}
}

View file

@ -24,7 +24,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" alignment="0" pref="582" max="32767" attributes="0"/>
<Component id="jScrollPane1" alignment="0" pref="586" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>

View file

@ -53,6 +53,10 @@ public class DraftPane extends MagePane {
this.draftPanel1.showDraft(draftId);
}
public void hideDraft() {
draftPanel1.hideDraft();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is

View file

@ -24,7 +24,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="tournamentPanel" alignment="0" pref="526" max="32767" attributes="0"/>
<Component id="tournamentPanel" alignment="0" pref="530" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>

View file

@ -54,6 +54,10 @@ public class TournamentPane extends MagePane {
this.repaint();
}
public void hideTournament() {
tournamentPanel.hideTournament();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is

View file

@ -113,6 +113,8 @@ public class TournamentPanel extends javax.swing.JPanel {
}
public void hideTournament() {
stopTasks();
this.chatPanel1.disconnect();
Component c = this.getParent();
while (c != null && !(c instanceof TournamentPane)) {
c = c.getParent();