jagafa.view.newui
Class RoundController2

java.lang.Object
  extended by java.util.Observable
      extended by jagafa.view.newui.RoundController2
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.util.Observer

public class RoundController2
extends java.util.Observable
implements java.awt.event.ActionListener, java.util.Observer

RoundController2 collects UI actions from the view and sends it to the round object. He also gets UI-update notification of the round and sends it to the view This version of RoundController does not show anything on the screen. It just creates the views. A top-level controller can fetch those views (JPanel) by calling the get...() methods.


Constructor Summary
RoundController2()
          Constructor does nothing.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Called by the top-level UI's cardPressed() method
 JassRound getRound()
          Get the round instance of the controller
 JassRoundPanel getRoundPanel()
          Get the rounds UI panel
 RuleChoicePanel getRuleChoicePanel()
          Get the RuleChoice panel
 RoundStatsPanel getStatsPanel()
          Get the stats panel
 SimpleSTPanel getSTPanel()
           
 void runAutomated()
           
 void startRound(ScoreTable scoreTable)
          Starts the game with the ruleSet given
 void toggleNoify()
           
 void update(java.util.Observable o, java.lang.Object arg)
          Update the UI when an observable calls this observer
 void updateStats()
           
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoundController2

public RoundController2()
Constructor does nothing. Game has to be started by calling startGame(Rules r)

Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Called by the top-level UI's cardPressed() method

Specified by:
actionPerformed in interface java.awt.event.ActionListener

startRound

public void startRound(ScoreTable scoreTable)
Starts the game with the ruleSet given


updateStats

public void updateStats()

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Update the UI when an observable calls this observer

Specified by:
update in interface java.util.Observer

getRound

public JassRound getRound()
Get the round instance of the controller


getRoundPanel

public JassRoundPanel getRoundPanel()
Get the rounds UI panel


getStatsPanel

public RoundStatsPanel getStatsPanel()
Get the stats panel


getRuleChoicePanel

public RuleChoicePanel getRuleChoicePanel()
Get the RuleChoice panel


runAutomated

public void runAutomated()

getSTPanel

public SimpleSTPanel getSTPanel()

toggleNoify

public void toggleNoify()


Copyright 2005 MA Software. All Rights Reserved.