Пример #1
0
 public synchronized void newEvent(Object source, SelectedEventType id, Ean ean, int wildcards) {
   UCCase activeview = MainGUI.getSelectedView();
   new Deb(debug, activeview.getName() + "->" + id + "->" + switchusecases.get(id));
   new Deb(debug, activeview.getName() + ": " + UCUseCases.getUsecase(activeview).ConsumedEvents);
   if (!(UCUseCases.getUsecase(activeview).ConsumedEvents == null)) {
     if (!UCUseCases.getUsecase(activeview).ConsumedEvents.contains(id)) {
       // activeview.toBackground();
       MainGUI.selectView(switchusecases.get(id));
     }
   }
   SelectedEvent.makeEvent(source, id, ean, wildcards);
 }
Пример #2
0
 private void shutDown() {
   // inform every usecase
   UCUseCases.toClose();
   // shutdown data connection
   UDataBaseConnect.CloseConnection(connection);
   new Deb(debug, "closing");
   System.exit(0);
 }
Пример #3
0
  public Control() {
    app_settings_pane =
        new FLGProperties(
            app_settings, propertyfilename, new File(defaultfilename), significantstring);
    app_settings = app_settings_pane.getProperties();
    new Deb(debug, "fetched properties");
    if (!UDataBaseConnect.getDataBankDrivers(app_settings))
      javax.swing.JOptionPane.showMessageDialog(
          null,
          "'sun.jdbc.odbc.JdbcOdbcDriver' or 'com.mysql.jdbc.Driver' nicht gefunden.\nDas Programm wird jetzt beendet");

    do {

      connection = UDataBaseConnect.getConnection(app_settings);
      if (connection == null) {
        VPVDialog.showSettingsDialog(app_settings_pane);
      }
      new Deb(debug, "connecting");
    } while (connection == null);
    new Deb(debug, "connected");
    thecontrol = this;
    // USQLQuery.setParams(this,connection);
    // new Deb(debug,"initialized UtilsParams");
    bvs = new UStorage(this, connection);
    new Deb(debug, "initialized bvs");
    OBUBookUse.init();
    new Deb(debug, "initialized OBUBuukUse");
    EtikettDruck.setPropertyFileStrings(
        propertyfilenameett, defaultfilenameett, significantstringett);
    new Deb(debug, "set EtikettDruck.setPropertyFileStrings");
    mainGUI = new MainGUI(this);
    new Deb(debug, "initialized mainGUI");
    ((VBVCSVImporterView) (UCUseCases.Datenimport.view)).init(mainGUI);
    new Deb(debug, "initialized BVCSV");
    switchusecases = UCUseCases.getSelected2Usecases();
    new Deb(debug, "initialized switchusecases");
    scanner = new ScanAdapter(this);
    new Deb(debug, "initialized SCANNER");
    MainGUI.selectView(UCUseCases.Ausleihe); // default usecase
    new Deb(debug, "End of Constructor of Control");
  }