/*
 * @(#)Main.java  1.0  2009-12-20
 * 
 * Copyright (c) 2009 Werner Randelshofer, Immensee, Switzerland.
 * All rights reserved.
 *
 * You may not use, copy or modify this file, except in compliance with the
 * license agreement you entered into with Werner Randelshofer.
 * For details see accompanying license terms.
 */

package ch.randelshofer.multishow;

import org.jhotdraw.app.Application;
import org.jhotdraw.app.OSXApplication;
import org.jhotdraw.app.SDIApplication;
import org.jhotdraw.util.ResourceBundleUtil;

/**
 * Main.
 *
 * @author Werner Randelshofer
 * @version 1.0 2009-12-20 Created.
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // Debug resource bundle
        ResourceBundleUtil.setVerbose(true);

        Application app;
        String os = System.getProperty("os.name").toLowerCase();
        if (os.startsWith("mac")) {
            app = new OSXApplication();
        } else if (os.startsWith("win")) {
          //  app = new DefaultMDIApplication();
            app = new SDIApplication();
        } else {
            app = new SDIApplication();
        }
        MultiShowApplicationModel model = new MultiShowApplicationModel();
        model.setName("MultiShow");
        model.setVersion(Main.class.getPackage().getImplementationVersion());
        model.setCopyright("Copyright 1999-2012 © Werner Randelshofer.\n" +
                "All Rights Reserved.");
        model.setViewClassName("ch.randelshofer.multishow.MultiShowView");
        app.setModel(model);
        app.launch(args);
        ViewRegistry.init();
    }
}
