|
From: Nick C. <sr...@us...> - 2002-01-11 17:54:35
|
Update of /cvsroot/repast/repast/uchicago/src/sim/gui
In directory usw-pr-cvs1:/tmp/cvs-serv22020/sim/gui
Modified Files:
DisplaySurface.java
Log Message:
A. Once again changed the how the actual painting interacts with the
gui event thread. There are now two methods.
1. updateDisplayDirect() -- this calls painter.paint directly. This
is should be called from within the event thread. So, for example, in
response to a keystroke etc.
2. updateDisplay() -- this calls painter.paint via
SwingUtilities.invokeAndWait(). This inserts the paint event into the
event queue and is to be used when a non-event thread wants to paint. So,
this is used from within your model which operates inside another thread.
I'm using invokeAndWait rather than invokeLater as invokeLater causes
problems with GraphLayouts that do lots of intermediate painting.
B. Added keylisteners for zooming ('z') and unzooming ('r').
C. Added code for zooming. Includes ability to draw zoom box and communicate
with Zoomables.
|