1 /* 
  2  * Created on May 2, 2005 
  3  * 
  4  * ControllerInterface.java 
  5  * Created with Eclipse v3.0 by tyoung 
  6  *  
  7  *  
  8  */ 
  9 package ubc.midp.mobilephoto.core.ui.controller; 
 10  
 11 import javax.microedition.lcdui.Command; 
 12  
 13  
 14 /** 
 15  * @author tyoung 
 16  * 
 17  * This interface must be implemented by all sub-Controllers used by MobilePhoto. 
 18  * It is for the Chain of Responsibility design pattern, and defined two methods. 
 19  * The entry point to handle a command using the implementing controller is the  
 20  * postCommand() method. postCommand() calls handleCommand, which will return True  
 21  * if the current controller has handled the command. handleCommand will return false otherwise. 
 22  * If handleCommand returns false, then postCommand will attempt to call the next controller 
 23  * in the chain, if one exists. 
 24  */ 
 25 public interface ControllerInterface { 
 26  
 27     public void postCommand(Command command); 
 28    
 29     public boolean handleCommand(Command command); 
 30      
 31 }    
    |