1 /****************************************************************************** 2 * BoardTestCommandDispatcher.java - Dummy CommandDispatcher for testing backgammon board drawing 3 * $Id$ 4 * 5 * BuckoFIBS - Backgammon by BuckoSoft 6 * Copyright© 2009,2010 - Dick Balaska - BuckoSoft, Corp. 7 * 8 * $Log$ 9 * Revision 1.2 2011/07/04 03:44:55 dick 10 * writeGameErrorln() writes a message to the game window in red. 11 * 12 * Revision 1.1 2011/05/07 15:11:29 dick 13 * Move BoardTest to the test system. 14 * 15 * Revision 1.5 2011/05/06 23:46:45 dick 16 * Remove a comment tag. 17 * 18 * Revision 1.4 2010/12/22 04:36:49 dick 19 * Add dummy getMainDialog(). 20 * 21 * Revision 1.3 2010/03/03 13:12:22 inim 22 * Replaced (c) sign in comment mangled by CVS default encoding back to UTF-8 23 * 24 * Revision 1.2 2010/03/03 12:19:49 inim 25 * Moved source to UTF8 encoding from CP1252 encoding. To this end all source files' (c) message was updated to "Copyright© 2009,2010 - Dick Balaska - BuckoSoft, Corp.". This replaces the (c) sign to UTF8, and adds the new year 2010. 26 * 27 * Revision 1.1 2010/02/04 05:57:53 inim 28 * Mavenized project folder layout 29 * 30 * Revision 1.6 2009/02/24 05:51:12 dick 31 * Add dummy ropChanged(). 32 * 33 * Revision 1.5 2009/02/14 15:34:31 dick 34 * BuckoFIBS is released under the GNU license. 35 * Javadoc. 36 * 37 * Revision 1.4 2009/02/05 05:58:56 dick 38 * Get rid of the toodoo markers. 39 * 40 * Revision 1.3 2009/02/03 09:47:47 dick 41 * Dummy message handling needed by CommandDispatcher. 42 * 43 * Revision 1.2 2009/01/31 06:02:59 dick 44 * Add a dummy for the ToolbarHandler.buttonPressed(). 45 * 46 * Revision 1.1 2009/01/28 19:38:02 dick 47 * package com.buckosoft.fibs.gui.board.test becomes com.buckosoft.fibs.BuckoFIBS.gui.board.test. 48 * 49 * Revision 1.2 2009/01/28 18:15:24 dick 50 * Prettier cvs link in the javadoc. 51 * 52 * Revision 1.1 2009/01/18 05:12:53 dick 53 * Dummy CommandDispatcher for testing backgammon board drawing. 54 */ 55 56 /* 57 * This program is free software: you can redistribute it and/or modify 58 * it under the terms of the GNU General Public License as published by 59 * the Free Software Foundation, either version 3 of the License, or 60 * (at your option) any later version. 61 * 62 * This program is distributed in the hope that it will be useful, 63 * but WITHOUT ANY WARRANTY; without even the implied warranty of 64 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 65 * GNU General Public License for more details. 66 * 67 * You should have received a copy of the GNU General Public License 68 * along with this program. If not, see <http://www.gnu.org/licenses/>. 69 * 70 * The Original Code is BuckoFIBS, <http://www.buckosoft.com/BuckoFIBS/>. 71 * The Initial Developer of the Original Code is Dick Balaska and BuckoSoft, Corp. 72 * 73 */ 74 package com.buckosoft.fibs.gui.board; 75 76 import com.buckosoft.fibs.BuckoFIBS.BFProperties; 77 import com.buckosoft.fibs.BuckoFIBS.CommandDispatcher; 78 import com.buckosoft.fibs.BuckoFIBS.gui.MainDialog; 79 80 /** Dummy CommandDispatcher for testing backgammon board drawing 81 * @author Dick Balaska 82 * @since 2009/01/17 83 * @version $Revision$ <br> $Date$ 84 * @see <a href="http://cvs.buckosoft.com/Projects/BuckoFIBS/BuckoFIBS/src/com/buckosoft/fibs/BuckoFIBS/gui/board/test/BoardTestCommandDispatcher.java">cvs BoardTestCommandDispatcher.java</a> 85 */ 86 public class BoardTestCommandDispatcher implements CommandDispatcher { 87 private BFProperties properties; 88 89 /* (non-Javadoc) 90 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#dispatch(com.buckosoft.fibs.BuckoFIBS.CommandDispatcher.Command) 91 */ 92 @Override 93 public void dispatch(Command command) { 94 System.out.println("dispatch: " + command.toString()); 95 } 96 97 /* (non-Javadoc) 98 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#dispatch(com.buckosoft.fibs.BuckoFIBS.CommandDispatcher.Command, java.lang.String) 99 */ 100 @Override 101 public void dispatch(Command command, String arg1) { 102 System.out.println("dispatch: " + command.toString() + " arg1:'" + arg1 + "'"); 103 } 104 105 /* (non-Javadoc) 106 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#dispatch(com.buckosoft.fibs.BuckoFIBS.CommandDispatcher.Command, java.lang.Object) 107 */ 108 @Override 109 public void dispatch(Command command, Object obj) { 110 System.out.println("dispatch object: " + command.toString()); 111 } 112 113 /* (non-Javadoc) 114 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#dispatch(com.buckosoft.fibs.BuckoFIBS.CommandDispatcher.Command, java.lang.String, java.lang.String) 115 */ 116 @Override 117 public void dispatch(Command command, String arg1, String arg2) { 118 System.out.println("dispatch: " + command.toString() + " arg1:'" + arg1 + "'" + " arg2:'" + arg2 + "'"); 119 } 120 121 /* (non-Javadoc) 122 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#getProperties() 123 */ 124 @Override 125 public BFProperties getProperties() { 126 return(this.properties); 127 } 128 129 /** dummy method 130 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#setMainDialog(com.buckosoft.fibs.BuckoFIBS.gui.MainDialog) 131 */ 132 @Override 133 public void setMainDialog(MainDialog mainDialog) { 134 } 135 136 /** (non-Javadoc) 137 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#setProperties(com.buckosoft.fibs.BuckoFIBS.BFProperties) 138 */ 139 @Override 140 public void setProperties(BFProperties properties) { 141 this.properties = properties; 142 } 143 144 /* (non-Javadoc) 145 * @see com.buckosoft.fibs.BuckoFIBS.gui.board.ToolbarHandler#buttonPressed(com.buckosoft.fibs.BuckoFIBS.gui.board.ToolbarHandler.Button) 146 */ 147 @Override 148 public void buttonPressed(Button button) { 149 } 150 151 /* (non-Javadoc) 152 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#writeChatMessageln(java.lang.String, int, java.lang.String) 153 */ 154 @Override 155 public void writeChatMessageln(String name, int cookie, String text) { 156 } 157 158 /* (non-Javadoc) 159 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#writeGameMessageln(java.lang.String) 160 */ 161 @Override 162 public void writeGameMessageln(String s) { 163 } 164 165 /* (non-Javadoc) 166 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#writeNetworkMessageln(java.lang.String) 167 */ 168 @Override 169 public boolean writeNetworkMessageln(String s) { 170 return false; 171 } 172 173 /* (non-Javadoc) 174 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#writeRegisterUserMessage(java.lang.String) 175 */ 176 @Override 177 public void writeRegisterUserMessage(String s) { 178 } 179 180 /* (non-Javadoc) 181 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#writeSystemMessage(int, java.lang.String) 182 */ 183 @Override 184 public void writeSystemMessage(int type, String s) { 185 } 186 187 /* (non-Javadoc) 188 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#writeSystemMessageln(int, java.lang.String) 189 */ 190 @Override 191 public void writeSystemMessageln(int type, String s) { 192 } 193 194 /* (non-Javadoc) 195 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#writeSystemMessageln(java.lang.String) 196 */ 197 @Override 198 public void writeSystemMessageln(String s) { 199 } 200 201 /* (non-Javadoc) 202 * @see com.buckosoft.fibs.BuckoFIBS.CommandDispatcher#ropChanged(boolean[]) 203 */ 204 @Override 205 public void ropChanged(boolean[] rop) { 206 } 207 208 @Override 209 public MainDialog getMainDialog() { 210 return null; 211 } 212 213 @Override 214 public void writeGameErrorln(String s) { 215 // TODO Auto-generated method stub 216 217 } 218 219 }