title: fireEvent from Custom class
body: <p>I have the following class ProtokollEvent</p>
  
  <pre><code>public class ProtokollEvent extends Event {
  
  //variable holds all devices in given protokoll
  private ObservableList&lt;Device&gt; devicesList;
  
  //variable holds SaveResult
  private SaveResult result;
  
  //final ProtokollEvents
  public static final EventType&lt;ProtokollEvent&gt; PROTOKOLL_SAVE = new EventType(ANY, "PROTOKOLL_SAVE");
  public static final EventType&lt;ProtokollEvent&gt; PROTOKOLL_SAVE_DONE = new EventType(ANY, "PROTOKOLL_SAVE_DONE");
  public static final EventType&lt;ProtokollEvent&gt; PROTOKOLL_UPDATED = new EventType(ANY, "PROTOKOLL_UPDATED");
  public static final EventType&lt;ProtokollEvent&gt; PROTOKOLL_DELETED = new EventType(ANY, "PROTOKOLL_DELETED");
  
  public ProtokollEvent() {
      this(PROTOKOLL_SAVE);
  }
  
  public ProtokollEvent(EventType&lt;? extends Event&gt; arg0) {
      super(arg0);
  }
  
  public ProtokollEvent(Object arg0, EventTarget arg1, EventType&lt;? extends Event&gt; arg2) {
      super(arg0, arg1, arg2);
  }
  
  /**
   * getDevices will return current {@link Device} as ObservableList
   *
   * @return {@link ObservableList} of type {@link Device}
   */
  public ObservableList getDev() {
      return devicesList;
  }
  /**
   * setDevices will set devicesList
   * @param devices ObservableList {@link Device}
   */
  public void setDev(ObservableList devices) {
      this.devicesList = devices;
  }
  /**
   * get the result which is returned from calling saveProtokoll
   * @return result {@link SaveResult}
   */
  public SaveResult getResult() {
      return result;
  }
  /**
   * set the result which is returned after calling saveMessprotokoll in RestCall
   * @param result {@link SaveResult}
   */
  public void setResult(SaveResult result) {
      this.result = result;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>in the second class</p>
  
  <pre><code>public class SaveUtils {
  
  private MainWindowController controller;
  private ObservableList&lt;RowContainerPruefvorschriftController&gt; rows;
  private Protokoll lastSavedProtokoll;
  private Protokoll currentSavingProtokoll;
  
  public SaveUtils(MainWindowController control){
      this.controller = control;
  }
  
  private void startSaving(){
      currentSavingProtokoll = createProtokoll();
      boolean state = controller.networkOnline.get() ? saveOnline() :saveOffline();
  }
  
  public void setRows(ObservableList&lt;RowContainerPruefvorschriftController&gt; rows) {
      this.rows = rows;
      //if rows get set start saveing the data
      startSaving();
  }
  
  private boolean saveOffline(){
      return false;
  }
  private boolean saveOnline() {
      RestCall call = controller.getCall();
      //call saveMessprotokoll and look what SaveResult returns
      SaveResult result = call.saveMessprotokoll(currentSavingProtokoll);
      //create ProtokollEvent to tell all consumers if all was ok
      ProtokollEvent save = new ProtokollEvent(ProtokollEvent.PROTOKOLL_SAVE_DONE);
      save.setResult(result);
      //HOW to fire/dispatch the ProtokollEvent here??????
      //TODO: need to fire this event and listen for it in other classes
      if(result.getResult()&gt;0){
          controller.setLoggerMessage("SavedOnline-&gt;Protokoll-Nr.:"+result.getProtokollnr());
      }
      else {
          controller.setLoggerMessage("SavedOnline not successful-&gt;Error:"+result.getError_message());
      }        
      return true;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>in the saveOnline function i create a ProtokollEvent and pass it some values.
  What i now want is to fire or dispatch this event so other code parts could listen to this.</p>
  
  <p>I tried with fireEvent() but as i understood the Oracle-DOCs only NODEs, Windows and Scene are able to do so. But how could i solve it with my custom class?</p>
  
  <p>Additional i ask myself whats is the difference between fireEvent and dispatchEvent?</p>