Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/VDM/VDMRT/VeMoRT/graphic/src/gui/   (Vienna Development Method ©)  Datei vom 13.4.2020 mit Größe 1 kB image not shown  

Quelle  Graphics.java

  Sprache: JAVA
 

package gui;

import java.io.Serializable;

import org.overture.interpreter.runtime.ValueException;
import org.overture.interpreter.values.Value;
import org.overture.interpreter.values.VoidValue;


public class Graphics implements Serializable  {

 private static final long serialVersionUID = 1L;
 Controller ctrl;
    Model model;
    public Value init() {
        ctrl = new Controller();
        model = ctrl.getModel();
        return new VoidValue();
    }

    public Value sleep(){
        try {
   Thread.sleep(750);
  } catch (InterruptedException e) {
   e.printStackTrace();
  }
     
        return new VoidValue();
    }

    public Value addVehicle(Value vecID) throws ValueException {
        model.addVehicle(vecID.intValue(null));
        return new VoidValue();
    }

    public Value connectVehicles(Value vecID, Value vecID2) throws ValueException {

        model.connectVehicles(vecID.intValue(null), vecID2.intValue(null));
        return new VoidValue();
    }

    public Value disconnectVehicles(Value vecID, Value vecID2) throws ValueException {
        model.disconnectVehicles(vecID.intValue(null), vecID2.intValue(null));
        return new VoidValue();
    }

    public Value updatePosition(Value vecID, Value x, Value y) throws ValueException {
        model.updatePosition(vecID.intValue(null), (int) x.intValue(null), (int) y.intValue(null));
        model.refresh();
        return new VoidValue();
    }
    
    public Value updateDirection(Value vecID, Value dir) throws ValueException {
     model.updateDirection(vecID.intValue(null), (int) dir.intValue(null));
     return new VoidValue();
    }
    
    public Value receivedMessage(Value vecID) throws ValueException {
     model.receivedMessage(vecID.intValue(null));
     return new VoidValue();
    }
}

Messung V0.5 in Prozent
C=93 H=94 G=93

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.