Compilation fix

This commit is contained in:
magenoxx 2011-08-10 12:27:13 +04:00
parent 77e50e0a5d
commit cbf8f02df3

View file

@ -34,14 +34,6 @@
package mage.client.dialog;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.UUID;
import javax.swing.*;
import com.sun.deploy.panel.ITreeNode;
import mage.cards.CardDimensions;
import mage.cards.MageCard;
import mage.client.MageFrame;
@ -54,19 +46,26 @@ import mage.view.AbilityView;
import mage.view.CardView;
import mage.view.CardsView;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class ShowCardsDialog extends MageDialog implements MouseListener {
private boolean reloaded = false;
/** Creates new form ShowCardsDialog */
public ShowCardsDialog() {
initComponents();
/**
* Creates new form ShowCardsDialog
*/
public ShowCardsDialog() {
initComponents();
this.setModal(false);
}
}
public void loadCards(String name, CardsView showCards, BigCard bigCard, CardDimensions dimension, UUID gameId, boolean modal) {
this.reloaded = true;
@ -104,16 +103,16 @@ public class ShowCardsDialog extends MageDialog implements MouseListener {
private void loadCardsFew(CardsView showCards, BigCard bigCard, UUID gameId) {
Rectangle rectangle = new Rectangle(Config.dimensions.frameWidth, Config.dimensions.frameHeight);
Dimension dimension = new Dimension(Config.dimensions.frameWidth, Config.dimensions.frameHeight);
for (CardView card: showCards.values()) {
for (CardView card : showCards.values()) {
addCard(card, bigCard, gameId, rectangle, dimension);
rectangle.translate(Config.dimensions.frameWidth, 0);
}
cardArea.setPreferredSize(new Dimension(Config.dimensions.frameWidth * showCards.size(), Config.dimensions.frameHeight));
}
private void addCard(CardView card, BigCard bigCard, UUID gameId, Rectangle rectangle, Dimension dimension) {
if (card instanceof AbilityView) {
CardView tmp = ((AbilityView)card).getSourceCard();
CardView tmp = ((AbilityView) card).getSourceCard();
tmp.overrideRules(card.getRules());
tmp.setIsAbility(true);
tmp.overrideTargets(card.getTargets());
@ -135,7 +134,7 @@ public class ShowCardsDialog extends MageDialog implements MouseListener {
Rectangle rectangle = new Rectangle(Config.dimensions.frameWidth, Config.dimensions.frameHeight);
Dimension dimension = new Dimension(Config.dimensions.frameWidth, Config.dimensions.frameHeight);
int count = 0;
for (CardView card: showCards.values()) {
for (CardView card : showCards.values()) {
addCard(card, bigCard, gameId, rectangle, dimension);
if (count >= 20) {
rectangle.translate(Config.dimensions.frameWidth, -400);
@ -158,33 +157,34 @@ public class ShowCardsDialog extends MageDialog implements MouseListener {
this.reloaded = false;
}
/** 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 regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
/**
* 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 regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
cardArea = new javax.swing.JLayeredPane();
jScrollPane1 = new javax.swing.JScrollPane();
cardArea = new javax.swing.JLayeredPane();
setClosable(true);
setResizable(true);
getContentPane().setLayout(new java.awt.BorderLayout());
setClosable(true);
setResizable(true);
getContentPane().setLayout(new java.awt.BorderLayout());
jScrollPane1.setViewportView(cardArea);
jScrollPane1.setViewportView(cardArea);
getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
pack();
}// </editor-fold>//GEN-END:initComponents
pack();
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLayeredPane cardArea;
private javax.swing.JScrollPane jScrollPane1;
// End of variables declaration//GEN-END:variables
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLayeredPane cardArea;
private javax.swing.JScrollPane jScrollPane1;
// End of variables declaration//GEN-END:variables
@Override
public void mouseClicked(MouseEvent e) {
@ -197,12 +197,15 @@ public class ShowCardsDialog extends MageDialog implements MouseListener {
}
@Override
public void mouseReleased(MouseEvent e) {}
public void mouseReleased(MouseEvent e) {
}
@Override
public void mouseEntered(MouseEvent e) {}
public void mouseEntered(MouseEvent e) {
}
@Override
public void mouseExited(MouseEvent e) {}
public void mouseExited(MouseEvent e) {
}
}