de.hagenah.diplomacy.addins
Class ObserverAddIn

java.lang.Object
  extended by de.hagenah.diplomacy.addins.ObserverAddIn
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class ObserverAddIn
extends java.lang.Object
implements java.awt.event.ActionListener

This add-in gets a history and a list/summary of a game from the www.floc.net observer. The game is added to the selected game group or if an already existing game is selected it is updated (only the necessary part of the history is retrieved). There must be an Internet connection and the game must be registered with the www.floc.net observer. The advantages of getting the data from www.floc.net instead of the judges direct are:

and the disadvantages are:


Constructor Summary
ObserverAddIn(javax.swing.JFrame parent, Preferences preferences, java.lang.Object obj)
          Each time the add-in is called a new object is created.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Handler for the OK and Cancel button.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObserverAddIn

public ObserverAddIn(javax.swing.JFrame parent,
                     Preferences preferences,
                     java.lang.Object obj)
Each time the add-in is called a new object is created. This constructor should not return before the add-in has finished. It is executed by the event dispatching thread.

Parameters:
parent - A parent frame for dialog boxes
preferences - The preferences of the user
obj - The selected object in the tree:
  • a DipTurn, or
  • a DipGame, or
  • a DipGameGroup, or
  • a Map (String → DipGameGroup).
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Handler for the OK and Cancel button.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
event - Indicates which action occured