Exemplo n.º 1
0
 private void lireClasseFormu(Programme prog, StringBuffer buf, int indent, Argument arg) {
   Classe cl = (Classe) arg.getClasse(prog);
   for (Iterator<org.javascool.proglets.plurialgo.langages.modele.Variable> iter =
           cl.proprietes.iterator();
       iter.hasNext(); ) {
     Variable prop = (Variable) iter.next();
     if (prop.isOut()) continue;
     Argument arg1 = new Argument(arg.nom + "." + prop.nom, prop.type, arg.mode);
     lireFormu(prog, buf, indent, arg1);
   }
 }
Exemplo n.º 2
0
 private void declClasseFormu(Programme prog, StringBuffer buf, int indent, Argument arg) {
   String p_zone = "p_" + arg.nom;
   p_zone = Divers.remplacer(p_zone, ".", "_");
   Divers.indenter(buf, indent);
   Divers.ecrire(buf, "JPanel " + p_zone + "; ");
   Classe cl = (Classe) arg.getClasse(prog);
   for (Iterator<org.javascool.proglets.plurialgo.langages.modele.Variable> iter =
           cl.proprietes.iterator();
       iter.hasNext(); ) {
     Variable prop = (Variable) iter.next();
     if (prop.isOut()) continue;
     Argument arg1 = new Argument(arg.nom + "." + prop.nom, prop.type, arg.mode);
     declFormu(prog, buf, indent, arg1);
   }
 }
Exemplo n.º 3
0
 private void constrClasseFormu(
     Programme prog, StringBuffer buf, int indent, String msg, String p_pere, Argument arg) {
   this.constrLabelFormu(prog, buf, indent, msg, p_pere, arg);
   Classe cl = (Classe) arg.getClasse(prog);
   String p_zone = "p_" + arg.nom;
   p_zone = Divers.remplacer(p_zone, ".", "_");
   int nb_prop = cl.proprietes.size() - cl.compterMode("OUT");
   Divers.ecrire(buf, p_zone + "=new JPanel(new GridLayout(" + (2 * nb_prop) + "," + 1 + ")); ");
   Divers.ecrire(buf, p_pere + ".add(" + p_zone + ");");
   for (Iterator<org.javascool.proglets.plurialgo.langages.modele.Variable> iter =
           cl.proprietes.iterator();
       iter.hasNext(); ) {
     Variable prop = (Variable) iter.next();
     if (prop.isOut()) continue;
     String msg1 = prog.quote(prop.nom);
     Argument arg1 = new Argument(arg.nom + "." + prop.nom, prop.type, arg.mode);
     constrFormu(prog, buf, indent, msg1, p_zone, arg1);
   }
 }