/*******************************************************************************
* Copyright (c) 2008 Jerome Negre.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl-3.0-standalone.html
*
* Contributors:
* Jerome Negre - initial API and implementation
******************************************************************************/
package org.jnegre.redpill;
import java.awt.EventQueue;
import javax.swing.UIManager;
import org.jnegre.redpill.ui.MainDialog;
/**
*
* @author Jerome Negre (jerome@jnegre.org)
*
*/
public class RedPill {
public RedPill() throws Exception {
//get configuration
//init data model
final SessionManager sm = new SessionManager();
//launch gui
EventQueue.invokeAndWait(new Runnable() {
public void run() {
MainDialog md = new MainDialog(sm);
md.setVisible(true);
}
});
//launch core engine
new Engine(sm).start();
}
private static void initLookAndFeel() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
//Too bad, we'll use the default LnF
//(by the way, this should not happen)
}
}
/**
* @param args
*/
public static void main(String[] args) throws Exception {
initLookAndFeel();
new RedPill();
}
}