Public Member Functions | |
GameOverEvent (final Object source) | |
Static Public Member Functions | |
static void | addGameOverListener (final GameOverListener l) |
The acces funktions for the private static listenerList . | |
static void | removeGameOverListener (final GameOverListener l) |
The acces funktions for the private static listenerList . | |
Private Member Functions | |
void | fireGameOver () |
the method to notify all the listeners registered in listenerList | |
Static Private Attributes | |
static final long | serialVersionUID = 1L |
static final EventListenerList | listenerList = new EventListenerList() |
tetrisEvent.GameOverEvent.GameOverEvent.GameOverEvent | ( | final Object | source | ) |
References tetrisEvent.GameOverEvent.GameOverEvent.fireGameOver().
00022 { 00023 super(source); 00024 fireGameOver(); 00025 }
void tetrisEvent.GameOverEvent.GameOverEvent.fireGameOver | ( | ) | [private] |
the method to notify all the listeners registered in listenerList
References tetrisEvent.GameOverEvent.GameOverEvent.listenerList.
Referenced by tetrisEvent.GameOverEvent.GameOverEvent.GameOverEvent().
00031 { 00032 00033 final Object[] listeners = listenerList.getListenerList(); 00034 00035 // Process the listeners last to first, notifying 00036 // those that are interested in this event 00037 for (int i = listeners.length - 2; i >= 0; i -= 2) { 00038 //DEBUG System.out.println(listeners[i + 1]); 00039 // since there are only DropListeners added a valid operation. 00040 ((GameOverListener) listeners[i + 1]).gameOver(this); 00041 } 00042 }
static void tetrisEvent.GameOverEvent.GameOverEvent.addGameOverListener | ( | final GameOverListener | l | ) | [static] |
The acces funktions for the private static listenerList
.
This in particular adds the given listener to list.
l | The listener that shall be added. |
References tetrisEvent.GameOverEvent.GameOverEvent.listenerList.
00052 { 00053 listenerList.add(GameOverListener.class, l); 00054 }
static void tetrisEvent.GameOverEvent.GameOverEvent.removeGameOverListener | ( | final GameOverListener | l | ) | [static] |
The acces funktions for the private static listenerList
.
This in particular removes the given listener from the list.
l | The listener that shall be removed. |
References tetrisEvent.GameOverEvent.GameOverEvent.listenerList.
00062 { 00063 listenerList.remove(GameOverListener.class, l); 00064 }
final long tetrisEvent.GameOverEvent.GameOverEvent.serialVersionUID = 1L [static, private] |
final EventListenerList tetrisEvent.GameOverEvent.GameOverEvent.listenerList = new EventListenerList() [static, private] |