Package de.hpi.eworld.observer

Examples of de.hpi.eworld.observer.ObserverNotification


  }

  @Override
  public void update(final Observable o, final Object arg) {
    if (arg instanceof ObserverNotification) {
      final ObserverNotification notification = (ObserverNotification) arg;
      final NotificationType type = notification.getType();

      switch (type) {
        case modelCleared:
          onModelCleared();
          break;
View Full Code Here


    // connect signals and slots
    simulationStatistic.observable.addObserver(new Observer() {
      @Override
      public void update(Observable o, Object arg) {
        if (arg instanceof ObserverNotification) {
          final ObserverNotification notification = (ObserverNotification) arg;
          final NotificationType type = notification.getType();
         
          if (type.equals(NotificationType.simulationStatisticClosed)) {
            onSimulationStatisticClosed();
          }
        }
      }
    });
   
    dump = new SumoDump();
    dump.addObserver(new Observer() {
      @Override
      public void update(Observable o, Object arg) {
        if (arg instanceof ObserverNotification) {
          final ObserverNotification notification = (ObserverNotification) arg;
          final NotificationType type = notification.getType();
         
          if (type.equals(NotificationType.importSuccessful)) {
            onNewImport();
          }
        }
      }
    });
   
    /*
    StatisticsDataManager.getInstance().sumoSimDone.connect(
        this, "onSimulationFinished(String)");
    */
    TriggerSumo.getInstance().observable.addObserver(new Observer() {
      @Override
      public void update(Observable o, Object arg) {
        if (arg instanceof ObserverNotification) {
          final ObserverNotification notification = (ObserverNotification) arg;
          final NotificationType type = notification.getType();
         
          if (type.equals(NotificationType.sumoDone)) {
            onSimulationFinished((String) arg);
          }
        }
View Full Code Here

   
    this.visualizerPlugin.getSimControlToolbar().addObserver(new Observer() {
      @Override
      public void update(Observable o, Object arg) {
        if (arg instanceof ObserverNotification) {
          final ObserverNotification notification = (ObserverNotification) arg;
          final NotificationType type = notification.getType();
         
          if (type.equals(NotificationType.simulationFinished)) {
            onSimulationFinished((String) arg);
          }
        }
View Full Code Here

    return graphModel;
  }

  private void onBatchProcessStarted() {
    setInBatchProcess(true);
    fireNotifyObservers(new ObserverNotification(NotificationType.startBatchProcess));
  }
View Full Code Here

  public void onModelElementRemoved(ModelElement element) {
    getGraphModel().modelRemoved(element);
  }

  private void onViewItemHoverEntered(AbstractView<ModelElement> item) {
    fireNotifyObservers(new ObserverNotification(NotificationType.itemHoverEntered, item));
  }
View Full Code Here

  private void onViewItemHoverEntered(AbstractView<ModelElement> item) {
    fireNotifyObservers(new ObserverNotification(NotificationType.itemHoverEntered, item));
  }

  private void onViewItemHoverLeft() {
    fireNotifyObservers(new ObserverNotification(NotificationType.itemHoverLeft));
  }
View Full Code Here

  private void onViewItemHoverLeft() {
    fireNotifyObservers(new ObserverNotification(NotificationType.itemHoverLeft));
  }

  private void onViewItemClicked(AbstractView<ModelElement> item) {
    fireNotifyObservers(new ObserverNotification(NotificationType.itemClicked, item));
  }
View Full Code Here

  private void onViewItemClicked(AbstractView<ModelElement> item) {
    fireNotifyObservers(new ObserverNotification(NotificationType.itemClicked, item));
  }

  private void onItemMouseReleased(AbstractView<ModelElement> item) {
    fireNotifyObservers(new ObserverNotification(NotificationType.itemMouseReleased, item));
  }
View Full Code Here

  private void onItemMousePressed(AbstractView<ModelElement> item) {
    if (item instanceof GraphicsView) {
      dndHandler.setMousePointerOffset(((GraphicsView<ModelElement>) item).getMousePointerOffset());
    }
    fireNotifyObservers(new ObserverNotification(NotificationType.itemMousePressed, item));
  }
View Full Code Here

    }
    fireNotifyObservers(new ObserverNotification(NotificationType.itemMousePressed, item));
  }

  private void onFreeSpaceClicked() {
    fireNotifyObservers(new ObserverNotification(NotificationType.freeSpaceClicked));
  }
View Full Code Here

TOP

Related Classes of de.hpi.eworld.observer.ObserverNotification

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.