Package ch.bfh.ti.kybernetik.engine.controller.observerCommands.model

Examples of ch.bfh.ti.kybernetik.engine.controller.observerCommands.model.RoboterModelObserverCommand


            calculateOutOfWindowAreaPosition(roboterController, rm);

            notifyObservers(new RoboterMoveListModelObserverCommand(roboter,
                RoboterMoveModelObserverCommandState.ROBOTER_MOVE_ADDED, roboterController.getRoboterMoveHistory()));
            notifyObservers(new RoboterModelObserverCommand(roboter,
                RoboterModelObserverCommand.RoboterModelCommandState.ROBOTER_MOVED));
          }

        });
        this.notifyObservers(SimulatorObserverCommandState.MOVED_ALL_ROBOTOS);
View Full Code Here


  @Override
  public boolean addRoboterController(RoboterController roboterController) {

    boolean added = this.getRoboterControllers().add(roboterController);
    if (added) {
      this.notifyObservers(new RoboterModelObserverCommand(roboterController.getRoboter(), RoboterModelCommandState.ROBOTER_ADDED));
    }
    return added;
  }
View Full Code Here

  @Override
  public void removeRoboter(Roboter roboter) {
    RoboterController rcToRemove = this.getRoboterControllerForRoboter(roboter);
    if (rcToRemove != null) {
      this.getRoboterControllers().remove(rcToRemove);
      this.notifyObservers(new RoboterModelObserverCommand(rcToRemove.getRoboter(), RoboterModelCommandState.ROBOTER_REMOVED));
    }
  }
View Full Code Here

      SimulatorObserverCommandState simulatorCommand = (SimulatorObserverCommandState) observerCommand;
      if (simulatorCommand == SimulatorObserverCommandState.MOVED_ALL_ROBOTOS) {

      }
    } else if (observerCommand instanceof RoboterModelObserverCommand) {
      RoboterModelObserverCommand rmoc = (RoboterModelObserverCommand) observerCommand;
      if (rmoc.getState() == RoboterModelCommandState.ROBOTER_ADDED) {
        RoboterComponent newRoboterComponent = new RoboterComponent(rmoc.getModel(),
            simulator.getRoboterConstructionForRoboter(rmoc.getModel()));
        this.roboterComponents.add(newRoboterComponent);
      } else if (rmoc.getState() == RoboterModelCommandState.ROBOTER_REMOVED) {
        RoboterComponent rc = findOrAddRoboterComponent(rmoc.getModel());
        this.roboterComponents.remove(rc);
      }
    } else if (observerCommand instanceof LightSensorModelObserverCommand) {
      LightSensorModelObserverCommand lsmoc = (LightSensorModelObserverCommand) observerCommand;
      if (lsmoc.getState() == LightSensorCommandState.SENSOR_INTENSITY_CHANGED) {
View Full Code Here

TOP

Related Classes of ch.bfh.ti.kybernetik.engine.controller.observerCommands.model.RoboterModelObserverCommand

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.