Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

presque finie #4

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
24a11d0
Adding very basic CRUD operations
leNigaud Jun 17, 2023
09667ba
Verify and Fix basic CRUD
leNigaud Jun 18, 2023
c433804
Adding functions for the Questions
leNigaud Jun 18, 2023
3c7b2d9
Adding the functions for pdf and histogram
leNigaud Jun 19, 2023
e0a854b
Creating interfaces and specific classes
leNigaud Jun 19, 2023
75fe21a
Fenetre pour l'application
RandrianantenainaBearisoa Jun 25, 2023
d9b2521
Merge branch 'bearisoa' into mainBeta
R4NJI Jun 25, 2023
b42e504
initialisation du controler et changement de la methode main dans Vie…
R4NJI Jun 26, 2023
91202b6
getters for the secondary windows
RandrianantenainaBearisoa Jun 27, 2023
6ef65a8
getters for the secondary windows
RandrianantenainaBearisoa Jun 27, 2023
e0ff663
modif mety 1
RandrianantenainaBearisoa Jun 28, 2023
47416ae
init view
R4NJI Jun 28, 2023
791eceb
Merge branch 'bearUpdate' of https://github.com/R4NJI/gestionPension …
R4NJI Jun 28, 2023
32fb905
ajout package View dans View
R4NJI Jun 29, 2023
321d217
initialisation
R4NJI Jul 1, 2023
d6d0e50
ajout de personne reussie
R4NJI Jul 1, 2023
d1fb78e
reo le vo n-modifier-ko
RandrianantenainaBearisoa Jul 2, 2023
9804c72
ajout personne reussi
R4NJI Jul 2, 2023
87041e6
ajout réussie
R4NJI Jul 2, 2023
eb6b6ee
correction de l'ajout du tarif
R4NJI Jul 2, 2023
ae58e7e
Merge branch 'main' of https://github.com/RandrianantenainaBearisoa/g…
R4NJI Jul 2, 2023
97ec7f3
filtrage paiement par date reussie
R4NJI Jul 3, 2023
8f8edc7
filtrer personne reussie
R4NJI Jul 3, 2023
0859ba2
filtrage reussie,je passe a la modif
R4NJI Jul 3, 2023
1fc8462
initialisation des modifications
R4NJI Jul 3, 2023
bd7f050
generer recu fait
R4NJI Jul 3, 2023
0501e7e
mbola en cours de modification de mety misy erreur
RandrianantenainaBearisoa Jul 3, 2023
673805a
modif manaraka : efa misy setter sy getters
RandrianantenainaBearisoa Jul 3, 2023
3e7c807
mis à jour anle view
RandrianantenainaBearisoa Jul 4, 2023
a60889d
mis à jour anle view fa nisy ts nety kely le teo
RandrianantenainaBearisoa Jul 4, 2023
bad14aa
histogramme reussie
R4NJI Jul 4, 2023
ea51433
supprimer action reussie
R4NJI Jul 4, 2023
80fedba
il ne reste plus que modifier et ajouter
R4NJI Jul 5, 2023
a4bba8e
presque fini
R4NJI Jul 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
replay_pid*

1,172 changes: 1,172 additions & 0 deletions View.java

Large diffs are not rendered by default.

97 changes: 97 additions & 0 deletions secWin_newPay.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.table.JTableHeader;
import javax.swing.border.Border;
import java.time.LocalDate;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;


