use of org.magic.api.interfaces.MTGCardsProvider 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