/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package csa.tiletools;

import csa.event.EventSupport;
import csa.gui.CSAMainFrame;
import java.awt.AWTEvent;
import java.awt.Toolkit;
import java.awt.event.AWTEventListener;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.UIManager;

/**
 *
 * @author salchr
 */
public class JMomMain {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        
        Toolkit.getDefaultToolkit().setDynamicLayout(true);
        System.setProperty("sun.awt.noerasebackground", "true");
        JFrame.setDefaultLookAndFeelDecorated(true);
        JDialog.setDefaultLookAndFeelDecorated(true);

        
        // Mac tinyLAF does somehow not
        // undecorate windows in fullscreen mode
        // on the fly, either create the application NEW (and lose everything we do right now)
        // ... we jjust do not decorate the main Frame...
        Toolkit.getDefaultToolkit().setDynamicLayout(false);
        System.setProperty("sun.awt.noerasebackground", "false");
        JFrame.setDefaultLookAndFeelDecorated(false);
        
        
        try {
            UIManager.setLookAndFeel("de.muntjak.tinylookandfeel.TinyLookAndFeel");
        } catch(Exception ex) {
            ex.printStackTrace();
        }  
        EventSupport.getEventSupport();
  /*     
long eventMask = AWTEvent.MOUSE_MOTION_EVENT_MASK
    + AWTEvent.MOUSE_EVENT_MASK
    + AWTEvent.KEY_EVENT_MASK;
 eventMask = AWTEvent.KEY_EVENT_MASK;

Toolkit.getDefaultToolkit().addAWTEventListener( new AWTEventListener()
{
    public void eventDispatched(AWTEvent e)
    {
        System.out.println(e.getID());
    }
}, eventMask);
*/

        
        CSAMainFrame mainFrame = new CSAMainFrame();
        mainFrame.setVisible(true);
    }
}