class secWin_newPay extends JDialog {
private static JSpinner DateSpinner_Pay = new JSpinner(new SpinnerDateModel());
private static JSpinner.DateEditor DateEditor_Pay = new JSpinner.DateEditor(DateSpinner_Pay, "dd/MM/yyyy");
private static JTextField[] textFields = new JTextField[10];
private static JButton ajouterButton = new JButton("Ajouter");
// Récupérer les valeurs saisies dans les champs de texte
private static String[] values;
public secWin_newPay(Frame parent) {
super(parent, "Ajouter un nouveau paiement" , true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setResizable(false);
setSize(400, 200);
setLocationRelativeTo(parent);

JPanel contentPanel = new JPanel();
contentPanel.setLayout(new GridBagLayout());
GridBagConstraints constraints = new GridBagConstraints();
constraints.anchor = GridBagConstraints.WEST;
constraints.insets = new Insets(5, 5, 5, 5);
String[] nomchamp = {"IM", "numero de tarif","date"};
for (int i = 0; i < 3; i++) {
JLabel label = new JLabel(nomchamp[i]);
label.setFont(new Font("Bookman Old Style", Font.PLAIN, 15));
label.setForeground(new Color(0, 224, 230));
constraints.gridx = 0;
constraints.gridy = i;
contentPanel.add(label, constraints);

if(i==2){
DateSpinner_Pay.setEditor(DateEditor_Pay);
constraints.gridx = 1;
contentPanel.add(DateSpinner_Pay, constraints);
}
else{
textFields[i] = new JTextField(20);
constraints.gridx = 1;
contentPanel.add(textFields[i], constraints);
}
}

JPanel buttonPanel = new JPanel();

ajouterButton.setBackground(new Color(176, 224, 230));
ajouterButton.setForeground(Color.WHITE);
ajouterButton.setFont(ajouterButton.getFont().deriveFont(15f));


JButton annulerButton = new JButton("Annuler");
annulerButton.setBackground(new Color(176, 224, 230));
annulerButton.setForeground(Color.WHITE);
annulerButton.setFont(annulerButton.getFont().deriveFont(15f));
annulerButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
dispose();
}
});

buttonPanel.add(ajouterButton);
buttonPanel.add(annulerButton);

getContentPane().setLayout(new BorderLayout());
getContentPane().add(contentPanel, BorderLayout.CENTER);
getContentPane().add(buttonPanel, BorderLayout.SOUTH);
getContentPane().setBackground(Color.WHITE);
}

//tableau de type zone de texte de taille = 2 // lay zone de texte roa
public static JTextField[] getTextFields() {
return textFields;
}

//maka anlay composant fanaovana saisis de date
public static JSpinner getDateSpinner_Pay() {
return DateSpinner_Pay;
}

//bouton ajouter
public static JButton getAjouterButton() {
return ajouterButton;
}

}
104 changes: 104 additions & 0 deletions secWin_newPers.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.table.JTableHeader;
import javax.swing.border.Border;
import java.time.LocalDate;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;


public class secWin_newPers extends JDialog {
private static JTextField[] textFields = new JTextField[9];
private static String[] values;
private static JButton ajouterButton = new JButton("Ajouter");
private static JSpinner DateSpinner_Pers = new JSpinner(new SpinnerDateModel());
private static JSpinner.DateEditor DateEditor_Pers = new JSpinner.DateEditor(DateSpinner_Pers, "dd-MM-yyyy");
public secWin_newPers(Frame parent) {
super(parent, "Ajouter un nouvelle personne", true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setResizable(false);
setSize(500, 400);
setLocationRelativeTo(parent);

JPanel contentPanel = new JPanel();
contentPanel.setLayout(new GridBagLayout());
GridBagConstraints constraints = new GridBagConstraints();
constraints.anchor = GridBagConstraints.WEST;
constraints.insets = new Insets(5, 5, 5, 5);
String[] nomchamp = new String[]{"IM","NOM","PRENOMS","Date de naissance","Diplôme","Contact","Statut","Situation","Nom de Conjoint(e)","Prenom de conjoint(e)"};
int ok = 0;
for (int i = 0; i < 9 ; i++) {
int j = i;
if(ok!=0)j++;
JLabel label = new JLabel(nomchamp[j]);
label.setFont(new Font("Bookman Old Style", Font.PLAIN, 15));
label.setForeground(new Color(0, 224, 230));
constraints.gridx = 0;
constraints.gridy = j;
contentPanel.add(label, constraints);

if(i==3 && ok==0){
DateSpinner_Pers.setEditor(DateEditor_Pers);
constraints.gridx = 1;
contentPanel.add(DateSpinner_Pers, constraints);
i--;ok++;
}else{
textFields[i] = new JTextField(20);
constraints.gridx = 1;
contentPanel.add(textFields[i], constraints);
}
}

JPanel buttonPanel = new JPanel();
//if(View.rowNow != null) textFields[i].setText(View.rowNow[i]);
String aj = "";
if(View.rowNow != null){aj = "Modifier"; View.rowNow = null;}
ajouterButton.setBackground(new Color(176, 224, 230));
ajouterButton.setForeground(Color.WHITE);
ajouterButton.setFont(ajouterButton.getFont().deriveFont(15f));

JButton annulerButton = new JButton("Annuler");
annulerButton.setBackground(new Color(176, 224, 230));
annulerButton.setForeground(Color.WHITE);
annulerButton.setFont(annulerButton.getFont().deriveFont(15f));
annulerButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
dispose();
}
});

