CardsList: replaced mouseClicked by mousePressed (better interaction).

This commit is contained in:
magenoxx 2010-12-12 23:39:50 +03:00
parent 6e347d835a
commit 100a0a54e1
2 changed files with 7 additions and 7 deletions

View file

@ -136,9 +136,13 @@ public class CardsList extends javax.swing.JPanel implements MouseListener {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2 && !e.isConsumed()) {
}
@Override
public void mousePressed(MouseEvent e) {
if (e.getClickCount() == 2 && !e.isConsumed()) {
e.consume();
Object obj = e.getSource();
Object obj = e.getSource();
if (obj instanceof Card) {
cardEventSource.doubleClick(((Card)obj).getCardId(), "double-click");
} else if (obj instanceof MageCard) {
@ -147,10 +151,6 @@ public class CardsList extends javax.swing.JPanel implements MouseListener {
}
}
@Override
public void mousePressed(MouseEvent e) {
}
@Override
public void mouseReleased(MouseEvent e) {
}

View file

@ -63,7 +63,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
private JFileChooser fcSelectDeck;
private JFileChooser fcImportDeck;
private Deck deck = new Deck();;
private Deck deck = new Deck();
/** Creates new form DeckEditorPanel */
public DeckEditorPanel() {