Skip to content
Browse files

whitespace

  • Loading branch information...
1 parent 3d1169f commit a1d255947a20af17fef4e8f8495f6f81b9594edd @daveray committed Jan 14, 2012
Showing with 8 additions and 8 deletions.
  1. +7 −7 src/seesaw/timer.clj
  2. +1 −1 test/seesaw/test/timer.clj
View
14 src/seesaw/timer.clj
@@ -2,7 +2,7 @@
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
-; which can be found in the file epl-v10.html at the root of this
+; which can be found in the file epl-v10.html at the root of this
; distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
@@ -12,7 +12,7 @@
(:use [seesaw.action :only [action]]
[seesaw.options :only [bean-option apply-options option-map option-provider]]))
-(def ^{:private true} timer-opts
+(def ^{:private true} timer-opts
(option-map
(bean-option :initial-delay javax.swing.Timer)
(bean-option :delay javax.swing.Timer)
@@ -25,7 +25,7 @@
(fn [event]
(swap! value f))))
-(defn timer
+(defn timer
"Creates a new Swing timer that periodically executes the single-argument
function f. The argument is a \"state\" of the timer. Each time the function
is called its previous return value is passed to it. Kind of like (reduce)
@@ -34,16 +34,16 @@
:initial-value The first value passed to the handler function. Defaults to nil.
:initial-delay Delay, in milliseconds, of first call. Defaults to 0.
:delay Delay, in milliseconds, between calls. Defaults to 1000.
- :repeats? If true, the timer runs forever, otherwise, it's a
+ :repeats? If true, the timer runs forever, otherwise, it's a
\"one-shot\" timer. Defaults to true.
:start? Whether to start the timer immediately. Defaults to true.
- See http://download.oracle.com/javase/6/docs/api/javax/swing/Timer.html
+ See http://download.oracle.com/javase/6/docs/api/javax/swing/Timer.html
"
- [f & {:keys [start? initial-value] :or {start? true} :as opts}]
+ [f & {:keys [start? initial-value] :or {start? true} :as opts}]
(let [a (action :handler (timer-handler f initial-value))
t (javax.swing.Timer. 1000 a)]
(apply-options t (dissoc opts :start? :initial-value))
(when start? (.start t))
t))
-
+
View
2 test/seesaw/test/timer.clj
@@ -2,7 +2,7 @@
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
-; which can be found in the file epl-v10.html at the root of this
+; which can be found in the file epl-v10.html at the root of this
; distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.

0 comments on commit a1d2559

Please sign in to comment.
Something went wrong with that request. Please try again.