This commit is contained in:
24
script/test/test_swingutils.py
Normal file
24
script/test/test_swingutils.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import ch.psi.pshell.imaging.RendererMode as RendererMode
|
||||
import ch.psi.pshell.imaging.Calibration as Calibration
|
||||
from ch.psi.pshell.imaging.Overlays import *
|
||||
import ch.psi.utils.swing.SwingUtils as SwingUtils
|
||||
import javax.swing.SwingUtilities as SwingUtilities
|
||||
from swingutils.threads.swing import callSwing
|
||||
|
||||
|
||||
p = show_panel(img)
|
||||
dlg = SwingUtilities.getWindowAncestor(p)
|
||||
dlg.setSize(800,800)
|
||||
frm=SwingUtils.getFrame(p)
|
||||
dlg.setLocationRelativeTo(frm)
|
||||
|
||||
def update_frame(frm):
|
||||
SwingUtilities.updateComponentTreeUI(frm)
|
||||
frm.validate()
|
||||
frm.repaint()
|
||||
#$callSwing(update_frame, frm)
|
||||
|
||||
|
||||
x=0
|
||||
for i in range(0,10000000):
|
||||
x=x+1
|
||||
Reference in New Issue
Block a user