Example #1
0
  /**
   * Calling this method pauses the plot and displays a flashing message on the screen. Mainly used
   * when data is being loaded across the net. Everytime this routine is called a counter is
   * incremented the method Graph2D.finishedloading() decrements the counter. When the counter is
   * back to zero the plotting resumes.
   *
   * @see Graph2D#finishedloading()
   * @see Graph2D#loadmessage()
   * @see LoadMessage
   */
  public void startedloading() {

    loadingData++;

    if (loadingData != 1) return;

    if (load_thread == null) load_thread = new LoadMessage(this);
    load_thread.setFont(new Font("Helvetica", Font.PLAIN, 25));

    load_thread.begin();
  }
Example #2
0
  /**
   * Decrement the loading Data counter by one. When it is zero resume plotting.
   *
   * @see Graph2D#startedloading()
   * @see Graph2D#loadmessage()
   * @see LoadMessage
   */
  public void finishedloading() {

    loadingData--;

    if (loadingData > 0) return;

    if (load_thread != null) load_thread.end();
    load_thread = null;
  }
Example #3
0
 /**
  * Change the message to be flashed on the canvas
  *
  * @param s String contining the new message.
  * @see Graph2D#startedloading()
  * @see Graph2D#finishedloading()
  * @see LoadMessage
  */
 public void loadmessage(String s) {
   if (load_thread == null) load_thread = new LoadMessage(this);
   load_thread.setMessage(s);
 }