Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update readme and libs
  • Loading branch information
ertugrulcetin committed Sep 16, 2019
commit e27ea5f21b34b312002b336b7886fa30e22a6a3f
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
[![Build Status](https://secure.travis-ci.org/daveray/seesaw.png?branch=master)](http://travis-ci.org/daveray/seesaw)
## Seesaw with virtual dom
It's a fork of [seesaw](https://github.com/daveray/seesaw). This fork has virtual dom feature like **React.js**.

There's now a [Google Group](https://groups.google.com/group/seesaw-clj) for discussion and questions.
```clojure
(ns seesaw.ex
(:require [seesaw.core :as s]
[seesaw.options :refer [satom]]))

(def app-state (satom {:title "my-title"
:size [200 :by 325]}))

(def ff (s/frame :title (seesaw.options/get-k app-state :title)
:size (seesaw.options/get-k app-state :size)
:visible? true))

(swap! app-state update :title (constantly "helloo"))
;=>> re-renders the UI

(swap! app-state update :size (constantly [500 :by 300]))
;=>> re-renders the UI
```

[Here's a brief tutorial](https://gist.github.com/1441520) that covers some Seesaw basics. It assumes no knowledge of Swing or Java.

Expand Down
30 changes: 16 additions & 14 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,37 @@

:url "http://seesaw-clj.org"

:mailing-list {:name "seesaw-clj"
:mailing-list {:name "seesaw-clj"
:archive "https://groups.google.com/group/seesaw-clj"
:post "[email protected]"}
:post "[email protected]"}

:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo
:comments "same as Clojure"}
:comments "same as Clojure"}

:warn-on-reflection true

; To run the examples:
;
; $ lein examples
;
:aliases { "examples" ["run" "-m" "seesaw.test.examples.launcher"] }
:aliases {"examples" ["run" "-m" "seesaw.test.examples.launcher"]}

:dependencies [[org.clojure/clojure "1.8.0"]
:dependencies [[org.clojure/clojure "1.10.1"]
[com.miglayout/miglayout "3.7.4"]
[com.jgoodies/forms "1.2.1"]
[org.swinglabs.swingx/swingx-core "1.6.3"]
[com.jgoodies/forms "1.3.0"]
[org.swinglabs.swingx/swingx-core "1.6.5-1"]
[j18n "1.0.2"]
[com.fifesoft/rsyntaxtextarea "2.5.6"]]
:profiles { :dev {:dependencies [[com.stuartsierra/lazytest "1.1.2"]
[com.fifesoft/rsyntaxtextarea "3.0.3"]]
:plugins [[lein-ancient "0.6.15"]
[lein-cljfmt "0.6.4"]]
:profiles {:dev {:dependencies [[com.stuartsierra/lazytest "1.1.2"]
[lein-autodoc "0.9.0"]]}}
:repositories [["stuartsierra-releases" "https://stuartsierra.com/maven2"]]
:autodoc {
:name "Seesaw",
:page-title "Seesaw API Documentation"
:copyright "Copyright 2012, Dave Ray" }
:name "Seesaw",
:page-title "Seesaw API Documentation"
:copyright "Copyright 2012, Dave Ray"}
:java-source-paths ["jvm"])

6 changes: 3 additions & 3 deletions src/seesaw/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
in other namespaces have a core wrapper which adds additional
capability or makes them easier to use."
:author "Dave Ray"}
seesaw.core
seesaw.core
(:use [seesaw.util :only [illegal-argument to-seq check-args
constant-map resource resource-key?
to-dimension to-insets to-url try-cast
Expand Down Expand Up @@ -648,7 +648,7 @@ seesaw.core
(set-action* [this v] (.setAction this v)))

(def ^{:doc "Default handler for the :action option. Internal use."}
action-option (default-option :action set-action* get-action* "See (seesaw.core/action)"))
action-option (default-option :action set-action* get-action* "See (seesaw.core/action)"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; set/getModel is a common method on many types, but not in any common interface :(
Expand Down Expand Up @@ -683,7 +683,7 @@ action-option (default-option :action set-action* get-action* "See (seesaw.core/
javax.swing.JSpinner)

(def ^{:doc "Default handler for the :model option. Delegates to the ConfigModel protocol"}
model-option (default-option :model set-model* get-model*))
model-option (default-option :model set-model* get-model*))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; dragEnabled is a common method on many types, but not in any common interface :(
Expand Down