 (ns slide-explorer.display
-  (:import (javax.swing AbstractAction JComponent JFrame JLabel KeyStroke)
-           (java.awt Canvas Color Graphics Graphics2D RenderingHints Window)
+  (:import (javax.swing AbstractAction JComponent JFrame JPanel JLabel KeyStroke
+                        SwingUtilities)
+           (java.awt Color Graphics Graphics2D RenderingHints Window)
            (java.awt.event ComponentAdapter KeyAdapter KeyEvent MouseAdapter
                            WindowAdapter)
            (java.awt.image BufferedImage WritableRaster)

(defn show []
  (let [screen-state (atom (sorted-map :x 0 :y 0 :z 0 :zoom 0))
        available-tiles (agent {})
        canvas (main-canvas screen-state available-tiles)
        frame (main-frame)]
    (def at available-tiles)
    (def ss screen-state)
    (def f frame)
    (def cvs canvas)
    (.add (.getContentPane frame) canvas)
    (setup-fullscreen frame)
    (handle-drags canvas screen-state)
    (handle-wheel canvas screen-state)
    (handle-resize canvas screen-state)
    (handle-zoom frame screen-state)
    (display-follow canvas screen-state)
    (display-follow canvas available-tiles)
    (display-follow canvas angle)
    frame))



           (java.util UUID)
           (java.util.prefs Preferences)
           (javax.imageio ImageIO)
           (ij ImagePlus)
           (ij.process ImageProcessor)
           (mmcorej TaggedImage)
           (org.micromanager AcqEngine MMStudioMainFrame)
           (org.micromanager.utils GUIUpdater ImageUtils JavaUtils MDUtils)
