use of mage.client.util.ClientEventType in project mage by magefree.
the class MageActionCallback method mouseClicked.
@Override
public void mouseClicked(MouseEvent e, TransferData data, boolean doubleClick) {
// send mouse clicked event to the card's area and other cards list components for processing
if (e.isConsumed()) {
return;
}
if (data.getComponent().getCardContainer() instanceof CardEventProducer) {
ClientEventType clickType = doubleClick ? ClientEventType.CARD_DOUBLE_CLICK : ClientEventType.CARD_CLICK;
CardEventProducer cardContainer = (CardEventProducer) data.getComponent().getCardContainer();
mage.client.util.Event clientEvent = new mage.client.util.Event(data.getComponent().getOriginal(), clickType, 0, e.getX(), e.getY(), data.getComponent(), e, false);
cardContainer.getCardEventSource().fireEvent(clientEvent);
}
}
Aggregations