Examples of ZInfo


Examples of fmg.fmg8.endlAutomat.ZInfo

     */
    public void selKn(final Knoten knot) {
        String bed;
        int folgeZustand;
        int kantAlter;
        ZInfo zusatz;
        Iterator<Transition> it;
        Transition bedingung;
        String istStart = "";

        this.loescheSelKnot();
        this.aktKnot = knot;

        if (this.aktKnot != null) {
            zusatz = (ZInfo) this.aktKnot.getInfo();

            it = zusatz.getBeds().iterator();
            while (it.hasNext()) {
                bedingung = (Transition) it.next();
                bed = bedingung.getCond().toString();
                folgeZustand = bedingung.getFolgezustand();
                kantAlter = bedingung.getAlter();
                this.ktList.add(bed
                                  + "-"
                                  + folgeZustand
                                  + " ("
                                  + kantAlter
                                  + ")");
            }

            this.aktion.setText("" + zusatz.getAktion());
            this.param.setText("" + zusatz.getParam());
            this.alter.setText("" + zusatz.getAlter());
            if (zusatz.istStartZ()) {
                istStart = Messages.getString("SteuerFenster.IstStart");
            }
            this.zustName.setText("" + knot.holeName() + istStart);
        }
    }
View Full Code Here

Examples of fmg.fmg8.endlAutomat.ZInfo

    protected void naechsterZustand() {
        int aktion;
        int parameter;
        LinkedList<Transition> bedingungen;
        Transition aktBed;
        ZInfo zusatz;
        int folgeZ = 0;
        Iterator<Transition> it;
        int i = 0;
       
        while (i < this.conds.length) {
            if (this.conds[i].evaluiere(this)) {
                if (this.initial || i != this.aktAut) {
                    this.aktAut = i;
                    this.vAut[this.aktAut].setzeChanged();
                    this.vAut[this.aktAut].notifyObservers(
                            new Integer(this.aktAut));
                    this.initial = false;
                }
                break;
            }
            i++;
        }
       
        this.expAktZyklen++;
        this.fitAktZyklen[this.aktAut]++;
        this.fitRedAktZyklen[this.aktAut]++;
        this.aktivZyklen[this.aktAut]++;
        this.mutAktZyklen++;
        this.condMutAktZyklen++;
       
        if (this.fitRedAktZyklen[this.aktAut] > this.fitRedZyklen) {
            this.setFitness(this.aktAut,
                            (int) ((double) this.getFitness()[this.aktAut]
                                    / this.fitRedWert));
            this.fitRedAktZyklen[this.aktAut] = 0;
        }
       
        if (this.fitAktZyklen[this.aktAut] > this.fitZyklen) {
            this.befehle.clear();
            this.befehle.add(new Integer(this.lastBf));

            this.setFitness(this.aktAut,
                            this.getFitness()[this.aktAut]
                            + this.fitVs[this.aktAut].fitness(
                                    (Roboter) this));

            this.fitAktZyklen[this.aktAut] = 0;
        }

//        if (this.pars.getEvol().booleanValue()) {
        if (this.umg.getSimulation().isEvolution()) {
            if (this.mutAktZyklen > this.mutZyklen) {
                this.mutV = true;
                this.mutiere();
                this.mutAktZyklen = 0;
                this.mutV = false;
            } else {
                this.mutV = false;
            }
           
            if (this.condMutAktZyklen > this.pars.getCondMutZyk()) {
                this.mutiereBeds();
                this.condMutAktZyklen = 0;
            }
        }
       
        if (this.aktZustand[this.aktAut] == null) {
            this.aktZustand[this.aktAut]
                            = this.vAut[this.aktAut].holeStartzustand();
        }

        if (this.isSelektiert()) {
            if (this.aktZustand[this.aktAut] != null) {
                this.vAut[this.aktAut].setzeChanged();
                this.vAut[this.aktAut].notifyObservers(
                        this.aktZustand[this.aktAut]);
            }
        }

        if (this.aktZustand[this.aktAut] != null) {
            zusatz = (ZInfo) this.aktZustand[this.aktAut].getInfo();
            aktion = zusatz.getAktion();
            parameter = zusatz.getParam();

            this.gesamtAktion(aktion, parameter);
           
            this.lastBf = aktion;
           
            bedingungen = zusatz.getBeds();
            it = bedingungen.iterator();
            this.aktZustand[this.aktAut] = null;
            while (it.hasNext() && folgeZ == 0) {
                aktBed = (Transition) it.next();
                if (aktBed.evaluiere(this)) {
View Full Code Here

Examples of fmg.fmg8.endlAutomat.ZInfo

     *
     * @param event  Das Event.
     */
    public void itemStateChanged(final ItemEvent event) {
        int pos;
        ZInfo zusatz;
        Transition bed;

        if (event.getSource() == this.ktList) {
            pos = ((Integer) event.getItem()).intValue();
            this.kantenEinstell.setEnabled(true);

            if (this.ktList.getSelectedItem() != null) {
                if (this.ktList.getSelectedItem().equals(
                        Messages.getString("SteuerFenster.KanteNeu"))) {
                    this.beding.setText(
                        Messages.getString("SteuerFenster.Bedingung"));
                    this.folgeZust.setText(
                        Messages.getString("SteuerFenster.FolgeZ"));
                    this.ktAlter.setText(
                        Messages.getString("SteuerFenster.KantAlter"));
                } else {
                    zusatz = (ZInfo) this.aktKnot.getInfo();
                    bed = (Transition) zusatz.getBeds().get(pos);
                    this.beding.setText(bed.getCond().toString());
                    this.folgeZust.setText("" + bed.getFolgezustand());
                    this.ktAlter.setText("" + bed.getAlter());
                }
            }
View Full Code Here

Examples of fmg.fmg8.endlAutomat.ZInfo

    public void actionPerformed(final ActionEvent event) {
        Object obj = event.getSource();
        String cmd = event.getActionCommand();
        String neueBed;
        int pos;
        ZInfo neuerZusatz;
        String neuFlZst;
        String neuKtAl;
        String[] elemente;
        boolean grammOk = true;
        Iterator<Vis> itG;
        String[] altSeq = this.aktGrph.getRob().erzeugeStrSeqs();
        Condition[] altCond = this.aktGrph.getRob().getConds();
        String befehl;

        befehl = ""
            + SonstMeth.posSuch(Konstanten.BEF,
                                this.aktion.getText());

        this.setCursor(new Cursor(Cursor.WAIT_CURSOR));

        itG = this.graphen.iterator();
        while (itG.hasNext()) {
            ((Vis) itG.next()).setCursor(new Cursor(Cursor.WAIT_CURSOR));
        }

        try {
            if (obj instanceof Button) {
                if (cmd.equals(Messages.getString(
                        "SteuerFenster.Autoanordnung"))) {
                    this.aktGrph.zuruecksetzen();
                } else if (cmd.equals(Messages.getString(
                        "SteuerFenster.Beenden"))) {
                    WindowClosingAdapter ende
                        = new WindowClosingAdapter(true, this);
                    ende.schliesseExt(this);
                } else if (cmd.equals(Messages.getString(
                        "SteuerFenster.Uebernehmen"))
                           && this.aktKnot != null) {
                    AllgemeinerDialog dia;
                    ArrayList<String> buttons = new ArrayList<String>();
                    buttons.add(Messages.getString("SteuerFenster.OK"));

                    if (!this.byteErk.erkenne(befehl)) {
                        dia = new AllgemeinerDialog(this,
                                        null,
                                        Messages.getString(
                                           "SteuerFenster.Earley"),
                                        buttons,
                                        "<"
                                        + befehl
                                        + ">\n\n\n"
                                        + this.byteErk.toString());
                        dia.setVisible(true);
                        grammOk = grammOk & false;
                    }
                    if (!this.byteErk.erkenne(this.param.getText())) {
                        dia = new AllgemeinerDialog(this,
                                        null,
                                        Messages.getString(
                                           "SteuerFenster.Earley"),
                                        buttons,
                                        "<"
                                        + this.param.getText()
                                        + ">\n\n\n"
                                        + this.byteErk.toString());
                        dia.setVisible(true);
                        grammOk = grammOk & false;
                    }
                    if (!this.byteErk.erkenne(this.alter.getText())) {
                        dia = new AllgemeinerDialog(this,
                                        null,
                                        Messages.getString(
                                           "SteuerFenster.Earley"),
                                        buttons,
                                        "<"
                                        + this.alter.getText()
                                        + ">\n\n\n"
                                        + this.byteErk.toString());
                        dia.setVisible(true);
                        grammOk = grammOk & false;
                    }
                    if (this.ktList.getSelectedItems().length > 0) {
                        this.beding.setText(
                                EndlicherAutomat.formatBed(
                                        this.beding.getText()));
                       
                        if (!this.bedgErk.erkenne(this.beding.getText())) {
                            dia = new AllgemeinerDialog(this,
                                            null,
                                            Messages.getString(
                                               "SteuerFenster.Earley"),
                                            buttons,
                                            "<"
                                            + this.beding.getText()
                                            + ">\n\n\n"
                                            + this.bedgErk.toString());
                            dia.setVisible(true);
                            grammOk = grammOk & false;
                        }
                        if (!this.byteErk.erkenne(this.folgeZust.getText())) {
                            dia = new AllgemeinerDialog(this,
                                            null,
                                            Messages.getString(
                                               "SteuerFenster.Earley"),
                                            buttons,
                                            "<"
                                            + this.folgeZust.getText()
                                            + ">\n\n\n"
                                            + this.byteErk.toString());
                            dia.setVisible(true);
                            grammOk = grammOk & false;
                        }
                        if (!this.byteErk.erkenne(this.ktAlter.getText())) {
                            dia = new AllgemeinerDialog(this,
                                            null,
                                            Messages.getString(
                                               "SteuerFenster.Earley"),
                                            buttons,
                                            "<"
                                            + this.ktAlter.getText()
                                            + ">\n\n\n"
                                            + this.byteErk.toString());
                            dia.setVisible(true);
                            grammOk = grammOk & false;
                        }
                    } else {
                        grammOk = grammOk & true;
                    }

                    if (grammOk) {
                        boolean istStart
                            = this.aktGrph.getRob().istStartZ(
                                    this.aktGrph.getAktAut(),
                                    this.aktKnot);
                        if (this.ktList.getSelectedItem() != null
                            && !this.beding.getText().equals(
                                Messages.getString("SteuerFenster.Bedingung"))
                            && !this.folgeZust.getText().equals(
                                Messages.getString("SteuerFenster.FolgeZ"))
                            && !this.ktAlter.getText().equals(
                                Messages.getString("SteuerFenster.KantAlter"))
                            && !this.beding.getText().equals("")
                            && !this.folgeZust.getText().equals("")
                            && !this.ktAlter.getText().equals("")) {
                            pos = this.ktList.getSelectedIndex();
                            neueBed = SonstMeth.ausFormatBed(
                                          this.beding.getText())
                                      + "-"
                                      + this.folgeZust.getText()
                                      + " ("
                                      + this.ktAlter.getText()
                                      + ")";
                            this.ktList.replaceItem(neueBed, pos);
                        }
                        this.aktKnot.loescheAlleNachfolger();
                        if (this.alter.getText().equals("")) {
                            this.alter.setText("1");
                        }
                        neuerZusatz = new ZInfo(
                                Integer.parseInt(befehl),
                                Integer.parseInt(this.param.getText()),
                                null,
                                istStart,
                                Integer.parseInt(this.alter.getText()));
View Full Code Here

Examples of fmg.fmg8.endlAutomat.ZInfo

        ArrayList<Integer> knot1;
        Iterator<Integer> it, it1;
        Iterator<Transition> it3;
        Integer aktKnNum;
        Knoten aktKn;
        ZInfo info;
        Knoten zielKn;
        Integer zielKnNum;
        Condition aktBed;
        Condition neuBed = null;
        Condition zwischBed;
        int numOrig1, numOrig2;
        int idlBefehl;
        EndlicherAutomat[] eas = new EndlicherAutomat[endAuts.length];
        LinkedList<Transition> trans;
        Transition tran;
        String[] args = {"log 4"};
       
        if (endAuts == null
                || conds == null
                || endAuts.length != conds.length
                || endAuts.length == 0) {
            SonstMeth.log(SonstMeth.LOG_ERROR,
                          "Gesamtautomat konnte nicht erzeugt werden.",
                          new Parametersatz(args));
        }
       
        for (int i = 0; i < eas.length; i++) {
            eas[i] = new EndlicherAutomat();
            eas[i].erzeugeAusSequenz(
                    endAuts[i].erzeugeStringSeq(),
                    fmg.fmg8.endlAutomat.translator.Konstanten.STD_TRANSL_BE,
                    false);
           
            if (eas[i].istLeer()) {
                eas[i].einfuegenKnoten(Integer.MAX_VALUE,
                        SonstMeth.posSuch(
                                fmg.fmg8.umgebung2D.Konstanten.BEF,
                                "stp"),
                        1,
                        1);
               
                eas[i].setStart(eas[i].holeKnoten(Integer.MAX_VALUE));
            }
        }
       
        // Neue Knoten zuordnen.
        for (int i = 0; i < eas.length; i++) {
            knotZuord[i] = new HashMap<Integer, Integer>();
           
            knot = new ArrayList<Integer>(eas[i].holAdj().keySet());
            it = knot.iterator();

            while (it.hasNext()) {
                aktKnNum = it.next();
                aktKn = eas[i].holeKnoten(aktKnNum);
                info = aktKn.getInfo();
                neu.einfuegenKnoten(lfdNr,
                                    info.getAktion(),
                                    info.getParam(),
                                    info.getAlter());
               
                knotZuord[i].put(aktKnNum, lfdNr);
                lfdNr++;
            }
        }
View Full Code Here

Examples of fmg.fmg8.endlAutomat.ZInfo

                            final int knotNam,
                            final int setValue,
                            final EndlicherAutomat aut) {
       
        Knoten knot = aut.holeKnoten(knotNam);
        ZInfo zusatz;
        int set;
        int setInst;
       
        if (knot == null) {
            this.insertNode(knotNam, aut);
            knot = aut.holeKnoten(knotNam);
        }
       
        zusatz = knot.getInfo();
        set = setValue % 256;
        if (set == 0) {
            set++;
        }

        if (mode == 1) { // Change instruction.
            setInst = SonstMeth.modZwischen(
                    setValue,
                    SonstMeth.minBef(this.modus),
                    SonstMeth.maxBef(this.modus));
            zusatz.setAkt(setInst);
        }
        if (mode == 2) { // Change parameter.
            zusatz.setPar(set);
        }
        if (mode == 3) { // Change additional parameter.
            zusatz.setAlter(set);
        }

        this.instrCounter++;
    }
View Full Code Here

Examples of fmg.fmg8.endlAutomat.ZInfo

     *          aktuellen Zustand keine Scriptinstruktion decodiert wurde.
     */
    private String naechsterZustand() {
        String inst = "";
        Knoten aktZust = this.holeKnoten(this.aktZustand);
        ZInfo info;
        LinkedList<Transition> bedingungen;
        int aktion;
        int par, parStand;
        int zusatz, zusatzStand;
        int regNumZiel;
        int regNumQuelle;
        int scrAktion;
        int k;
        int zwisch;
       
        if (this.boc || this.eoc) {
            return null;
        }
       
        if (aktZust == null) {
            aktZust = this.holeStartzustand();
           
            if (aktZust == null) {
                return null;
            }
           
            this.aktZustand = aktZust.holeName();
        }
       
        info = aktZust.getInfo();
        aktion = info.getAktion();
       
        // Aktion ermitteln und zusammenstellen.
        if (aktion == Konstanten.AUT_ADD_EDGE
                || aktion == Konstanten.AUT_ADD_NODE
                || aktion == Konstanten.AUT_CHANGE_ACT
                || aktion == Konstanten.AUT_CHANGE_AGE
                || aktion == Konstanten.AUT_CHANGE_PAR
                || aktion == Konstanten.AUT_EXTEND_COND_H
                || aktion == Konstanten.AUT_EXTEND_COND_C
                || aktion == Konstanten.AUT_EXTEND_COND_O
                || aktion == Konstanten.AUT_ERGAENZ_COND) {
            // Topologische Aktionen:
           
            parStand = info.getParam();
            parStand = SonstMeth.modZwischen(
                    parStand,
                    SonstMeth.minVar(SonstMeth.MODUS_TRANSLATOR),
                    SonstMeth.maxVar(SonstMeth.MODUS_TRANSLATOR));
           
            if (aktion == Konstanten.AUT_EXTEND_COND_H) {
                k = 255;
            } else if (aktion == Konstanten.AUT_EXTEND_COND_O) {
                // F�r Konstanten siehe Konstanten.autTOscript()
                zwisch = SonstMeth.modZwischen(this.getH(parStand), 4, 16);
                if (zwisch == 12) {
                    zwisch++;
                }
               
                k = Konstanten.autTOscript(zwisch) - zwisch;
//                k = Konstanten.autTOscript(
//                        this.getH(parStand))
//                        - this.getH(parStand);
            } else {
                k = 0;
            }
           
            scrAktion = Konstanten.scrBefNum(aktion);
            inst += scrAktion;
            inst += "," + (this.getH(parStand) + k);
           
            // Zusatzparameter vorhanden?
            if (Const.BEF_PAR[scrAktion] == 2) {
                zusatzStand = info.getAlter();
                zusatzStand = SonstMeth.modZwischen(
                        zusatzStand,
                        SonstMeth.minVar(SonstMeth.MODUS_TRANSLATOR),
                        SonstMeth.maxVar(SonstMeth.MODUS_TRANSLATOR));
               
                inst += "," + this.getH(zusatzStand);

                // Speichere automatisch den Zusatzparameter in Reg2 (= H102).
                if (aktion != Konstanten.AUT_EXTEND_COND_C
                        && aktion != Konstanten.AUT_EXTEND_COND_H
                        && aktion != Konstanten.AUT_EXTEND_COND_O) {
                    this.setH(
                            Konstanten.SENS_REG_MIN + 1,
                            this.getH(zusatzStand));
                }
            }
           
            // Speichere automatisch den Parameter in Reg1 (= H101).
            if (aktion != Konstanten.AUT_EXTEND_COND_C
                    && aktion != Konstanten.AUT_EXTEND_COND_H
                    && aktion != Konstanten.AUT_EXTEND_COND_O) {
                this.setH(Konstanten.SENS_REG_MIN, this.getH(parStand));
            }
        } else if (aktion == Konstanten.AUT_REG_CONST) {
            // Register-Aktion (Konstante setzen):
           
            par = info.getParam();
            zusatz = info.getAlter();
            regNumZiel = SonstMeth.modZwischen(
                    par,
                    SonstMeth.minVar(SonstMeth.MODUS_TRANSLATOR),
                    SonstMeth.maxVar(SonstMeth.MODUS_TRANSLATOR));
            this.setH(regNumZiel, zusatz);
        } else if (aktion == Konstanten.AUT_REG_VAR) {
            // Register-Aktion (anderes Register kopieren):

            par = info.getParam();
            zusatz = info.getAlter();
            regNumQuelle = SonstMeth.modZwischen(
                    par,
                    SonstMeth.minVar(SonstMeth.MODUS_TRANSLATOR),
                    SonstMeth.maxVar(SonstMeth.MODUS_TRANSLATOR));
            regNumZiel = SonstMeth.modZwischen(
                    zusatz,
                    SonstMeth.minVar(SonstMeth.MODUS_TRANSLATOR),
                    SonstMeth.maxVar(SonstMeth.MODUS_TRANSLATOR));
           
            this.setH(regNumZiel, this.getH(regNumQuelle));
        }
       
        /*
         * IDLE-Aktion (NXT): Bedeutet, dass nur der Code-Zeiger verschoben
         * wird; wird nicht explizit behandelt.
         */

        SonstMeth.log(
                SonstMeth.LOG_STAGE1,
                "Translator: Zustand "
                    + this.aktZustand
                    + ", Token "
                    + this.getAktToken()
                    + " / "
                    + this.getLookAheadToken()
                    + ": "
                    + new Script(inst),
                this.pars);
       
        // Folgezustand festlegen, Code-Zeiger verschieben.
        bedingungen = info.getBeds();
        this.aktZustand = -1;
        for (Transition aktBed : bedingungen) {
            if (aktBed.evaluiere(this)) {
                this.aktZustand = aktBed.getFolgezustand();
                break;
View Full Code Here

Examples of fmg.fmg8.endlAutomat.ZInfo

     */
    public void selKn(final Knoten knot) {
        String bed;
        int folgeZustand;
        int kantAlter;
        ZInfo zusatz;
        Iterator<Transition> it;
        Transition bedingung;
        String istStart = "";

        this.loescheSelKnot();
        this.aktKnot = knot;

        if (this.aktKnot != null) {
            zusatz = (ZInfo) this.aktKnot.getInfo();

            it = zusatz.getBeds().iterator();
            while (it.hasNext()) {
                bedingung = (Transition) it.next();
                bed = bedingung.getCond().toString();
                folgeZustand = bedingung.getFolgezustand();
                kantAlter = bedingung.getAlter();
                this.ktList.add(bed
                                  + "-"
                                  + folgeZustand
                                  + " ("
                                  + kantAlter
                                  + ")");
            }

            this.aktion.setText("" + zusatz.getAktion());
            this.param.setText("" + zusatz.getParam());
            this.alter.setText("" + zusatz.getAlter());
            if (zusatz.istStartZ()) {
                istStart = Messages.getString("SteuerFenster.IstStart");
            }
            this.zustName.setText("" + knot.holeName() + istStart);
        }
    }
View Full Code Here

Examples of fmg.fmg8.endlAutomat.ZInfo

     *
     * @param event  Das Event.
     */
    public void itemStateChanged(final ItemEvent event) {
        int pos;
        ZInfo zusatz;
        Transition bed;

        if (event.getSource() == this.ktList) {
            pos = ((Integer) event.getItem()).intValue();
            this.kantenEinstell.setEnabled(true);

            if (this.ktList.getSelectedItem() != null) {
                if (this.ktList.getSelectedItem().equals(
                        Messages.getString("SteuerFenster.KanteNeu"))) {
                    this.beding.setText(
                        Messages.getString("SteuerFenster.Bedingung"));
                    this.folgeZust.setText(
                        Messages.getString("SteuerFenster.FolgeZ"));
                    this.ktAlter.setText(
                        Messages.getString("SteuerFenster.KantAlter"));
                } else {
                    zusatz = (ZInfo) this.aktKnot.getInfo();
                    bed = (Transition) zusatz.getBeds().get(pos);
                    this.beding.setText(bed.getCond().toString());
                    this.folgeZust.setText("" + bed.getFolgezustand());
                    this.ktAlter.setText("" + bed.getAlter());
                }
            }
View Full Code Here

Examples of fmg.fmg8.endlAutomat.ZInfo

    public void actionPerformed(final ActionEvent event) {
        Object obj = event.getSource();
        String cmd = event.getActionCommand();
        String neueBed;
        int pos;
        ZInfo neuerZusatz;
        String neuFlZst;
        String neuKtAl;
        String[] elemente;
        boolean grammOk = true;
        Iterator<Vis> itG;
        String[] altSeq = this.aktGrph.getRob().erzeugeStrSeqs();
        Condition[] altCond = this.aktGrph.getRob().getConds();
        String befehl;

        befehl = ""
            + SonstMeth.posSuch(Konstanten.BEF,
                                this.aktion.getText());

        this.setCursor(new Cursor(Cursor.WAIT_CURSOR));

        itG = this.graphen.iterator();
        while (itG.hasNext()) {
            ((Vis) itG.next()).setCursor(new Cursor(Cursor.WAIT_CURSOR));
        }

        try {
            if (obj instanceof Button) {
                if (cmd.equals(Messages.getString(
                        "SteuerFenster.Autoanordnung"))) {
                    this.aktGrph.zuruecksetzen();
                } else if (cmd.equals(Messages.getString(
                        "SteuerFenster.Beenden"))) {
                    WindowClosingAdapter ende
                        = new WindowClosingAdapter(true, this);
                    ende.schliesseExt(this);
                } else if (cmd.equals(Messages.getString(
                        "SteuerFenster.Uebernehmen"))
                           && this.aktKnot != null) {
                    AllgemeinerDialog dia;
                    ArrayList<String> buttons = new ArrayList<String>();
                    buttons.add(Messages.getString("SteuerFenster.OK"));

                    if (!this.byteErk.erkenne(befehl)) {
                        dia = new AllgemeinerDialog(this,
                                        null,
                                        Messages.getString(
                                           "SteuerFenster.Earley"),
                                        buttons,
                                        "<"
                                        + befehl
                                        + ">\n\n\n"
                                        + this.byteErk.toString());
                        dia.setVisible(true);
                        grammOk = grammOk & false;
                    }
                    if (!this.byteErk.erkenne(this.param.getText())) {
                        dia = new AllgemeinerDialog(this,
                                        null,
                                        Messages.getString(
                                           "SteuerFenster.Earley"),
                                        buttons,
                                        "<"
                                        + this.param.getText()
                                        + ">\n\n\n"
                                        + this.byteErk.toString());
                        dia.setVisible(true);
                        grammOk = grammOk & false;
                    }
                    if (!this.byteErk.erkenne(this.alter.getText())) {
                        dia = new AllgemeinerDialog(this,
                                        null,
                                        Messages.getString(
                                           "SteuerFenster.Earley"),
                                        buttons,
                                        "<"
                                        + this.alter.getText()
                                        + ">\n\n\n"
                                        + this.byteErk.toString());
                        dia.setVisible(true);
                        grammOk = grammOk & false;
                    }
                    if (this.ktList.getSelectedItems().length > 0) {
                        this.beding.setText(
                                EndlicherAutomat.formatBed(
                                        this.beding.getText()));
                       
                        if (!this.bedgErk.erkenne(this.beding.getText())) {
                            dia = new AllgemeinerDialog(this,
                                            null,
                                            Messages.getString(
                                               "SteuerFenster.Earley"),
                                            buttons,
                                            "<"
                                            + this.beding.getText()
                                            + ">\n\n\n"
                                            + this.bedgErk.toString());
                            dia.setVisible(true);
                            grammOk = grammOk & false;
                        }
                        if (!this.byteErk.erkenne(this.folgeZust.getText())) {
                            dia = new AllgemeinerDialog(this,
                                            null,
                                            Messages.getString(
                                               "SteuerFenster.Earley"),
                                            buttons,
                                            "<"
                                            + this.folgeZust.getText()
                                            + ">\n\n\n"
                                            + this.byteErk.toString());
                            dia.setVisible(true);
                            grammOk = grammOk & false;
                        }
                        if (!this.byteErk.erkenne(this.ktAlter.getText())) {
                            dia = new AllgemeinerDialog(this,
                                            null,
                                            Messages.getString(
                                               "SteuerFenster.Earley"),
                                            buttons,
                                            "<"
                                            + this.ktAlter.getText()
                                            + ">\n\n\n"
                                            + this.byteErk.toString());
                            dia.setVisible(true);
                            grammOk = grammOk & false;
                        }
                    } else {
                        grammOk = grammOk & true;
                    }

                    if (grammOk) {
                        boolean istStart
                            = this.aktGrph.getRob().istStartZ(
                                    this.aktGrph.getAktAut(),
                                    this.aktKnot);
                        if (this.ktList.getSelectedItem() != null
                            && !this.beding.getText().equals(
                                Messages.getString("SteuerFenster.Bedingung"))
                            && !this.folgeZust.getText().equals(
                                Messages.getString("SteuerFenster.FolgeZ"))
                            && !this.ktAlter.getText().equals(
                                Messages.getString("SteuerFenster.KantAlter"))
                            && !this.beding.getText().equals("")
                            && !this.folgeZust.getText().equals("")
                            && !this.ktAlter.getText().equals("")) {
                            pos = this.ktList.getSelectedIndex();
                            neueBed = SonstMeth.ausFormatBed(
                                          this.beding.getText())
                                      + "-"
                                      + this.folgeZust.getText()
                                      + " ("
                                      + this.ktAlter.getText()
                                      + ")";
                            this.ktList.replaceItem(neueBed, pos);
                        }
                        this.aktKnot.loescheAlleNachfolger();
                        if (this.alter.getText().equals("")) {
                            this.alter.setText("1");
                        }
                        neuerZusatz = new ZInfo(
                                Integer.parseInt(befehl),
                                Integer.parseInt(this.param.getText()),
                                null,
                                istStart,
                                Integer.parseInt(this.alter.getText()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.