2022-05-23 21:01:17 +02:00
|
|
|
package app;
|
|
|
|
|
|
|
|
import java.awt.EventQueue;
|
|
|
|
import java.awt.Font;
|
|
|
|
import java.awt.event.ActionEvent;
|
|
|
|
import java.awt.event.ActionListener;
|
|
|
|
|
|
|
|
import javax.swing.ImageIcon;
|
|
|
|
import javax.swing.JButton;
|
|
|
|
import javax.swing.JFrame;
|
|
|
|
import javax.swing.JLabel;
|
|
|
|
import javax.swing.SwingConstants;
|
|
|
|
|
|
|
|
import MEPTL.commandes;
|
|
|
|
|
|
|
|
import java.awt.Color;
|
2022-05-24 18:25:41 +02:00
|
|
|
import java.awt.Toolkit;
|
2022-05-23 21:01:17 +02:00
|
|
|
|
|
|
|
@SuppressWarnings("serial")
|
|
|
|
public class mainApp extends JFrame implements ActionListener {
|
|
|
|
|
|
|
|
//public static final String LOOK_AND_FEEL_1 = "javax.swing.plaf.nimbus.NimbusLookAndFeel";
|
|
|
|
|
|
|
|
private JFrame frmEvalwriter;
|
2022-05-24 18:25:41 +02:00
|
|
|
// public static JFrame Creer ;
|
2022-05-23 21:01:17 +02:00
|
|
|
|
|
|
|
JButton btnCreate;
|
|
|
|
JButton actCharge;
|
2022-05-24 18:25:41 +02:00
|
|
|
JButton aPropos;
|
|
|
|
private JButton btnCrerUnFichier;
|
|
|
|
|
2022-05-23 21:01:17 +02:00
|
|
|
/**
|
|
|
|
* Launch the application.
|
|
|
|
*/
|
|
|
|
public static void main(String[] args) {
|
2022-05-24 18:25:41 +02:00
|
|
|
commandes.console=false;
|
2022-05-23 21:01:17 +02:00
|
|
|
EventQueue.invokeLater(new Runnable() {
|
|
|
|
public void run() {
|
|
|
|
try {
|
|
|
|
mainApp window = new mainApp();
|
|
|
|
window.frmEvalwriter.setVisible(true);
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create the application.
|
|
|
|
*/
|
|
|
|
public mainApp() {
|
|
|
|
initialize();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize the contents of the frame.
|
|
|
|
*/
|
|
|
|
private void initialize() {
|
|
|
|
|
|
|
|
frmEvalwriter = new JFrame();
|
2022-05-24 18:25:41 +02:00
|
|
|
frmEvalwriter.setIconImage(Toolkit.getDefaultToolkit().getImage(mainApp.class.getResource("/resources/evalwriter.ico")));
|
2022-05-23 21:01:17 +02:00
|
|
|
frmEvalwriter.setResizable(false);
|
2022-05-24 18:25:41 +02:00
|
|
|
frmEvalwriter.setTitle("analyseWriter");
|
|
|
|
frmEvalwriter.setBounds(100, 100, 555, 457);
|
2022-05-23 21:01:17 +02:00
|
|
|
frmEvalwriter.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
|
|
|
frmEvalwriter.getContentPane().setLayout(null);
|
|
|
|
ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
|
2022-05-24 18:25:41 +02:00
|
|
|
setIconImage(img.getImage());
|
2022-05-23 21:01:17 +02:00
|
|
|
|
2022-05-24 18:25:41 +02:00
|
|
|
btnCreate = new JButton("Modifier un fichier d'analyse");
|
2022-05-23 21:01:17 +02:00
|
|
|
btnCreate.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
|
|
|
btnCreate.addActionListener(this);
|
|
|
|
|
2022-05-24 18:25:41 +02:00
|
|
|
btnCreate.setBounds(34, 163, 470, 50);
|
2022-05-23 21:01:17 +02:00
|
|
|
frmEvalwriter.getContentPane().add(btnCreate);
|
|
|
|
|
2022-05-24 18:25:41 +02:00
|
|
|
actCharge = new JButton("Charge le fichier d'analyse pour évaluer les fichiers des étudiants");
|
2022-05-23 21:01:17 +02:00
|
|
|
actCharge.setBackground(Color.PINK);
|
|
|
|
actCharge.addActionListener(this);
|
|
|
|
actCharge.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
2022-05-24 18:25:41 +02:00
|
|
|
actCharge.setBounds(34, 96, 470, 45);
|
2022-05-23 21:01:17 +02:00
|
|
|
frmEvalwriter.getContentPane().add(actCharge);
|
|
|
|
|
|
|
|
JLabel lblNewLabel = new JLabel();
|
|
|
|
ImageIcon img2 = new ImageIcon(getClass().getResource("/accueil.png") );
|
|
|
|
lblNewLabel.setIcon(img2);
|
|
|
|
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
|
lblNewLabel.setFont(new Font("Pacifico", Font.PLAIN, 26));
|
2022-05-24 18:25:41 +02:00
|
|
|
lblNewLabel.setBounds(34, 11, 470, 74);
|
2022-05-23 21:01:17 +02:00
|
|
|
frmEvalwriter.getContentPane().add(lblNewLabel);
|
2022-05-24 18:25:41 +02:00
|
|
|
|
|
|
|
aPropos = new JButton("A Propos");
|
|
|
|
aPropos.addActionListener(this);
|
|
|
|
aPropos.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
|
|
|
aPropos.setBounds(34, 326, 161, 50);
|
|
|
|
frmEvalwriter.getContentPane().add(aPropos);
|
|
|
|
|
|
|
|
btnCrerUnFichier = new JButton("Créer un fichier d'analyse à partir d'un fichier ODF");
|
|
|
|
btnCrerUnFichier.addActionListener(new ActionListener() {
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
|
}
|
|
|
|
});
|
|
|
|
btnCrerUnFichier.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
|
|
|
btnCrerUnFichier.setBounds(34, 235, 470, 50);
|
|
|
|
frmEvalwriter.getContentPane().add(btnCrerUnFichier);
|
2022-05-23 21:01:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
|
if(e.getSource()==btnCreate) {
|
|
|
|
// Creer = new create();
|
|
|
|
frmEvalwriter.dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
if(e.getSource()==actCharge) {
|
2022-05-24 18:25:41 +02:00
|
|
|
if(!commandes.console) System.out.println( "Début chargement du fichier d'analyse." );
|
|
|
|
new filechooserXML();
|
|
|
|
if(commandes.fichierAnalyseValide) System.out.println("Le chargement du fichier d'analyse est réussi.");
|
|
|
|
|
2022-05-23 21:01:17 +02:00
|
|
|
// tree.setModel(utils.getTree().getModel()) ;
|
|
|
|
// textNodeSelect.setText("Le chargement de la nouvelle structure est réussi.");
|
|
|
|
// create.this.MAJToolBar();
|
2022-05-24 18:25:41 +02:00
|
|
|
|
|
|
|
if(!commandes.console) System.out.println( "Fin chargement du fichier d'analyse" );
|
|
|
|
new evaluate();
|
|
|
|
frmEvalwriter.dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
if(e.getSource()==aPropos) {
|
|
|
|
new about();
|
2022-05-23 21:01:17 +02:00
|
|
|
}
|
|
|
|
|
2022-05-24 18:25:41 +02:00
|
|
|
}
|
2022-05-23 21:01:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|