DroppEvent
is allways called if a Stone reached the ground and a new one is created.
More...
Public Member Functions | |
DroppEvent (final Object source, int removedLines) | |
int | getRemovedLines () |
The getter method to acces the removedLines value. | |
Static Public Member Functions | |
static void | addDroppListener (final DroppListener l) |
The acces funktions for the private static listenerList . | |
static void | removeDroppListener (final DroppListener l) |
The acces funktions for the private static listenerList . | |
Private Member Functions | |
void | fireDropped () |
the method to notify all the listeners registered in listenerList | |
Private Attributes | |
int | removedLines |
Static Private Attributes | |
static final long | serialVersionUID = -55181583316208764L |
static final EventListenerList | listenerList = new EventListenerList() |
DroppEvent
is allways called if a Stone reached the ground and a new one is created.
tetrisEvent.DroppEvent.DroppEvent.DroppEvent | ( | final Object | source, | |
int | removedLines | |||
) |
References tetrisEvent.DroppEvent.DroppEvent.fireDropped().
00020 { 00021 super(source); 00022 this.removedLines = removedLines; 00023 fireDropped(); 00024 }
void tetrisEvent.DroppEvent.DroppEvent.fireDropped | ( | ) | [private] |
the method to notify all the listeners registered in listenerList
References tetrisEvent.DroppEvent.DroppEvent.listenerList.
Referenced by tetrisEvent.DroppEvent.DroppEvent.DroppEvent().
00030 { 00031 00032 final Object[] listeners = listenerList.getListenerList(); 00033 00034 // Process the listeners last to first, notifying 00035 // those that are interested in this event 00036 for (int i = listeners.length - 2; i >= 0; i -= 2) { 00037 // since there are only DropListeners added a valid operation. 00038 ((DroppListener) listeners[i + 1]).dropped(this); 00039 } 00040 }
static void tetrisEvent.DroppEvent.DroppEvent.addDroppListener | ( | final DroppListener | 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.DroppEvent.DroppEvent.listenerList.
00050 { 00051 listenerList.add(DroppListener.class, l); 00052 }
static void tetrisEvent.DroppEvent.DroppEvent.removeDroppListener | ( | final DroppListener | 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.DroppEvent.DroppEvent.listenerList.
00060 { 00061 listenerList.remove(DroppListener.class, l); 00062 }
int tetrisEvent.DroppEvent.DroppEvent.getRemovedLines | ( | ) |
The getter method to acces the removedLines
value.
References tetrisEvent.DroppEvent.DroppEvent.removedLines.
Referenced by game.Score.DroppEventListener.dropped().
00067 { 00068 return removedLines; 00069 }
final long tetrisEvent.DroppEvent.DroppEvent.serialVersionUID = -55181583316208764L [static, private] |
final EventListenerList tetrisEvent.DroppEvent.DroppEvent.listenerList = new EventListenerList() [static, private] |
int tetrisEvent.DroppEvent.DroppEvent.removedLines [private] |
Referenced by tetrisEvent.DroppEvent.DroppEvent.getRemovedLines().