ballwar.view
Interface IBallCtrlAdapter


public interface IBallCtrlAdapter

Interface to the model from the view that is used to control the balls once they are already created.


Method Summary
 void clearBalls()
          Asks the model to clear (delete) all the balls.
 String getDisplayStr(String origStr)
          Asks that the models augment or replace the current given display string.
 void paint(Graphics g)
          Requests that the model have all the balls paint themselves onto the given Graphics context and to update ther states.
 void switchStrategy(Object fac)
          Tells the model to switch the decoree strategy in the currently defined SwitcherStrategy to a new strategy, as specified by the given factory.
 

Method Detail

paint

void paint(Graphics g)
Requests that the model have all the balls paint themselves onto the given Graphics context and to update ther states.

Parameters:
g - The Graphics context onto which the balls should paint themeselves.

clearBalls

void clearBalls()
Asks the model to clear (delete) all the balls.


switchStrategy

void switchStrategy(Object fac)
Tells the model to switch the decoree strategy in the currently defined SwitcherStrategy to a new strategy, as specified by the given factory.

Parameters:
fac - The factory for the model to use to create the new decoree strategy for SwitcherStrategy..

getDisplayStr

String getDisplayStr(String origStr)
Asks that the models augment or replace the current given display string.

Parameters:
origStr - The original display string.
Returns:
The new display string.