package football;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import football.config.CustomScoringHelperProperties;
import football.core.ComparisonModel;
import football.core.ScoringResults;
import football.core.SimpleController;
import football.core.SimpleModel;
import football.core.SimpleView;
import football.core.intface.CustomScoringHelperController;
import football.core.intface.CustomScoringHelperModel;

public class FantasyFootballCustomScoringHelper
{
	private static final Logger logger = LoggerFactory.getLogger(FantasyFootballCustomScoringHelper.class.getName());

	public static void main(String[] args)
	{
		// read in properties from file
		CustomScoringHelperProperties.init();

		// determine type of model to create
		CustomScoringHelperModel model;
		if(CustomScoringHelperProperties.useCompositeModel()) {
			logger.info("creating comparison model");
			model = new ComparisonModel();
		} else {
			logger.info("creating simple model");
			model = new SimpleModel();
		}

		// if no cmd line args, then run GUI version; else, run command line version
		boolean runGUIVersion = (args.length == 0);
		if(runGUIVersion) {
			logger.info("Running GUI version");
			SimpleView view = new SimpleView(model);
			CustomScoringHelperController controller = new SimpleController(model, view);
			view.setVisible(true);
		} else {
			logger.info("Running command line version");
			ScoringResults results = model.run(args);
			model.logResults(results);
		}
	}
}

@@ -12,16 +12,99 @@
 tball;%0A%0A
+import javax.swing.UIManager;%0Aimport javax.swing.UnsupportedLookAndFeelException;%0A%0A
 import o
@@ -713,16 +713,456 @@
 rgs)%0A%09%7B%0A
+        try %7B%0A            UIManager.setLookAndFeel(%0A                    UIManager.getSystemLookAndFeelClassName());%0A        %7D catch (UnsupportedLookAndFeelException e) %7B%0A%09%09%09logger.error(e.toString());%0A        %7D catch (ClassNotFoundException e) %7B%0A%09%09%09logger.error(e.toString());%0A        %7D catch (InstantiationException e) %7B%0A%09%09%09logger.error(e.toString());%0A        %7D catch (IllegalAccessException e) %7B%0A%09%09%09logger.error(e.toString());%0A        %7D%0A%0A
 %09%09// rea

set look and feel to system L&F