Class GameDataEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class GameDataEvent
    extends TimeStampedEvent
    An event indicating that the previous game data object is no longer valid e.g. after the user loaded a report. See magellan.client.event.EventDispatcher.
    See Also:
    GameDataListener, Serialized Form
    • Field Summary

      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor Description
      GameDataEvent​(java.lang.Object source, GameData data)
      Creates an GameDataEvent object.
      GameDataEvent​(java.lang.Object source, GameData data, boolean isLoaded)
      Creates an GameDataEvent object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      GameData getGameData()
      Returns the new valid game data object.
      boolean isLoaded()
      Returns true if game data is freshly loaded (in contrast to a GameDataEvent with a changed game data object that is only thrown if there are so many changes that single OrderConfirmEvent/ TempUnitEvent/UnitOrdersEvent) would bloat the event queue).
      • Methods inherited from class java.util.EventObject

        getSource
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GameDataEvent

        public GameDataEvent​(java.lang.Object source,
                             GameData data)
        Creates an GameDataEvent object.
        Parameters:
        source - the object that originated the event.
        data - the new game data object.
      • GameDataEvent

        public GameDataEvent​(java.lang.Object source,
                             GameData data,
                             boolean isLoaded)
        Creates an GameDataEvent object.
        Parameters:
        source - the object that originated the event.
        data - the new game data object.
        isLoaded - the new isLoaded state of the GameDataEvent.
    • Method Detail

      • getGameData

        public GameData getGameData()
        Returns the new valid game data object.
        Returns:
        the new game data object
      • isLoaded

        public boolean isLoaded()
        Returns true if game data is freshly loaded (in contrast to a GameDataEvent with a changed game data object that is only thrown if there are so many changes that single OrderConfirmEvent/ TempUnitEvent/UnitOrdersEvent) would bloat the event queue).