 (ns slide-explorer.display
   (:import (javax.swing AbstractAction JComponent JFrame JLabel KeyStroke)
            (java.awt Canvas Color Graphics Graphics2D RenderingHints Window)
-           (java.awt.event ComponentAdapter KeyAdapter KeyEvent MouseAdapter WindowAdapter)
+           (java.awt.event ComponentAdapter KeyAdapter KeyEvent MouseAdapter
+                           WindowAdapter)
            (java.awt.image BufferedImage WritableRaster)
            (java.awt.geom AffineTransform Point2D$Double)
            (java.io ByteArrayInputStream)


(defn get-tile [[nx ny nz nc nt]]
  (awt-image (grab-tagged-image)))

(defn add-tile [tile-map tile-zoom indices]
  (assoc-in tile-map [tile-zoom indices] (get-tile indices)))

to normal size."
  ([^java.awt.GraphicsDevice device window]
    (if window
      (when (not= (.getFullScreenWindow device) window)
        (.dispose window)
        (.setUndecorated window true)
        (.setFullScreenWindow device window)
        (.show window))
      (when-let [window (.getFullScreenWindow device)]
        (.dispose window)
        (.setFullScreenWindow device nil)
        (.setUndecorated window false)
        (.show window)))
    window)
  ([window]
    (full-screen! (default-screen-device) window)))
