Back to index

wims  3.65+svn20090927
Public Member Functions | Package Attributes
rene.zirkel.DragThread Class Reference
Collaboration diagram for rene.zirkel.DragThread:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DragThread (ZirkelCanvas zc)
void run ()
synchronized void mouseDragged (MouseEvent e)
void waitReady ()

Package Attributes

MouseEvent EWaiting = null
ZirkelCanvas ZC
Object Ready = new Object()
boolean Working = false

Detailed Description

Author:
Rene A thread for reporting drags to the main program, avoiding to many drag messages, so that the program seems to hang.

Definition at line 14 of file DragThread.java.


Constructor & Destructor Documentation

Definition at line 20 of file DragThread.java.

       {      ZC=zc;
              start();
       }

Member Function Documentation

synchronized void rene.zirkel.DragThread.mouseDragged ( MouseEvent  e) [inline]

Definition at line 55 of file DragThread.java.

       {      EWaiting=e;
              notify();
       }

Here is the caller graph for this function:

void rene.zirkel.DragThread.run ( ) [inline]

Definition at line 25 of file DragThread.java.

       {      MouseEvent e;
              while (true)
              {      if (EWaiting==null)
                     {      try
                            {      synchronized (this)
                                   {      wait();
                                   }
                            }
                            catch (Exception ex) {}
                     }
                     if (EWaiting!=null)
                     {      synchronized (this)
                            {      e=EWaiting;
                                   EWaiting=null;
                            }
                            Working=true;
                            ZC.doMouseDragged(e);
                            try
                            {      sleep(0);
                            }
                            catch (Exception ex) {}
                            Working=false;
                            synchronized (Ready)
                            {      Ready.notify();
                            }
                     }
              }
       }

Here is the call graph for this function:

Definition at line 60 of file DragThread.java.

       {      if (!Working) return;
              synchronized (Ready)
              {      try
                     {      Thread.currentThread().wait(1000);
                     }
                     catch (Exception ex) {}
              }
       }

Here is the caller graph for this function:


Member Data Documentation

MouseEvent rene.zirkel.DragThread.EWaiting = null [package]

Definition at line 15 of file DragThread.java.

Object rene.zirkel.DragThread.Ready = new Object() [package]

Definition at line 17 of file DragThread.java.

Definition at line 18 of file DragThread.java.

Definition at line 16 of file DragThread.java.


The documentation for this class was generated from the following file: