1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
| private JRadioButton _b1 = new JRadioButton("Arithmétiques");
private JRadioButton _b2 = new JRadioButton("Textes");
private JRadioButton _b3 = new JRadioButton("Conversions");
private JRadioButton _b4 = new JRadioButton("Conditions");
private JRadioButton _b5 = new JRadioButton("Groupes");
private JRadioButton _bV1 = new JRadioButton("Constante");
private JRadioButton _bV2 = new JRadioButton("Informations");
private JRadioButton _bV3 = new JRadioButton("Informations calculées");
private JRadioButton _bV4 = new JRadioButton("Champ ou variable");
private JTabbedPane _criteriacontainer = new JTabbedPane();
private CardLayout mo_cardLayout;
private JPanel _jpfonct = new JPanel(new GridLayout(5,1));
private JPanel _jpgen = new JPanel();
private JPanel _jpnom = new JPanel();
private JPanel _jptype = new JPanel(new GridLayout(4,1));
private JPanel _jpgenval = new JPanel();
private JPanel _jptree = new JPanel();
private JPanel _jpexpre = new JPanel();
private JPanel _jpinfo = new JPanel();
private String _nom;
private TitledBorder _border;
private void initPanel()
{
mo_cardLayout = new CardLayout();
_jpnom = new JPanel (mo_cardLayout);
ButtonGroup group = new ButtonGroup();
group.add(_b1);
group.add(_b2);
group.add(_b3);
group.add(_b4);
group.add(_b5);
_jpfonct.add(_b1);
_jpfonct.add(_b2);
_jpfonct.add(_b3);
_jpfonct.add(_b4);
_jpfonct.add(_b5);
_b1.addActionListener(this);
_b2.addActionListener(this);
_b3.addActionListener(this);
_b4.addActionListener(this);
_b5.addActionListener(this);
JPanel _panelinit = new JPanel();
JRadioButton bA1 = new JRadioButton("Addition");
JRadioButton bA2 = new JRadioButton("Soustraction");
JRadioButton bA3 = new JRadioButton("Multiplication");
JRadioButton bA4 = new JRadioButton("Division");
JRadioButton bA5 = new JRadioButton("Arrondi");
JRadioButton bA6 = new JRadioButton("Partie Entière");
JRadioButton bA7 = new JRadioButton("Entier supérieur");
JRadioButton bA8 = new JRadioButton("Valeur Absolue");
JRadioButton bA9 = new JRadioButton("Signe");
JRadioButton bA10 = new JRadioButton("Puissance");
JRadioButton bA11 = new JRadioButton("Modulo");
JRadioButton bA12 = new JRadioButton("Racine Carrée");
JPanel _panelarithmetique = new JPanel();
_panelarithmetique.setLayout(new GridLayout(12,1));
ButtonGroup groupA = new ButtonGroup();
groupA.add(bA1);
groupA.add(bA2);
groupA.add(bA3);
groupA.add(bA4);
groupA.add(bA5);
groupA.add(bA6);
groupA.add(bA7);
groupA.add(bA8);
groupA.add(bA9);
groupA.add(bA10);
groupA.add(bA11);
groupA.add(bA12);
_panelarithmetique.add(bA1);
_panelarithmetique.add(bA2);
_panelarithmetique.add(bA3);
_panelarithmetique.add(bA4);
_panelarithmetique.add(bA5);
_panelarithmetique.add(bA6);
_panelarithmetique.add(bA7);
_panelarithmetique.add(bA8);
_panelarithmetique.add(bA9);
_panelarithmetique.add(bA10);
_panelarithmetique.add(bA11);
_panelarithmetique.add(bA12);
JRadioButton bT1 = new JRadioButton("Concaténation");
JRadioButton bT2 = new JRadioButton("Longueur");
JRadioButton bT3 = new JRadioButton("Extraction");
JRadioButton bT4 = new JRadioButton("Position");
JRadioButton bT5 = new JRadioButton("Suppression des espaces à gauche");
JRadioButton bT6 = new JRadioButton("Suppression des espaces à droite");
JPanel _paneltexte = new JPanel();
_paneltexte.setLayout(new GridLayout(6,1));
ButtonGroup groupT = new ButtonGroup();
groupT.add(bT1);
groupT.add(bT2);
groupT.add(bT3);
groupT.add(bT4);
groupT.add(bT5);
groupT.add(bT6);
_paneltexte.add(bT1);
_paneltexte.add(bT2);
_paneltexte.add(bT3);
_paneltexte.add(bT4);
_paneltexte.add(bT5);
_paneltexte.add(bT6);
JRadioButton bC1 = new JRadioButton("Majuscule");
JRadioButton bC2 = new JRadioButton("Minuscule");
JRadioButton bC3 = new JRadioButton("Texte");
JRadioButton bC4 = new JRadioButton("Numérique");
JRadioButton bC5 = new JRadioButton("Code ASCII en caractère");
JRadioButton bC6 = new JRadioButton("Caractère en code ASCII");
JPanel _panelconversion = new JPanel();
_panelconversion.setLayout(new GridLayout(6,1));
ButtonGroup groupC = new ButtonGroup();
groupC.add(bC1);
groupC.add(bC2);
groupC.add(bC3);
groupC.add(bC4);
groupC.add(bC5);
groupC.add(bC6);
_panelconversion.add(bC1);
_panelconversion.add(bC2);
_panelconversion.add(bC3);
_panelconversion.add(bC4);
_panelconversion.add(bC5);
_panelconversion.add(bC6);
JRadioButton bCd1 = new JRadioButton("Condition sur NULL");
JRadioButton bCd2 = new JRadioButton("Première valeur non NULL ");
// "(Nombre de valeur **)");
String[] data = {"1", "2", "3", "4"};
JComboBox nbval = new JComboBox(data);
JRadioButton bCd3 = new JRadioButton("Dans le cas");
// "(Nombre de cas **)");
String[] data1 = {"1", "2", "3", "4"};
JComboBox nbcase = new JComboBox(data1);
JPanel _panelcondition = new JPanel();
_panelcondition.setLayout(new GridLayout(3,1));
ButtonGroup groupCd = new ButtonGroup();
groupCd.add(bCd1);
groupCd.add(bCd2);
groupCd.add(bCd3);
_panelcondition.add(bCd1);
_panelcondition.add(bCd2);
// _panelcondition.add(ColorChooser);
_panelcondition.add(nbval);
_panelcondition.add(bCd3);
_panelcondition.add(nbcase);
JRadioButton bG1 = new JRadioButton("Moyenne");
JRadioButton bG2 = new JRadioButton("Somme");
JRadioButton bG3 = new JRadioButton("Minimum");
JRadioButton bG4 = new JRadioButton("Maximum");
JRadioButton bG5 = new JRadioButton("Nombre");
JRadioButton bG6 = new JRadioButton("Nombre Distinct");
JPanel _panelgroupe = new JPanel();
_panelgroupe.setLayout(new GridLayout(6,1));
ButtonGroup groupG = new ButtonGroup();
groupG.add(bG1);
groupG.add(bG2);
groupG.add(bG3);
groupG.add(bG4);
groupG.add(bG5);
groupG.add(bG6);
_panelgroupe.add(bG1);
_panelgroupe.add(bG2);
_panelgroupe.add(bG3);
_panelgroupe.add(bG4);
_panelgroupe.add(bG5);
_panelgroupe.add(bG6);
_jpnom.add (_panelinit,"Init");
_jpnom.add (_panelarithmetique,"Arithmétique");
_jpnom.add (_paneltexte,"Texte");
_jpnom.add (_panelconversion,"Conversion");
_jpnom.add (_panelcondition,"Conditionnelle");
_jpnom.add (_panelgroupe,"Groupe");
// Création du panneau
_jpexpre.setBorder(new TitledBorder(new EtchedBorder(),
"Expression de la fonction :",
TitledBorder.LEFT,
TitledBorder.TOP,
_jpexpre.getFont().deriveFont(Font.ITALIC, 12),
Color.black));
_jpexpre.setPreferredSize(new Dimension(690,100));
JTextArea expression = new JTextArea();
expression.setPreferredSize(new Dimension(680,90));
_jpexpre.add(expression, BorderLayout.CENTER);
_jpgen.add(_jpexpre,BorderLayout.SOUTH);
_jpgen.add(_jpfonct,BorderLayout.WEST);
_jpgen.add(_jpnom,BorderLayout.CENTER);
_expressionpanel.add(_jpgen); |
Partager