buttonPanel.add(ajouterButton);
buttonPanel.add(annulerButton);

getContentPane().setLayout(new BorderLayout());
getContentPane().add(contentPanel, BorderLayout.CENTER);
getContentPane().add(buttonPanel, BorderLayout.SOUTH);
getContentPane().setBackground(Color.WHITE);
}


private static String[] getValues() {
return values;
}

//maka ny tableau de type zone de texte (ilaina @fangalana ny entrée an'ny nouvel utilisateur) : im , nom , prenom , diplome , contact , status , situation , Nom conjoint , prenom conjoint //tsy ao lay date de naissance
public static JTextField getTextFields(int i) {
return textFields[i];
}
//maka anle objet fanaovana saisis de date an'ny fanaovana saisis de date de naissance
public static JSpinner getBirthDate(){
return DateSpinner_Pers;
}

//bouton ajouter
public static JButton getAjouterButton() {
return ajouterButton;
}


}
81 changes: 81 additions & 0 deletions secWin_newTar.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.table.JTableHeader;
import javax.swing.border.Border;
import java.time.LocalDate;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;


public class secWin_newTar extends JDialog {
private static JTextField[] textFields = new JTextField[10];
// Récupérer les valeurs saisies dans les champs de texte
private static String[] values;
private static JButton ajouterButton = new JButton("Ajouter");
public secWin_newTar(Frame parent) {
super(parent, "Ajouter un nouveau tarif", true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setResizable(false);
setSize(400, 200);
setLocationRelativeTo(parent);

JPanel contentPanel = new JPanel();
contentPanel.setLayout(new GridBagLayout());
GridBagConstraints constraints = new GridBagConstraints();
constraints.anchor = GridBagConstraints.WEST;
constraints.insets = new Insets(5, 5, 5, 5);
String[] nomchamp = {"numero de tarif", "diplome", "catégorie", "montant"};
for (int i = 0; i < 4; i++) {
JLabel label = new JLabel(nomchamp[i]);
label.setFont(new Font("Bookman Old Style", Font.PLAIN, 15));
label.setForeground(new Color(0, 224, 230));
constraints.gridx = 0;
constraints.gridy = i;
contentPanel.add(label, constraints);

textFields[i] = new JTextField(20);
if(View.rowNow != null) textFields[i].setText(View.rowNow[i]);
constraints.gridx = 1;
contentPanel.add(textFields[i], constraints);
}

JPanel buttonPanel = new JPanel();
ajouterButton.setBackground(new Color(176, 224, 230));
ajouterButton.setForeground(Color.WHITE);
ajouterButton.setFont(ajouterButton.getFont().deriveFont(15f));

JButton annulerButton = new JButton("Annuler");
annulerButton.setBackground(new Color(176, 224, 230));
annulerButton.setForeground(Color.WHITE);
annulerButton.setFont(annulerButton.getFont().deriveFont(15f));
annulerButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
dispose();
}
});

buttonPanel.add(ajouterButton);
buttonPanel.add(annulerButton);

getContentPane().setLayout(new BorderLayout());
getContentPane().add(contentPanel, BorderLayout.CENTER);
getContentPane().add(buttonPanel, BorderLayout.SOUTH);
getContentPane().setBackground(Color.WHITE);
}


//zone de texte efatra no retourner-n'ty getter ray ty : num tarif , diplome , catégorie , montant
public static JTextField[] getTextFields() {
return textFields;
}
//retourne le bouton ajouter
public static JButton getAjouterButton() {
return ajouterButton;
}

}
Loading