 
 (ns sqls.ui.worksheet
-  (:import (java.awt Point))
   (:use [clojure.string :only (join split-lines trim)])
   (:require [clojure.tools.logging :refer [spy spyf]])
   (:require seesaw.chooser

  (assert (not= frame nil))
  (let [ctrl-enter-keystroke (seesaw.keystroke/keystroke "control ENTER")
        sql-text-area (seesaw.core/select frame [:#sql])]
    (seesaw.core/listen sql-text-area :key-pressed (partial on-key-press handler ctrl-enter-keystroke))))



        ;            (let [[_ _ w h] dimensions]
        ;              [h :by w]))
        ;_ (println (format "pref size: %s" pref-size))
        query-text-area (fix-textarea-bindings (seesaw.rsyntax/text-area :id :sql
                                                                         :syntax :sql
                                                                         :columns 80
                                                                         :rows 25))
        query-text-area-scrollable (seesaw.core/scrollable query-text-area)
        results-panel (seesaw.core/vertical-panel :id :results-panel
                                                  :preferred-size [800 :by 400])
