2022-05-23 21:01:17 +02:00
|
|
|
package app;
|
|
|
|
|
2022-05-25 09:30:49 +02:00
|
|
|
import java.awt.Color;
|
2022-05-23 21:01:17 +02:00
|
|
|
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;
|
2022-05-28 21:08:52 +02:00
|
|
|
import java.awt.SystemColor;
|
2022-05-23 21:01:17 +02:00
|
|
|
|
2022-05-25 09:30:49 +02:00
|
|
|
public class mainApp extends JFrame implements ActionListener{
|
2022-05-23 21:01:17 +02:00
|
|
|
|
|
|
|
//public static final String LOOK_AND_FEEL_1 = "javax.swing.plaf.nimbus.NimbusLookAndFeel";
|
|
|
|
|
2022-05-25 09:30:49 +02:00
|
|
|
/**
|
|
|
|
*
|
2022-05-23 21:01:17 +02:00
|
|
|
*/
|
2022-05-25 09:30:49 +02:00
|
|
|
private static final long serialVersionUID = 1L;
|
2022-05-23 21:01:17 +02:00
|
|
|
|
2022-05-25 09:30:49 +02:00
|
|
|
private JFrame frmEvalwriter;
|
|
|
|
// public static JFrame Creer ;
|
2022-05-23 21:01:17 +02:00
|
|
|
|
2022-05-25 09:30:49 +02:00
|
|
|
JButton btnCreate;
|
|
|
|
JButton actCharge;
|
2022-05-24 18:25:41 +02:00
|
|
|
|
2022-05-25 09:30:49 +02:00
|
|
|
/**
|
|
|
|
* Launch the application.
|
|
|
|
*/
|
|
|
|
public static void main(String[] args) {
|
|
|
|
commandes.console=false;
|
|
|
|
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();
|
|
|
|
}
|
2022-05-23 21:01:17 +02:00
|
|
|
|
2022-05-25 09:30:49 +02:00
|
|
|
/**
|
|
|
|
* Initialize the contents of the frame.
|
|
|
|
*/
|
|
|
|
private void initialize() {
|
|
|
|
|
2022-05-26 20:10:24 +02:00
|
|
|
|
|
|
|
|
2022-05-25 09:30:49 +02:00
|
|
|
frmEvalwriter = new JFrame();
|
|
|
|
frmEvalwriter.setResizable(false);
|
|
|
|
frmEvalwriter.setTitle("analyseWriter");
|
2022-05-28 19:13:25 +02:00
|
|
|
frmEvalwriter.setBounds(100, 100, 555, 315);
|
2022-05-25 09:30:49 +02:00
|
|
|
frmEvalwriter.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
|
|
|
frmEvalwriter.getContentPane().setLayout(null);
|
|
|
|
ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
|
2022-05-26 20:10:24 +02:00
|
|
|
frmEvalwriter.setIconImage(img.getImage());
|
2022-05-25 09:30:49 +02:00
|
|
|
|
|
|
|
btnCreate = new JButton("Modifier un fichier d'analyse");
|
2022-05-28 19:13:25 +02:00
|
|
|
btnCreate.setHorizontalAlignment(SwingConstants.LEFT);
|
|
|
|
btnCreate.setIcon(new ImageIcon(mainApp.class.getResource("/resources/fichierAnalyseModif.png")));
|
2022-05-25 09:30:49 +02:00
|
|
|
btnCreate.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
|
|
|
btnCreate.addActionListener(this);
|
|
|
|
|
2022-05-28 19:13:25 +02:00
|
|
|
btnCreate.setBounds(34, 180, 470, 58);
|
2022-05-25 09:30:49 +02:00
|
|
|
frmEvalwriter.getContentPane().add(btnCreate);
|
|
|
|
|
2022-05-26 20:10:24 +02:00
|
|
|
actCharge = new JButton("Evaluer les fichiers des étudiants - Créer un fichier d'analyse");
|
2022-05-28 19:13:25 +02:00
|
|
|
actCharge.setHorizontalAlignment(SwingConstants.LEFT);
|
|
|
|
actCharge.setIcon(new ImageIcon(mainApp.class.getResource("/resources/evaluate.png")));
|
2022-05-28 21:08:52 +02:00
|
|
|
actCharge.setBackground(SystemColor.inactiveCaption);
|
2022-05-25 09:30:49 +02:00
|
|
|
actCharge.addActionListener(this);
|
|
|
|
actCharge.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
2022-05-28 19:13:25 +02:00
|
|
|
actCharge.setBounds(34, 110, 470, 58);
|
2022-05-25 09:30:49 +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));
|
|
|
|
lblNewLabel.setBounds(34, 11, 470, 74);
|
|
|
|
frmEvalwriter.getContentPane().add(lblNewLabel);
|
|
|
|
}
|
2022-05-23 21:01:17 +02:00
|
|
|
|
2022-05-24 18:25:41 +02:00
|
|
|
|
2022-05-25 09:30:49 +02:00
|
|
|
@Override
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
|
if(e.getSource()==btnCreate) {
|
2022-05-28 19:13:25 +02:00
|
|
|
new create();
|
|
|
|
frmEvalwriter.dispose();
|
2022-05-25 09:30:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if(e.getSource()==actCharge) {
|
2022-05-25 18:21:23 +02:00
|
|
|
if(!commandes.console) System.out.println( "Début chargement du fichier d'analyse." );
|
2022-05-25 09:30:49 +02:00
|
|
|
new evaluate();
|
|
|
|
frmEvalwriter.dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2022-05-23 21:01:17 +02:00
|
|
|
|
2022-05-25 09:30:49 +02:00
|
|
|
}
|