Package fmg.fmg8.graphVis

Examples of fmg.fmg8.graphVis.Vis


   
    /**
     * Speichert die aktuelle Population im Standardverzeichnis.
     */
    private void speicherePop() {
        Vis aktVis;
        Iterator<Vis> it = this.graphen.iterator();
       
        while (it.hasNext()) {
            aktVis = it.next();
            aktVis.speichereGraph(
                    fmg.fmg8.graphVis.Messages.getString("Vis.All"));
        }
       
        SonstMeth.log(SonstMeth.LOG_INFO,
                      "Population gespeichert ("
View Full Code Here


     *
     * @param rob  Der zu selektierende Roboter.
     */
    public void selGraph(final Roboter rob) {
        int i = 0;
        Vis aktVis;
        Vis robVis = (Vis) ((VisMantel) rob.getObserver()).getObserver();
       
        while (i < this.graphen.size()) {
            aktVis = (Vis) this.graphen.get(i);
            if (aktVis.getRob().getId() == robVis.getRob().getId()) {
                aktVis.erzeugeTransAusStdSeqs(rob.getTransStdCodes());
                this.selGraph(aktVis);
            }
            i++;
        }
View Full Code Here

        this.selRob = 0;
       
        String[] seqs = new String[
               aufn.getPops().get(0).getRobSchnapp()[0].getVStdCodes().length];
       
        this.aktGraph = new Vis("", seqs, null, -1, this.aktParams, null);

        this.popNum = -1;
       
        this.lastBest = 0;
       
View Full Code Here

                SteuerFenster.main(new String[0]);
            } else if (cmd.equals("Trajektorien...")) {
                ArrayList<String> arr = new ArrayList<String>();
                Iterator<Vis> it = this.graphen.iterator();
                while (it.hasNext()) {
                    Vis v = it.next();
                    arr.add(v.toString());
                }
               
                AllgemeinerDialog dia = new AllgemeinerDialog(
                          this,
                          "Draw trajectories",
View Full Code Here

     */
    private void ladeSnap(final int nummer) {
        PopSnapshot pop
            = (PopSnapshot) this.aufnahme.getPops().get(nummer);
        RobSnapshot[] robs = pop.getRobSchnapp();
        Vis neuVis;
        Translator[] trans = new Translator[robs[0].getTStdCodes().length];
       
        this.popNum = pop.getId();
        this.graphen.clear();
       
        for (int i = 0; i < robs.length; i++) {
            for (int j = 0; j < trans.length; j++) {
                trans[j] = new Translator(
                        robs[i].getTStdCodes()[j],
                        new ScriptInterpreter(
                                this.aktParams,
                                SonstMeth.MODUS_TRANSLATOR),
                        this.aktParams);
            }
           
            neuVis = new Vis(
                    this.nameRob(pop, robs[i]),
                    robs[i].getVStdCodes(),
                    robs[i].getConds(),
                    robs[i].getId(),
                    this.aktParams,
                    trans);
            this.graphen.add(neuVis);

            neuVis.setBounds(this.getWidth(),
                             0,
                             800,
                             700);
        }
       
View Full Code Here

   
    /**
     * Speichert die aktuelle Population im Standardverzeichnis.
     */
    private void speicherePop() {
        Vis aktVis;
        Iterator<Vis> it = this.graphen.iterator();
       
        while (it.hasNext()) {
            aktVis = it.next();
            aktVis.speichereGraph(
                    fmg.fmg8.graphVis.Messages.getString("Vis.All"));
        }
       
        SonstMeth.log(SonstMeth.LOG_INFO,
                      "Population gespeichert ("
View Full Code Here

     *
     * @param rob  Der zu selektierende Roboter.
     */
    public void selGraph(final Roboter rob) {
        int i = 0;
        Vis aktVis;
        Vis robVis = (Vis) ((VisMantel) rob.getObserver()).getObserver();
       
        while (i < this.graphen.size()) {
            aktVis = (Vis) this.graphen.get(i);
            if (aktVis.getRob().getId() == robVis.getRob().getId()) {
                this.selGraph(aktVis);
            }
            i++;
        }
    }
View Full Code Here

     * Initialisierungsmethode (Roboter und Darstellung).
     */
    private void init() {
        this.setSize(200, 200);
        this.setLocation(new Point(400, 100));
        this.darstArt = new DarstModEA(
                50,
                Konstanten.OBEN,
                this.getWidth() - 50,
                this.getHeight() - 50);

View Full Code Here

        this.addWindowListener(new WindHideAdapt());
       
        this.darstArten = new DarstModEA[autAnz];
       
        for (int i = 0; i < autAnz; i++) {
            this.darstArten[i] = new DarstModEA(
                    50,
                    Konstanten.OBEN,
                    this.getWidth() - 50,
                    this.getHeight() - 50);
        }
View Full Code Here

        buttons.add(ja);
        buttons.add(nein);
        buttons.add(alle);
        buttons.add(keiner);
        buttons.add(abbrechen);
        AllgemeinerDialog nachfrage;
        nachfrage = new AllgemeinerDialog(this, Messages
                .getString("Vis.SollDerEndlicheAutomat")
                + this.robName + Messages.getString("Vis.GespeichertWerden"),
                Messages.getString("Vis.saveGraph"), buttons, null);

        if (!anweisung.equals(alle) && !anweisung.equals(keiner)) {
            nachfrage.setVisible(true);
        }

        if (anweisung.equals(alle) || nachfrage.getResult().equals(ja)
                || nachfrage.getResult().equals(alle)) {

            this.rob.speichereAuts(this.robName);

            if (this.pars.getpngAutSp()) {
                this.savePNG(this.robName);
            }
           
            try {
                FileOutputStream fs = new FileOutputStream(pfad + this.robName
                        + "." + fmg.fmg8.graphVis.Konstanten.KOORD_ENDUNG);
                ObjectOutputStream os = new ObjectOutputStream(fs);
                os.writeObject(this.darstArten);
                os.close();
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }

        if (anweisung.equals(alle) || anweisung.equals(keiner)) {
            return anweisung;
        } else {
            return nachfrage.getResult();
        }
    }
View Full Code Here

TOP

Related Classes of fmg.fmg8.graphVis.Vis

Copyright © 2018 www.massapicom. 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.