use of org.magic.api.interfaces.MTGPicturesCache in project MtgDesktopCompanion by nicho92.
the class PicturesProviderTests method removeCache.
@Before
public void removeCache() {
MTGLogger.changeLevel(Level.ERROR);
List<MTGPicturesCache> caches = MTGControler.getInstance().getListCaches();
MTGControler.getInstance().getListCaches().removeAll(caches);
MTGPicturesCache cache = new NoCache();
cache.enable(true);
MTGControler.getInstance().getListCaches().add(cache);
}
use of org.magic.api.interfaces.MTGPicturesCache in project MtgDesktopCompanion by nicho92.
the class SpeedConfigurator method save.
protected void save() {
for (MTGCardsProvider prov : MTGControler.getInstance().getListProviders()) {
prov.enable(false);
if (prov.getName().equals(cboProvider.getSelectedItem().toString()))
prov.enable(true);
MTGControler.getInstance().setProperty(prov, prov.isEnable());
}
for (MTGDao prov : MTGControler.getInstance().getDaoProviders()) {
prov.enable(false);
if (prov.getName().equals(cboDAOs.getSelectedItem().toString()))
prov.enable(true);
MTGControler.getInstance().setProperty(prov, prov.isEnable());
}
for (MTGPictureProvider prov : MTGControler.getInstance().getPicturesProviders()) {
prov.enable(false);
if (prov.getName().equals(cboPictures.getSelectedItem().toString()))
prov.enable(true);
MTGControler.getInstance().setProperty(prov, prov.isEnable());
}
for (MTGPicturesCache prov : MTGControler.getInstance().getListCaches()) {
prov.enable(false);
if (prov.getName().equals(cboCaches.getSelectedItem().toString()))
prov.enable(true);
MTGControler.getInstance().setProperty(prov, prov.isEnable());
}
for (MTGDashBoard prov : MTGControler.getInstance().getDashBoards()) {
prov.enable(false);
if (prov.getName().equals(cboDashboard.getSelectedItem().toString()))
prov.enable(true);
MTGControler.getInstance().setProperty(prov, prov.isEnable());
}
System.exit(0);
}
Aggregations