// 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"); } } } }
@Override public void clearCardEventListeners() { cardEventSource.clearListeners(); }
@Override public void addCardEventListener(Listener<Event> listener) { cardEventSource.addListener(listener); }