Package megamek.common.event.board
Class GameBoardNewEvent
java.lang.Object
java.util.EventObject
megamek.common.event.GameEvent
megamek.common.event.board.GameBoardNewEvent
- All Implemented Interfaces:
Serializable
Instances of this class are sent when the new board for game is set
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionGameBoardNewEvent(Object source, Board oldBoard, Board newBoard, int boardId) Constructs the new event with the specified old/new board objects -
Method Summary
Modifier and TypeMethodDescriptionvoidfireEvent(GameListener gameListener) Sub-classed events implement this method to call their specific method on a GameListener instance that their event has been fired.intMethods inherited from class java.util.EventObject
getSource
-
Constructor Details
-
GameBoardNewEvent
Constructs the new event with the specified old/new board objects- Parameters:
source- The event sourceoldBoard- old game boardnewBoard- new game board
-
-
Method Details
-
getNewBoard
-
getOldBoard
-
fireEvent
Description copied from class:GameEventSub-classed events implement this method to call their specific method on a GameListener instance that their event has been fired. -
getEventName
- Specified by:
getEventNamein classGameEvent
-
getBoardId
public int getBoardId()- Returns:
- The ID of both the old and new Board.
-