Q:

Direct flow depending on incoming dynamic type

I have a listener class that accepts GUI change events in one method.
The incoming event objects have a superclass of a type of GUI Event, the behaviour should depend on the dynamic type of the incoming variable.
I wanted to do do lots of methods like:
handleGUIEvent(EventChangedX event)
handleGUIEvent(EventChangedY event)

I am using a single event listener and receiving objects of various types but the behaviour should be different for each. What would you do?
I do not want to use a switch statement as this would get unmaintainable.

A:

GUIEvent should provide an abstract method of the type
delegateEvent(EventListener el)

Each subclass should then implement this method, and call back on a particular method on EventListener. That way the subclasses of GUIEvent can determine what to call on EventListener, and the two object classes between them can determine what action to perform. This is known as double-dispatch. It avoids switch statements and the like.
Although I've drawn this out as EventListener calling on GUIEvent.delegateEvent and calling back on EventListener, there's no reason why there couldn't be a third class (say, EventReceiver). So the abstract method on GUIEvent would look like:
delegateEvent(EventReceiver er)

and EventReceiver would implement appropriate methods to be called by the GUIEvents.

