/*
 * C'est ici que l'on définit toutes les fenêtres et dialogues utilisés
 */

package fr.free.cdmrail;

import javax.swing.*;
import java.awt.*;

// Dans cette classe on trouve la création de toutes les fenêtres
public class CdmWin implements GlobalVar{
	// Instances des fenêtres
	CdmWinMain winMain; // Fenêtre principale de CDM-Rail
	
	// Constructeur
	CdmWin (String winType) {
		/**
		 * @param winType
		 */
		switch (winType) {
			case WIN_MAIN :
//				winMain = new CdmWinMain("CDM-Rail - " + CDM_VERSION);
				break;
		}
	}
	
	/*
	 * Classe de la fenêtre principale de CDM-Rail
	 */
//	private class CdmWinMain extends JFrame
	class CdmWinMain implements GlobalVar {
		//  Dimensions de l'écran
//		winHeight = (short)CdmGlobal.screenSize.getHeight();
//		winWidth = (short)CdmGlobal.screenSize.getWidth();
//		// La fenêtre à créer
//		JFrame newWin;
		// Ses attributs
		String titre;
		short winHeight;
		short winWidth;
		
		// Constructeur
		CdmWinMain(String titre) {
			
			/**
			 * @param titre
			 */
			this.setTitle(titre);
//			//  Dimensions de l'écran
//			winHeight = (short)CdmGlobal.screenSize.getHeight();
//			winWidth = (short)CdmGlobal.screenSize.getWidth();
//			this.setSize(winWidth, winHeight);
//			// On l'affiche sur l'écran principal
//			this.setLocation(CdmGlobal.SCREEN_SECONDARY.getDefaultConfiguration().getBounds().x, this.getY());
//			this.setLocationRelativeTo(null);
//			this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//			this.setVisible(true);
		}
	}

}






