org.gjt.universe
Class ResultBase

java.lang.Object
  |
  +--org.gjt.universe.ResultBase
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ResultArrival, ResultBattle, ResultBuild, ResultColonize, ResultDetection, ResultEngineering, ResultHomeSystem, ResultMessage, ResultTech, ResultWormholeOscillation

public abstract class ResultBase
extends java.lang.Object
implements java.io.Serializable

The base class for all Result objects. A Result is the information that a civ receives during turn generation about certain events. Such events might include building of an item, research complete, or a space battle.

Author:
Sean Starkey
See Also:
Serialized Form

Field Summary
private  DisplayReturn DR
          The DisplayReturn that is displayed on the Results list.
 
Constructor Summary
protected ResultBase()
          This constructor will set the DisplayReturn to an empty string.
protected ResultBase(DisplayReturn in_DR)
          Constructor that takes a DisplayReturn used to display a message.
 
Method Summary
 DisplayReturn getDisplayReturn()
          This returns the DisplayReturn object associated with this result.
abstract  void selected()
          This abstract method is called when the result line is double clicked.
protected  void setDisplayReturn(DisplayReturn in_DR)
          This method sets the DisplayReturn object for this result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DR

private DisplayReturn DR
The DisplayReturn that is displayed on the Results list. Generally a message but might also include an index for a popup screen.

Constructor Detail

ResultBase

protected ResultBase()
This constructor will set the DisplayReturn to an empty string.


ResultBase

protected ResultBase(DisplayReturn in_DR)
Constructor that takes a DisplayReturn used to display a message.

Parameters:
in_DR - The DisplayReturn object.
Method Detail

setDisplayReturn

protected void setDisplayReturn(DisplayReturn in_DR)
This method sets the DisplayReturn object for this result.

Parameters:
in_DR - The new DisplayReturn object.

getDisplayReturn

public DisplayReturn getDisplayReturn()
This returns the DisplayReturn object associated with this result.

Returns:
The DisplayReturn object.

selected

public abstract void selected()
This abstract method is called when the result line is double clicked. This method should bring up a popup dialog with information or something similar. Some result objects will just ignore this method.



Copyright © 2001 Universe Dev Team All Rights Reserved.