Last active
July 19, 2019 22:26
-
-
Save bltavares/0f53488664a7700720281eb00ce4f5c8 to your computer and use it in GitHub Desktop.
Self executable cabine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#_( | |
DEPS=' | |
{:deps {seesaw {:mvn/version "1.5.0"}}} | |
' | |
exec clojure -Sdeps "$DEPS" "$0" "$@" | |
) | |
(ns cockpit.core | |
(:require [seesaw.core :as ss] | |
[seesaw.dev :as dev])) | |
;; (dev/show-options (ss/table)) | |
(defn -main [& args] | |
(ss/invoke-later | |
(-> (ss/frame :title "Auto Pilot - Cockpit", | |
:on-close :exit | |
:content (ss/border-panel | |
:size [640 :by 480] | |
:north (ss/horizontal-panel :items ["Cabine SFN" | |
(ss/text "CNPJ ou CPF") | |
(ss/button :text "Buscar")]) | |
:south (ss/horizontal-panel :items [(ss/button :text "Abrir MP3" | |
:listen [:action (fn [_] (ss/input "Escolha o arquivo musical e curta seu cafézinho" :type :question))]) | |
(ss/button :text "▶") | |
(ss/slider :value 0) | |
"0:00/0:00"]) | |
:center (ss/scrollable | |
(ss/table :model [:columns [{:key :personal-identifier :text "CPF ou CNPJ"} | |
{:key :num-cab-seq :text "NumCabSeq"} | |
{:key :DtMvto :text "DtMvto"}] | |
:rows (->> 100 | |
range | |
(map (fn [_] {:personal-identifier "123.456.789-01" | |
:num-cab-seq (-> 100 rand str (subs 10)) | |
:DtMvto "1996-01-01"})))])))) | |
ss/pack! | |
ss/show!))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment