 (ns nightcode.core
   (:use [seesaw.core :only [invoke-later
                             frame
+                            select
                             native!
                             show!
+                            request-focus!
                             horizontal-panel
                             vertical-panel
                             left-right-split


(defn get-project-pane
  []
  (let [project-tree (tree :id :project-tree)]
    (doto project-tree
          (.setRootVisible false)
          (.setShowsRootHandles true)

  (org.pushingpixels.substance.api.SubstanceLookAndFeel/setSkin
    (org.pushingpixels.substance.api.skin.GraphiteSkin.))
  (invoke-later
    (let [root (-> (frame :title "Nightcode"
                          :content (get-window-content)
                          :width 1024
                          :height 768
                          :on-close :exit)
                   show!)]
      (request-focus! (select root [:#project-tree])))))
