added Windows button to toolbar

This commit is contained in:
BetaSteward 2011-01-24 22:35:07 -05:00
parent 6e7576abe7
commit 812d1bc9c3
12 changed files with 152 additions and 115 deletions

View file

@ -19,12 +19,12 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" alignment="0" pref="394" max="32767" attributes="0"/>
<Component id="jScrollPane1" alignment="0" pref="868" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" alignment="0" pref="282" max="32767" attributes="0"/>
<Component id="jScrollPane1" alignment="0" pref="582" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>

View file

@ -49,6 +49,7 @@ public class DraftPane extends MagePane {
}
public void showDraft(UUID draftId) {
this.setTitle("Draft - " + draftId);
this.draftPanel1.showDraft(draftId);
}
@ -70,11 +71,11 @@ public class DraftPane extends MagePane {
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 394, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 868, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 282, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 582, Short.MAX_VALUE)
);
pack();

View file

@ -153,9 +153,6 @@
<Property name="editable" type="boolean" value="false"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtPack1ActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JTextField" name="txtPack2">
<Properties>
@ -168,18 +165,12 @@
<Property name="editable" type="boolean" value="false"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtPack3ActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JTextField" name="txtCardNo">
<Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtCardNoActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="chkPack1">
</Component>
@ -200,9 +191,6 @@
</Border>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtTimeRemainingActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>

View file

@ -34,6 +34,7 @@
package mage.client.draft;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.UUID;
@ -120,7 +121,12 @@ public class DraftPanel extends javax.swing.JPanel {
}
public void hideDraft() {
this.setVisible(false);
Component c = this.getParent();
while (c != null && !(c instanceof DraftPane)) {
c = c.getParent();
}
if (c != null)
c.setVisible(false);
}
/** This method is called from within the constructor to
@ -162,40 +168,20 @@ public class DraftPanel extends javax.swing.JPanel {
txtPack1.setEditable(false);
txtPack1.setEnabled(false);
txtPack1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txtPack1ActionPerformed(evt);
}
});
txtPack2.setEditable(false);
txtPack2.setEnabled(false);
txtPack3.setEditable(false);
txtPack3.setEnabled(false);
txtPack3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txtPack3ActionPerformed(evt);
}
});
txtCardNo.setEditable(false);
txtCardNo.setEnabled(false);
txtCardNo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txtCardNoActionPerformed(evt);
}
});
txtTimeRemaining.setEditable(false);
txtTimeRemaining.setForeground(java.awt.Color.red);
txtTimeRemaining.setHorizontalAlignment(javax.swing.JTextField.CENTER);
txtTimeRemaining.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
txtTimeRemaining.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txtTimeRemainingActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
@ -293,22 +279,6 @@ public class DraftPanel extends javax.swing.JPanel {
);
}// </editor-fold>//GEN-END:initComponents
private void txtPack1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtPack1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtPack1ActionPerformed
private void txtPack3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtPack3ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtPack3ActionPerformed
private void txtCardNoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCardNoActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtCardNoActionPerformed
private void txtTimeRemainingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTimeRemainingActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtTimeRemainingActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private mage.client.cards.BigCard bigCard;