mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
TableWaitingDialog is not closeable and stays on top
This commit is contained in:
parent
71a1b5dbef
commit
e841ed0cf8
5 changed files with 10 additions and 8 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.1" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
|
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
|
||||||
<SyntheticProperties>
|
<SyntheticProperties>
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<EmptySpace min="0" pref="306" max="32767" attributes="0"/>
|
<EmptySpace min="0" pref="310" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,8 @@ public class MageDialog extends javax.swing.JInternalFrame {
|
||||||
public void show() {
|
public void show() {
|
||||||
super.show();
|
super.show();
|
||||||
this.toFront();
|
this.toFront();
|
||||||
this.setClosable(!modal);
|
if (modal)
|
||||||
|
this.setClosable(false);
|
||||||
if (this.modal) {
|
if (this.modal) {
|
||||||
startModal();
|
startModal();
|
||||||
}
|
}
|
||||||
|
|
@ -75,8 +76,8 @@ public class MageDialog extends javax.swing.JInternalFrame {
|
||||||
public void setVisible(boolean value) {
|
public void setVisible(boolean value) {
|
||||||
super.setVisible(value);
|
super.setVisible(value);
|
||||||
this.toFront();
|
this.toFront();
|
||||||
this.setClosable(!modal);
|
|
||||||
if (modal) {
|
if (modal) {
|
||||||
|
this.setClosable(false);
|
||||||
if (value) {
|
if (value) {
|
||||||
startModal();
|
startModal();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
<Form version="1.6" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
|
<Form version="1.6" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
<Property name="closable" type="boolean" value="false"/>
|
||||||
<Property name="resizable" type="boolean" value="true"/>
|
<Property name="resizable" type="boolean" value="true"/>
|
||||||
<Property name="title" type="java.lang.String" value="Waiting for players"/>
|
<Property name="title" type="java.lang.String" value="Waiting for players"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
|
|
@ -40,7 +41,7 @@
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<Component id="jSplitPane1" pref="263" max="32767" attributes="0"/>
|
<Component id="jSplitPane1" pref="267" max="32767" attributes="0"/>
|
||||||
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
|
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
<Component id="btnMoveDown" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="btnMoveDown" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,6 @@ public class TableWaitingDialog extends MageDialog {
|
||||||
session.getUI().addButton(MageComponents.TABLE_WAITING_START_BUTTON, btnStart);
|
session.getUI().addButton(MageComponents.TABLE_WAITING_START_BUTTON, btnStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
|
||||||
public void update(TableView table) {
|
public void update(TableView table) {
|
||||||
try {
|
try {
|
||||||
if (table != null) {
|
if (table != null) {
|
||||||
|
|
@ -158,6 +157,7 @@ public class TableWaitingDialog extends MageDialog {
|
||||||
tableSeats = new javax.swing.JTable();
|
tableSeats = new javax.swing.JTable();
|
||||||
chatPanel = new mage.client.chat.ChatPanel(false);
|
chatPanel = new mage.client.chat.ChatPanel(false);
|
||||||
|
|
||||||
|
setClosable(false);
|
||||||
setResizable(true);
|
setResizable(true);
|
||||||
setTitle("Waiting for players");
|
setTitle("Waiting for players");
|
||||||
|
|
||||||
|
|
@ -222,7 +222,7 @@ public class TableWaitingDialog extends MageDialog {
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 263, Short.MAX_VALUE)
|
.addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(btnMoveDown)
|
.addComponent(btnMoveDown)
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
||||||
newTableDialog.showDialog(roomId);
|
newTableDialog.showDialog(roomId);
|
||||||
if (newTableDialog.getTable() != null) {
|
if (newTableDialog.getTable() != null) {
|
||||||
tableWaitingDialog = new TableWaitingDialog();
|
tableWaitingDialog = new TableWaitingDialog();
|
||||||
MageFrame.getDesktop().add(tableWaitingDialog);
|
MageFrame.getDesktop().add(tableWaitingDialog, JLayeredPane.MODAL_LAYER);
|
||||||
tableWaitingDialog.showDialog(roomId, newTableDialog.getTable().getTableId(), false);
|
tableWaitingDialog.showDialog(roomId, newTableDialog.getTable().getTableId(), false);
|
||||||
}
|
}
|
||||||
}//GEN-LAST:event_btnNewTableActionPerformed
|
}//GEN-LAST:event_btnNewTableActionPerformed
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue