001/* 002 * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. 003 * Copyright (C) 2000-2010 The Gridarta Developers. 004 * 005 * This program is free software; you can redistribute it and/or modify 006 * it under the terms of the GNU General Public License as published by 007 * the Free Software Foundation; either version 2 of the License, or 008 * (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU General Public License for more details. 014 * 015 * You should have received a copy of the GNU General Public License along 016 * with this program; if not, write to the Free Software Foundation, Inc., 017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 018 */ 019 020package net.sf.gridarta.model.settings; 021 022import java.io.File; 023import org.jetbrains.annotations.NotNull; 024 025/** 026 * An {@link GlobalSettings} implementation for testing purposes. 027 * @author Andreas Kirschbaum 028 */ 029public class TestGlobalSettings extends AbstractGlobalSettings { 030 031 /** 032 * The maps directory. 033 */ 034 @NotNull 035 private File mapsDirectory = new File("maps"); 036 037 /** 038 * {@inheritDoc} 039 */ 040 @NotNull 041 @Override 042 public File getArchDirectoryDefault() { 043 throw new AssertionError(); 044 } 045 046 /** 047 * {@inheritDoc} 048 */ 049 @NotNull 050 @Override 051 public File getArchDirectory() { 052 return new File("arch"); 053 } 054 055 /** 056 * {@inheritDoc} 057 */ 058 @Override 059 public void setArchDirectory(@NotNull final File archDirectory) { 060 throw new AssertionError(); 061 } 062 063 /** 064 * {@inheritDoc} 065 */ 066 @NotNull 067 @Override 068 public File getMapsDirectoryDefault() { 069 throw new AssertionError(); 070 } 071 072 /** 073 * {@inheritDoc} 074 */ 075 @NotNull 076 @Override 077 public File getMapsDirectory() { 078 return mapsDirectory; 079 } 080 081 /** 082 * {@inheritDoc} 083 */ 084 @Override 085 public void setMapsDirectory(@NotNull final File mapsDirectory) { 086 if (this.mapsDirectory.equals(mapsDirectory)) { 087 return; 088 } 089 090 this.mapsDirectory = mapsDirectory; 091 fireMapsDirectoryChanged(); 092 } 093 094 /** 095 * {@inheritDoc} 096 */ 097 @Override 098 public void setImageDirectory(@NotNull final File imageDirectory) { 099 throw new AssertionError(); 100 } 101 102 /** 103 * {@inheritDoc} 104 */ 105 @NotNull 106 @Override 107 public File getImageDirectory() { 108 throw new AssertionError(); 109 } 110 111 /** 112 * {@inheritDoc} 113 */ 114 @NotNull 115 @Override 116 public String getConfigSourceName() { 117 throw new AssertionError(); 118 } 119 120 /** 121 * {@inheritDoc} 122 */ 123 @Override 124 public void setConfigSourceName(@NotNull final String configSourceName) { 125 throw new AssertionError(); 126 } 127 128 /** 129 * {@inheritDoc} 130 */ 131 @NotNull 132 @Override 133 public File getCurrentSaveMapDirectory() { 134 throw new AssertionError(); 135 } 136 137 /** 138 * {@inheritDoc} 139 */ 140 @Override 141 public void setCurrentSaveMapDirectory(@NotNull final File currentSaveMapDirectory) { 142 throw new AssertionError(); 143 } 144 145 /** 146 * {@inheritDoc} 147 */ 148 @Override 149 public boolean isAutoPopupDocumentation() { 150 throw new AssertionError(); 151 } 152 153 /** 154 * {@inheritDoc} 155 */ 156 @Override 157 public void setAutoPopupDocumentation(final boolean autoPopupDocumentation) { 158 throw new AssertionError(); 159 } 160 161 /** 162 * {@inheritDoc} 163 */ 164 @Override 165 @NotNull 166 public File getPickmapDir() { 167 throw new AssertionError(); 168 } 169 170 /** 171 * {@inheritDoc} 172 */ 173 @Override 174 public boolean hasMediaDirectory() { 175 throw new AssertionError(); 176 } 177 178 /** 179 * {@inheritDoc} 180 */ 181 @NotNull 182 @Override 183 public File getMediaDirectoryDefault() { 184 throw new AssertionError(); 185 } 186 187 /** 188 * {@inheritDoc} 189 */ 190 @Override 191 @NotNull 192 public File getMediaDirectory() { 193 throw new AssertionError(); 194 } 195 196 /** 197 * {@inheritDoc} 198 */ 199 @Override 200 public void setMediaDirectory(@NotNull final File mediaDirectory) { 201 throw new AssertionError(); 202 } 203 204 /** 205 * {@inheritDoc} 206 */ 207 @Override 208 public boolean hasImageSet() { 209 throw new AssertionError(); 210 } 211 212 /** 213 * {@inheritDoc} 214 */ 215 @NotNull 216 @Override 217 public String getImageSetDefault() { 218 throw new AssertionError(); 219 } 220 221 /** 222 * {@inheritDoc} 223 */ 224 @NotNull 225 @Override 226 public String getImageSet() { 227 throw new AssertionError(); 228 } 229 230 @Override 231 public void setImageSet(@NotNull final String imageSet) { 232 throw new AssertionError(); 233 } 234 235 /** 236 * {@inheritDoc} 237 */ 238 @Override 239 @NotNull 240 public File getConfigurationDirectory() { 241 throw new AssertionError(); 242 } 243 244 /** 245 * {@inheritDoc} 246 */ 247 @Override 248 @NotNull 249 public File getCollectedDirectory() { 250 return new File("collected"); 251 } 252 253 /** 254 * {@inheritDoc} 255 */ 256 @Override 257 public boolean isShowMainToolbar() { 258 throw new AssertionError(); 259 } 260 261 /** 262 * {@inheritDoc} 263 */ 264 @Override 265 public void setShowMainToolbar(final boolean selected) { 266 throw new AssertionError(); 267 } 268 269 /** 270 * {@inheritDoc} 271 */ 272 @NotNull 273 @Override 274 public String getUserName() { 275 return "user"; 276 } 277 278 /** 279 * {@inheritDoc} 280 */ 281 @NotNull 282 @Override 283 public String getUserNameDefault() { 284 throw new AssertionError(); 285 } 286 287 /** 288 * {@inheritDoc} 289 */ 290 @Override 291 public void setUserName(@NotNull final String userName) { 292 throw new AssertionError(); 293 } 294 295 /** 296 * {@inheritDoc} 297 */ 298 @Override 299 public boolean saveIndices() { 300 return false; 301 } 302 303}