forked from External/mage
change client messages to enum rather than string
This commit is contained in:
parent
a110b54d91
commit
9cbc2b7ea2
14 changed files with 233 additions and 331 deletions
|
|
@ -27,14 +27,13 @@
|
|||
*/
|
||||
package mage.client.cards;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.io.Serializable;
|
||||
import mage.client.util.*;
|
||||
import mage.client.util.Event;
|
||||
import mage.client.util.EventDispatcher;
|
||||
import mage.client.util.EventSource;
|
||||
import mage.client.util.Listener;
|
||||
import mage.view.SimpleCardView;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -49,42 +48,22 @@ public class CardEventSource implements EventSource<Event>, Serializable {
|
|||
dispatcher.addListener(listener);
|
||||
}
|
||||
|
||||
public void setNumber(SimpleCardView card, String message, int number) {
|
||||
dispatcher.fireEvent(new Event(card, message, number));
|
||||
public void fireEvent(SimpleCardView card, ClientEventType eventType, int number){
|
||||
dispatcher.fireEvent(new Event(card, eventType, number));
|
||||
}
|
||||
|
||||
public void removeSpecificCard(SimpleCardView card, String message) {
|
||||
dispatcher.fireEvent(new Event(card, message));
|
||||
public void fireEvent(ClientEventType eventType){
|
||||
dispatcher.fireEvent(new Event(null, eventType));
|
||||
}
|
||||
|
||||
public void addSpecificCard(SimpleCardView card, String message) {
|
||||
dispatcher.fireEvent(new Event(card, message));
|
||||
public void fireEvent(SimpleCardView card, ClientEventType eventType){
|
||||
dispatcher.fireEvent(new Event(card, eventType));
|
||||
}
|
||||
|
||||
public void doubleClick(SimpleCardView card, String message) {
|
||||
dispatcher.fireEvent(new Event(card, message));
|
||||
}
|
||||
|
||||
public void altDoubleClick(SimpleCardView card, String message) {
|
||||
dispatcher.fireEvent(new Event(card, message));
|
||||
}
|
||||
|
||||
public void removeFromMainEvent(String message) {
|
||||
dispatcher.fireEvent(new Event(null, message));
|
||||
}
|
||||
|
||||
public void removeFromSideboardEvent(String message) {
|
||||
dispatcher.fireEvent(new Event(null, message));
|
||||
}
|
||||
|
||||
public void showPopupMenuEvent(SimpleCardView card, Component component, int x, int y, String message) {
|
||||
public void fireEvent(SimpleCardView card, Component component, int x, int y, ClientEventType message) {
|
||||
dispatcher.fireEvent(new Event(card, message, x, y, component));
|
||||
}
|
||||
|
||||
public void actionConsumedEvent(String message) {
|
||||
dispatcher.fireEvent(new Event(null, message));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearListeners() {
|
||||
dispatcher.clearListeners();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue