All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class guinea.player.event.PlayerEvent
java.lang.Object
   |
   +----java.util.EventObject
           |
           +----guinea.player.event.PlayerEvent
  -  public class PlayerEvent
  -  extends EventObject
This is a base class for all player events.
  Variable Index
  -   · 
	id
  
-  The ID of the event type.
  
-   · 
	ID_LAST
  
-  The last ID number used bu this class.
  
-   · 
	ID_PLAYER_STARTED
  
-  The ID for the 'player has started' event.
  
-   · 
	ID_PLAYER_STOPPED
  
-  The ID for the 'player has stopped' event.
  Constructor Index
  -   · 
	PlayerEvent(Object, int)
  
-  Construct a new player event.
  Method Index
  -   · 
	getID()
  
-  Get the ID of this message.
  
-   · 
	getPlayer()
  
-  The the player that originated this event.
  
-   · 
	toString()
  
-  Return a string representation of the event.
  Variables
 · 
id
 protected int id
  -  The ID of the event type.
   
-  
    -  See Also:
    
-  getID
  
 
· 
ID_PLAYER_STARTED
 public static final int ID_PLAYER_STARTED
  -  The ID for the 'player has started' event.
 
· 
ID_PLAYER_STOPPED
 public static final int ID_PLAYER_STOPPED
  -  The ID for the 'player has stopped' event.
 
· 
ID_LAST
 public static final int ID_LAST
  -  The last ID number used bu this class.  Sub-classes may use ID
values larger than ID_LAST for their own message IDs.
 
  Constructors
 · 
PlayerEvent
 public PlayerEvent(Object source,
                    int id)
  -  Construct a new player event.
   
- 
    -  Parameters:
    
-  source - the source of the event.
    -  id - the ID of this message type.
  
 
  Methods
 · 
getID
 public int getID()
  -  Get the ID of this message.
   
- 
    -  Returns:
    
-  ID of this message.
  
 
· 
getPlayer
 public Player getPlayer()
  -  The the player that originated this event.  This simply
returns the source cast to a Player.
   
- 
    -  Returns:
    
-  the player that originated this event.
  
 
· 
toString
 public String toString()
  -  Return a string representation of the event.
   
- 
    -  Returns:
    
-  a string.
    
-  Overrides:
    
-  toString in class EventObject
  
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index