   (:require [flatgui.util.matrix :as m]
             [flatgui.base :as fg]
             [flatgui.awt :as awt]
+            [flatgui.inputchannels.keyboard :as keyboard]
+            [flatgui.inputchannels.awtbase :as inputbase]
             [flatgui.theme]
             [flatgui.layout]
             [flatgui.widgets.label :as label]

                                                            :auto-size true
                                                            :paint-border false
                                                            :model text-model
                                                            :text (:text text-model)})}})}})

    (fg/defcomponent label/label :validity-indicator
      {:text "Valid"
       :foreground (awt/color 64 255 64)
       :evolvers {:text (fg/accessorfn (if (get-property component [] :config-valid)
                                         "Valid"
                                         "Not valid"))
                  :foreground (fg/accessorfn (if (get-property component [] :config-valid)
                                               (awt/color 64 255 64)
                                               (awt/color 255 64 64)))}})

    (fg/defcomponent button/button :apply {:text "Apply"})))

(def root-panel
  (fg/defcomponent

   [[:m :|] [:n :|] [:o :|] [:p :|]]])

(fg/defevolverfn :layout
  (if (or
        (and
          (= (fg/get-reason) [:config :apply])
          (abtn/button-pressed? (get-property [:config :apply] :pressed-trigger)))
        (and
          (= (fg/get-reason) [:config :scroll :content-pane :textfield])
          (abtn/button-pressed? (get-property [:config :scroll :content-pane :textfield] :pressed-trigger))))
    (read-string (get-property [:config :scroll :content-pane :textfield] :text))
    old-layout))

