Exemplo n.º 1
0
 public void handleEvent(AppEvent event) {
   EventType type = event.getType();
   if (type.equals(PagamentoSellaEvents.ShowForm)) {
     forwardToView(pagamentroView, event);
     OrdineModel model = (OrdineModel) event.getData();
     pagamentroView.setPagamentoModel(model);
   } else {
     forwardToView(pagamentroView, event);
   }
 }
  @Override
  public void handleEvent(AppEvent event) {
    final EventType type = event.getType();

    if (type.equals(EnvCreateEvents.CreateRequest)) {
      LOG.finest("CreateRequest");
      final String name = event.<String>getData("name");
      final int floors = event.getData("floors");
      final Polygon outline = event.<Polygon>getData("outline");
      final List<ExtDevice> devices = event.<List<ExtDevice>>getData("devices");
      final List<ExtSensor> sensors = event.<List<ExtSensor>>getData("sensors");
      onCreateRequest(name, floors, outline, devices, sensors);

    } else

    /*
     * Pass through to view
     */
    {
      forwardToView(creator, event);
    }
  }
Exemplo n.º 3
0
  @Override
  protected void handleEvent(AppEvent event) {
    EventType eventType = event.getType();

    if (eventType.equals(CommonEvents.Init)) {
      onInit();
    } else if (eventType.equals(CommonEvents.Error)) {
      onError();
    } else if (eventType.equals(StudentEvents.NavigationPanelReady)) {
      onNavigationPanelReady(event);
    } else if (eventType.equals(StudentEvents.StudentsPanelReady)) {
      onStudentsPanelReady(event);
    } else if (eventType.equals(StudentEvents.InformationPanelReady)) {
      onInformationPanelReady(event);
    } else if (eventType.equals(StudentEvents.MenuBarReady)) {
      onMenuBarReady(event);
    } else if (eventType.equals(StudentEvents.StatusBarReady)) {
      onStatusBarReady(event);
    } else if (eventType.equals(StudentEvents.UIReady)) {
      onUIReady();
    }
  }