tetrisEvent.DroppEvent.DroppEvent Class Reference

The DroppEvent is allways called if a Stone reached the ground and a new one is created. More...

Inheritance diagram for tetrisEvent.DroppEvent.DroppEvent:

Inheritance graph
[legend]
Collaboration diagram for tetrisEvent.DroppEvent.DroppEvent:

Collaboration graph
[legend]

List of all members.

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()


Detailed Description

The DroppEvent is allways called if a Stone reached the ground and a new one is created.

Author:
Team Solid Sun
Version:
0.01 09.jun.2008

Constructor & Destructor Documentation

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         }


Member Function Documentation

void tetrisEvent.DroppEvent.DroppEvent.fireDropped (  )  [private]

the method to notify all the listeners registered in listenerList

See also:
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.

Parameters:
l The listener that shall be added.
See also:
listenerList

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.

Parameters:
l The listener that shall be removed.
See also:
listenerList

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.

Returns:
The count of Lines that were removed.

References tetrisEvent.DroppEvent.DroppEvent.removedLines.

Referenced by game.Score.DroppEventListener.dropped().

00067                                      {
00068                 return removedLines;
00069         }


Member Data Documentation

final long tetrisEvent.DroppEvent.DroppEvent.serialVersionUID = -55181583316208764L [static, private]

final EventListenerList tetrisEvent.DroppEvent.DroppEvent.listenerList = new EventListenerList() [static, private]


The documentation for this class was generated from the following file:

Generated on Mon Jul 28 19:03:09 2008 for SolidJavaTetris by  doxygen 1.5.5