Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 37 lines (32 sloc) 1.614 kb
1e4c10e @daveray Pulled in kotarak's forms changes. Added a minimal test to exercise ever...
authored
1 ; Copyright (c) Dave Ray, 2011. All rights reserved.
2
3 ; The use and distribution terms for this software are covered by the
4 ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 ; which can be found in the file epl-v10.html at the root of this
6 ; distribution.
7 ; By using this software in any fashion, you are agreeing to be bound by
8 ; the terms of this license.
9 ; You must not remove this notice, or any other, from this software.
10
11 (ns seesaw.test.forms
63a63c3 @daveray Major refactoring of option handling throughout Seesaw.
authored
12 (:use [seesaw [core :exclude (separator)]])
13 (:use seesaw.forms)
1e4c10e @daveray Pulled in kotarak's forms changes. Added a minimal test to exercise ever...
authored
14 (:use [lazytest.describe :only (describe it testing)]
15 [lazytest.expect :only (expect)]))
16
17 (describe forms-panel
18 (it "Creates a JPanel using a JGoodies form builder"
19 (let [p (forms-panel
20 "pref,4dlu,80dlu,8dlu,pref,4dlu,80dlu"
21 :column-groups [[1 5]]
22 :leading-column-offset 0
23 :line-gap-size (com.jgoodies.forms.layout.Sizes/pixel 5)
24 :items [(title "JGoodies forms test")
25 (separator "General")
26 "Company" (span (text) 5)
27 "Contact" (span (text) 5)
28 "Click here" (next-column) (span (action :name "A button") 5)
29 (next-line)
30 (separator "Propeller")
31 "PTI/kW" (text :columns 10) "Power/kW" (text :columns 10)
32 "R/mm" (text :columns 10) "D/mm" (text :columns 10)
33 (separator)]
34 :default-dialog-border? true)]
35 (expect (instance? javax.swing.JPanel p)))))
36
Something went wrong with that request. Please try again.