Ejemplo n.º 1
0
 // Variables declaration - do not modify//GEN-BEGIN:variables
 // End of variables declaration//GEN-END:variables
 @Override
 public void mouseClicked(MouseEvent e) {
   if ((e.getClickCount() & 1) == 0
       && (e.getClickCount() > 0)
       && !e.isConsumed()) { // double clicks and repeated double clicks
     e.consume();
     Object obj = e.getSource();
     if (obj instanceof Card) {
       if (e.isAltDown()) {
         cardEventSource.altDoubleClick(((Card) obj).getOriginal(), "alt-double-click");
       } else {
         cardEventSource.doubleClick(((Card) obj).getOriginal(), "double-click");
       }
     } else if (obj instanceof MageCard) {
       if (e.isAltDown()) {
         cardEventSource.altDoubleClick(((MageCard) obj).getOriginal(), "alt-double-click");
       } else {
         cardEventSource.doubleClick(((MageCard) obj).getOriginal(), "double-click");
       }
     }
   }
 }
Ejemplo n.º 2
0
 @Override
 public void clearCardEventListeners() {
   cardEventSource.clearListeners();
 }
Ejemplo n.º 3
0
 @Override
 public void addCardEventListener(Listener<Event> listener) {
   cardEventSource.addListener(listener);
 }