From ad7f10ab6a874abafa75ccbdbdd74a584e89178f Mon Sep 17 00:00:00 2001 From: ertugrulcetin Date: Wed, 27 Jun 2018 19:32:55 +0300 Subject: [PATCH 01/10] added dynamic renderer with satom --- project.clj | 4 +- src/seesaw/core.clj | 983 +++++++++++++++-------------- src/seesaw/options.clj | 193 ++++-- src/seesaw/wiki/c_1_home_page.clj | 12 + src/seesaw/wiki/c_2_frames.clj | 15 + src/seesaw/wiki/c_3_widgets.clj | 75 +++ src/seesaw/wiki/c_4_containers.clj | 227 +++++++ src/seesaw/wiki/util.clj | 41 ++ 8 files changed, 999 insertions(+), 551 deletions(-) create mode 100644 src/seesaw/wiki/c_1_home_page.clj create mode 100644 src/seesaw/wiki/c_2_frames.clj create mode 100644 src/seesaw/wiki/c_3_widgets.clj create mode 100644 src/seesaw/wiki/c_4_containers.clj create mode 100644 src/seesaw/wiki/util.clj diff --git a/project.clj b/project.clj index b25f2b1f..b284882d 100644 --- a/project.clj +++ b/project.clj @@ -12,7 +12,7 @@ :distribution :repo :comments "same as Clojure"} - :warn-on-reflection true + :warn-on-reflection false ; To run the examples: ; @@ -20,7 +20,7 @@ ; :aliases { "examples" ["run" "-m" "seesaw.test.examples.launcher"] } - :dependencies [[org.clojure/clojure "1.4.0"] + :dependencies [[org.clojure/clojure "1.8.0"] [com.miglayout/miglayout "3.7.4"] [com.jgoodies/forms "1.2.1"] [org.swinglabs.swingx/swingx-core "1.6.3"] diff --git a/src/seesaw/core.clj b/src/seesaw/core.clj index 9a240f70..2ec9bf38 100644 --- a/src/seesaw/core.clj +++ b/src/seesaw/core.clj @@ -9,12 +9,12 @@ ; You must not remove this notice, or any other, from this software. (ns ^{:doc -"Core functions and macros for Seesaw. Although there are many more - Seesaw namespaces, usually what you want is in here. Most functions - in other namespaces have a core wrapper which adds additional - capability or makes them easier to use." + "Core functions and macros for Seesaw. Although there are many more + Seesaw namespaces, usually what you want is in here. Most functions + 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 @@ -35,16 +35,17 @@ event selector icon action cells table graphics cursor scroll dnd] [seesaw.layout :as layout]) (:import [javax.swing - SwingConstants UIManager ScrollPaneConstants DropMode - BoxLayout - JDialog JFrame JComponent Box JPanel JScrollPane JSplitPane JToolBar JTabbedPane - JLabel JTextField JTextArea JTextPane - AbstractButton JButton ButtonGroup - JOptionPane] + SwingConstants UIManager ScrollPaneConstants DropMode + BoxLayout + JDialog JFrame JComponent Box JPanel JScrollPane JSplitPane JToolBar JTabbedPane + JLabel JTextField JTextArea JTextPane + AbstractButton JButton ButtonGroup + JOptionPane] [javax.swing.text JTextComponent StyleConstants] [java.awt Component FlowLayout BorderLayout GridLayout - GridBagLayout GridBagConstraints - Dimension])) + GridBagLayout GridBagConstraints + Dimension] + (clojure.lang IAtom IDeref IMeta))) (declare to-widget) (declare popup-option-handler) @@ -58,12 +59,12 @@ `(seesaw.invoke/invoke-now ~@args)) (defmacro invoke-later - "Alias for seesaw.invoke/invoke-later" + "Alias for seesaw.invoke/invoke-later" [& args] `(seesaw.invoke/invoke-later ~@args)) (defmacro invoke-soon - "Alias for seesaw.invoke/invoke-soon" + "Alias for seesaw.invoke/invoke-soon" [& args] `(seesaw.invoke/invoke-soon ~@args)) @@ -217,8 +218,8 @@ used by Seesaw to construct widgets that can be fiddled with later, e.g. installing a paint handler, etc." ([factory-class & opts] - `(proxy [~factory-class seesaw.selector.Tag] [~@opts] - (tag_name [] (.getSimpleName ~factory-class))))) + `(proxy [~factory-class seesaw.selector.Tag] [~@opts] + (tag_name [] (.getSimpleName ~factory-class))))) ;******************************************************************************* @@ -234,16 +235,16 @@ (extend-protocol Showable java.awt.Component - (visible! [this v] (doto this (.setVisible (boolean v)))) - (visible? [this] (.isVisible this)) + (visible! [this v] (doto this (.setVisible (boolean v)))) + (visible? [this] (.isVisible this)) java.awt.Dialog - (visible! [this v] - (if (and v (is-modal-dialog? this)) - (show-modal-dialog this) - (doto this (.setVisible false)))) + (visible! [this v] + (if (and v (is-modal-dialog? this)) + (show-modal-dialog this) + (doto this (.setVisible false)))) java.util.EventObject - (visible! [this v] (visible! (.getSource this) v)) - (visible? [this] (visible? (.getSource this)))) + (visible! [this v] (visible! (.getSource this) v)) + (visible? [this] (visible? (.getSource this)))) (defn show! "Show a frame, dialog or widget. @@ -371,43 +372,43 @@ ; here for re-use. (defn- move-component-to! [^java.awt.Component this x y] (let [old-loc (.getLocation this) - x (or x (.x old-loc)) - y (or y (.y old-loc))] + x (or x (.x old-loc)) + y (or y (.y old-loc))] (doto this (.setLocation x y)))) (defn- move-component-by! [^java.awt.Component this dx dy] (let [old-loc (.getLocation this) - x (.x old-loc) - y (.y old-loc)] + x (.x old-loc) + y (.y old-loc)] (doto this (.setLocation (+ x dx) (+ y dy))))) (extend-protocol Movable java.util.EventObject - (move-to! [this x y] (move-to! (.getSource this) x y)) - (move-by! [this dx dy] (move-by! (.getSource this) dx dy)) - (move-to-front! [this] (move-to-front! (.getSource this))) - (move-to-back! [this] (move-to-back! (.getSource this))) + (move-to! [this x y] (move-to! (.getSource this) x y)) + (move-by! [this dx dy] (move-by! (.getSource this) dx dy)) + (move-to-front! [this] (move-to-front! (.getSource this))) + (move-to-back! [this] (move-to-back! (.getSource this))) java.awt.Component - (move-to! [this x y] (move-component-to! this x y)) - (move-by! [this dx dy] (move-component-by! this dx dy)) - (move-to-front! [this] - (do - (doto (.getParent this) - (.setComponentZOrder this 0) - layout/handle-structure-change) - this)) - (move-to-back! [this] - (let [parent (.getParent this) - n (.getComponentCount parent)] - (doto parent - (.setComponentZOrder this (dec n)) - layout/handle-structure-change) - this)) + (move-to! [this x y] (move-component-to! this x y)) + (move-by! [this dx dy] (move-component-by! this dx dy)) + (move-to-front! [this] + (do + (doto (.getParent this) + (.setComponentZOrder this 0) + layout/handle-structure-change) + this)) + (move-to-back! [this] + (let [parent (.getParent this) + n (.getComponentCount parent)] + (doto parent + (.setComponentZOrder this (dec n)) + layout/handle-structure-change) + this)) java.awt.Window - (move-to! [this x y] (move-component-to! this x y)) - (move-by! [this dx dy] (move-component-by! this dx dy)) - (move-to-front! [this] (doto this .toFront)) - (move-to-back! [this] (doto this .toBack))) + (move-to! [this x y] (move-component-to! this x y)) + (move-by! [this dx dy] (move-component-by! this dx dy)) + (move-to-front! [this] (doto this .toFront)) + (move-to-back! [this] (doto this .toBack))) (defn move! "Move a widget relatively or absolutely. target is a 'to-widget'-able object, @@ -446,18 +447,18 @@ (check-args (#{:by :to :to-front :to-back} how) "Expected :by, :to, :to-front, :to-back in move!") (case how (:to :by) - (let [[x y] (cond - (instance? java.awt.Point loc) (let [^java.awt.Point loc loc] [(.x loc) (.y loc)]) - (instance? java.awt.Rectangle loc) (let [^java.awt.Rectangle loc loc] [(.x loc) (.y loc)]) - (= how :to) (replace {:* nil} loc) - :else loc)] - (case how - :to (move-to! target x y) - :by (move-by! target x y))) + (let [[x y] (cond + (instance? java.awt.Point loc) (let [^java.awt.Point loc loc] [(.x loc) (.y loc)]) + (instance? java.awt.Rectangle loc) (let [^java.awt.Rectangle loc loc] [(.x loc) (.y loc)]) + (= how :to) (replace {:* nil} loc) + :else loc)] + (case how + :to (move-to! target x y) + :by (move-by! target x y))) :to-front - (move-to-front! target) + (move-to-front! target) :to-back - (move-to-back! target))) + (move-to-back! target))) (defn width "Returns the width of the given widget in pixels" @@ -501,7 +502,7 @@ (config* w :user-data)) (def ^{:private true} h-alignment-table - (constant-map SwingConstants :left :right :leading :trailing :center )) + (constant-map SwingConstants :left :right :leading :trailing :center)) (def ^{:private true} v-alignment-table (constant-map SwingConstants :top :center :bottom)) @@ -516,18 +517,18 @@ (cond ; TODO to-rect protocol? (= :preferred v) - (bounds-option-handler target (.getPreferredSize target)) + (bounds-option-handler target (.getPreferredSize target)) (instance? java.awt.Rectangle v) (.setBounds target v) (instance? java.awt.Dimension v) - (let [loc (.getLocation target) - v ^java.awt.Dimension v] - (.setBounds target (.x loc) (.y loc) (.width v) (.height v))) + (let [loc (.getLocation target) + v ^java.awt.Dimension v] + (.setBounds target (.x loc) (.y loc) (.width v) (.height v))) :else - (let [old (.getBounds target) - [x y w h] (replace {:* nil} v)] - (.setBounds target - (or x (.x old)) (or y (.y old)) - (or w (.width old)) (or h (.height old)))))) + (let [old (.getBounds target) + [x y w h] (replace {:* nil} v)] + (.setBounds target + (or x (.x old)) (or y (.y old)) + (or w (.width old)) (or h (.height old)))))) ;******************************************************************************* @@ -554,18 +555,18 @@ (extend-protocol ConfigIcon ; most things don't have icons... java.awt.Component - (set-icon* [this v] - (illegal-argument "%s does not support the :icon option" (class this))) - (get-icon* [this] - (illegal-argument "%s does not support the :icon option" (class this))) + (set-icon* [this v] + (illegal-argument "%s does not support the :icon option" (class this))) + (get-icon* [this] + (illegal-argument "%s does not support the :icon option" (class this))) javax.swing.JLabel - (set-icon* [this v] (.setIcon this (make-icon v))) - (get-icon* [this] (.getIcon this)) + (set-icon* [this v] (.setIcon this (make-icon v))) + (get-icon* [this] (.getIcon this)) javax.swing.AbstractButton - (set-icon* [this v] (.setIcon this (make-icon v))) - (get-icon* [this] (.getIcon this))) + (set-icon* [this v] (.setIcon this (make-icon v))) + (get-icon* [this] (.getIcon this))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; get/setText is a common method on many types, but not in any common interface :( @@ -577,39 +578,39 @@ (extend-protocol ConfigText Object - (set-text* [this v] (set-text* (to-widget this) v)) - (get-text* [this] (get-text* (to-widget this))) + (set-text* [this v] (set-text* (to-widget this) v)) + (get-text* [this] (get-text* (to-widget this))) java.awt.Component - (set-text* [this v] - (illegal-argument "%s does not support (seesaw.core/text!)" (class this))) - (get-text* [this] - (illegal-argument "%s does not support (seesaw.core/text)" (class this))) + (set-text* [this v] + (illegal-argument "%s does not support (seesaw.core/text!)" (class this))) + (get-text* [this] + (illegal-argument "%s does not support (seesaw.core/text)" (class this))) javax.swing.JLabel - (set-text* [this v] (.setText this v)) - (get-text* [this] (.getText this)) + (set-text* [this v] (.setText this v)) + (get-text* [this] (.getText this)) javax.swing.AbstractButton - (set-text* [this v] (.setText this v)) - (get-text* [this] (.getText this)) + (set-text* [this v] (.setText this v)) + (get-text* [this] (.getText this)) javax.swing.text.AbstractDocument - (set-text* [this v] (.replace this 0 (.getLength this) v nil)) - (get-text* [this] (.getText this 0 (.getLength this))) + (set-text* [this v] (.replace this 0 (.getLength this) v nil)) + (get-text* [this] (.getText this 0 (.getLength this))) javax.swing.event.DocumentEvent - (set-text* [this v] (set-text* (.getDocument this) v)) - (get-text* [this] (get-text* (.getDocument this))) + (set-text* [this v] (set-text* (.getDocument this) v)) + (get-text* [this] (get-text* (.getDocument this))) javax.swing.text.JTextComponent - (set-text* [this v] (.setText this v)) - (get-text* [this] (.getText this)) + (set-text* [this v] (.setText this v)) + (get-text* [this] (.getText this)) javax.swing.JComboBox - (set-text* [this v] ) - (get-text* [this] - (if-let [i (selection this)] - (str i)))) + (set-text* [this v]) + (get-text* [this] + (if-let [i (selection this)] + (str i)))) (defn- convert-text-value [v] (cond - (nil? v) v - (string? v) v - (number? v) (str v) + (nil? v) v + (string? v) v + (number? v) (str v) (resource-key? v) (resource v) (satisfies? clojure.java.io/IOFactory v) (slurp v) ; TODO This line is unreachable because the IOFactory protocol is @@ -637,17 +638,17 @@ (extend-protocol ConfigAction javax.swing.AbstractButton - (get-action* [this] (.getAction this)) - (set-action* [this v] (.setAction this v)) + (get-action* [this] (.getAction this)) + (set-action* [this v] (.setAction this v)) javax.swing.JTextField - (get-action* [this] (.getAction this)) - (set-action* [this v] (.setAction this v)) + (get-action* [this] (.getAction this)) + (set-action* [this v] (.setAction this v)) javax.swing.JComboBox - (get-action* [this] (.getAction this)) - (set-action* [this v] (.setAction this v))) + (get-action* [this] (.getAction this)) + (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 :( @@ -659,16 +660,16 @@ (extend-protocol ConfigModel javax.swing.text.JTextComponent - (get-model* [this] (.getDocument this)) - (set-model* [this v] (.setDocument this v))) + (get-model* [this] (.getDocument this)) + (set-model* [this v] (.setDocument this v))) (defmacro ^{:private true} config-model-impl [& classes] `(extend-protocol ConfigModel - ~@(mapcat - (fn [c] - `(~c (~'get-model* [this#] (. this# ~'getModel)) - (~'set-model* [this# v#] (. this# ~'setModel v#)))) - classes))) + ~@(mapcat + (fn [c] + `(~c (~'get-model* [this#] (. this# ~'getModel)) + (~'set-model* [this# v#] (. this# ~'setModel v#)))) + classes))) (config-model-impl javax.swing.AbstractButton @@ -682,7 +683,7 @@ 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 :( @@ -693,15 +694,15 @@ ; Do-nothing impls for everybody (extend-protocol ConfigDragEnabled javax.swing.JComponent (get-drag-enabled [this] false) (set-drag-enabled [this v]) - javax.swing.JWindow (get-drag-enabled [this] false) (set-drag-enabled [this v])) + javax.swing.JWindow (get-drag-enabled [this] false) (set-drag-enabled [this v])) (defmacro ^{:private true} config-drag-enabled-impl [& classes] `(extend-protocol ConfigDragEnabled - ~@(mapcat - (fn [c] - `(~c (~'get-drag-enabled [this#] (. this# ~'getDragEnabled)) - (~'set-drag-enabled [this# v#] (. this# ~'setDragEnabled (boolean v#))))) - classes))) + ~@(mapcat + (fn [c] + `(~c (~'get-drag-enabled [this#] (. this# ~'getDragEnabled)) + (~'set-drag-enabled [this# v#] (. this# ~'setDragEnabled (boolean v#))))) + classes))) (config-drag-enabled-impl javax.swing.text.JTextComponent @@ -715,15 +716,15 @@ ; drop-mode support constants (def ^{:private true} drop-mode-to-keyword { - DropMode/INSERT :insert - DropMode/INSERT_COLS :insert-cols - DropMode/INSERT_ROWS :insert-rows - DropMode/ON :on - DropMode/ON_OR_INSERT :on-or-insert - DropMode/ON_OR_INSERT_COLS :on-or-insert-cols - DropMode/ON_OR_INSERT_ROWS :on-or-insert-rows - DropMode/USE_SELECTION :use-selection -}) + DropMode/INSERT :insert + DropMode/INSERT_COLS :insert-cols + DropMode/INSERT_ROWS :insert-rows + DropMode/ON :on + DropMode/ON_OR_INSERT :on-or-insert + DropMode/ON_OR_INSERT_COLS :on-or-insert-cols + DropMode/ON_OR_INSERT_ROWS :on-or-insert-rows + DropMode/USE_SELECTION :use-selection + }) (def ^{:private true} keyword-to-drop-mode (clojure.set/map-invert drop-mode-to-keyword)) @@ -737,8 +738,8 @@ (extend-protocol LayoutOrientationConfig javax.swing.JList - (set-layout-orientation* [this v] (.setLayoutOrientation this v)) - (get-layout-orientation* [this] (.getLayoutOrientation this))) + (set-layout-orientation* [this v] (.setLayoutOrientation this v)) + (get-layout-orientation* [this] (.getLayoutOrientation this))) (defn- layout-orientation-option [table] (let [rtable (clojure.set/map-invert table)] @@ -752,10 +753,10 @@ (keys table)))) (def ^{:private true} list-layout-orientation-table { - :vertical javax.swing.JList/VERTICAL - :horizontal-wrap javax.swing.JList/HORIZONTAL_WRAP - :vertical-wrap javax.swing.JList/VERTICAL_WRAP -}) + :vertical javax.swing.JList/VERTICAL + :horizontal-wrap javax.swing.JList/HORIZONTAL_WRAP + :vertical-wrap javax.swing.JList/VERTICAL_WRAP + }) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -766,23 +767,23 @@ (extend-protocol SelectionModeConfig javax.swing.tree.TreeSelectionModel - (set-selection-mode* [this v] (.setSelectionMode this v)) - (get-selection-mode* [this] (.getSelectionMode this)) + (set-selection-mode* [this v] (.setSelectionMode this v)) + (get-selection-mode* [this] (.getSelectionMode this)) javax.swing.JTree - (set-selection-mode* [this v] (set-selection-mode* (.getSelectionModel this) v)) - (get-selection-mode* [this] (get-selection-mode* (.getSelectionModel this))) + (set-selection-mode* [this v] (set-selection-mode* (.getSelectionModel this) v)) + (get-selection-mode* [this] (get-selection-mode* (.getSelectionModel this))) javax.swing.ListSelectionModel - (set-selection-mode* [this v] (.setSelectionMode this v)) - (get-selection-mode* [this] (.getSelectionMode this)) + (set-selection-mode* [this v] (.setSelectionMode this v)) + (get-selection-mode* [this] (.getSelectionMode this)) javax.swing.JTable - (set-selection-mode* [this v] (set-selection-mode* (.getSelectionModel this) v)) - (get-selection-mode* [this] (get-selection-mode* (.getSelectionModel this))) + (set-selection-mode* [this v] (set-selection-mode* (.getSelectionModel this) v)) + (get-selection-mode* [this] (get-selection-mode* (.getSelectionModel this))) javax.swing.JList - (set-selection-mode* [this v] (.setSelectionMode this v)) - (get-selection-mode* [this] (.getSelectionMode this))) + (set-selection-mode* [this v] (.setSelectionMode this v)) + (get-selection-mode* [this] (.getSelectionMode this))) (defn- selection-mode-option [table] (let [rtable (clojure.set/map-invert table)] @@ -796,16 +797,16 @@ (keys table)))) (def ^{:private true} list-selection-mode-table { - :single javax.swing.ListSelectionModel/SINGLE_SELECTION - :single-interval javax.swing.ListSelectionModel/SINGLE_INTERVAL_SELECTION - :multi-interval javax.swing.ListSelectionModel/MULTIPLE_INTERVAL_SELECTION -}) + :single javax.swing.ListSelectionModel/SINGLE_SELECTION + :single-interval javax.swing.ListSelectionModel/SINGLE_INTERVAL_SELECTION + :multi-interval javax.swing.ListSelectionModel/MULTIPLE_INTERVAL_SELECTION + }) -(def ^ {:private true} tree-selection-mode-table { - :single javax.swing.tree.TreeSelectionModel/SINGLE_TREE_SELECTION - :contiguous javax.swing.tree.TreeSelectionModel/CONTIGUOUS_TREE_SELECTION - :discontiguous javax.swing.tree.TreeSelectionModel/DISCONTIGUOUS_TREE_SELECTION -}) +(def ^{:private true} tree-selection-mode-table { + :single javax.swing.tree.TreeSelectionModel/SINGLE_TREE_SELECTION + :contiguous javax.swing.tree.TreeSelectionModel/CONTIGUOUS_TREE_SELECTION + :discontiguous javax.swing.tree.TreeSelectionModel/DISCONTIGUOUS_TREE_SELECTION + }) (declare paint-option-handler) @@ -826,7 +827,7 @@ (default-option :user-data (fn [c v] (put-meta! c ::user-data v)) - (fn [c] (get-meta c ::user-data)) + (fn [c] (get-meta c ::user-data)) ["Anything." "Associate arbitrary user-data with a widget." "See (seesaw.core/user-data)"]) @@ -836,8 +837,8 @@ (bean-option :focusable? java.awt.Component boolean nil boolean-examples) (default-option :background #(do - (.setBackground ^JComponent %1 (seesaw.color/to-color %2)) - (.setOpaque ^JComponent %1 true)) + (.setBackground ^JComponent %1 (seesaw.color/to-color %2)) + (.setOpaque ^JComponent %1 true)) #(.getBackground ^JComponent %1) color-examples) (bean-option :foreground JComponent seesaw.color/to-color nil color-examples) @@ -850,35 +851,35 @@ (bean-option :minimum-size JComponent to-dimension nil dimension-examples) (bean-option :maximum-size JComponent to-dimension nil dimension-examples) (default-option :size - #(let [d (to-dimension %2)] - (doto ^JComponent %1 - (.setPreferredSize d) - (.setMinimumSize d) - (.setMaximumSize d))) - #(.getSize ^JComponent %1) - dimension-examples) + #(let [d (to-dimension %2)] + (doto ^JComponent %1 + (.setPreferredSize d) + (.setMinimumSize d) + (.setMaximumSize d))) + #(.getSize ^JComponent %1) + dimension-examples) (default-option :location - #(move! %1 :to %2) - #(.getLocation ^java.awt.Component %1) - ["See (seesaw.core/move! :to)"]) + #(move! %1 :to %2) + #(.getLocation ^java.awt.Component %1) + ["See (seesaw.core/move! :to)"]) (default-option :location-on-screen - nil - #(.getLocationOnScreen ^java.awt.Component %1) - ["java.awt.Point location in global screen coords"]) + nil + #(.getLocationOnScreen ^java.awt.Component %1) + ["java.awt.Point location in global screen coords"]) (default-option :bounds - bounds-option-handler - #(.getBounds ^java.awt.Component %1) - [:preferred '[x y w h] "Use :* to leave component unchanged:" - '[x :* :* h]]) + bounds-option-handler + #(.getBounds ^java.awt.Component %1) + [:preferred '[x y w h] "Use :* to leave component unchanged:" + '[x :* :* h]]) (default-option :popup - #(popup-option-handler %1 %2) - nil - ['javax.swing.JPopupMenu - "(fn [e]) that returns a seq of menu items" - "See (seesaw.core/popup)"]) + #(popup-option-handler %1 %2) + nil + ['javax.swing.JPopupMenu + "(fn [e]) that returns a seq of menu items" + "See (seesaw.core/popup)"]) (default-option :paint #(paint-option-handler %1 %2) nil ["See (seesaw.core/canvas)"]) ; TODO I'd like to push these down but cells.clj uses them on non-attached @@ -899,24 +900,24 @@ (extend-protocol Configurable java.util.EventObject - (config* [target name] (config* (to-widget target) name)) - (config!* [target args] (config!* (to-widget target) args)) + (config* [target name] (config* (to-widget target) name)) + (config!* [target args] (config!* (to-widget target) args)) java.awt.Component - (config* [target name] (get-option-value target name)) - (config!* [target args] (apply-options target args)) + (config* [target name] (get-option-value target name)) + (config!* [target args] (apply-options target args)) javax.swing.JComponent - (config* [target name] (get-option-value target name)) - (config!* [target args] (apply-options target args)) + (config* [target name] (get-option-value target name)) + (config!* [target args] (apply-options target args)) javax.swing.Action - (config* [target name] (get-option-value target name)) - (config!* [target args] (apply-options target args)) + (config* [target name] (get-option-value target name)) + (config!* [target args] (apply-options target args)) java.awt.Window - (config* [target name] (get-option-value target name)) - (config!* [target args] (apply-options target args))) + (config* [target name] (get-option-value target name)) + (config!* [target args] (apply-options target args))) ;******************************************************************************* ; ToDocument @@ -926,17 +927,17 @@ [v] (let [w (to-widget v)] (cond - (instance? javax.swing.text.Document v) v + (instance? javax.swing.text.Document v) v (instance? javax.swing.event.DocumentEvent v) (.getDocument ^javax.swing.event.DocumentEvent v) - (instance? JTextComponent w) (.getDocument ^JTextComponent w)))) + (instance? JTextComponent w) (.getDocument ^JTextComponent w)))) ;******************************************************************************* ; Abstract Panel (defn abstract-panel ([panel layout opts] - (doto panel - (.setLayout (if (fn? layout) (layout panel) layout)) - (apply-options opts))) + (doto panel + (.setLayout (if (fn? layout) (layout panel) layout)) + (apply-options opts))) ([layout opts] (abstract-panel (construct JPanel) layout opts))) ;******************************************************************************* @@ -1105,7 +1106,7 @@ See http://download.oracle.com/javase/6/docs/api/java/awt/GridLayout.html " [& {:keys [rows columns] - :as opts}] + :as opts}] (abstract-panel (layout/grid-layout rows columns) opts)) ;******************************************************************************* @@ -1189,15 +1190,15 @@ ; Buttons (extend-protocol Configurable javax.swing.ButtonGroup - (config* [target name] (get-option-value target name)) - (config!* [target args] (apply-options target args))) + (config* [target name] (get-option-value target name)) + (config!* [target args] (apply-options target args))) (def button-group-options (option-map (default-option :buttons - #(doseq [b %2] (.add ^javax.swing.ButtonGroup %1 b)) - #(enumeration-seq (.getElements ^javax.swing.ButtonGroup %1)) - ["A seq of buttons in the group"]))) + #(doseq [b %2] (.add ^javax.swing.ButtonGroup %1 b)) + #(enumeration-seq (.getElements ^javax.swing.ButtonGroup %1)) + ["A seq of buttons in the group"]))) (option-provider javax.swing.ButtonGroup button-group-options) @@ -1338,7 +1339,7 @@ model-option action-option (resource-option :resource (concat base-resource-options - [:caret-color :disabled-text-color :selected-text-color :selection-color])) + [:caret-color :disabled-text-color :selected-text-color :selection-color])) (bean-option :editable? javax.swing.text.JTextComponent boolean) (bean-option :margin javax.swing.text.JTextComponent to-insets) (bean-option :caret-color javax.swing.text.JTextComponent seesaw.color/to-color nil color-examples) @@ -1366,10 +1367,10 @@ (bean-option :columns javax.swing.JTextArea) (bean-option :rows javax.swing.JTextArea) (default-option :wrap-lines? - #(doto ^javax.swing.JTextArea %1 - (.setLineWrap (boolean %2)) - (.setWrapStyleWord (boolean %2))) - #(.getLineWrap ^javax.swing.JTextArea %1)) + #(doto ^javax.swing.JTextArea %1 + (.setLineWrap (boolean %2)) + (.setWrapStyleWord (boolean %2))) + #(.getLineWrap ^javax.swing.JTextArea %1)) (bean-option :tab-size javax.swing.JTextArea)))) (widget-option-provider javax.swing.JTextArea text-area-options) @@ -1432,10 +1433,10 @@ multi? (or (coll? arg0) (seq? arg0))] (cond (nil? arg0) (illegal-argument "First arg must not be nil") - as-doc (get-text as-doc) - as-widget (get-text as-widget) - multi? (map #(text %) arg0) - :else (text :text arg0))) + as-doc (get-text as-doc) + as-widget (get-text as-widget) + multi? (map #(text %) arg0) + :else (text :text arg0))) (let [{:keys [multi-line?] :as opts} args opts (dissoc opts :multi-line?)] (if multi-line? @@ -1485,13 +1486,13 @@ (let [style (.addStyle text-pane (name id) nil)] (doseq [[k v] (partition 2 options)] (case k - :font (.addAttribute style StyleConstants/FontFamily (name v)) - :size (.addAttribute style StyleConstants/FontSize (Integer. v)) - :color (.addAttribute style StyleConstants/Foreground (seesaw.color/to-color v)) + :font (.addAttribute style StyleConstants/FontFamily (name v)) + :size (.addAttribute style StyleConstants/FontSize (Integer. v)) + :color (.addAttribute style StyleConstants/Foreground (seesaw.color/to-color v)) :background (.addAttribute style StyleConstants/Background (seesaw.color/to-color v)) - :bold (.addAttribute style StyleConstants/Bold (boolean v)) - :italic (.addAttribute style StyleConstants/Italic (boolean v)) - :underline (.addAttribute style StyleConstants/Underline (boolean v)) + :bold (.addAttribute style StyleConstants/Bold (boolean v)) + :italic (.addAttribute style StyleConstants/Italic (boolean v)) + :underline (.addAttribute style StyleConstants/Underline (boolean v)) (illegal-argument "Option %s is not supported in :styles" k)))))) (def styled-text-options @@ -1499,7 +1500,7 @@ text-options (option-map (default-option :wrap-lines? #(put-meta! %1 :wrap-lines? (boolean %2)) - #(get-meta %1 :wrap-lines?)) + #(get-meta %1 :wrap-lines?)) (default-option :styles add-styles)))) (widget-option-provider javax.swing.JTextPane styled-text-options) @@ -1532,7 +1533,7 @@ (seesaw.core/style-text!) http://download.oracle.com/javase/6/docs/api/javax/swing/JTextPane.html " - { :arglists '([& args]) } + {:arglists '([& args])} [& {:as opts}] (let [pane (proxy [JTextPane] [] (getScrollableTracksViewportWidth [] @@ -1551,7 +1552,7 @@ [^JTextPane target id ^Integer start ^Integer length] (check-args (instance? JTextPane target) "style-text! only applied to styled-text widgets") (.setCharacterAttributes (.getStyledDocument target) - start length (.getStyle target (name id)) true) + start length (.getStyle target (name id)) true) target) ;******************************************************************************* @@ -1669,8 +1670,8 @@ (option-map (around-option model-option to-list-model identity "See (seesaw.core/listbox)") (default-option :renderer - #(.setCellRenderer ^javax.swing.JList %1 (seesaw.cells/to-cell-renderer %1 %2)) - #(.getCellRenderer ^javax.swing.JList %1)) + #(.setCellRenderer ^javax.swing.JList %1 (seesaw.cells/to-cell-renderer %1 %2)) + #(.getCellRenderer ^javax.swing.JList %1)) (selection-mode-option list-selection-mode-table) (bean-option :fixed-cell-height javax.swing.JList) (layout-orientation-option list-layout-orientation-table) @@ -1708,12 +1709,12 @@ (-> table .getColumnModel .getColumns enumeration-seq)) (def ^{:private true} auto-resize-mode-table { - :off javax.swing.JTable/AUTO_RESIZE_OFF - :next-column javax.swing.JTable/AUTO_RESIZE_NEXT_COLUMN - :subsequent-columns javax.swing.JTable/AUTO_RESIZE_SUBSEQUENT_COLUMNS - :last-column javax.swing.JTable/AUTO_RESIZE_LAST_COLUMN - :all-columns javax.swing.JTable/AUTO_RESIZE_ALL_COLUMNS -}) + :off javax.swing.JTable/AUTO_RESIZE_OFF + :next-column javax.swing.JTable/AUTO_RESIZE_NEXT_COLUMN + :subsequent-columns javax.swing.JTable/AUTO_RESIZE_SUBSEQUENT_COLUMNS + :last-column javax.swing.JTable/AUTO_RESIZE_LAST_COLUMN + :all-columns javax.swing.JTable/AUTO_RESIZE_ALL_COLUMNS + }) (def table-options (merge @@ -1722,15 +1723,15 @@ model-option (bean-option :model javax.swing.JTable to-table-model) (default-option :show-grid? - #(.setShowGrid ^javax.swing.JTable %1 (boolean %2)) - (fn [^javax.swing.JTable t] - (and (.getShowHorizontalLines t) - (.getShowVerticalLines t)))) + #(.setShowGrid ^javax.swing.JTable %1 (boolean %2)) + (fn [^javax.swing.JTable t] + (and (.getShowHorizontalLines t) + (.getShowVerticalLines t)))) (default-option :column-widths - #(doall - (map (fn [c w] (.setWidth c w) (.setPreferredWidth c w)) (table-columns %1) %2)) - #(doall - (map (fn [c] (.getWidth c)) (table-columns %1)))) + #(doall + (map (fn [c w] (.setWidth c w) (.setPreferredWidth c w)) (table-columns %1) %2)) + #(doall + (map (fn [c] (.getWidth c)) (table-columns %1)))) (bean-option [:show-vertical-lines? :show-vertical-lines] javax.swing.JTable boolean) (bean-option [:show-horizontal-lines? :show-horizontal-lines] javax.swing.JTable boolean) (bean-option [:fills-viewport-height? :fills-viewport-height] javax.swing.JTable boolean) @@ -1863,21 +1864,21 @@ (def ^{:private true} spinner-date-by-table (constant-map java.util.Calendar - :era - :year - :month - :week-of-year - :week-of-month - :day-of-month - :day-of-year - :day-of-week - :day-of-week-in-month - :am-pm - :hour - :hour-of-day - :minute - :second - :millisecond)) + :era + :year + :month + :week-of-year + :week-of-month + :day-of-month + :day-of-year + :day-of-week + :day-of-week-in-month + :am-pm + :hour + :hour-of-day + :minute + :second + :millisecond)) (defn ^javax.swing.SpinnerModel spinner-model "A helper function for creating spinner models. Calls take the general @@ -1906,20 +1907,20 @@ [v & {:keys [from to by]}] (cond ; TODO Reflection here. Don't know how to get rid of it. - (number? v) - (let [step (or by 1)] - (javax.swing.SpinnerNumberModel. ^Number v ^Comparable from ^Comparable to + (number? v) + (let [step (or by 1)] + (javax.swing.SpinnerNumberModel. ^Number v ^Comparable from ^Comparable to ^Number step)) (instance? java.util.Date v) - (javax.swing.SpinnerDateModel. ^java.util.Date v - from to - (spinner-date-by-table by)) + (javax.swing.SpinnerDateModel. ^java.util.Date v + from to + (spinner-date-by-table by)) :else (illegal-argument "Don't' know how to make spinner :model from %s" (class v)))) (defn- ^javax.swing.SpinnerModel to-spinner-model [v] (cond (instance? javax.swing.SpinnerModel v) v - (sequential? v) (javax.swing.SpinnerListModel. ^java.util.List v) + (sequential? v) (javax.swing.SpinnerListModel. ^java.util.List v) (instance? java.util.Date v) (doto (javax.swing.SpinnerDateModel.) (.setValue ^java.util.Date v)) (number? v) (doto (javax.swing.SpinnerNumberModel.) (.setValue v)) :else (illegal-argument "Don't' know how to make spinner :model from %s" (class v)))) @@ -1964,22 +1965,22 @@ ; Scrolling (def ^{:private true} hscroll-table { - :as-needed ScrollPaneConstants/HORIZONTAL_SCROLLBAR_AS_NEEDED - :never ScrollPaneConstants/HORIZONTAL_SCROLLBAR_NEVER - :always ScrollPaneConstants/HORIZONTAL_SCROLLBAR_ALWAYS -}) + :as-needed ScrollPaneConstants/HORIZONTAL_SCROLLBAR_AS_NEEDED + :never ScrollPaneConstants/HORIZONTAL_SCROLLBAR_NEVER + :always ScrollPaneConstants/HORIZONTAL_SCROLLBAR_ALWAYS + }) (def ^{:private true} vscroll-table { - :as-needed ScrollPaneConstants/VERTICAL_SCROLLBAR_AS_NEEDED - :never ScrollPaneConstants/VERTICAL_SCROLLBAR_NEVER - :always ScrollPaneConstants/VERTICAL_SCROLLBAR_ALWAYS -}) + :as-needed ScrollPaneConstants/VERTICAL_SCROLLBAR_AS_NEEDED + :never ScrollPaneConstants/VERTICAL_SCROLLBAR_NEVER + :always ScrollPaneConstants/VERTICAL_SCROLLBAR_ALWAYS + }) (def ^{:private true} scrollable-corner-constants { - :lower-left ScrollPaneConstants/LOWER_LEFT_CORNER - :lower-right ScrollPaneConstants/LOWER_RIGHT_CORNER - :upper-left ScrollPaneConstants/UPPER_LEFT_CORNER - :upper-right ScrollPaneConstants/UPPER_RIGHT_CORNER -}) + :lower-left ScrollPaneConstants/LOWER_LEFT_CORNER + :lower-right ScrollPaneConstants/LOWER_RIGHT_CORNER + :upper-left ScrollPaneConstants/UPPER_LEFT_CORNER + :upper-right ScrollPaneConstants/UPPER_RIGHT_CORNER + }) (defn- set-scrollable-corner [k ^JScrollPane w v] (.setCorner w (scrollable-corner-constants k) (make-widget v))) @@ -1991,19 +1992,19 @@ (bean-option [:hscroll :horizontal-scroll-bar-policy] JScrollPane hscroll-table) (bean-option [:vscroll :vertical-scroll-bar-policy] JScrollPane vscroll-table) (default-option :row-header - (fn [^JScrollPane w v] - (let [v (make-widget v)] - (if (instance? javax.swing.JViewport v) - (.setRowHeader w v) - (.setRowHeaderView w v))))) + (fn [^JScrollPane w v] + (let [v (make-widget v)] + (if (instance? javax.swing.JViewport v) + (.setRowHeader w v) + (.setRowHeaderView w v))))) (default-option :column-header - (fn [^JScrollPane w v] - (let [v (make-widget v)] - (if (instance? javax.swing.JViewport v) - (.setColumnHeader w v) - (.setColumnHeaderView w v)))))) - (apply option-map - (for [k (keys scrollable-corner-constants)] + (fn [^JScrollPane w v] + (let [v (make-widget v)] + (if (instance? javax.swing.JViewport v) + (.setColumnHeader w v) + (.setColumnHeaderView w v)))))) + (apply option-map + (for [k (keys scrollable-corner-constants)] (default-option k (partial set-scrollable-corner k)))))) (widget-option-provider JScrollPane scrollable-options) @@ -2117,19 +2118,19 @@ (if (and (> (.getWidth splitter) 0) (> (.getHeight splitter) 0)) (.setDividerLocation splitter (double value)) (.addComponentListener splitter - (proxy [java.awt.event.ComponentAdapter] [] - (componentResized [e] - (.removeComponentListener splitter this) - (divider-location-proportional! splitter value))))) + (proxy [java.awt.event.ComponentAdapter] [] + (componentResized [e] + (.removeComponentListener splitter this) + (divider-location-proportional! splitter value))))) (.addHierarchyListener splitter - (reify java.awt.event.HierarchyListener - (hierarchyChanged [this e] - (when (and (not= 0 (bit-and - ^Integer (.getChangeFlags e) - ^Integer java.awt.event.HierarchyEvent/SHOWING_CHANGED)) - (.isShowing splitter)) - (.removeHierarchyListener splitter this) - (divider-location-proportional! splitter value))))))) + (reify java.awt.event.HierarchyListener + (hierarchyChanged [this e] + (when (and (not= 0 (bit-and + ^Integer (.getChangeFlags e) + ^Integer java.awt.event.HierarchyEvent/SHOWING_CHANGED)) + (.isShowing splitter)) + (.removeHierarchyListener splitter this) + (divider-location-proportional! splitter value))))))) (defn- divider-location! "Sets the divider location of a splitter. Value can be one of cases: @@ -2154,8 +2155,8 @@ [^javax.swing.JSplitPane splitter value] (cond (integer? value) (.setDividerLocation splitter ^Integer value) - (ratio? value) (divider-location! splitter (double value)) - (float? value) (divider-location-proportional! splitter value) + (ratio? value) (divider-location! splitter (double value)) + (float? value) (divider-location-proportional! splitter value) :else (illegal-argument "Expected integer or float, got %s" value)) splitter) @@ -2297,13 +2298,13 @@ button-options (option-map (default-option :items - (fn [^javax.swing.JMenu menu items] - (doseq [item items] - (if-let [menu-item (to-menu-item item)] - (.add menu menu-item) - (if (= :separator item) - (.addSeparator menu) - (.add menu (make-widget item)))))))))) + (fn [^javax.swing.JMenu menu items] + (doseq [item items] + (if-let [menu-item (to-menu-item item)] + (.add menu menu-item) + (if (= :separator item) + (.addSeparator menu) + (.add menu (make-widget item)))))))))) (widget-option-provider javax.swing.JMenu menu-options) @@ -2327,13 +2328,13 @@ (option-map ; TODO reflection - duplicate of menu-options (default-option :items - (fn [^javax.swing.JPopupMenu menu items] - (doseq [item items] - (if-let [menu-item (to-menu-item item)] - (.add menu menu-item) - (if (= :separator item) - (.addSeparator menu) - (.add menu (make-widget item)))))))))) + (fn [^javax.swing.JPopupMenu menu items] + (doseq [item items] + (if-let [menu-item (to-menu-item item)] + (.add menu menu-item) + (if (= :separator item) + (.addSeparator menu) + (.add menu (make-widget item)))))))))) (widget-option-provider javax.swing.JPopupMenu popup-options) @@ -2357,16 +2358,16 @@ (defn- ^javax.swing.JPopupMenu make-popup [target arg event] (cond (instance? javax.swing.JPopupMenu arg) arg - (fn? arg) (popup :items (arg event)) + (fn? arg) (popup :items (arg event)) :else (illegal-argument "Don't know how to make popup with %s" arg))) (defn- popup-option-handler [^java.awt.Component target arg] (listen target :mouse - (fn [^java.awt.event.MouseEvent event] - (when (.isPopupTrigger event) - (let [p (make-popup target arg event)] - (.show p (to-widget event) (.x (.getPoint event)) (.y (.getPoint event)))))))) + (fn [^java.awt.event.MouseEvent event] + (when (.isPopupTrigger event) + (let [p (make-popup target arg event)] + (.show p (to-widget event) (.x (.getPoint event)) (.y (.getPoint event)))))))) (def menubar-options @@ -2409,7 +2410,7 @@ (bean-option :floatable? javax.swing.JToolBar boolean) ; Override default :items handler (default-option :items - #(layout/add-widgets %1 (insert-toolbar-separators %2)))))) + #(layout/add-widgets %1 (insert-toolbar-separators %2)))))) (widget-option-provider javax.swing.JToolBar toolbar-options) @@ -2436,9 +2437,9 @@ (constant-map SwingConstants :bottom :top :left :right)) (def ^{:private true} tab-overflow-table { - :scroll JTabbedPane/SCROLL_TAB_LAYOUT - :wrap JTabbedPane/WRAP_TAB_LAYOUT -}) + :scroll JTabbedPane/SCROLL_TAB_LAYOUT + :wrap JTabbedPane/WRAP_TAB_LAYOUT + }) (defn- add-to-tabbed-panel [^javax.swing.JTabbedPane tp tab-defs] @@ -2446,8 +2447,8 @@ (let [title-cmp (try-cast Component title) index (.getTabCount tp)] (cond-doto tp - true (.addTab (if-not title-cmp (resource title)) (make-icon icon) (make-widget content) (resource tip)) - title-cmp (.setTabComponentAt index title-cmp)))) + true (.addTab (if-not title-cmp (resource title)) (make-icon icon) (make-widget content) (resource tip)) + title-cmp (.setTabComponentAt index title-cmp)))) tp) (def tabbed-panel-options @@ -2516,14 +2517,14 @@ ; TODO reflection here can't be eliminated thanks for proxy limitations ; with protected methods (when super? (proxy-super paintComponent g)) - (when after (seesaw.graphics/push g (after this g))))) + (when after (seesaw.graphics/push g (after this g))))) (defn- paint-option-handler [^java.awt.Component c v] (cond (nil? v) (do (update-proxy c {"paintComponent" nil}) (.repaint c)) - (fn? v) (paint-option-handler c {:after v}) + (fn? v) (paint-option-handler c {:after v}) (map? v) (do (put-meta! c paint-property v) (update-proxy c {"paintComponent" paint-component-impl}) @@ -2554,8 +2555,8 @@ (seesaw.graphics) http://download.oracle.com/javase/6/docs/api/javax/swing/JComponent.html#paintComponent%28java.awt.Graphics%29 " - [cls & opts] - `(apply-options (construct ~cls) (vector ~@opts))) + [cls & opts] + `(apply-options (construct ~cls) (vector ~@opts))) (def canvas-options default-options) @@ -2605,16 +2606,16 @@ (def ^{:private true} abstract-window-options (option-map (default-option :id - seesaw.selector/id-of! - seesaw.selector/id-of - ["A keyword id." - "See (seesaw.core/select)"]) + seesaw.selector/id-of! + seesaw.selector/id-of + ["A keyword id." + "See (seesaw.core/select)"]) (default-option :class - seesaw.selector/class-of! - seesaw.selector/class-of - ["A keyword class, in the HTML/CSS sense." - "See (Seesaw.core/select)"]) + seesaw.selector/class-of! + seesaw.selector/class-of + ["A keyword class, in the HTML/CSS sense." + "See (Seesaw.core/select)"]) (default-option :content @@ -2627,7 +2628,7 @@ (fn [^javax.swing.RootPaneContainer f] (.getContentPane f)) "The frame's main content widget") - (bean-option :minimum-size java.awt.Window to-dimension nil + (bean-option :minimum-size java.awt.Window to-dimension nil dimension-examples) (bean-option :size java.awt.Window to-dimension nil @@ -2639,7 +2640,7 @@ (bean-option :transfer-handler java.awt.Window seesaw.dnd/to-transfer-handler identity - "See (seesaw.dnd/to-transfer-handler)") )) + "See (seesaw.dnd/to-transfer-handler)"))) (def window-options abstract-window-options) @@ -2686,12 +2687,12 @@ http://download.oracle.com/javase/6/docs/api/javax/swing/JWindow.html " [& {:keys [width height visible? size] - :as opts}] + :as opts}] (cond-doto ^javax.swing.JWindow (apply-options (construct javax.swing.JWindow) - (dissoc opts :width :height :visible?)) - (and (not size) - (or width height)) (.setSize (or width 100) (or height 100)) - visible? (.setVisible (boolean visible?)))) + (dissoc opts :width :height :visible?)) + (and (not size) + (or width height)) (.setSize (or width 100) (or height 100)) + visible? (.setVisible (boolean visible?)))) ;******************************************************************************* ; Frame @@ -2705,16 +2706,16 @@ "Returns the window/frame that is currently in full-screen mode or nil if none." ([^java.awt.GraphicsDevice device] - (.getFullScreenWindow device)) + (.getFullScreenWindow device)) ([] - (full-screen-window (default-screen-device)))) + (full-screen-window (default-screen-device)))) (defn full-screen? "Returns true if the given window/frame is in full-screen mode" ([^java.awt.GraphicsDevice device window] - (= (to-root window) (.getFullScreenWindow device))) + (= (to-root window) (.getFullScreenWindow device))) ([window] - (full-screen? (default-screen-device) window))) + (full-screen? (default-screen-device) window))) (defn- full-screen-ensure-undecorated "Windows should be undecorated when put into full-screen. If they're not @@ -2723,10 +2724,10 @@ [window] (when (and window (not (config window :undecorated?))) (-> window - dispose! - (config! :undecorated? true) - (put-meta! ::was-decorated? true) - show!)) + dispose! + (config! :undecorated? true) + (put-meta! ::was-decorated? true) + show!)) window) (defn- restore-full-screen-window-decorations @@ -2735,37 +2736,37 @@ (when-let [window (full-screen-window device)] (when (get-meta window ::was-decorated?) (-> window - dispose! - (config! :undecorated? false) - (put-meta! ::was-decorated? nil) - show!)))) + dispose! + (config! :undecorated? false) + (put-meta! ::was-decorated? nil) + show!)))) (defn full-screen! "Make the given window/frame full-screen. Pass nil to return all windows to normal size." ([^java.awt.GraphicsDevice device window] - (restore-full-screen-window-decorations device) - (.setFullScreenWindow device (full-screen-ensure-undecorated (to-root window))) - window) + (restore-full-screen-window-decorations device) + (.setFullScreenWindow device (full-screen-ensure-undecorated (to-root window))) + window) ([window] - (full-screen! (default-screen-device) window))) + (full-screen! (default-screen-device) window))) (defn toggle-full-screen! "Toggle the full-screen state of the given window/frame." ([^java.awt.GraphicsDevice device window] - (full-screen! device - (if (full-screen? device window) nil window)) - window) + (full-screen! device + (if (full-screen? device window) nil window)) + window) ([window] - (toggle-full-screen! (default-screen-device) window))) + (toggle-full-screen! (default-screen-device) window))) (def ^{:private true} frame-on-close-map { - :hide JFrame/HIDE_ON_CLOSE - :dispose JFrame/DISPOSE_ON_CLOSE - :exit JFrame/EXIT_ON_CLOSE - :nothing JFrame/DO_NOTHING_ON_CLOSE -}) + :hide JFrame/HIDE_ON_CLOSE + :dispose JFrame/DISPOSE_ON_CLOSE + :exit JFrame/EXIT_ON_CLOSE + :nothing JFrame/DO_NOTHING_ON_CLOSE + }) (defn- ^java.awt.Image frame-icon-converter [value] (cond @@ -2871,13 +2872,13 @@ http://download.oracle.com/javase/6/docs/api/javax/swing/JFrame.html " [& {:keys [width height visible? size] - :as opts}] + :as opts}] (cond-doto ^JFrame (apply-options (construct JFrame) (dissoc opts :width :height :visible?)) - (and (not size) - (or width height)) (.setSize (or width 100) (or height 100)) - true (.setLocationByPlatform true) - visible? (.setVisible (boolean visible?)))) + (and (not size) + (or width height)) (.setSize (or width 100) (or height 100)) + true (.setLocationByPlatform true) + visible? (.setVisible (boolean visible?)))) (defn- get-root "Basically the same as SwingUtilities/getRoot, except handles JPopupMenus @@ -2892,7 +2893,7 @@ (instance? java.awt.Window w) w (instance? java.applet.Applet w) w (instance? javax.swing.JPopupMenu w) - (let [^javax.swing.JPopupMenu w w] + (let [^javax.swing.JPopupMenu w w] (if-let [p (.getParent w)] (get-root p) (get-root (.getInvoker w)))) @@ -2913,22 +2914,22 @@ ; Custom-Dialog (def ^{:private true} dialog-modality-table { - true java.awt.Dialog$ModalityType/APPLICATION_MODAL - false java.awt.Dialog$ModalityType/MODELESS - nil java.awt.Dialog$ModalityType/MODELESS - :application java.awt.Dialog$ModalityType/APPLICATION_MODAL - :document java.awt.Dialog$ModalityType/DOCUMENT_MODAL - :toolkit java.awt.Dialog$ModalityType/TOOLKIT_MODAL -}) + true java.awt.Dialog$ModalityType/APPLICATION_MODAL + false java.awt.Dialog$ModalityType/MODELESS + nil java.awt.Dialog$ModalityType/MODELESS + :application java.awt.Dialog$ModalityType/APPLICATION_MODAL + :document java.awt.Dialog$ModalityType/DOCUMENT_MODAL + :toolkit java.awt.Dialog$ModalityType/TOOLKIT_MODAL + }) (def custom-dialog-options (merge frame-options (option-map (default-option :modal? - #(.setModalityType ^java.awt.Dialog %1 - (or (dialog-modality-table %2) - (dialog-modality-table (boolean %2))))) + #(.setModalityType ^java.awt.Dialog %1 + (or (dialog-modality-table %2) + (dialog-modality-table (boolean %2))))) ; TODO This is a little odd. (default-option :parent #(.setLocationRelativeTo ^java.awt.Dialog %1 %2)) @@ -3025,8 +3026,8 @@ http://download.oracle.com/javase/6/docs/api/javax/swing/JDialog.html " [& {:keys [width height visible? modal? on-close size] - :or {width 100 height 100 visible? false} - :as opts}] + :or {width 100 height 100 visible? false} + :as opts}] (let [^JDialog dlg (apply-options (construct JDialog) (merge {:modal? true} @@ -3041,12 +3042,12 @@ ;******************************************************************************* ; Alert (def ^{:private true} message-type-map { - :error JOptionPane/ERROR_MESSAGE - :info JOptionPane/INFORMATION_MESSAGE - :warning JOptionPane/WARNING_MESSAGE - :question JOptionPane/QUESTION_MESSAGE - :plain JOptionPane/PLAIN_MESSAGE -}) + :error JOptionPane/ERROR_MESSAGE + :info JOptionPane/INFORMATION_MESSAGE + :warning JOptionPane/WARNING_MESSAGE + :question JOptionPane/QUESTION_MESSAGE + :plain JOptionPane/PLAIN_MESSAGE + }) (defn- alert-impl " @@ -3057,13 +3058,13 @@ Icon icon) " [source message {:keys [title type icon] :or {type :plain}}] - (let [source (to-widget source) + (let [source (to-widget source) message (if (coll? message) (object-array message) (resource message))] (JOptionPane/showMessageDialog ^java.awt.Component source - message - (resource title) - (message-type-map type) - (make-icon icon)))) + message + (resource title) + (message-type-map type) + (make-icon icon)))) (defn alert "Show a simple message alert dialog: @@ -3094,7 +3095,7 @@ s (second args)] (cond (or (= n 0) (keyword? f)) - (illegal-argument "alert requires at least one non-keyword arg") + (illegal-argument "alert requires at least one non-keyword arg") (= n 1) (alert-impl nil f {}) (= n 2) (alert-impl f s {}) (keyword? s) (alert-impl nil f (drop 1 args)) @@ -3117,16 +3118,16 @@ Object initialSelectionValue) " [source message {:keys [title value type choices icon to-string] - :or {type :plain to-string str}}] + :or {type :plain to-string str}}] (let [source (to-widget source) message (if (coll? message) (object-array message) (resource message)) choices (when choices (object-array (map #(InputChoice. % to-string) choices))) result (JOptionPane/showInputDialog ^java.awt.Component source - message - (resource title) - (message-type-map type) - (make-icon icon) - choices value)] + message + (resource title) + (message-type-map type) + (make-icon icon) + choices value)] (if (and result choices) (:value result) result))) @@ -3179,32 +3180,32 @@ s (second args)] (cond (or (= n 0) (keyword? f)) - (illegal-argument "input requires at least one non-keyword arg") - (= n 1) (input-impl nil f {}) - (= n 2) (input-impl f s {}) + (illegal-argument "input requires at least one non-keyword arg") + (= n 1) (input-impl nil f {}) + (= n 2) (input-impl f s {}) (keyword? s) (input-impl nil f (drop 1 args)) - :else (input-impl f s (drop 2 args))))) + :else (input-impl f s (drop 2 args))))) ;******************************************************************************* ; dialog (def ^:private dialog-option-type-map { - :default JOptionPane/DEFAULT_OPTION - :yes-no JOptionPane/YES_NO_OPTION - :yes-no-cancel JOptionPane/YES_NO_CANCEL_OPTION - :ok-cancel JOptionPane/OK_CANCEL_OPTION -}) + :default JOptionPane/DEFAULT_OPTION + :yes-no JOptionPane/YES_NO_OPTION + :yes-no-cancel JOptionPane/YES_NO_CANCEL_OPTION + :ok-cancel JOptionPane/OK_CANCEL_OPTION + }) (def ^:private dialog-defaults { - :content "Please set the :content option." - :option-type :default - :type :plain - :options nil - :default-option nil - :success-fn (fn [_] :success) - :cancel-fn (fn [_]) - :no-fn (fn [_] :no) -}) + :content "Please set the :content option." + :option-type :default + :type :plain + :options nil + :default-option nil + :success-fn (fn [_] :success) + :cancel-fn (fn [_]) + :no-fn (fn [_] :no) + }) (defn dialog "Display a JOptionPane. This is a dialog which displays some @@ -3277,33 +3278,33 @@ ;; (Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue) (let [{:keys [content option-type type options default-option success-fn cancel-fn no-fn]} (merge dialog-defaults opts) - pane (JOptionPane. - content - (message-type-map type) - (dialog-option-type-map option-type) - nil ;icon - (when options - (into-array (map make-widget options))) - (or default-option (first options))) ; default selection + pane (JOptionPane. + content + (message-type-map type) + (dialog-option-type-map option-type) + nil ;icon + (when options + (into-array (map make-widget options))) + (or default-option (first options))) ; default selection remaining-opts (apply dissoc opts :visible? (keys dialog-defaults)) dlg (apply custom-dialog :visible? false :content pane (reduce concat remaining-opts))] - ;; when there was no options specified, default options will be - ;; used, so the success-fn cancel-fn & no-fn must be called - (when-not options - (.addPropertyChangeListener pane JOptionPane/VALUE_PROPERTY - (reify java.beans.PropertyChangeListener - (propertyChange [this e] - (let [v (.getNewValue e) - f (condp = v - JOptionPane/CLOSED_OPTION cancel-fn - JOptionPane/YES_OPTION success-fn - JOptionPane/NO_OPTION no-fn - JOptionPane/CANCEL_OPTION cancel-fn - cancel-fn)] - (return-from-dialog e (f pane))))))) - (if (:visible? opts) - (show! dlg) - dlg))) + ;; when there was no options specified, default options will be + ;; used, so the success-fn cancel-fn & no-fn must be called + (when-not options + (.addPropertyChangeListener pane JOptionPane/VALUE_PROPERTY + (reify java.beans.PropertyChangeListener + (propertyChange [this e] + (let [v (.getNewValue e) + f (condp = v + JOptionPane/CLOSED_OPTION cancel-fn + JOptionPane/YES_OPTION success-fn + JOptionPane/NO_OPTION no-fn + JOptionPane/CANCEL_OPTION cancel-fn + cancel-fn)] + (return-from-dialog e (f pane))))))) + (if (:visible? opts) + (show! dlg) + dlg))) ;******************************************************************************* ; confirm @@ -3317,15 +3318,15 @@ Icon icon) " [source message {:keys [title option-type type icon] - :or {type :plain option-type :ok-cancel}}] + :or {type :plain option-type :ok-cancel}}] (let [source (to-widget source) message (if (coll? message) (object-array message) (resource message)) result (JOptionPane/showConfirmDialog ^java.awt.Component source - message - (resource title) - (dialog-option-type-map option-type) - (message-type-map type) - (make-icon icon))] + message + (resource title) + (dialog-option-type-map option-type) + (message-type-map type) + (make-icon icon))] (condp = result JOptionPane/NO_OPTION false JOptionPane/CANCEL_OPTION nil @@ -3359,11 +3360,11 @@ s (second args)] (cond (or (= n 0) (keyword? f)) - (illegal-argument "confirm requires at least one non-keyword arg") - (= n 1) (confirm-impl nil f {}) - (= n 2) (confirm-impl f s {}) + (illegal-argument "confirm requires at least one non-keyword arg") + (= n 1) (confirm-impl nil f {}) + (= n 2) (confirm-impl f s {}) (keyword? s) (confirm-impl nil f (drop 1 args)) - :else (confirm-impl f s (drop 2 args))))) + :else (confirm-impl f s (drop 2 args))))) ;******************************************************************************* @@ -3380,12 +3381,12 @@ (bean-option [:max :maximum] javax.swing.JSlider) (default-option :minor-tick-spacing #(do (check-args (number? %2) ":minor-tick-spacing must be a number.") - (.setPaintTicks ^javax.swing.JSlider %1 true) - (.setMinorTickSpacing ^javax.swing.JSlider %1 %2))) + (.setPaintTicks ^javax.swing.JSlider %1 true) + (.setMinorTickSpacing ^javax.swing.JSlider %1 %2))) (default-option :major-tick-spacing #(do (check-args (number? %2) ":major-tick-spacing must be a number.") - (.setPaintTicks ^javax.swing.JSlider %1 true) - (.setMajorTickSpacing ^javax.swing.JSlider %1 %2))) + (.setPaintTicks ^javax.swing.JSlider %1 true) + (.setMajorTickSpacing ^javax.swing.JSlider %1 %2))) (bean-option [:snap-to-ticks? :snap-to-ticks] javax.swing.JSlider boolean) (bean-option [:paint-ticks? :paint-ticks] javax.swing.JSlider boolean) (bean-option [:paint-labels? :paint-labels] javax.swing.JSlider boolean) @@ -3427,7 +3428,7 @@ " [& {:keys [orientation value min max minor-tick-spacing major-tick-spacing snap-to-ticks? paint-ticks? paint-labels? paint-track? inverted?] - :as kw}] + :as kw}] (let [sl (construct javax.swing.JSlider)] (apply-options sl kw))) @@ -3493,26 +3494,26 @@ (extend-protocol seesaw.selector/Selectable javax.swing.JComponent - (id-of* [this] - (.getClientProperty this id-property)) - (id-of!* [this id] - (.putClientProperty this id-property (keyword id))) - (class-of* [this] - (.getClientProperty this class-property)) - (class-of!* [this classes] - (.putClientProperty this class-property - (set (map name (if (coll? classes) classes [classes]))))) + (id-of* [this] + (.getClientProperty this id-property)) + (id-of!* [this id] + (.putClientProperty this id-property (keyword id))) + (class-of* [this] + (.getClientProperty this class-property)) + (class-of!* [this classes] + (.putClientProperty this class-property + (set (map name (if (coll? classes) classes [classes]))))) java.awt.Component - (id-of* [this] - (get-meta this id-property)) - (id-of!* [this id] - (put-meta! this id-property (keyword id))) - (class-of* [this] - (get-meta this class-property)) - (class-of!* [this classes] - (put-meta! this class-property - (set (map name (if (coll? classes) classes [classes])))))) + (id-of* [this] + (get-meta this id-property)) + (id-of!* [this id] + (put-meta! this id-property (keyword id))) + (class-of* [this] + (get-meta this class-property)) + (class-of!* [this classes] + (put-meta! this class-property + (set (map name (if (coll? classes) classes [classes])))))) (defn select "Select a widget using the given selector expression. Selectors are *always* @@ -3582,11 +3583,11 @@ https://github.com/cgrand/enlive " ([root selector] - (check-args (vector? selector) "selector must be vector") - (let [root (to-widget root) - result (seesaw.selector/select root selector) - id? (and (nil? (second selector)) (seesaw.selector/id-selector? (first selector)))] - (if id? (first result) result)))) + (check-args (vector? selector) "selector must be vector") + (let [root (to-widget root) + result (seesaw.selector/select root selector) + id? (and (nil? (second selector)) (seesaw.selector/id-selector? (first selector)))] + (if id? (first result) result)))) (defrecord ^{:private true} SelectWith [widget] clojure.lang.IFn @@ -3689,11 +3690,11 @@ " [widgets & body] `(let [~@(mapcat (fn [[f & args :as widget]] - (if-let [id (:id (apply hash-map args))] - [(symbol (name id)) widget] - (illegal-argument "No :id specified for widget in %s" - (pr-str widget)))) - widgets)] + (if-let [id (:id (apply hash-map args))] + [(symbol (name id)) widget] + (illegal-argument "No :id specified for widget in %s" + (pr-str widget)))) + widgets)] ~@body)) ;******************************************************************************* @@ -3813,4 +3814,4 @@ This idea is shamelessly borrowed from Clarity https://github.com/stathissideris/clarity " [target v] - (seesaw.value/value!* (or (to-widget target) target) v)) + (seesaw.value/value!* (or (to-widget target) target) v)) \ No newline at end of file diff --git a/src/seesaw/options.clj b/src/seesaw/options.clj index 10aa561f..f3da3daa 100644 --- a/src/seesaw/options.clj +++ b/src/seesaw/options.clj @@ -8,11 +8,12 @@ ; the terms of this license. ; You must not remove this notice, or any other, from this software. -(ns ^{:doc "Functions for dealing with options." +(ns ^{:doc "Functions for dealing with options." :author "Dave Ray"} - seesaw.options +seesaw.options (:use [seesaw.util :only [camelize illegal-argument check-args - resource resource-key?]])) + resource resource-key?]]) + (:import (clojure.lang IAtom IDeref IMeta IRef))) (defprotocol OptionProvider (get-option-maps* [this])) @@ -21,7 +22,7 @@ (apply merge (get-option-maps* this))) (defmacro option-provider [class options] - `(extend-protocol OptionProvider + `(extend-protocol OptionProvider ~class (~'get-option-maps* [this#] [~options]))) @@ -30,46 +31,46 @@ (declare apply-options) (defn- strip-question-mark - [^String s] + [^String s] (if (.endsWith s "?") (.substring s 0 (dec (count s))) s)) (defn- setter-name [property] - (->> property - name - strip-question-mark - (str "set-") - camelize - symbol)) + (->> property + name + strip-question-mark + (str "set-") + camelize + symbol)) (defn- getter-name [property] (let [property (name property) prefix (if (.endsWith property "?") "is-" "get-")] - (->> property - name - strip-question-mark - (str prefix) - camelize - symbol))) + (->> property + name + strip-question-mark + (str prefix) + camelize + symbol))) (defn- split-bean-option-name [v] (cond (vector? v) v :else [v v])) -(defmacro bean-option +(defmacro bean-option [name-arg target-type & [set-conv get-conv examples]] (let [[option-name bean-property-name] (split-bean-option-name name-arg) target (gensym "target")] - `(Option. ~option-name - (fn [~(with-meta target {:tag target-type}) value#] - (. ~target ~(setter-name bean-property-name) (~(or set-conv `identity) value#))) - (fn [~(with-meta target {:tag target-type})] - (~(or get-conv `identity) (. ~target ~(getter-name bean-property-name)))) - ~examples))) - -(defn default-option + `(Option. ~option-name + (fn [~(with-meta target {:tag target-type}) value#] + (. ~target ~(setter-name bean-property-name) (~(or set-conv `identity) value#))) + (fn [~(with-meta target {:tag target-type})] + (~(or get-conv `identity) (. ~target ~(getter-name bean-property-name)))) + ~examples))) + +(defn default-option ([name] (default-option name (fn [_ _] (illegal-argument "No setter defined for option %s" name)))) ([name setter] (default-option name setter (fn [_] (illegal-argument "No getter defined for option %s" name)))) ([name setter getter] (default-option name setter getter nil)) @@ -80,7 +81,7 @@ ([name examples] (default-option name (fn [_ _]) (fn [_ _]) "Internal use.")) ([name] (ignore-option name nil))) -(defn resource-option +(defn resource-option "Defines an option that takes a j18n namespace-qualified keyword as a value. The keyword is used as a prefix for the set of properties in the given key list. This allows subsets of widget options to be configured @@ -92,26 +93,102 @@ (resource-option :resource [:text :foreground :background]) " [option-name keys] - (default-option - option-name + (default-option + option-name (fn [target value] {:pre [(resource-key? value)]} (let [nspace (namespace value) prefix (name value)] - (apply-options - target (mapcat (fn [k] - (let [prop (keyword nspace (str prefix "." k))] - (when-let [v (resource prop)] - [(keyword k) v]))) - (map name keys))))) + (apply-options + target (mapcat (fn [k] + (let [prop (keyword nspace (str prefix "." k))] + (when-let [v (resource prop)] + [(keyword k) v]))) + (map name keys))))) nil - [(str "A i18n prefix for a resource with keys") + [(str "A i18n prefix for a resource with keys") (pr-str keys)])) +(def satoms (atom {})) + +(defn- apply-setter + [this old-val new-val] + (when-not (= old-val new-val) + (doseq [[ins m] (get @satoms this)] + (doseq [opt (vals m)] + (if-let [setter (:setter opt)] + (if (seq (:keys opt)) + (let [o-val (apply get-in (cons old-val [(:keys opt)])) + n-val (apply get-in (cons new-val [(:keys opt)]))] + (when-not (= o-val n-val) + (setter ins n-val))) + (setter ins new-val)) + (illegal-argument "No setter found for option %s" (:name opt)))))) + new-val) + +(deftype SAtom [state meta validator watches] + + IAtom + (swap [this f] + (apply-setter this @state (swap! state f))) + (swap [this f x] + (apply-setter this @state (swap! state f x))) + (swap [this f x y] + (apply-setter this @state (swap! state f x y))) + (swap [this f x y args] + (apply-setter this @state (swap! state f x y args))) + (compareAndSet [this old new] + (when (compare-and-set! state old new) + (apply-setter this @state new))) + (reset [this new] + (apply-setter this @state (reset! state new))) + + IDeref + (deref [_] + @state) + + IRef + (addWatch [_ k call] + (.addWatch state k call)) + (removeWatch [_ k] + (.removeWatch state k)) + + IMeta + (meta [_] meta)) + +(defn get-k + [^SAtom a k & ks] + {:satom a :keys (cons k ks)}) + +(defn setup-reference* + [^clojure.lang.ARef r options] + (let [opts (apply hash-map options)] + (when (:meta opts) + (.resetMeta r (:meta opts))) + (when (:validator opts) + (.setValidator r (:validator opts))) + r)) + +(defn satom + ([x] (SAtom. (atom x) nil nil nil)) + ([x & options] (setup-reference* (satom x) options))) + (defn- apply-option [target ^Option opt v] - (if-let [setter (:setter opt)] - (setter target v) + (if-let [setter (:setter opt)] + (cond + (and (map? v) (= (class (:satom v)) SAtom)) + (do + (swap! satoms assoc-in [(:satom v) target (:name opt)] (assoc opt :keys (:keys v))) + (setter target (apply get-in (cons @(:satom v) [(:keys v)])))) + + (= SAtom (class v)) + (do + (swap! satoms assoc-in [v target (:name opt)] opt) + (setter target @v)) + + :else + (setter target v)) (illegal-argument "No setter found for option %s" (:name opt)))) (defn- ^Option lookup-option [target handler-maps name] @@ -123,7 +200,7 @@ (defn- apply-options* [target opts handler-maps] - (let [pairs (if (map? opts) opts (partition 2 opts))] + (let [pairs (if (map? opts) opts (partition 2 opts))] (doseq [[k v] pairs] (let [opt (lookup-option target handler-maps k)] (apply-option target opt v)))) @@ -131,7 +208,7 @@ (defn apply-options [target opts] - (check-args (or (map? opts) (even? (count opts))) + (check-args (or (map? opts) (even? (count opts))) "opts must be a map or have an even number of entries") (apply-options* target opts (get-option-maps* target))) @@ -143,35 +220,35 @@ (defn around-option ([parent-option set-conv get-conv examples] - (default-option (:name parent-option) - (fn [target value] - ((:setter parent-option) target ((or set-conv identity) value))) - (fn [target] - ((or get-conv identity) ((:getter parent-option) target))) - examples)) + (default-option (:name parent-option) + (fn [target value] + ((:setter parent-option) target ((or set-conv identity) value))) + (fn [target] + ((or get-conv identity) ((:getter parent-option) target))) + examples)) ([parent-option set-conv get-conv] (around-option parent-option set-conv get-conv nil))) -(defn option-map +(defn option-map "Construct an option map from a list of options." [& opts] (into {} (map (juxt :name identity) opts))) -(defn get-option-value +(defn get-option-value ([target name] (get-option-value target name (get-option-maps* target))) ([target name handlers] - (let [^Option option (lookup-option target handlers name) - getter (:getter option)] - (if getter - (getter target) - (illegal-argument "Option %s cannot be read from %s" name (class target)))))) + (let [^Option option (lookup-option target handlers name) + getter (:getter option)] + (if getter + (getter target) + (illegal-argument "Option %s cannot be read from %s" name (class target)))))) (defn set-option-value ([target name value] (set-option-value target name (get-option-maps* target))) ([target name value handlers] - (let [^Option option (lookup-option target handlers name) - setter (:setter option)] - (if setter - (setter target value) - (illegal-argument "Option %s cannot be set on %s" name (class target)))))) + (let [^Option option (lookup-option target handlers name) + setter (:setter option)] + (if setter + (setter target value) + (illegal-argument "Option %s cannot be set on %s" name (class target)))))) diff --git a/src/seesaw/wiki/c_1_home_page.clj b/src/seesaw/wiki/c_1_home_page.clj new file mode 100644 index 00000000..3ea10027 --- /dev/null +++ b/src/seesaw/wiki/c_1_home_page.clj @@ -0,0 +1,12 @@ +(ns seesaw.wiki.c-1-home-page + (:require [seesaw.core :as saw] + [seesaw.event :as ev] + [seesaw.options :as opt] + [seesaw.wiki.util :as util] + [clojure.string :as string])) + +(util/show-options (saw/label)) + +(util/show-events (saw/label)) + +(util/show-events (saw/button)) \ No newline at end of file diff --git a/src/seesaw/wiki/c_2_frames.clj b/src/seesaw/wiki/c_2_frames.clj new file mode 100644 index 00000000..9718a151 --- /dev/null +++ b/src/seesaw/wiki/c_2_frames.clj @@ -0,0 +1,15 @@ +(ns seesaw.wiki.c-2-frames + (:require [seesaw.core :as sw] + [seesaw.wiki.util :as util])) + +(def f (sw/frame :title "An example" + :on-close :hide + :content "Some Content" + :size [640 :by 400] + :visible? true)) + +(-> f sw/show!) + +(util/show-options f) + +(seesaw.core/to-root f) \ No newline at end of file diff --git a/src/seesaw/wiki/c_3_widgets.clj b/src/seesaw/wiki/c_3_widgets.clj new file mode 100644 index 00000000..e3529dba --- /dev/null +++ b/src/seesaw/wiki/c_3_widgets.clj @@ -0,0 +1,75 @@ +(ns seesaw.wiki.c-3-widgets + (:require [seesaw.core :as sw] + [seesaw.options :as op] + [seesaw.wiki.util :as util] + [clojure.string :as str])) + +(comment + (seesaw.core/make-widget)) + +(def p (sw/vertical-panel :items ["This" "is" "a" "vertical" "stack of" "JLabels"])) + +(def fl (let [choose (fn [e] (sw/alert "I should open a file chooser"))] + (sw/flow-panel + :items ["File" [:fill-h 5] + (sw/text (System/getProperty "user.dir")) [:fill-h 5] + (sw/action :handler choose :name "...")]))) + +(def title (op/satom "Ertus")) + +(vals (get @op/satoms title)) + +(swap! title str/lower-case) + +(reset! title "Hey") + + +(def size (op/satom {:as 12})) + +(swap! size (fn [a] [150 :by 300])) + +(sw/frame :title "An example" + :on-close :hide + :content title + :size size + :visible? true) + +(sw/frame :title "An example" + :on-close :hide + :content (java.net.URL. "https://github.com/daveray/seesaw/wiki/Widgets") + :size [640 :by 400] + :visible? true) + +(util/show-options (sw/label)) + + +(sw/button :id :the-button :text "Push me") + +(sw/select root [:#the-button]) + + + +(def kkk (op/satom {})) + +(swap! kkk assoc-in [:a :b :c] 1) + +(def file (op/satom "File")) + +(reset! file "File") + +(def items (op/satom [(sw/menu :text "File" :items []) + (sw/menu :text "Edit" :items []) + (sw/menu :text "Exit" :items [])])) + +(sw/menubar :items + [(sw/menu :text "File" :items []) + (sw/menu :text "Edit" :items []) + (sw/menu :text "Exit" :items [])]) + +(def oo (op/satom {:title {:name "Menu"}})) + +(reset! oo {:title {:name "Keremcik aa"}}) + +(sw/frame :title (op/get-k oo :title ) + :size [640 :by 400] + :visible? true) \ No newline at end of file diff --git a/src/seesaw/wiki/c_4_containers.clj b/src/seesaw/wiki/c_4_containers.clj new file mode 100644 index 00000000..faa43cf1 --- /dev/null +++ b/src/seesaw/wiki/c_4_containers.clj @@ -0,0 +1,227 @@ +(ns seesaw.wiki.c-4-containers + (:require [seesaw.core :as sw :refer :all] + [seesaw.mig :as mig] + [seesaw.bind :as b] + [seesaw.wiki.util :as util]) + (:import (javafx.application Platform) + (java.lang.reflect Constructor Parameter))) + + +(sw/frame :title "An example" + :on-close :hide + :content (sw/flow-panel + :align :left + :hgap 20 + :items ["Label" "Another label"]) + :size [640 :by 400] + :visible? true) + + +(sw/frame :title "An example" + :on-close :hide + :content (sw/grid-panel + :border "Properties" + :columns 2 + :items ["Name" (sw/text "Frank") + "Address" (sw/text "123 Main St")]) + :size [640 :by 400] + :visible? true) + +(sw/frame :title "An example" + :on-close :hide + :content (sw/border-panel :hgap 10 :vgap 10 + :center "CENTER" + :north "NORTH" + :south "SOUTH" + :east "EAST" + :west "WEST") + :size [400 :by 400] + :visible? true) + + +(sw/frame :title "An example" + :on-close :hide + :content (mig/mig-panel + :constraints ["wrap 2" + "[shrink 0]20px[200, grow, fill]" + "[shrink 0]5px[]"] + :items [["name:"] [(sw/text "ert")] + ["category:"] [(sw/text "ce")] + ["date:"] [(sw/text "ass")] + ["comment:"] [(sw/text "asda")]]) + :size [400 :by 400] + :visible? true) + + +(sw/frame :title "An example" + :on-close :hide + :content (let [lw 100, tw 200, wh 25] + (form-panel + :border 10 + :items [[(label :text "Name:" + :preferred-size [lw :by wh]) + :gridy 0 :gridx 0] + [(text :text "asdsad" + :preferred-size [tw :by wh]) + :gridy 0 :gridx 1 + :gridwidth :remainder] + + [(label :text "category:" + :preferred-size [lw :by wh]) + :gridy 1 :gridx 0 + :gridwidth 1] + [(text :text "asdsad" + :preferred-size [tw :by wh]) + :gridy 1 :gridx 1 + :gridwidth :remainder] + + [(label :text "date:" + :preferred-size [lw :by wh]) + :gridy 2 :gridx 0 + :gridwidth 1] + [(text :text "asdsad" + :preferred-size [tw :by wh]) + :gridy 2 :gridx 1 + :gridwidth :remainder] + + [(label :text "comment:" + :preferred-size [lw :by wh]) + :gridy 3 :gridx 0 + :gridwidth 1] + [(text :text "asdsad" + :preferred-size [tw :by wh]) + :gridy 3 :gridx 1 + :gridwidth :remainder] + ])) + :size [400 :by 400] + :visible? true) + + +(let [open-action (action + :handler (fn [e] (alert "I should open a new something.")) + :name "Open ..." + :key "menu O" + :tip "Open a new something something.") + exit-action (action + :handler (fn [e] (.dispose (to-frame e))) + :name "Exit" + :tip "Close this window")] + (frame + :title "Toolbar action test" + :content (border-panel + :north (toolbar :items [open-action exit-action]) + :center "Insert content here") + :visible? true)) + + + +(input "Pick a city" + :choices [{:name "New York" :population 8000000} + {:name "Ann Arbor" :population 100000} + {:name "Twin Peaks" :population 5201}] + :to-string :name) + +(alert "Something terrible has happened") + + +(def f (let [bg (button-group) + f (-> (frame :title "test" + :content (border-panel :center (text :id :text :text "hi") + :south (horizontal-panel :items + [(radio :group bg :text "enabled") + (radio :group bg :text "disabled")]))) + pack! + show!)] + + (b/bind (b/selection bg) + ; when a radio button is clicked the selection temporarily goes to nil + ; so filter those out + (b/filter identity) + (b/transform #(= "enabled" (text %))) + (b/property (select f [:#text]) :enabled?)) + f)) + +(let [open-action (action + :handler (fn [e] (alert "I should open a new something.")) + :name "Open ..." + :key "menu O" + :tip "Open a new something something.") + exit-action (action + :handler (fn [e] (.dispose (to-frame e))) + :name "Exit" + :tip "Close this window")] + (frame :title "MENUS!" + :menubar + (menubar :items + [(menu :text "File" :items [open-action exit-action]) + (menu :text "Edit" :items [open-action exit-action])]) + :visible? true)) + + +(let [open-action (action + :handler (fn [e] (alert "I should open a new something.")) + :name "Open ..." + :key "menu O" + :tip "Open a new something something.") + exit-action (action + :handler (fn [e] (.dispose (to-frame e))) + :name "Exit" + :tip "Close this window")] + (frame :title "MENUS!" + :content (listbox :popup (fn [e] [open-action exit-action]) + :model ["a" "b"]) + :visible? true + :size [640 :by 400])) + +(frame :title "MENUS!" + :content (table + :model [ + :columns [{:key :name, :text "Name"} :likes] + :rows '[["Bobby" "Laura Palmer"] + ["Agent Cooper" "Cherry Pie"] + {:likes "Laura Palmer" :name "James"} + {:name "Big Ed" :likes "Norma Jennings"}]]) + :visible? true + :size [640 :by 400]) + + +(javax.swing.JButton.) +(sw/construct javafx.stage.Stage) +(javafx.stage.Stage.) + + +(javafx.embed.swing.JFXPanel.) +(javafx.application.Platform/setImplicitExit false) + +(defn -run-later [^java.lang.Runnable fn] + (if (Platform/isFxApplicationThread) + (do + (println "aaa") + (fn)) + (Platform/runLater fn))) + +(defmacro run-later [& body] + `(-run-later + (fn [] + (try ~@body + (catch Throwable ex# + (println ex#)))))) + +(run-later + (type javafx.scene.control.Button)) + + +(com.sun.javafx.application.PlatformImpl/startup (fn [_] (javafx.stage.Stage .))) + +(defn ctor-fn [^Class k] + (let [^Constructor ctor (->> (.getDeclaredConstructors k) + (sort-by #(count (.getParameters ^Constructor %))) + first) + _ (assert ctor (str "No ctor for class " k))] + (.setAccessible ctor true) + (fn [] + (let [^objects arr (into-array Object (map + (fn [^Parameter p] + (convert-value default-value (.getType p))) + (.getParameters ctor)))] + (.newInstance ctor arr))))) \ No newline at end of file diff --git a/src/seesaw/wiki/util.clj b/src/seesaw/wiki/util.clj new file mode 100644 index 00000000..f1467182 --- /dev/null +++ b/src/seesaw/wiki/util.clj @@ -0,0 +1,41 @@ +(ns seesaw.wiki.util + (:require [seesaw.options :as opt] + [seesaw.util :as util] + [clojure.string :as string] + [seesaw.event :as ev])) + + +(defn show-events + "Given a class or instance, print information about all supported events. + From there, you can look up javadocs, etc. + + Examples: + + (show-events javax.swing.JButton) + ... lots of output ... + + (show-events (button)) + ... lots of output ... + " + [v] + (doseq [{:keys [name ^Class class events]} (->> (ev/events-for v) + (sort-by :name))] + (printf "%s [%s]%n" name (if class (.getName class) "?")) + (doseq [e (sort events)] + (printf " %s%n" e)))) + +(defn- examples-str [examples] + (string/join (format "%n %24s " "") (util/to-seq examples))) + +(defn show-options + "Given an object, print information about the options it supports. These + are all the options you can legally pass to (seesaw.core/config) and + friends." + [v] + (printf "%s%n" (.getName (class v))) + (printf " %24s Notes/Examples%n" "Option") + (printf "--%24s --------------%n" (apply str (repeat 24 \-))) + (doseq [{:keys [name setter examples]} (sort-by :name (vals (opt/get-option-map v)))] + (printf " %24s %s%n" + name + (if examples (examples-str examples) "")))) From 62787c153f752c63fbbcb2da2a7250a590b161bf Mon Sep 17 00:00:00 2001 From: ertugrulcetin Date: Wed, 27 Jun 2018 19:37:45 +0300 Subject: [PATCH 02/10] added dynamic satom --- .idea/ClojureProjectResolveSettings.xml | 6 + .idea/codeStyles/Project.xml | 7 + .idea/codeStyles/codeStyleConfig.xml | 5 + .idea/compiler.xml | 19 + .idea/encodings.xml | 6 + .idea/inspectionProfiles/Project_Default.xml | 6 + .../Leiningen__cider_cider_nrepl_0_16_0.xml | 9 + .../Leiningen__clojure_complete_0_2_4.xml | 9 + ...en__com_fifesoft_rsyntaxtextarea_2_5_6.xml | 9 + .../Leiningen__com_jgoodies_forms_1_2_1.xml | 9 + ...iningen__com_miglayout_miglayout_3_7_4.xml | 9 + ...ingen__com_stuartsierra_lazytest_1_1_2.xml | 9 + .idea/libraries/Leiningen__j18n_1_0_2.xml | 9 + .../Leiningen__lein_autodoc_0_9_0.xml | 9 + .../Leiningen__org_clojure_clojure_1_8_0.xml | 11 + ...gen__org_clojure_clojure_contrib_1_2_0.xml | 9 + ...ningen__org_clojure_tools_nrepl_0_2_12.xml | 9 + ...g_swinglabs_swingx_swingx_action_1_6_3.xml | 9 + ...glabs_swingx_swingx_autocomplete_1_6_3.xml | 9 + ...g_swinglabs_swingx_swingx_common_1_6_3.xml | 9 + ...org_swinglabs_swingx_swingx_core_1_6_3.xml | 9 + ...swinglabs_swingx_swingx_painters_1_6_3.xml | 9 + ...org_swinglabs_swingx_swingx_plaf_1_6_3.xml | 9 + ...Leiningen__org_tcrawley_dynapath_1_0_0.xml | 9 + .../Leiningen__swank_clojure_1_2_1.xml | 9 + .idea/misc.xml | 87 ++ .idea/modules.xml | 8 + .idea/vcs.xml | 6 + .idea/workspace.xml | 946 ++++++++++++++++++ .nrepl-port | 1 + seesaw.iml | 37 + 31 files changed, 1307 insertions(+) create mode 100644 .idea/ClojureProjectResolveSettings.xml create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/compiler.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/libraries/Leiningen__cider_cider_nrepl_0_16_0.xml create mode 100644 .idea/libraries/Leiningen__clojure_complete_0_2_4.xml create mode 100644 .idea/libraries/Leiningen__com_fifesoft_rsyntaxtextarea_2_5_6.xml create mode 100644 .idea/libraries/Leiningen__com_jgoodies_forms_1_2_1.xml create mode 100644 .idea/libraries/Leiningen__com_miglayout_miglayout_3_7_4.xml create mode 100644 .idea/libraries/Leiningen__com_stuartsierra_lazytest_1_1_2.xml create mode 100644 .idea/libraries/Leiningen__j18n_1_0_2.xml create mode 100644 .idea/libraries/Leiningen__lein_autodoc_0_9_0.xml create mode 100644 .idea/libraries/Leiningen__org_clojure_clojure_1_8_0.xml create mode 100644 .idea/libraries/Leiningen__org_clojure_clojure_contrib_1_2_0.xml create mode 100644 .idea/libraries/Leiningen__org_clojure_tools_nrepl_0_2_12.xml create mode 100644 .idea/libraries/Leiningen__org_swinglabs_swingx_swingx_action_1_6_3.xml create mode 100644 .idea/libraries/Leiningen__org_swinglabs_swingx_swingx_autocomplete_1_6_3.xml create mode 100644 .idea/libraries/Leiningen__org_swinglabs_swingx_swingx_common_1_6_3.xml create mode 100644 .idea/libraries/Leiningen__org_swinglabs_swingx_swingx_core_1_6_3.xml create mode 100644 .idea/libraries/Leiningen__org_swinglabs_swingx_swingx_painters_1_6_3.xml create mode 100644 .idea/libraries/Leiningen__org_swinglabs_swingx_swingx_plaf_1_6_3.xml create mode 100644 .idea/libraries/Leiningen__org_tcrawley_dynapath_1_0_0.xml create mode 100644 .idea/libraries/Leiningen__swank_clojure_1_2_1.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 .nrepl-port create mode 100644 seesaw.iml diff --git a/.idea/ClojureProjectResolveSettings.xml b/.idea/ClojureProjectResolveSettings.xml new file mode 100644 index 00000000..df470b16 --- /dev/null +++ b/.idea/ClojureProjectResolveSettings.xml @@ -0,0 +1,6 @@ + + + + IDE + + \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 00000000..b3295c5b --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 00000000..8f1a3b79 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 00000000..c57b3c50 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 00000000..97626ba4 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..0970a10f --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__cider_cider_nrepl_0_16_0.xml b/.idea/libraries/Leiningen__cider_cider_nrepl_0_16_0.xml new file mode 100644 index 00000000..a60ee795 --- /dev/null +++ b/.idea/libraries/Leiningen__cider_cider_nrepl_0_16_0.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__clojure_complete_0_2_4.xml b/.idea/libraries/Leiningen__clojure_complete_0_2_4.xml new file mode 100644 index 00000000..5c3a95e9 --- /dev/null +++ b/.idea/libraries/Leiningen__clojure_complete_0_2_4.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__com_fifesoft_rsyntaxtextarea_2_5_6.xml b/.idea/libraries/Leiningen__com_fifesoft_rsyntaxtextarea_2_5_6.xml new file mode 100644 index 00000000..78b49742 --- /dev/null +++ b/.idea/libraries/Leiningen__com_fifesoft_rsyntaxtextarea_2_5_6.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__com_jgoodies_forms_1_2_1.xml b/.idea/libraries/Leiningen__com_jgoodies_forms_1_2_1.xml new file mode 100644 index 00000000..770cdf07 --- /dev/null +++ b/.idea/libraries/Leiningen__com_jgoodies_forms_1_2_1.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__com_miglayout_miglayout_3_7_4.xml b/.idea/libraries/Leiningen__com_miglayout_miglayout_3_7_4.xml new file mode 100644 index 00000000..c0e7469f --- /dev/null +++ b/.idea/libraries/Leiningen__com_miglayout_miglayout_3_7_4.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__com_stuartsierra_lazytest_1_1_2.xml b/.idea/libraries/Leiningen__com_stuartsierra_lazytest_1_1_2.xml new file mode 100644 index 00000000..5c76e259 --- /dev/null +++ b/.idea/libraries/Leiningen__com_stuartsierra_lazytest_1_1_2.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__j18n_1_0_2.xml b/.idea/libraries/Leiningen__j18n_1_0_2.xml new file mode 100644 index 00000000..0e265a82 --- /dev/null +++ b/.idea/libraries/Leiningen__j18n_1_0_2.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__lein_autodoc_0_9_0.xml b/.idea/libraries/Leiningen__lein_autodoc_0_9_0.xml new file mode 100644 index 00000000..1aa18b6c --- /dev/null +++ b/.idea/libraries/Leiningen__lein_autodoc_0_9_0.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_clojure_clojure_1_8_0.xml b/.idea/libraries/Leiningen__org_clojure_clojure_1_8_0.xml new file mode 100644 index 00000000..df42c10a --- /dev/null +++ b/.idea/libraries/Leiningen__org_clojure_clojure_1_8_0.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_clojure_clojure_contrib_1_2_0.xml b/.idea/libraries/Leiningen__org_clojure_clojure_contrib_1_2_0.xml new file mode 100644 index 00000000..d6d430bc --- /dev/null +++ b/.idea/libraries/Leiningen__org_clojure_clojure_contrib_1_2_0.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_clojure_tools_nrepl_0_2_12.xml b/.idea/libraries/Leiningen__org_clojure_tools_nrepl_0_2_12.xml new file mode 100644 index 00000000..9e0ab2d3 --- /dev/null +++ b/.idea/libraries/Leiningen__org_clojure_tools_nrepl_0_2_12.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_action_1_6_3.xml b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_action_1_6_3.xml new file mode 100644 index 00000000..cb0318e3 --- /dev/null +++ b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_action_1_6_3.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_autocomplete_1_6_3.xml b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_autocomplete_1_6_3.xml new file mode 100644 index 00000000..19078e1c --- /dev/null +++ b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_autocomplete_1_6_3.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_common_1_6_3.xml b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_common_1_6_3.xml new file mode 100644 index 00000000..68fbdd75 --- /dev/null +++ b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_common_1_6_3.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_core_1_6_3.xml b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_core_1_6_3.xml new file mode 100644 index 00000000..760b0547 --- /dev/null +++ b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_core_1_6_3.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_painters_1_6_3.xml b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_painters_1_6_3.xml new file mode 100644 index 00000000..5ce254d3 --- /dev/null +++ b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_painters_1_6_3.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_plaf_1_6_3.xml b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_plaf_1_6_3.xml new file mode 100644 index 00000000..023514d9 --- /dev/null +++ b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_plaf_1_6_3.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_tcrawley_dynapath_1_0_0.xml b/.idea/libraries/Leiningen__org_tcrawley_dynapath_1_0_0.xml new file mode 100644 index 00000000..58bf9abd --- /dev/null +++ b/.idea/libraries/Leiningen__org_tcrawley_dynapath_1_0_0.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Leiningen__swank_clojure_1_2_1.xml b/.idea/libraries/Leiningen__swank_clojure_1_2_1.xml new file mode 100644 index 00000000..25485b38 --- /dev/null +++ b/.idea/libraries/Leiningen__swank_clojure_1_2_1.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..2ed49eda --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,87 @@ + + + + /usr/local/bin/ghc + /usr/local/bin/cabal + /usr/local/bin/stack + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..85c385b0 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 00000000..8f9f8d61 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,946 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + p + require + ppr + ppron + pprin + pprint + :size + :content + :aliceblue + [640 :by 480] + OptionProvider + option-provider + option-provider J + jframe + defn agent + ertus + validator + hashse + hashs + Option. + atom + dlg-result + options + defn atom + burada + ops: + watches + remove-wat + SAtom + get-k + + + sw/text + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {:repl-history {:ide [], :local [{:command "(com.sun.javafx.application.PlatformImpl/runLater (fn [_]\n (javafx.stage.Stage.)))", :offset 49, :ns "user"} {:command "(let [cls (Class/forName \"javafx.scene.control.ListCell\" false (clojure.lang.RT/baseLoader))] (.importClass *ns* cls))", :offset 21, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage.\" false (clojure.lang.RT/baseLoader))] (.importClass *ns* cls))", :offset 45, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))] (.importClass *ns* cls))", :offset 44, :ns "user"} {:command "cls", :offset 3, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)\n cls)", :offset 114, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)\n (.newInstance cls))", :offset 128, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)\n (.newInstance (.importClass *ns* cls)))", :offset 148, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls))", :offset 108, :ns "user"} {:command "(type (let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)))", :offset 121, :ns "user"} {:command "(run-later\n (javafx.stage.Stage.)\n )", :offset 38, :ns "seesaw.wiki.c-4-containers"} {:command "(com.sun.javafx.application.PlatformImpl/startup (fn [_] (javafx.stage.Stage .)))", :offset 81, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (javafx.stage.Stage))", :offset 34, :ns "seesaw.wiki.c-4-containers"} {:command "(javax.swing.JButton.)", :offset 22, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (println \"As\"))", :offset 28, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (javafx.stage.Stage.))", :offset 35, :ns "seesaw.wiki.c-4-containers"} {:command "(javafx.stage.Stage.)", :offset 21, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (javafx.stage.Stage.)\n )", :offset 39, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (eval \"(javafx.stage.Stage.)\")\n )", :offset 48, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (sw/construct javafx.stage.Stage)\n )", :offset 51, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (let [c (sw/construct javafx.stage.Stage)]\n (type c)\n ))", :offset 75, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (let [c (sw/construct javafx.stage.Stage)]\n (println (type c))\n ))", :offset 85, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (let [c (sw/construct javafx.stage.Stage)]\n (println (.newInstance javafx.stage.Stage))\n ))", :offset 110, :ns "seesaw.wiki.c-4-containers"} {:command "(extend-listener-protocol AddChangeListener add-change-listener addChangeListener\n javax.swing.BoundedRangeModel\n javax.swing.JProgressBar\n javax.swing.JSlider\n javax.swing.JTabbedPane\n javax.swing.JViewport\n javax.swing.AbstractButton\n javax.swing.SingleSelectionModel\n javax.swing.SpinnerModel\n javax.swing.JSpinner\n javax.swing.ButtonModel)", :offset 353, :ns "seesaw.event"} {:command "event-groups-by-listener-class", :offset 30, :ns "seesaw.event"} {:command "(defn camelize\n \"Convert input string to camelCase from hyphen-case\"\n [s]\n (clojure.string/replace s #\"-(.)\" #(.toUpperCase ^String (%1 1))))\n(-> :drag-mouse-moved name camelize symbol)", :offset 144, :ns "user"} {:command "(ns ^{:doc \"Functions for handling events. Do not use these functions directly.\n Use (seesaw.core/listen) instead.\"\n :author \"Dave Ray\"}\n seesaw.event\n (:use [seesaw.meta :only [put-meta! get-meta]]\n [seesaw.util :only [camelize illegal-argument to-seq check-args]])\n (:import [javax.swing.event ChangeListener\n CaretListener DocumentListener\n ListSelectionListener\n TreeSelectionListener TreeExpansionListener TreeWillExpandListener TreeModelListener\n HyperlinkListener]\n [javax.swing.text Document]\n [java.awt.event WindowListener FocusListener ActionListener ItemListener\n MouseListener MouseMotionListener MouseWheelListener\n KeyListener ComponentListener]\n [java.beans PropertyChangeListener]))", :offset 849, :ns "user"} {:command "(defmacro ^{:private true } extend-listener-protocol [proto proto-method java-method & classes]\n `(extend-protocol ~proto\n ~@(mapcat (fn [c] `(~c (~proto-method [this# v#] (. this# ~java-method v#)))) classes)))", :offset 216, :ns "seesaw.event"} {:command "(defprotocol ^{:private true} AddChangeListener\n (add-change-listener [this l]))", :offset 81, :ns "seesaw.event"} {:command "(defprotocol ^{:private true} AddActionListener\n (add-action-listener [this v]))", :offset 81, :ns "seesaw.event"} {:command "(defprotocol ^{:private true} AddListSelectionListener\n (add-list-selection-listener [this v]))", :offset 96, :ns "seesaw.event"} {:command "(macroexpand-1 '(extend-listener-protocol AddChangeListener add-change-listener addChangeListener\n javax.swing.BoundedRangeModel\n javax.swing.JProgressBar\n javax.swing.JSlider\n javax.swing.JTabbedPane\n javax.swing.JViewport\n javax.swing.AbstractButton\n javax.swing.SingleSelectionModel\n javax.swing.SpinnerModel\n javax.swing.JSpinner\n javax.swing.ButtonModel))", :offset 760, :ns "seesaw.event"} {:command "(extend-listener-protocol AddChangeListener add-change-listener addChangeListener\n javax.swing.BoundedRangeModel\n javax.swing.JProgressBar\n javax.swing.JSlider\n javax.swing.JTabbedPane\n javax.swing.JViewport\n javax.swing.AbstractButton\n javax.swing.SingleSelectionModel\n javax.swing.SpinnerModel\n javax.swing.JSpinner\n javax.swing.ButtonModel)", :offset 743, :ns "seesaw.event"} {:command "(extend-listener-protocol AddListSelectionListener add-list-selection-listener addListSelectionListener\n javax.swing.JList\n javax.swing.ListSelectionModel)", :offset 157, :ns "seesaw.event"} {:command "(extend-protocol AddListSelectionListener\n javax.swing.JTable\n (add-list-selection-listener [this l]\n (add-list-selection-listener (.getSelectionModel this) l)))", :offset 170, :ns "seesaw.event"} {:command "(def ^{:private true} event-groups {\n\n :component {\n :name :component\n :class ComponentListener\n :events #{:component-hidden\n :component-moved\n :component-resized\n :component-shown}\n :install #(.addComponentListener ^java.awt.Component %1 ^ComponentListener %2)\n }\n\n :property-change {\n :name :property-change\n :class PropertyChangeListener\n :events #{:property-change}\n :install #(.addPropertyChangeListener ^java.awt.Component %1 ^PropertyChangeListener %2)\n }\n :key {\n :name :key\n :class KeyListener\n :events #{:key-pressed :key-released :key-typed}\n :install #(.addKeyListener ^java.awt.Component %1 ^KeyListener %2)\n }\n :window {\n :name :window\n :class WindowListener\n :events #{:window-activated :window-deactivated\n :window-closed :window-closing :window-opened\n :window-deiconified :window-iconified}\n :install #(.addWindowListener ^java.awt.Window %1 ^WindowListener %2)\n }\n :focus {\n :name :focus\n :class FocusListener\n :events #{:focus-gained :focus-lost}\n :install #(.addFocusListener ^java.awt.Component %1 ^FocusListener %2)\n }\n :document {\n :name :document\n :class DocumentListener\n :events #{:changed-update :insert-update :remove-update}\n :install (fn [target listener]\n (.addDocumentListener\n (if (instance? Document target)\n ^Document target\n (.getDocument ^javax.swing.text.JTextComponent target))\n ^DocumentListener listener))\n }\n :caret {\n :name :caret\n :class CaretListener\n :events #{:caret-update}\n :install #(.addCaretListener ^javax.swing.text.JTextComponent %1 ^CaretListener %2)\n }\n :action {\n :name :action\n :class ActionListener\n :events #{:action-performed}\n :install add-action-listener\n }\n :change {\n :name :change\n :class ChangeListener\n :events #{:state-changed}\n :install add-change-listener\n }\n :item {\n :name :item\n :class ItemListener\n :events #{:item-state-changed}\n :install #(.addItemListener ^java.awt.ItemSelectable %1 ^ItemListener %2)\n }\n :mouse {\n :name :mouse\n :class MouseListener\n :events #{:mouse-clicked :mouse-entered :mouse-exited :mouse-pressed :mouse-released}\n :install #(.addMouseListener ^java.awt.Component %1 ^MouseListener %2)\n }\n :mouse-motion {\n :name :mouse-motion\n :class MouseMotionListener\n :events #{:mouse-moved :mouse-dragged}\n :install #(.addMouseMotionListener ^java.awt.Component %1 ^MouseMotionListener %2)\n }\n :mouse-wheel {\n :name :mouse-wheel\n :class MouseWheelListener\n :events #{:mouse-wheel-moved}\n :install #(.addMouseWheelListener ^java.awt.Component %1 ^MouseWheelListener %2)\n }\n :list-selection {\n :name :list-selection\n :class ListSelectionListener\n :events #{:value-changed}\n :named-events #{:list-selection} ; Suppress reversed map entry\n :install add-list-selection-listener\n }\n :tree-selection {\n :name :tree-selection\n :class TreeSelectionListener\n :events #{:value-changed}\n :named-events #{:tree-selection} ; Suppress reversed map entry\n :install #(.addTreeSelectionListener ^javax.swing.JTree %1 ^TreeSelectionListener %2)\n }\n :tree-expansion {\n :name :tree-expansion\n :class TreeExpansionListener\n :events #{:tree-expanded :tree-collapsed}\n :install #(.addTreeExpansionListener ^javax.swing.JTree %1 ^TreeExpansionListener %2)\n }\n ; Since one of the methods matches the listener name, we give the overall\n ; a slightly different name to distinguish registering for *all* events\n ; versus just one.\n :tree-will-expand* {\n :name :tree-will-expand*\n :class TreeWillExpandListener\n :events #{:tree-will-expand :tree-will-collapse}\n :install #(.addTreeWillExpandListener ^javax.swing.JTree %1 ^TreeWillExpandListener %2)\n }\n :tree-model {\n :name :tree-model\n :class TreeModelListener\n :events #{:tree-nodes-changed :tree-nodes-inserted :tree-nodes-removed :tree-structure-changed}\n :install #(.addTreeModelListener ^javax.swing.tree.TreeModel %1 ^TreeModelListener %2)\n }\n\n :drag-source {\n :name :drag-source\n :class java.awt.dnd.DragSourceListener\n :events #{:drag-drop-end :drag-enter :drag-exit :drag-over :drop-action-changed}\n ; Names are mostly the same as DragTarget events, so prefix with ds-\n ; See event-method-table below too!\n :named-events #{:ds-drag-drop-end :ds-drag-enter :ds-drag-exit :ds-drag-over :ds-drop-action-changed}\n :install #(.addDragSourceListener ^java.awt.dnd.DragSource %1 ^java.awt.dnd.DragSourceListener %2)\n }\n\n :drag-source-motion {\n :name :drag-source-motion\n :class java.awt.dnd.DragSourceMotionListener\n :events #{:drag-mouse-moved}\n :install #(.addDragSourceMotionListener ^java.awt.dnd.DragSource %1 ^java.awt.dnd.DragSourceMotionListener %2)\n }\n\n :drop-target {\n :name :drop-target\n :class java.awt.dnd.DropTargetListener\n :events #{:drag-enter :drag-exit :drag-over :drop :drop-action-changed}\n ; Names are mostly the same as DragSource events, so prefix with dt-\n ; See event-method-table below too!\n :named-events #{:dt-drag-enter :dt-drag-exit :dt-drag-over :dt-drop :dt-drop-action-changed}\n :install #(.addDropTargetListener ^java.awt.dnd.DropTarget %1 ^java.awt.dnd.DropTargetListener %2)\n }\n\n :hyperlink {\n :name :hyperlink\n :class HyperlinkListener\n :events #{:hyperlink-update}\n :install #(.addHyperlinkListener ^javax.swing.JEditorPane %1\n ^HyperlinkListener %2)\n }\n})", :offset 5808, :ns "seesaw.event"} {:command "(def ^{:private true} event-groups-by-listener-class\n (into {}\n (for [{:keys [class] :as group} (vals event-groups)]\n [class group])))", :offset 151, :ns "seesaw.event"} {:command "(defn- get-listener-class [^java.lang.reflect.Method m]\n (let [[arg] (.getParameterTypes m)]\n (if (and arg (.startsWith (.getName m) \"add\"))\n arg)))", :offset 157, :ns "seesaw.event"} {:command "(defn events-for\n \"Returns a sequence of event info maps for the given object which can\n be either a widget instance or class.\n\n Used by (seesaw.dev/show-events).\n\n See:\n (seesaw.dev/show-events)\n \"\n [v]\n (let [base (->> (.getMethods (if (class? v) ^java.lang.Class v (class v)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install)))\n selection (selection-group-for v)]\n (if selection\n (cons selection base)\n base)))", :offset 593, :ns "seesaw.event"} {:command "(seesaw.core/label)", :offset 19, :ns "seesaw.event"} {:command "(require 'seesaw.core)", :offset 22, :ns "seesaw.event"} {:command "(class \"as\")", :offset 12, :ns "seesaw.event"} {:command "(defn events-for\n \"Returns a sequence of event info maps for the given object which can\n be either a widget instance or class.\n\n Used by (seesaw.dev/show-events).\n\n See:\n (seesaw.dev/show-events)\n \"\n [v]\n (let [base (->> (.getMethods (if (class? v) ^java.lang.Class v (class v)))\n (map #(do\n (println (get-listener-class %))\n (get-listener-class %)))\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install)))\n selection (selection-group-for v)]\n (if selection\n (cons selection base)\n base)))", :offset 682, :ns "seesaw.event"} {:command "(.getMethods (class \"As\"))", :offset 26, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class \"As\"))]\n (println m)\n )", :offset 55, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class \"As\"))]\n (println (get-listener-class m))\n )", :offset 76, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (println (get-listener-class m)))", :offset 88, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (get-listener-class m)]\n (println l)))", :offset 109, :ns "seesaw.event"} {:command "(filter identity [nil nil 1 2 nil])", :offset 35, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (get-listener-class m)]\n (println (map event-groups-by-listener-class l))))", :offset 146, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n )", :offset 205, :ns "seesaw.event"} {:command "(clojure.pprint/pprint event-groups-by-listener-class)", :offset 54, :ns "seesaw.event"} {:command "(count (.getMethods (class (seesaw.core/label))))", :offset 49, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n ;(map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n )", :offset 206, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n ;(map #(dissoc % :install))\n )", :offset 204, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install))\n )", :offset 203, :ns "seesaw.event"} {:command "(defn events-for\n \"Returns a sequence of event info maps for the given object which can\n be either a widget instance or class.\n\n Used by (seesaw.dev/show-events).\n\n See:\n (seesaw.dev/show-events)\n \"\n [v]\n (let [base (->> (.getMethods (if (class? v) ^java.lang.Class v (class v)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install)))\n selection (selection-group-for v)]\n (if selection\n (cons selection base)\n base)))", :offset 638, :ns "seesaw.event"} {:command "(events-for (seesaw.core/label))", :offset 32, :ns "seesaw.event"} {:command "(util/show-events (saw/button))", :offset 31, :ns "seesaw.wiki.c-1-home-page"} {:command "(util/show-events (saw/label))", :offset 30, :ns "seesaw.wiki.c-1-home-page"} {:command "(apply + [1 2])", :offset 13, :ns "user"} {:command "(apply + [1 2] [3])", :offset 17, :ns "user"} {:command "apply", :offset 5} {:command "(apply + [1 2] 3)", :offset 16, :ns "user"} {:command "(apply + [1 2] [2])", :offset 17, :ns "user"} {:command "(apply + [1 2] [[2]])", :offset 18, :ns "user"} {:command "(apply + [1 2] [])", :offset 16, :ns "user"} {:command "(defn- get-listener-class-2 [^java.lang.reflect.Method m]\n (let [[arg] (.getParameterTypes m)]\n (if (and arg (.startsWith (.getName m) \"setOn\"))\n arg)))", :offset 161, :ns "seesaw.event"} {:command "(defn- get-listener-class-2 [^java.lang.reflect.Method m]\n (let [[arg] (.getParameterTypes m)]\n (if (and arg (.startsWith (.getName m) \"setOn\"))\n (.getName m))))", :offset 170, :ns "seesaw.event"} {:command "(->> (.getMethods javafx.scene.Node)\n (map get-listener-class-2)\n (filter identity)\n ;(map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n )", :offset 198, :ns "seesaw.event"} {:command "(apply + [1 2] )", :offset 15, :ns "user"} {:command "(count(->> (.getMethods javafx.scene.Node)\n (map get-listener-class-2)\n (filter identity)\n ;(map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n ))", :offset 211, :ns "seesaw.event"} {:command "^java.awt.Component", :offset 19, :ns "user"} {:command "(merge {:a 1} {:b 2})", :offset 19, :ns "user"} {:command "(merge {:a {:b 3\n :c 3}} {:b 2})", :offset 43, :ns "user"} {:command "(merge {:a {:b 3\n :c 3}} {:a {:b 2}})", :offset 45, :ns "user"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (.getParameterTypes m)]\n (println l)))", :offset 109, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0))))", :offset 118, :ns "seesaw.event"} {:command "(doseq [m (.getMethods javafx.scene.control.ButtonBase)]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0))))", :offset 122, :ns "seesaw.event"} {:command "(.getMethods javafx.scene.control.ButtonBase)", :offset 45, :ns "seesaw.event"} {:command "(.getDeclaredMethods javafx.scene.control.ButtonBase)", :offset 53, :ns "seesaw.event"} {:command "(class javafx.scene.control.ButtonBase)", :offset 39, :ns "seesaw.event"} {:command "(Class/forName \"javafx.scene.control.ButtonBase\")", :offset 49, :ns "seesaw.event"} {:command "(run-later\n (doseq [m (.getDeclaredMethods (Class/forName \"javafx.scene.control.ButtonBase\"))]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0)))))", :offset 166, :ns "seesaw.wiki.c-4-containers"} {:command "(.getMethods (Class/forName \"javafx.scene.control.ButtonBase\"))", :offset 63, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (doseq [m (.getMethods (Class/forName \"javafx.scene.control.ButtonBase\"))]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0)))))", :offset 158, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (.getMethods (Class/forName \"javafx.scene.control.ButtonBase\")))", :offset 77, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (.getMethods javafx.scene.control.ButtonBase))", :offset 59, :ns "seesaw.wiki.c-4-containers"} {:command "(Class/forName \"javafx.scene.control.Button\")", :offset 45, :ns "seesaw.event"} {:command "(.getDeclaredMethods javafx.scene.control.Button)", :offset 49, :ns "seesaw.event"} {:command "(.getMethods javafx.scene.control.Button)", :offset 41, :ns "seesaw.event"} {:command "(run-later\n (.getMethods javafx.scene.control.Button))", :offset 55, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n javafx.scene.control.Button)", :offset 41, :ns "seesaw.wiki.c-4-containers"} {:command "(.getMethods javafx.scene.layout VBox)", :offset 38, :ns "seesaw.event"} {:command "(.getMethods javafx.scene.layout.VBox)", :offset 38, :ns "seesaw.event"} {:command "(ns seesaw.wiki.c-4-containers\n (:require [seesaw.core :as sw :refer :all]\n [seesaw.mig :as mig]\n [seesaw.bind :as b]\n [seesaw.wiki.util :as util])\n (:import (javafx.application Platform)\n (java.lang.reflect Constructor Parameter)))", :offset 277, :ns "user"} {:command "(ns sadas)", :offset 10, :ns "seesaw.wiki.c-4-containers"} {:command "(defmacro run-later [& body]\n `(-run-later\n (fn []\n (try ~@body\n (catch Throwable ex#\n (println ex#))))))", :offset 140, :ns "seesaw.wiki.c-4-containers"} {:command "(in-ns 'user)", :offset 13, :ns "seesaw.wiki.c-4-containers"} {:command "(javafx.embed.swing.JFXPanel.)", :offset 30, :ns "seesaw.wiki.c-4-containers"} {:command "(Platform/setImplicitExit false)", :offset 32, :ns "seesaw.wiki.c-4-containers"} {:command "(defn -run-later [^java.lang.Runnable fn]\n (if (Platform/isFxApplicationThread)\n (do\n (println \"aaa\")\n (fn))\n (Platform/runLater fn)))", :offset 152, :ns "seesaw.wiki.c-4-containers"} {:command "\n\n(javafx.embed.swing.JFXPanel.)\n(javafx.application.Platform/setImplicitExit false)\n\n(defn -run-later [^java.lang.Runnable fn]\n (if (Platform/isFxApplicationThread)\n (do\n (println \"aaa\")\n (fn))\n (Platform/runLater fn)))\n\n(defmacro run-later [& body]\n `(-run-later\n (fn []\n (try ~@body\n (catch Throwable ex#\n (println ex#))))))", :offset 380, :ns "user"} {:command "javafx.application.Platform", :offset 27, :ns "user"} {:command "(javafx.application.Platform/setImplicitExit false)\n", :offset 52, :ns "user"} {:command "\n(defn -run-later [^java.lang.Runnable fn]\n (if (Platform/isFxApplicationThread)\n (do\n (println \"aaa\")\n (fn))\n (Platform/runLater fn)))\n\n(defmacro run-later [& body]\n `(-run-later\n (fn []\n (try ~@body\n (catch Throwable ex#\n (println ex#))))))\n", :offset 296, :ns "user"} {:command "(run-later\n (type javafx.scene.control.Button))", :offset 48, :ns "user"} {:command "(run-later\n (println (type javafx.scene.control.Button)))", :offset 56, :ns "user"} {:command "(run-later\n (println (.getMethods javafx.scene.control.Button)))", :offset 34, :ns "user"} {:command "(seesaw.core/user-data)", :offset 23, :ns "seesaw.core"} {:command "(def m {:a \"Example doc string\"})", :offset 30, :ns "user"} {:command "(defn a\n (:a m)\n [x y]\n (+ x y))", :offset 33, :ns "user"} {:command "(defmacro my-defn \n [] \n )", :offset 17} {:command "(let [doc (:a m)] \n (defn a\n doc\n [x y]\n (+ x y)))", :offset 36, :ns "user"} {:command "(let [doc (:a m)] \n (defn a\n ~doc\n [x y]\n (+ x y)))", :offset 34, :ns "user"} {:command "(let [doc (:a m)] \n (defn a\n \"ok\"\n [x y]\n (+ x y)))", :offset 36, :ns "user"} {:command "(defmacro my-defn \n [doc] \n `(defn my-fn ~doc []))", :offset 47, :ns "user"} {:command "(my-defn \"ses\")", :offset 13, :ns "user"} {:command "(meta (var my-fn))", :offset 16, :ns "user"} {:command "(ns ^{:doc\n\"Core functions and macros for Seesaw. Although there are many more\n Seesaw namespaces, usually what you want is in here. Most functions\n in other namespaces have a core wrapper which adds additional\n capability or makes them easier to use.\"\n :author \"Dave Ray\"}\n seesaw.core\n (:use [seesaw.util :only [illegal-argument to-seq check-args\n constant-map resource resource-key?\n to-dimension to-insets to-url try-cast\n cond-doto to-mnemonic-keycode]]\n [seesaw.config :only [Configurable config* config!*]]\n [seesaw.options :only [ignore-option default-option bean-option\n resource-option around-option\n apply-options\n option-map option-provider\n get-option-value]]\n [seesaw.widget-options :only [widget-option-provider]]\n [seesaw.meta :only [get-meta put-meta!]]\n [seesaw.to-widget :only [ToWidget to-widget*]]\n [seesaw.make-widget :only [make-widget*]])\n (:require clojure.java.io\n clojure.set\n [seesaw color font border invoke timer selection value\n event selector icon action cells table graphics cursor scroll dnd]\n [seesaw.layout :as layout])\n (:import [javax.swing\n SwingConstants UIManager ScrollPaneConstants DropMode\n BoxLayout\n JDialog JFrame JComponent Box JPanel JScrollPane JSplitPane JToolBar JTabbedPane\n JLabel JTextField JTextArea JTextPane\n AbstractButton JButton ButtonGroup\n JOptionPane]\n [javax.swing.text JTextComponent StyleConstants]\n [java.awt Component FlowLayout BorderLayout GridLayout\n GridBagLayout GridBagConstraints\n Dimension]))", :offset 1887, :ns "user"} {:command "(ns seesaw.wiki.c-1-home-page\n (:require [seesaw.core :as saw]\n [seesaw.event :as ev]\n [seesaw.options :as opt]\n [seesaw.wiki.util :as util]\n [clojure.string :as string]))", :offset 216, :ns "user"} {:command "(def p (sw/vertical-panel :items [\"This\" \"is\" \"a\" \"vertical\" \"stack of\" \"JLabels\"]))", :offset 84, :ns "seesaw.wiki.c-3-widgets"} {:command ":as", :offset 3, :ns "seesaw.wiki.c-3-widgets"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core]))", :offset 55, :ns "user"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]))", :offset 62, :ns "user"} {:command "(ns seesaw.widgets.log-window\n (:use [seesaw.core]\n [seesaw.bind :only [bind]]\n [seesaw.keymap :only [map-key]]\n [seesaw.invoke :only [signaller]]\n [seesaw.options :only [apply-options option-map default-option]]\n [seesaw.widget-options :only [WidgetOptionProvider]]))", :offset 304, :ns "user"} {:command "(def fl (let [choose (fn [e] (sw/alert \"I should open a file chooser\"))]\n (sw/flow-panel\n :items [\"File\" [:fill-h 5]\n (sw/text (System/getProperty \"user.dir\")) [:fill-h 5]\n (sw/action :handler choose :name \"...\")])))", :offset 274, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content (java.net.URL. \"https://github.com/daveray/seesaw/wiki/Widgets\")\n :size [640 :by 400]\n :visible? true)", :offset 195, :ns "seesaw.wiki.c-3-widgets"} {:command "(util/show-options (sw/label))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/button :id :the-button :text \"Push me\")", :offset 43, :ns "seesaw.wiki.c-3-widgets"} {:command "(def fl (let [choose (fn [e] (sw/alert \"I should open a file chooser\"))]pr\n (sw/flow-panel\n :items [\"File\" [:fill-h 5]\n (sw/text (System/getProperty \"user.dir\")) [:fill-h 5]\n (sw/action :handler choose :name \"...\")])))", :offset 276, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content fl\n :size [640 :by 400]\n :visible? true)", :offset 133, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content \"Saas\"\n :size [640 :by 400]\n :visible? true)", :offset 137, :ns "seesaw.wiki.c-3-widgets"} {:command "(def a (atom 1))", :offset 14, :ns "user"} {:command "(type @a)", :offset 8, :ns "user"} {:command "(.hashCode a)", :offset 12, :ns "user"} {:command "(.hashCode @a)", :offset 13, :ns "user"} {:command "(def b (atom 1))", :offset 6, :ns "user"} {:command "(.hashCode @b)", :offset 13, :ns "user"} {:command "(def o (Option. :deneme (fn [] ) (fn [] ) nil))", :offset 47, :ns "seesaw.options"} {:command "(def o2 (Option. :deneme (fn [] ) (fn [] ) nil))", :offset 48, :ns "seesaw.options"} {:command "(== o o2)", :offset 9, :ns "seesaw.options"} {:command "(= o o2)", :offset 8, :ns "seesaw.options"} {:command "(= o o)", :offset 7, :ns "seesaw.options"} {:command "(def m {o \"deneme\"})", :offset 20, :ns "seesaw.options"} {:command "(get m o)", :offset 9, :ns "seesaw.options"} {:command "( + 1 1)", :offset 7, :ns "user"} {:command "(def k (atom \"As\"))", :offset 16, :ns "user"} {:command "(def mm {k \"den\"})", :offset 15, :ns "user"} {:command "(get mm k)", :offset 9, :ns "user"} {:command "(ns ^{:doc\n \"Core functions and macros for Seesaw. Although there are many more\n Seesaw namespaces, usually what you want is in here. Most functions\n in other namespaces have a core wrapper which adds additional\n capability or makes them easier to use.\"\n :author \"Dave Ray\"}\nseesaw.core\n (:use [seesaw.util :only [illegal-argument to-seq check-args\n constant-map resource resource-key?\n to-dimension to-insets to-url try-cast\n cond-doto to-mnemonic-keycode]]\n [seesaw.config :only [Configurable config* config!*]]\n [seesaw.options :only [ignore-option default-option bean-option\n resource-option around-option\n apply-options\n option-map option-provider\n get-option-value]]\n [seesaw.widget-options :only [widget-option-provider]]\n [seesaw.meta :only [get-meta put-meta!]]\n [seesaw.to-widget :only [ToWidget to-widget*]]\n [seesaw.make-widget :only [make-widget*]])\n (:require clojure.java.io\n clojure.set\n [seesaw color font border invoke timer selection value\n event selector icon action cells table graphics cursor scroll dnd]\n [seesaw.layout :as layout])\n (:import [javax.swing\n SwingConstants UIManager ScrollPaneConstants DropMode\n BoxLayout\n JDialog JFrame JComponent Box JPanel JScrollPane JSplitPane JToolBar JTabbedPane\n JLabel JTextField JTextArea JTextPane\n AbstractButton JButton ButtonGroup\n JOptionPane]\n [javax.swing.text JTextComponent StyleConstants]\n [java.awt Component FlowLayout BorderLayout GridLayout\n GridBagLayout GridBagConstraints\n Dimension]\n (clojure.lang IAtom IDeref IMeta)))", :offset 1994, :ns "user"} {:command "(deftype SAtom [^:mutable state meta validator ^:mutable watches]\n IAtom\n\n\n IDeref\n (deref [this]\n (println \"Derefeedd!!!\")\n state)\n\n IMeta\n (meta [_] meta))", :offset 168, :ns "seesaw.core"} {:command "(defn stom\n ([x] (new SAtom x))\n ([x & options] (setup-reference (stom x) options)))", :offset 86, :ns "seesaw.core"} {:command "(defn stom\n ([x] (new SAtom))\n ([x & options] (setup-reference (stom x) options)))", :offset 84, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom.))\n ([x & options] (setup-reference (stom x) options)))", :offset 81, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (setup-reference (stom x) options)))", :offset 95, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (#'setup-reference (stom x) options)))", :offset 97, :ns "seesaw.core"} {:command "(defn s-reference \n [^clojure.lang.ARef r options]\n (let [opts (apply hash-map options)]\n (when (:meta opts)\n (.resetMeta r (:meta opts)))\n (when (:validator opts)\n (.setValidator r (:validator opts)))\n r))", :offset 227, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (s-reference (stom x) options)))", :offset 91, :ns "seesaw.core"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content \"Ertus\"\n :size [640 :by 400]\n :visible? true)", :offset 138, :ns "seesaw.wiki.c-3-widgets"} {:command "(deftype SAtom [^:mutable state meta validator ^:mutable watches]\n IAtom\n\n\n IDeref\n (deref [this]\n (println (type this))\n (println state)\n state)\n\n IMeta\n (meta [_] meta))", :offset 185, :ns "seesaw.core"} {:command "(defn satom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (s-reference (satom x) options)))", :offset 93, :ns "seesaw.core"} {:command "@ak", :offset 3, :ns "seesaw.core"} {:command "(deftype SAtom [state meta validator watches]\n IAtom\n (swap [this f]\n (swap! state f))\n (swap [this f x]\n (swap! state f x))\n (swap [this f x y]\n (swap! state f x y))\n (swap [this f x y args]\n (swap! state f x y args))\n (compareAndSet [this old new]\n (compare-and-set! state old new))\n (reset [this new]\n (reset! state new))\n\n IDeref\n (deref [this]\n (println (type this))\n @state)\n\n IMeta\n (meta [_] meta))", :offset 441, :ns "seesaw.core"} {:command "(def ak (satom 1))", :offset 18, :ns "seesaw.core"} {:command "(swap! ak inc)", :offset 14, :ns "seesaw.core"} {:command "(def kol (atom 5))", :offset 18, :ns "seesaw.core"} {:command "(swap! kol inc)", :offset 15, :ns "seesaw.core"} {:command "(type ak)", :offset 9, :ns "seesaw.core"} {:command "(val {:a 1})", :offset 10, :ns "user"} {:command "(vals {:a 1})", :offset 5, :ns "user"} {:command "(vals {:a {:b 1}})", :offset 15, :ns "user"} {:command "(first (vals {:a {:b 1}}))", :offset 25, :ns "user"} {:command "(ns ^{:doc \"Functions for dealing with options.\"\n :author \"Dave Ray\"}\nseesaw.options\n (:use [seesaw.util :only [camelize illegal-argument check-args\n resource resource-key?]])\n (:import (clojure.lang IAtom IDeref IMeta)))", :offset 258, :ns "user"} {:command "(def s (atom {}))", :offset 17, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n IAtom\n (swap [this f]\n (let [v (swap! state f)\n target-ins (get s state)\n options (vals (first (vals target-ins)))]\n (doseq [opt options]\n (if-let [setter (:setter opt)]\n (setter target-ins v)\n (illegal-argument \"No setter found for option %s\" (:name opt))))))\n (swap [this f x]\n (swap! state f x))\n (swap [this f x y]\n (swap! state f x y))\n (swap [this f x y args]\n (swap! state f x y args))\n (compareAndSet [this old new]\n (compare-and-set! state old new))\n (reset [this new]\n (reset! state new))\n\n IDeref\n (deref [this]\n (println (type this))\n @state)\n\n IMeta\n (meta [_] meta))", :offset 722, :ns "seesaw.options"} {:command "(defn s-reference\n [^clojure.lang.ARef r options]\n (let [opts (apply hash-map options)]\n (when (:meta opts)\n (.resetMeta r (:meta opts)))\n (when (:validator opts)\n (.setValidator r (:validator opts)))\n r))", :offset 226, :ns "seesaw.options"} {:command "(defn satom\n ([x] (SAtom. (atom x) nil nil nil))\n ([x & options] (s-reference (satom x) options)))", :offset 100, :ns "seesaw.options"} {:command "(def k (satom 1))", :offset 17, :ns "seesaw.options"} {:command "(type k)", :offset 8, :ns "seesaw.options"} {:command "(= seesaw.options.SAtom (type k))", :offset 33, :ns "seesaw.options"} {:command "(= seesaw.options.SAtom (class k))", :offset 34, :ns "seesaw.options"} {:command "(= SAtom (class k))", :offset 19, :ns "seesaw.options"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]\n [seesaw.wiki.util :as util]))", :offset 102, :ns "user"} {:command "@title", :offset 6, :ns "seesaw.wiki.c-3-widgets"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]\n [seesaw.options :as op]\n [seesaw.wiki.util :as util]))", :offset 138, :ns "user"} {:command "(def title (op/satom 1))", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content 12\n :size [640 :by 400]\n :visible? true)", :offset 133, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"DEneme\"))", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "op/s", :offset 4, :ns "seesaw.wiki.c-3-widgets"} {:command "(vals (first (vals (get @op/s title))))", :offset 39, :ns "seesaw.wiki.c-3-widgets"} {:command "(first (vals (get @op/s title)))", :offset 32, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content title\n :size [640 :by 400]\n :visible? true)", :offset 136, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"sesver\"))", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"Deneme\"))", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] [1200 :by 800]))", :offset 37, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"G]zel\"))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [1200 :by 800]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [200 :by 800]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 800]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 800]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 10]))", :offset 34, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 1000]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 200]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(doseq [a {:a 1 :b 2}]\n a)", :offset 26, :ns "user"} {:command "(doseq [a {:a 1 :b 2}]\n (println a))", :offset 35, :ns "user"} {:command "(doseq [[a b] {:a 1 :b 2}]\n (println a b))", :offset 41, :ns "user"} {:command "(doseq [[x y] {:a {:b 2 :c 3}}]\n (println x y))", :offset 46, :ns "user"} {:command "(swap! title (fn [a] \"aaaa\"))", :offset 29, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"bbb\"))", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [1600 :by 200]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 100]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 200]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 400]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(def chp (atom 1))", :offset 16, :ns "user"} {:command "(compare-and-set! chp 2)", :offset 23, :ns "user"} {:command "(compare-and-set! chp 1 2)", :offset 24, :ns "user"} {:command "(compare-and-set! chp 2 2)", :offset 23, :ns "user"} {:command "(compare-and-set! chp 3 2)", :offset 23, :ns "user"} {:command "(reset! chp 8)", :offset 13, :ns "user"} {:command "(swap! title (fn [a] \"bbb22\"))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a ] a) \"ses\")", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] a) \"ses\" \"aa\")", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] a) )", :offset 25, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] a) \"aa\")", :offset 29, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title str/capitalize)", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title str/upper-case)", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title str/lower-case)", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"deneme\")", :offset 23, :ns "seesaw.wiki.c-3-widgets"} {:command "(def kkk (satom 1))", :offset 19, :ns "seesaw.wiki.c-3-widgets"} {:command "(defn- apply-setter\n [this val]\n (doseq [[ins m] (get @s this)]\n (doseq [opt (vals m)]\n (if-let [setter (:setter opt)]\n (do\n (setter ins val)\n val)\n (illegal-argument \"No setter found for option %s\" (:name opt))))))", :offset 257, :ns "seesaw.options"} {:command "(defn- apply-setter\n [this val]\n (doseq [[ins m] (get @s this)]\n (doseq [opt (vals m)]\n (if-let [setter (:setter opt)]\n (setter ins val)\n (illegal-argument \"No setter found for option %s\" (:name opt)))))\n val)", :offset 234, :ns "seesaw.options"} {:command "(def kkk (op/satom 1))", :offset 22, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! kkk inc)", :offset 15, :ns "seesaw.wiki.c-3-widgets"} {:command "(def title (op/satom \"Ertus\"))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(def size (op/satom [650 :by 450]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content title\n :size size\n :visible? true)", :offset 127, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 500]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 300]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Ses ver\")", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Ses ver Türkiye!!!\")", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Aga selam\")", :offset 26, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Ataturk\")", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Deneme\")", :offset 23, :ns "seesaw.wiki.c-3-widgets"} {:command "(def kkk (op/satom {}))", :offset 23, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! kkk assoc-in [:a :b :c] 1)", :offset 33, :ns "seesaw.wiki.c-3-widgets"} {:command "@op/s", :offset 5, :ns "seesaw.wiki.c-3-widgets"} {:command "(vals (get @op/s title))", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(get @op/s title)", :offset 17, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Denemesa\")", :offset 25, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Hey\")", :offset 20, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [15000 :by 300]))", :offset 37, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [1500 :by 300]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [150 :by 300]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :menubar\n (sw/menubar :items\n [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])]))", :offset 170, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :visible? true\n :menubar\n (sw/menubar :items\n [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])]))", :offset 213, :ns "seesaw.wiki.c-3-widgets"} {:command "(def file (op/satom \"File\"))", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :visible? true\n :menubar\n (sw/menubar :items\n [(sw/menu :text file :items [])\n (sw/menu :text \"Edit\" :items [])]))", :offset 211, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! file \"Aga\")", :offset 19, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! file \"File\")", :offset 20, :ns "seesaw.wiki.c-3-widgets"} {:command "(def items (op/satom [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])\n (sw/menu :text \"Exit\" :items [])]))", :offset 167, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :visible? true\n :menubar\n (sw/menubar :items\n items))", :offset 128, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! items [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])\n (sw/menu :text \"Exit 2\" :items [])])", :offset 147, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! items [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])])", :offset 97, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! items [(sw/menu :text \"File\" :items [])])", :offset 49, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/menubar :items\n [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])\n (sw/menu :text \"Exit\" :items [])])", :offset 158, :ns "seesaw.wiki.c-3-widgets"} {:command "(defn setup-reference*\n [^clojure.lang.ARef r options]\n (let [opts (apply hash-map options)]\n (when (:meta opts)\n (.resetMeta r (:meta opts)))\n (when (:validator opts)\n (.setValidator r (:validator opts)))\n r))", :offset 231, :ns "seesaw.options"} {:command "(defn satom\n ([x] (SAtom. (atom x) nil nil nil))\n ([x & options] (setup-reference* (satom x) options)))", :offset 105, :ns "seesaw.options"} {:command "(def a (satom {}))", :offset 18, :ns "seesaw.options"} {:command "(ns ^{:doc \"Functions for dealing with options.\"\n :author \"Dave Ray\"}\nseesaw.options\n (:use [seesaw.util :only [camelize illegal-argument check-args\n resource resource-key?]])\n (:import (clojure.lang IAtom IDeref IMeta IRef)))", :offset 263, :ns "user"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this (swap! state f)))\n (swap [this f x]\n (apply-setter this (swap! state f x)))\n (swap [this f x y]\n (apply-setter this (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this new)))\n (reset [this new]\n (apply-setter this (reset! state new)))\n\n IDeref\n (deref [this]\n @state)\n\n IRef\n (addWatch [this k call]\n (.addWatch state k call))\n (removeWatch [this k]\n (.removeWatch state k))\n\n IMeta\n (meta [_] meta))", :offset 669, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this (swap! state f)))\n (swap [this f x]\n (apply-setter this (swap! state f x)))\n (swap [this f x y]\n (apply-setter this (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this new)))\n (reset [this new]\n (apply-setter this (reset! state new)))\n\n IDeref\n (deref [this]\n @state)\n\n IRef\n (addWatch [this k call]\n (.addWatch this k call))\n (removeWatch [this k]\n (.removeWatch this k))\n\n IMeta\n (meta [_] meta))", :offset 667, :ns "seesaw.options"} {:command "(add-watch a :watcher\n (fn [key atom old-state new-state]\n (prn \"-- Atom Changed --\")\n (prn \"key\" key)\n (prn \"atom\" atom)\n (prn \"old-state\" old-state)\n (prn \"new-state\" new-state)))", :offset 251, :ns "seesaw.options"} {:command "(.getWatches)", :offset 13, :ns "seesaw.options"} {:command "(.getWatches a)", :offset 15, :ns "seesaw.options"} {:command "(remove-watch a :watcher)", :offset 25, :ns "seesaw.options"} {:command "(reset! a {:foo \"bar\"})", :offset 23, :ns "seesaw.options"} {:command "(defprotocol IGetK\n (get-k [this & k] \"Gets the satom's key\")\n (get-k-in [this ks] \"Gets the satom's neste key\"))", :offset 36, :ns "user"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this state (swap! state f)))\n (swap [this f x]\n (apply-setter this state (swap! state f x)))\n (swap [this f x y]\n (apply-setter this state (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this state (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this state new)))\n (reset [this new]\n (apply-setter this state (reset! state new)))\n\n IDeref\n (deref [_]\n @state)\n\n IRef\n (addWatch [_ k call]\n (.addWatch state k call))\n (removeWatch [_ k]\n (.removeWatch state k))\n\n IGetK\n (get-k [this & ks]\n {:satom this :key ks})\n\n IMeta\n (meta [_] meta))", :offset 753, :ns "seesaw.options"} {:command "(defprotocol IGetK\n (get-k [this k & ks]))", :offset 43, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this state (swap! state f)))\n (swap [this f x]\n (apply-setter this state (swap! state f x)))\n (swap [this f x y]\n (apply-setter this state (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this state (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this state new)))\n (reset [this new]\n (apply-setter this state (reset! state new)))\n\n IDeref\n (deref [_]\n @state)\n\n IRef\n (addWatch [_ k call]\n (.addWatch state k call))\n (removeWatch [_ k]\n (.removeWatch state k))\n\n IGetK\n (get-k [this k & ks]\n {:satom this :key (cons k ks)})\n\n IMeta\n (meta [_] meta))", :offset 764, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this state (swap! state f)))\n (swap [this f x]\n (apply-setter this state (swap! state f x)))\n (swap [this f x y]\n (apply-setter this state (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this state (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this state new)))\n (reset [this new]\n (apply-setter this state (reset! state new)))\n\n IDeref\n (deref [_]\n @state)\n\n IRef\n (addWatch [_ k call]\n (.addWatch state k call))\n (removeWatch [_ k]\n (.removeWatch state k))\n\n IGetK\n (get-k [this k & ks]\n {:satom this :keys (cons k ks)})\n\n IMeta\n (meta [_] meta))", :offset 765, :ns "seesaw.options"} {:command "(map? {:A 1})", :offset 11, :ns "user"} {:command "(map? [:a 1])", :offset 11, :ns "user"} {:command "(def oo (op/satoms {:title \"<Menu>\"}))", :offset 38, :ns "seesaw.wiki.c-3-widgets"} {:command "(def size (op/satom {:as 12}))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title :a)\n :visible? true)", :offset 66, :ns "seesaw.wiki.c-3-widgets"} {:command "@oo", :offset 3, :ns "seesaw.wiki.c-3-widgets"} {:command "(def ooo (Option. :a nil nil nil))", :offset 34, :ns "seesaw.options"} {:command "ooo", :offset 3, :ns "seesaw.options"} {:command "(assoc ooo :ass \"sie\")", :offset 22, :ns "seesaw.options"} {:command "(sw/frame :title oo\n :visible? true)", :offset 45, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo \"asd\")", :offset 17, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! oo (fn [a] \"Ertu\"))", :offset 26, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo \"asdadadada\")", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(defn- apply-setter\n [this old-val new-val]\n (when-not (= old-val new-val)\n (println \"come\")\n (println this)\n (doseq [[ins m] (get @satoms this)]\n (println \"yy\")\n (doseq [opt (vals m)]\n (println \"aaa\")\n (if-let [setter (:setter opt)]\n (setter ins new-val)\n (illegal-argument \"No setter found for option %s\" (:name opt))))))\n new-val)", :offset 387, :ns "seesaw.options"} {:command "(reset! oo \"asdadadada22\")", :offset 26, :ns "seesaw.wiki.c-3-widgets"} {:command "oo", :offset 2, :ns "seesaw.wiki.c-3-widgets"} {:command "(def oo (op/satom {:title \"<Menu>\"}))", :offset 37, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title)\n :visible? true)", :offset 63, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title \"Deneme\"})", :offset 29, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title \"Deneme 22\"})", :offset 32, :ns "seesaw.wiki.c-3-widgets"} {:command "(def m {:a {:b {:c 3}}})", :offset 20, :ns "user"} {:command "(apply get-in m :a :b :c)", :offset 24, :ns "user"} {:command "(apply get-in [m :a :b :c])", :offset 25, :ns "user"} {:command "(apply get-in [m [:a :b :c]])", :offset 26, :ns "user"} {:command "(merge [m '(1 2 3)])", :offset 17, :ns "user"} {:command "(merge [[:a] '(1 2 3)])", :offset 11, :ns "user"} {:command "(merge '[l] [[:a :b]])", :offset 19, :ns "user"} {:command "(cons {:a 1} [:a :b :c])", :offset 22, :ns "user"} {:command "(reset! oo {:title {:name \"Menu 22 23\"}})", :offset 41, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Menu 22 \"}})", :offset 39, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Menu 22\"}})", :offset 38, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Menu\"}})", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo [:title :name])\n :visible? true)", :offset 71, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can Selam\"}})", :offset 40, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can s\"}})", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can2\"}})", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can23\"}})", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can\"}})", :offset 34, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Kerem\"}})", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo [:title ])\n :size [640 :by 400]\n :visible? true)", :offset 96, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title)\n :size [640 :by 400]\n :visible? true)", :offset 93, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo )\n :size [640 :by 400]\n :visible? true)", :offset 87, :ns "seesaw.wiki.c-3-widgets"} {:command "(defprotocol IGetK\n (get-k [this & ks]))", :offset 41, :ns "user"} {:command "(deftype SAtom [state meta validator watches]\n IGetK\n (get-k [this & ks]\n {:satom this :keys (vec ks)}))", :offset 108, :ns "user"} {:command "(SAtom. nil nil nil nil)", :offset 23, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil))", :offset 31, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b)", :offset 37, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b :c :D\n )", :offset 51, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b :c)", :offset 40, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b )", :offset 38, :ns "user"} {:command "(defn as\n [& k]\n (vec k))", :offset 25, :ns "user"} {:command "(as 1 2 3)", :offset 9, :ns "user"} {:command "(deftype SAtom []\n IGetK\n (get-k [this & ks]\n {:satom this :keys (vec ks)}))", :offset 16, :ns "user"} {:command "(get-k (SAtom. ) :a :b )", :offset 15, :ns "user"} {:command "(get-k (SAtom.) :a :b )", :offset 14, :ns "user"} {:command "(get-k (SAtom.) :a)", :offset 18, :ns "user"} {:command "(sw/frame :title (op/get-k oo [:title :name])\n :size [640 :by 400]\n :visible? true)", :offset 101, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Keremcik\"}})", :offset 39, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Keremcik a\"}})", :offset 41, :ns "seesaw.wiki.c-3-widgets"} {:command "(cons :a nil)", :offset 12, :ns "user"} {:command "(defn get-k\n [^SAtom a k & ks]\n {:satom a :keys (cons k ks)})", :offset 63, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :title)", :offset 38, :ns "user"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]\n [seesaw.options :as op]\n [seesaw.wiki.util :as util]\n [clojure.string :as str]))", :offset 175, :ns "user"} {:command "(def oo (op/satom {:title {:name \"Menu\"}}))", :offset 43, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title :name)\n :size [640 :by 400]\n :visible? true)", :offset 99, :ns "seesaw.wiki.c-3-widgets"} {:command "(def a (op/get-k oo :title :name))", :offset 34, :ns "seesaw.wiki.c-3-widgets"} {:command "(def aa (op/get-k oo :title :name))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "aa", :offset 2, :ns "seesaw.wiki.c-3-widgets"}], :remote []}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1510870004380 + + + 1530117175994 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No facets are configured + + + + + + + + scala-sdk-2.11.7 + + + + + + + + 1.8 (1) + + + + + + + + seesaw + + + + + + + + 1.8 + + + + + + + + Leiningen: clojure-complete:0.2.4 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.nrepl-port b/.nrepl-port new file mode 100644 index 00000000..ca4be4ac --- /dev/null +++ b/.nrepl-port @@ -0,0 +1 @@ +60201 \ No newline at end of file diff --git a/seesaw.iml b/seesaw.iml new file mode 100644 index 00000000..06df9c2d --- /dev/null +++ b/seesaw.iml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From bc8d8f234dd86601af2f64114a78a6758dbfe223 Mon Sep 17 00:00:00 2001 From: ertugrulcetin Date: Wed, 27 Jun 2018 19:40:53 +0300 Subject: [PATCH 03/10] removed files --- .idea/workspace.xml | 123 +++++++------------------------------------- 1 file changed, 20 insertions(+), 103 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8f9f8d61..35e527ab 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,39 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + - + - - + + @@ -74,7 +42,7 @@ - + @@ -96,7 +64,7 @@ - + @@ -105,7 +73,7 @@ - + @@ -252,56 +220,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -353,7 +271,7 @@ - {:repl-history {:ide [], :local [{:command "(com.sun.javafx.application.PlatformImpl/runLater (fn [_]\n (javafx.stage.Stage.)))", :offset 49, :ns "user"} {:command "(let [cls (Class/forName \"javafx.scene.control.ListCell\" false (clojure.lang.RT/baseLoader))] (.importClass *ns* cls))", :offset 21, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage.\" false (clojure.lang.RT/baseLoader))] (.importClass *ns* cls))", :offset 45, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))] (.importClass *ns* cls))", :offset 44, :ns "user"} {:command "cls", :offset 3, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)\n cls)", :offset 114, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)\n (.newInstance cls))", :offset 128, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)\n (.newInstance (.importClass *ns* cls)))", :offset 148, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls))", :offset 108, :ns "user"} {:command "(type (let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)))", :offset 121, :ns "user"} {:command "(run-later\n (javafx.stage.Stage.)\n )", :offset 38, :ns "seesaw.wiki.c-4-containers"} {:command "(com.sun.javafx.application.PlatformImpl/startup (fn [_] (javafx.stage.Stage .)))", :offset 81, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (javafx.stage.Stage))", :offset 34, :ns "seesaw.wiki.c-4-containers"} {:command "(javax.swing.JButton.)", :offset 22, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (println \"As\"))", :offset 28, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (javafx.stage.Stage.))", :offset 35, :ns "seesaw.wiki.c-4-containers"} {:command "(javafx.stage.Stage.)", :offset 21, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (javafx.stage.Stage.)\n )", :offset 39, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (eval \"(javafx.stage.Stage.)\")\n )", :offset 48, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (sw/construct javafx.stage.Stage)\n )", :offset 51, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (let [c (sw/construct javafx.stage.Stage)]\n (type c)\n ))", :offset 75, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (let [c (sw/construct javafx.stage.Stage)]\n (println (type c))\n ))", :offset 85, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (let [c (sw/construct javafx.stage.Stage)]\n (println (.newInstance javafx.stage.Stage))\n ))", :offset 110, :ns "seesaw.wiki.c-4-containers"} {:command "(extend-listener-protocol AddChangeListener add-change-listener addChangeListener\n javax.swing.BoundedRangeModel\n javax.swing.JProgressBar\n javax.swing.JSlider\n javax.swing.JTabbedPane\n javax.swing.JViewport\n javax.swing.AbstractButton\n javax.swing.SingleSelectionModel\n javax.swing.SpinnerModel\n javax.swing.JSpinner\n javax.swing.ButtonModel)", :offset 353, :ns "seesaw.event"} {:command "event-groups-by-listener-class", :offset 30, :ns "seesaw.event"} {:command "(defn camelize\n \"Convert input string to camelCase from hyphen-case\"\n [s]\n (clojure.string/replace s #\"-(.)\" #(.toUpperCase ^String (%1 1))))\n(-> :drag-mouse-moved name camelize symbol)", :offset 144, :ns "user"} {:command "(ns ^{:doc \"Functions for handling events. Do not use these functions directly.\n Use (seesaw.core/listen) instead.\"\n :author \"Dave Ray\"}\n seesaw.event\n (:use [seesaw.meta :only [put-meta! get-meta]]\n [seesaw.util :only [camelize illegal-argument to-seq check-args]])\n (:import [javax.swing.event ChangeListener\n CaretListener DocumentListener\n ListSelectionListener\n TreeSelectionListener TreeExpansionListener TreeWillExpandListener TreeModelListener\n HyperlinkListener]\n [javax.swing.text Document]\n [java.awt.event WindowListener FocusListener ActionListener ItemListener\n MouseListener MouseMotionListener MouseWheelListener\n KeyListener ComponentListener]\n [java.beans PropertyChangeListener]))", :offset 849, :ns "user"} {:command "(defmacro ^{:private true } extend-listener-protocol [proto proto-method java-method & classes]\n `(extend-protocol ~proto\n ~@(mapcat (fn [c] `(~c (~proto-method [this# v#] (. this# ~java-method v#)))) classes)))", :offset 216, :ns "seesaw.event"} {:command "(defprotocol ^{:private true} AddChangeListener\n (add-change-listener [this l]))", :offset 81, :ns "seesaw.event"} {:command "(defprotocol ^{:private true} AddActionListener\n (add-action-listener [this v]))", :offset 81, :ns "seesaw.event"} {:command "(defprotocol ^{:private true} AddListSelectionListener\n (add-list-selection-listener [this v]))", :offset 96, :ns "seesaw.event"} {:command "(macroexpand-1 '(extend-listener-protocol AddChangeListener add-change-listener addChangeListener\n javax.swing.BoundedRangeModel\n javax.swing.JProgressBar\n javax.swing.JSlider\n javax.swing.JTabbedPane\n javax.swing.JViewport\n javax.swing.AbstractButton\n javax.swing.SingleSelectionModel\n javax.swing.SpinnerModel\n javax.swing.JSpinner\n javax.swing.ButtonModel))", :offset 760, :ns "seesaw.event"} {:command "(extend-listener-protocol AddChangeListener add-change-listener addChangeListener\n javax.swing.BoundedRangeModel\n javax.swing.JProgressBar\n javax.swing.JSlider\n javax.swing.JTabbedPane\n javax.swing.JViewport\n javax.swing.AbstractButton\n javax.swing.SingleSelectionModel\n javax.swing.SpinnerModel\n javax.swing.JSpinner\n javax.swing.ButtonModel)", :offset 743, :ns "seesaw.event"} {:command "(extend-listener-protocol AddListSelectionListener add-list-selection-listener addListSelectionListener\n javax.swing.JList\n javax.swing.ListSelectionModel)", :offset 157, :ns "seesaw.event"} {:command "(extend-protocol AddListSelectionListener\n javax.swing.JTable\n (add-list-selection-listener [this l]\n (add-list-selection-listener (.getSelectionModel this) l)))", :offset 170, :ns "seesaw.event"} {:command "(def ^{:private true} event-groups {\n\n :component {\n :name :component\n :class ComponentListener\n :events #{:component-hidden\n :component-moved\n :component-resized\n :component-shown}\n :install #(.addComponentListener ^java.awt.Component %1 ^ComponentListener %2)\n }\n\n :property-change {\n :name :property-change\n :class PropertyChangeListener\n :events #{:property-change}\n :install #(.addPropertyChangeListener ^java.awt.Component %1 ^PropertyChangeListener %2)\n }\n :key {\n :name :key\n :class KeyListener\n :events #{:key-pressed :key-released :key-typed}\n :install #(.addKeyListener ^java.awt.Component %1 ^KeyListener %2)\n }\n :window {\n :name :window\n :class WindowListener\n :events #{:window-activated :window-deactivated\n :window-closed :window-closing :window-opened\n :window-deiconified :window-iconified}\n :install #(.addWindowListener ^java.awt.Window %1 ^WindowListener %2)\n }\n :focus {\n :name :focus\n :class FocusListener\n :events #{:focus-gained :focus-lost}\n :install #(.addFocusListener ^java.awt.Component %1 ^FocusListener %2)\n }\n :document {\n :name :document\n :class DocumentListener\n :events #{:changed-update :insert-update :remove-update}\n :install (fn [target listener]\n (.addDocumentListener\n (if (instance? Document target)\n ^Document target\n (.getDocument ^javax.swing.text.JTextComponent target))\n ^DocumentListener listener))\n }\n :caret {\n :name :caret\n :class CaretListener\n :events #{:caret-update}\n :install #(.addCaretListener ^javax.swing.text.JTextComponent %1 ^CaretListener %2)\n }\n :action {\n :name :action\n :class ActionListener\n :events #{:action-performed}\n :install add-action-listener\n }\n :change {\n :name :change\n :class ChangeListener\n :events #{:state-changed}\n :install add-change-listener\n }\n :item {\n :name :item\n :class ItemListener\n :events #{:item-state-changed}\n :install #(.addItemListener ^java.awt.ItemSelectable %1 ^ItemListener %2)\n }\n :mouse {\n :name :mouse\n :class MouseListener\n :events #{:mouse-clicked :mouse-entered :mouse-exited :mouse-pressed :mouse-released}\n :install #(.addMouseListener ^java.awt.Component %1 ^MouseListener %2)\n }\n :mouse-motion {\n :name :mouse-motion\n :class MouseMotionListener\n :events #{:mouse-moved :mouse-dragged}\n :install #(.addMouseMotionListener ^java.awt.Component %1 ^MouseMotionListener %2)\n }\n :mouse-wheel {\n :name :mouse-wheel\n :class MouseWheelListener\n :events #{:mouse-wheel-moved}\n :install #(.addMouseWheelListener ^java.awt.Component %1 ^MouseWheelListener %2)\n }\n :list-selection {\n :name :list-selection\n :class ListSelectionListener\n :events #{:value-changed}\n :named-events #{:list-selection} ; Suppress reversed map entry\n :install add-list-selection-listener\n }\n :tree-selection {\n :name :tree-selection\n :class TreeSelectionListener\n :events #{:value-changed}\n :named-events #{:tree-selection} ; Suppress reversed map entry\n :install #(.addTreeSelectionListener ^javax.swing.JTree %1 ^TreeSelectionListener %2)\n }\n :tree-expansion {\n :name :tree-expansion\n :class TreeExpansionListener\n :events #{:tree-expanded :tree-collapsed}\n :install #(.addTreeExpansionListener ^javax.swing.JTree %1 ^TreeExpansionListener %2)\n }\n ; Since one of the methods matches the listener name, we give the overall\n ; a slightly different name to distinguish registering for *all* events\n ; versus just one.\n :tree-will-expand* {\n :name :tree-will-expand*\n :class TreeWillExpandListener\n :events #{:tree-will-expand :tree-will-collapse}\n :install #(.addTreeWillExpandListener ^javax.swing.JTree %1 ^TreeWillExpandListener %2)\n }\n :tree-model {\n :name :tree-model\n :class TreeModelListener\n :events #{:tree-nodes-changed :tree-nodes-inserted :tree-nodes-removed :tree-structure-changed}\n :install #(.addTreeModelListener ^javax.swing.tree.TreeModel %1 ^TreeModelListener %2)\n }\n\n :drag-source {\n :name :drag-source\n :class java.awt.dnd.DragSourceListener\n :events #{:drag-drop-end :drag-enter :drag-exit :drag-over :drop-action-changed}\n ; Names are mostly the same as DragTarget events, so prefix with ds-\n ; See event-method-table below too!\n :named-events #{:ds-drag-drop-end :ds-drag-enter :ds-drag-exit :ds-drag-over :ds-drop-action-changed}\n :install #(.addDragSourceListener ^java.awt.dnd.DragSource %1 ^java.awt.dnd.DragSourceListener %2)\n }\n\n :drag-source-motion {\n :name :drag-source-motion\n :class java.awt.dnd.DragSourceMotionListener\n :events #{:drag-mouse-moved}\n :install #(.addDragSourceMotionListener ^java.awt.dnd.DragSource %1 ^java.awt.dnd.DragSourceMotionListener %2)\n }\n\n :drop-target {\n :name :drop-target\n :class java.awt.dnd.DropTargetListener\n :events #{:drag-enter :drag-exit :drag-over :drop :drop-action-changed}\n ; Names are mostly the same as DragSource events, so prefix with dt-\n ; See event-method-table below too!\n :named-events #{:dt-drag-enter :dt-drag-exit :dt-drag-over :dt-drop :dt-drop-action-changed}\n :install #(.addDropTargetListener ^java.awt.dnd.DropTarget %1 ^java.awt.dnd.DropTargetListener %2)\n }\n\n :hyperlink {\n :name :hyperlink\n :class HyperlinkListener\n :events #{:hyperlink-update}\n :install #(.addHyperlinkListener ^javax.swing.JEditorPane %1\n ^HyperlinkListener %2)\n }\n})", :offset 5808, :ns "seesaw.event"} {:command "(def ^{:private true} event-groups-by-listener-class\n (into {}\n (for [{:keys [class] :as group} (vals event-groups)]\n [class group])))", :offset 151, :ns "seesaw.event"} {:command "(defn- get-listener-class [^java.lang.reflect.Method m]\n (let [[arg] (.getParameterTypes m)]\n (if (and arg (.startsWith (.getName m) \"add\"))\n arg)))", :offset 157, :ns "seesaw.event"} {:command "(defn events-for\n \"Returns a sequence of event info maps for the given object which can\n be either a widget instance or class.\n\n Used by (seesaw.dev/show-events).\n\n See:\n (seesaw.dev/show-events)\n \"\n [v]\n (let [base (->> (.getMethods (if (class? v) ^java.lang.Class v (class v)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install)))\n selection (selection-group-for v)]\n (if selection\n (cons selection base)\n base)))", :offset 593, :ns "seesaw.event"} {:command "(seesaw.core/label)", :offset 19, :ns "seesaw.event"} {:command "(require 'seesaw.core)", :offset 22, :ns "seesaw.event"} {:command "(class \"as\")", :offset 12, :ns "seesaw.event"} {:command "(defn events-for\n \"Returns a sequence of event info maps for the given object which can\n be either a widget instance or class.\n\n Used by (seesaw.dev/show-events).\n\n See:\n (seesaw.dev/show-events)\n \"\n [v]\n (let [base (->> (.getMethods (if (class? v) ^java.lang.Class v (class v)))\n (map #(do\n (println (get-listener-class %))\n (get-listener-class %)))\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install)))\n selection (selection-group-for v)]\n (if selection\n (cons selection base)\n base)))", :offset 682, :ns "seesaw.event"} {:command "(.getMethods (class \"As\"))", :offset 26, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class \"As\"))]\n (println m)\n )", :offset 55, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class \"As\"))]\n (println (get-listener-class m))\n )", :offset 76, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (println (get-listener-class m)))", :offset 88, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (get-listener-class m)]\n (println l)))", :offset 109, :ns "seesaw.event"} {:command "(filter identity [nil nil 1 2 nil])", :offset 35, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (get-listener-class m)]\n (println (map event-groups-by-listener-class l))))", :offset 146, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n )", :offset 205, :ns "seesaw.event"} {:command "(clojure.pprint/pprint event-groups-by-listener-class)", :offset 54, :ns "seesaw.event"} {:command "(count (.getMethods (class (seesaw.core/label))))", :offset 49, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n ;(map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n )", :offset 206, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n ;(map #(dissoc % :install))\n )", :offset 204, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install))\n )", :offset 203, :ns "seesaw.event"} {:command "(defn events-for\n \"Returns a sequence of event info maps for the given object which can\n be either a widget instance or class.\n\n Used by (seesaw.dev/show-events).\n\n See:\n (seesaw.dev/show-events)\n \"\n [v]\n (let [base (->> (.getMethods (if (class? v) ^java.lang.Class v (class v)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install)))\n selection (selection-group-for v)]\n (if selection\n (cons selection base)\n base)))", :offset 638, :ns "seesaw.event"} {:command "(events-for (seesaw.core/label))", :offset 32, :ns "seesaw.event"} {:command "(util/show-events (saw/button))", :offset 31, :ns "seesaw.wiki.c-1-home-page"} {:command "(util/show-events (saw/label))", :offset 30, :ns "seesaw.wiki.c-1-home-page"} {:command "(apply + [1 2])", :offset 13, :ns "user"} {:command "(apply + [1 2] [3])", :offset 17, :ns "user"} {:command "apply", :offset 5} {:command "(apply + [1 2] 3)", :offset 16, :ns "user"} {:command "(apply + [1 2] [2])", :offset 17, :ns "user"} {:command "(apply + [1 2] [[2]])", :offset 18, :ns "user"} {:command "(apply + [1 2] [])", :offset 16, :ns "user"} {:command "(defn- get-listener-class-2 [^java.lang.reflect.Method m]\n (let [[arg] (.getParameterTypes m)]\n (if (and arg (.startsWith (.getName m) \"setOn\"))\n arg)))", :offset 161, :ns "seesaw.event"} {:command "(defn- get-listener-class-2 [^java.lang.reflect.Method m]\n (let [[arg] (.getParameterTypes m)]\n (if (and arg (.startsWith (.getName m) \"setOn\"))\n (.getName m))))", :offset 170, :ns "seesaw.event"} {:command "(->> (.getMethods javafx.scene.Node)\n (map get-listener-class-2)\n (filter identity)\n ;(map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n )", :offset 198, :ns "seesaw.event"} {:command "(apply + [1 2] )", :offset 15, :ns "user"} {:command "(count(->> (.getMethods javafx.scene.Node)\n (map get-listener-class-2)\n (filter identity)\n ;(map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n ))", :offset 211, :ns "seesaw.event"} {:command "^java.awt.Component", :offset 19, :ns "user"} {:command "(merge {:a 1} {:b 2})", :offset 19, :ns "user"} {:command "(merge {:a {:b 3\n :c 3}} {:b 2})", :offset 43, :ns "user"} {:command "(merge {:a {:b 3\n :c 3}} {:a {:b 2}})", :offset 45, :ns "user"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (.getParameterTypes m)]\n (println l)))", :offset 109, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0))))", :offset 118, :ns "seesaw.event"} {:command "(doseq [m (.getMethods javafx.scene.control.ButtonBase)]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0))))", :offset 122, :ns "seesaw.event"} {:command "(.getMethods javafx.scene.control.ButtonBase)", :offset 45, :ns "seesaw.event"} {:command "(.getDeclaredMethods javafx.scene.control.ButtonBase)", :offset 53, :ns "seesaw.event"} {:command "(class javafx.scene.control.ButtonBase)", :offset 39, :ns "seesaw.event"} {:command "(Class/forName \"javafx.scene.control.ButtonBase\")", :offset 49, :ns "seesaw.event"} {:command "(run-later\n (doseq [m (.getDeclaredMethods (Class/forName \"javafx.scene.control.ButtonBase\"))]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0)))))", :offset 166, :ns "seesaw.wiki.c-4-containers"} {:command "(.getMethods (Class/forName \"javafx.scene.control.ButtonBase\"))", :offset 63, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (doseq [m (.getMethods (Class/forName \"javafx.scene.control.ButtonBase\"))]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0)))))", :offset 158, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (.getMethods (Class/forName \"javafx.scene.control.ButtonBase\")))", :offset 77, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (.getMethods javafx.scene.control.ButtonBase))", :offset 59, :ns "seesaw.wiki.c-4-containers"} {:command "(Class/forName \"javafx.scene.control.Button\")", :offset 45, :ns "seesaw.event"} {:command "(.getDeclaredMethods javafx.scene.control.Button)", :offset 49, :ns "seesaw.event"} {:command "(.getMethods javafx.scene.control.Button)", :offset 41, :ns "seesaw.event"} {:command "(run-later\n (.getMethods javafx.scene.control.Button))", :offset 55, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n javafx.scene.control.Button)", :offset 41, :ns "seesaw.wiki.c-4-containers"} {:command "(.getMethods javafx.scene.layout VBox)", :offset 38, :ns "seesaw.event"} {:command "(.getMethods javafx.scene.layout.VBox)", :offset 38, :ns "seesaw.event"} {:command "(ns seesaw.wiki.c-4-containers\n (:require [seesaw.core :as sw :refer :all]\n [seesaw.mig :as mig]\n [seesaw.bind :as b]\n [seesaw.wiki.util :as util])\n (:import (javafx.application Platform)\n (java.lang.reflect Constructor Parameter)))", :offset 277, :ns "user"} {:command "(ns sadas)", :offset 10, :ns "seesaw.wiki.c-4-containers"} {:command "(defmacro run-later [& body]\n `(-run-later\n (fn []\n (try ~@body\n (catch Throwable ex#\n (println ex#))))))", :offset 140, :ns "seesaw.wiki.c-4-containers"} {:command "(in-ns 'user)", :offset 13, :ns "seesaw.wiki.c-4-containers"} {:command "(javafx.embed.swing.JFXPanel.)", :offset 30, :ns "seesaw.wiki.c-4-containers"} {:command "(Platform/setImplicitExit false)", :offset 32, :ns "seesaw.wiki.c-4-containers"} {:command "(defn -run-later [^java.lang.Runnable fn]\n (if (Platform/isFxApplicationThread)\n (do\n (println \"aaa\")\n (fn))\n (Platform/runLater fn)))", :offset 152, :ns "seesaw.wiki.c-4-containers"} {:command "\n\n(javafx.embed.swing.JFXPanel.)\n(javafx.application.Platform/setImplicitExit false)\n\n(defn -run-later [^java.lang.Runnable fn]\n (if (Platform/isFxApplicationThread)\n (do\n (println \"aaa\")\n (fn))\n (Platform/runLater fn)))\n\n(defmacro run-later [& body]\n `(-run-later\n (fn []\n (try ~@body\n (catch Throwable ex#\n (println ex#))))))", :offset 380, :ns "user"} {:command "javafx.application.Platform", :offset 27, :ns "user"} {:command "(javafx.application.Platform/setImplicitExit false)\n", :offset 52, :ns "user"} {:command "\n(defn -run-later [^java.lang.Runnable fn]\n (if (Platform/isFxApplicationThread)\n (do\n (println \"aaa\")\n (fn))\n (Platform/runLater fn)))\n\n(defmacro run-later [& body]\n `(-run-later\n (fn []\n (try ~@body\n (catch Throwable ex#\n (println ex#))))))\n", :offset 296, :ns "user"} {:command "(run-later\n (type javafx.scene.control.Button))", :offset 48, :ns "user"} {:command "(run-later\n (println (type javafx.scene.control.Button)))", :offset 56, :ns "user"} {:command "(run-later\n (println (.getMethods javafx.scene.control.Button)))", :offset 34, :ns "user"} {:command "(seesaw.core/user-data)", :offset 23, :ns "seesaw.core"} {:command "(def m {:a \"Example doc string\"})", :offset 30, :ns "user"} {:command "(defn a\n (:a m)\n [x y]\n (+ x y))", :offset 33, :ns "user"} {:command "(defmacro my-defn \n [] \n )", :offset 17} {:command "(let [doc (:a m)] \n (defn a\n doc\n [x y]\n (+ x y)))", :offset 36, :ns "user"} {:command "(let [doc (:a m)] \n (defn a\n ~doc\n [x y]\n (+ x y)))", :offset 34, :ns "user"} {:command "(let [doc (:a m)] \n (defn a\n \"ok\"\n [x y]\n (+ x y)))", :offset 36, :ns "user"} {:command "(defmacro my-defn \n [doc] \n `(defn my-fn ~doc []))", :offset 47, :ns "user"} {:command "(my-defn \"ses\")", :offset 13, :ns "user"} {:command "(meta (var my-fn))", :offset 16, :ns "user"} {:command "(ns ^{:doc\n\"Core functions and macros for Seesaw. Although there are many more\n Seesaw namespaces, usually what you want is in here. Most functions\n in other namespaces have a core wrapper which adds additional\n capability or makes them easier to use.\"\n :author \"Dave Ray\"}\n seesaw.core\n (:use [seesaw.util :only [illegal-argument to-seq check-args\n constant-map resource resource-key?\n to-dimension to-insets to-url try-cast\n cond-doto to-mnemonic-keycode]]\n [seesaw.config :only [Configurable config* config!*]]\n [seesaw.options :only [ignore-option default-option bean-option\n resource-option around-option\n apply-options\n option-map option-provider\n get-option-value]]\n [seesaw.widget-options :only [widget-option-provider]]\n [seesaw.meta :only [get-meta put-meta!]]\n [seesaw.to-widget :only [ToWidget to-widget*]]\n [seesaw.make-widget :only [make-widget*]])\n (:require clojure.java.io\n clojure.set\n [seesaw color font border invoke timer selection value\n event selector icon action cells table graphics cursor scroll dnd]\n [seesaw.layout :as layout])\n (:import [javax.swing\n SwingConstants UIManager ScrollPaneConstants DropMode\n BoxLayout\n JDialog JFrame JComponent Box JPanel JScrollPane JSplitPane JToolBar JTabbedPane\n JLabel JTextField JTextArea JTextPane\n AbstractButton JButton ButtonGroup\n JOptionPane]\n [javax.swing.text JTextComponent StyleConstants]\n [java.awt Component FlowLayout BorderLayout GridLayout\n GridBagLayout GridBagConstraints\n Dimension]))", :offset 1887, :ns "user"} {:command "(ns seesaw.wiki.c-1-home-page\n (:require [seesaw.core :as saw]\n [seesaw.event :as ev]\n [seesaw.options :as opt]\n [seesaw.wiki.util :as util]\n [clojure.string :as string]))", :offset 216, :ns "user"} {:command "(def p (sw/vertical-panel :items [\"This\" \"is\" \"a\" \"vertical\" \"stack of\" \"JLabels\"]))", :offset 84, :ns "seesaw.wiki.c-3-widgets"} {:command ":as", :offset 3, :ns "seesaw.wiki.c-3-widgets"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core]))", :offset 55, :ns "user"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]))", :offset 62, :ns "user"} {:command "(ns seesaw.widgets.log-window\n (:use [seesaw.core]\n [seesaw.bind :only [bind]]\n [seesaw.keymap :only [map-key]]\n [seesaw.invoke :only [signaller]]\n [seesaw.options :only [apply-options option-map default-option]]\n [seesaw.widget-options :only [WidgetOptionProvider]]))", :offset 304, :ns "user"} {:command "(def fl (let [choose (fn [e] (sw/alert \"I should open a file chooser\"))]\n (sw/flow-panel\n :items [\"File\" [:fill-h 5]\n (sw/text (System/getProperty \"user.dir\")) [:fill-h 5]\n (sw/action :handler choose :name \"...\")])))", :offset 274, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content (java.net.URL. \"https://github.com/daveray/seesaw/wiki/Widgets\")\n :size [640 :by 400]\n :visible? true)", :offset 195, :ns "seesaw.wiki.c-3-widgets"} {:command "(util/show-options (sw/label))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/button :id :the-button :text \"Push me\")", :offset 43, :ns "seesaw.wiki.c-3-widgets"} {:command "(def fl (let [choose (fn [e] (sw/alert \"I should open a file chooser\"))]pr\n (sw/flow-panel\n :items [\"File\" [:fill-h 5]\n (sw/text (System/getProperty \"user.dir\")) [:fill-h 5]\n (sw/action :handler choose :name \"...\")])))", :offset 276, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content fl\n :size [640 :by 400]\n :visible? true)", :offset 133, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content \"Saas\"\n :size [640 :by 400]\n :visible? true)", :offset 137, :ns "seesaw.wiki.c-3-widgets"} {:command "(def a (atom 1))", :offset 14, :ns "user"} {:command "(type @a)", :offset 8, :ns "user"} {:command "(.hashCode a)", :offset 12, :ns "user"} {:command "(.hashCode @a)", :offset 13, :ns "user"} {:command "(def b (atom 1))", :offset 6, :ns "user"} {:command "(.hashCode @b)", :offset 13, :ns "user"} {:command "(def o (Option. :deneme (fn [] ) (fn [] ) nil))", :offset 47, :ns "seesaw.options"} {:command "(def o2 (Option. :deneme (fn [] ) (fn [] ) nil))", :offset 48, :ns "seesaw.options"} {:command "(== o o2)", :offset 9, :ns "seesaw.options"} {:command "(= o o2)", :offset 8, :ns "seesaw.options"} {:command "(= o o)", :offset 7, :ns "seesaw.options"} {:command "(def m {o \"deneme\"})", :offset 20, :ns "seesaw.options"} {:command "(get m o)", :offset 9, :ns "seesaw.options"} {:command "( + 1 1)", :offset 7, :ns "user"} {:command "(def k (atom \"As\"))", :offset 16, :ns "user"} {:command "(def mm {k \"den\"})", :offset 15, :ns "user"} {:command "(get mm k)", :offset 9, :ns "user"} {:command "(ns ^{:doc\n \"Core functions and macros for Seesaw. Although there are many more\n Seesaw namespaces, usually what you want is in here. Most functions\n in other namespaces have a core wrapper which adds additional\n capability or makes them easier to use.\"\n :author \"Dave Ray\"}\nseesaw.core\n (:use [seesaw.util :only [illegal-argument to-seq check-args\n constant-map resource resource-key?\n to-dimension to-insets to-url try-cast\n cond-doto to-mnemonic-keycode]]\n [seesaw.config :only [Configurable config* config!*]]\n [seesaw.options :only [ignore-option default-option bean-option\n resource-option around-option\n apply-options\n option-map option-provider\n get-option-value]]\n [seesaw.widget-options :only [widget-option-provider]]\n [seesaw.meta :only [get-meta put-meta!]]\n [seesaw.to-widget :only [ToWidget to-widget*]]\n [seesaw.make-widget :only [make-widget*]])\n (:require clojure.java.io\n clojure.set\n [seesaw color font border invoke timer selection value\n event selector icon action cells table graphics cursor scroll dnd]\n [seesaw.layout :as layout])\n (:import [javax.swing\n SwingConstants UIManager ScrollPaneConstants DropMode\n BoxLayout\n JDialog JFrame JComponent Box JPanel JScrollPane JSplitPane JToolBar JTabbedPane\n JLabel JTextField JTextArea JTextPane\n AbstractButton JButton ButtonGroup\n JOptionPane]\n [javax.swing.text JTextComponent StyleConstants]\n [java.awt Component FlowLayout BorderLayout GridLayout\n GridBagLayout GridBagConstraints\n Dimension]\n (clojure.lang IAtom IDeref IMeta)))", :offset 1994, :ns "user"} {:command "(deftype SAtom [^:mutable state meta validator ^:mutable watches]\n IAtom\n\n\n IDeref\n (deref [this]\n (println \"Derefeedd!!!\")\n state)\n\n IMeta\n (meta [_] meta))", :offset 168, :ns "seesaw.core"} {:command "(defn stom\n ([x] (new SAtom x))\n ([x & options] (setup-reference (stom x) options)))", :offset 86, :ns "seesaw.core"} {:command "(defn stom\n ([x] (new SAtom))\n ([x & options] (setup-reference (stom x) options)))", :offset 84, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom.))\n ([x & options] (setup-reference (stom x) options)))", :offset 81, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (setup-reference (stom x) options)))", :offset 95, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (#'setup-reference (stom x) options)))", :offset 97, :ns "seesaw.core"} {:command "(defn s-reference \n [^clojure.lang.ARef r options]\n (let [opts (apply hash-map options)]\n (when (:meta opts)\n (.resetMeta r (:meta opts)))\n (when (:validator opts)\n (.setValidator r (:validator opts)))\n r))", :offset 227, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (s-reference (stom x) options)))", :offset 91, :ns "seesaw.core"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content \"Ertus\"\n :size [640 :by 400]\n :visible? true)", :offset 138, :ns "seesaw.wiki.c-3-widgets"} {:command "(deftype SAtom [^:mutable state meta validator ^:mutable watches]\n IAtom\n\n\n IDeref\n (deref [this]\n (println (type this))\n (println state)\n state)\n\n IMeta\n (meta [_] meta))", :offset 185, :ns "seesaw.core"} {:command "(defn satom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (s-reference (satom x) options)))", :offset 93, :ns "seesaw.core"} {:command "@ak", :offset 3, :ns "seesaw.core"} {:command "(deftype SAtom [state meta validator watches]\n IAtom\n (swap [this f]\n (swap! state f))\n (swap [this f x]\n (swap! state f x))\n (swap [this f x y]\n (swap! state f x y))\n (swap [this f x y args]\n (swap! state f x y args))\n (compareAndSet [this old new]\n (compare-and-set! state old new))\n (reset [this new]\n (reset! state new))\n\n IDeref\n (deref [this]\n (println (type this))\n @state)\n\n IMeta\n (meta [_] meta))", :offset 441, :ns "seesaw.core"} {:command "(def ak (satom 1))", :offset 18, :ns "seesaw.core"} {:command "(swap! ak inc)", :offset 14, :ns "seesaw.core"} {:command "(def kol (atom 5))", :offset 18, :ns "seesaw.core"} {:command "(swap! kol inc)", :offset 15, :ns "seesaw.core"} {:command "(type ak)", :offset 9, :ns "seesaw.core"} {:command "(val {:a 1})", :offset 10, :ns "user"} {:command "(vals {:a 1})", :offset 5, :ns "user"} {:command "(vals {:a {:b 1}})", :offset 15, :ns "user"} {:command "(first (vals {:a {:b 1}}))", :offset 25, :ns "user"} {:command "(ns ^{:doc \"Functions for dealing with options.\"\n :author \"Dave Ray\"}\nseesaw.options\n (:use [seesaw.util :only [camelize illegal-argument check-args\n resource resource-key?]])\n (:import (clojure.lang IAtom IDeref IMeta)))", :offset 258, :ns "user"} {:command "(def s (atom {}))", :offset 17, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n IAtom\n (swap [this f]\n (let [v (swap! state f)\n target-ins (get s state)\n options (vals (first (vals target-ins)))]\n (doseq [opt options]\n (if-let [setter (:setter opt)]\n (setter target-ins v)\n (illegal-argument \"No setter found for option %s\" (:name opt))))))\n (swap [this f x]\n (swap! state f x))\n (swap [this f x y]\n (swap! state f x y))\n (swap [this f x y args]\n (swap! state f x y args))\n (compareAndSet [this old new]\n (compare-and-set! state old new))\n (reset [this new]\n (reset! state new))\n\n IDeref\n (deref [this]\n (println (type this))\n @state)\n\n IMeta\n (meta [_] meta))", :offset 722, :ns "seesaw.options"} {:command "(defn s-reference\n [^clojure.lang.ARef r options]\n (let [opts (apply hash-map options)]\n (when (:meta opts)\n (.resetMeta r (:meta opts)))\n (when (:validator opts)\n (.setValidator r (:validator opts)))\n r))", :offset 226, :ns "seesaw.options"} {:command "(defn satom\n ([x] (SAtom. (atom x) nil nil nil))\n ([x & options] (s-reference (satom x) options)))", :offset 100, :ns "seesaw.options"} {:command "(def k (satom 1))", :offset 17, :ns "seesaw.options"} {:command "(type k)", :offset 8, :ns "seesaw.options"} {:command "(= seesaw.options.SAtom (type k))", :offset 33, :ns "seesaw.options"} {:command "(= seesaw.options.SAtom (class k))", :offset 34, :ns "seesaw.options"} {:command "(= SAtom (class k))", :offset 19, :ns "seesaw.options"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]\n [seesaw.wiki.util :as util]))", :offset 102, :ns "user"} {:command "@title", :offset 6, :ns "seesaw.wiki.c-3-widgets"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]\n [seesaw.options :as op]\n [seesaw.wiki.util :as util]))", :offset 138, :ns "user"} {:command "(def title (op/satom 1))", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content 12\n :size [640 :by 400]\n :visible? true)", :offset 133, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"DEneme\"))", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "op/s", :offset 4, :ns "seesaw.wiki.c-3-widgets"} {:command "(vals (first (vals (get @op/s title))))", :offset 39, :ns "seesaw.wiki.c-3-widgets"} {:command "(first (vals (get @op/s title)))", :offset 32, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content title\n :size [640 :by 400]\n :visible? true)", :offset 136, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"sesver\"))", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"Deneme\"))", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] [1200 :by 800]))", :offset 37, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"G]zel\"))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [1200 :by 800]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [200 :by 800]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 800]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 800]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 10]))", :offset 34, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 1000]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 200]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(doseq [a {:a 1 :b 2}]\n a)", :offset 26, :ns "user"} {:command "(doseq [a {:a 1 :b 2}]\n (println a))", :offset 35, :ns "user"} {:command "(doseq [[a b] {:a 1 :b 2}]\n (println a b))", :offset 41, :ns "user"} {:command "(doseq [[x y] {:a {:b 2 :c 3}}]\n (println x y))", :offset 46, :ns "user"} {:command "(swap! title (fn [a] \"aaaa\"))", :offset 29, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"bbb\"))", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [1600 :by 200]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 100]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 200]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 400]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(def chp (atom 1))", :offset 16, :ns "user"} {:command "(compare-and-set! chp 2)", :offset 23, :ns "user"} {:command "(compare-and-set! chp 1 2)", :offset 24, :ns "user"} {:command "(compare-and-set! chp 2 2)", :offset 23, :ns "user"} {:command "(compare-and-set! chp 3 2)", :offset 23, :ns "user"} {:command "(reset! chp 8)", :offset 13, :ns "user"} {:command "(swap! title (fn [a] \"bbb22\"))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a ] a) \"ses\")", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] a) \"ses\" \"aa\")", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] a) )", :offset 25, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] a) \"aa\")", :offset 29, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title str/capitalize)", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title str/upper-case)", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title str/lower-case)", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"deneme\")", :offset 23, :ns "seesaw.wiki.c-3-widgets"} {:command "(def kkk (satom 1))", :offset 19, :ns "seesaw.wiki.c-3-widgets"} {:command "(defn- apply-setter\n [this val]\n (doseq [[ins m] (get @s this)]\n (doseq [opt (vals m)]\n (if-let [setter (:setter opt)]\n (do\n (setter ins val)\n val)\n (illegal-argument \"No setter found for option %s\" (:name opt))))))", :offset 257, :ns "seesaw.options"} {:command "(defn- apply-setter\n [this val]\n (doseq [[ins m] (get @s this)]\n (doseq [opt (vals m)]\n (if-let [setter (:setter opt)]\n (setter ins val)\n (illegal-argument \"No setter found for option %s\" (:name opt)))))\n val)", :offset 234, :ns "seesaw.options"} {:command "(def kkk (op/satom 1))", :offset 22, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! kkk inc)", :offset 15, :ns "seesaw.wiki.c-3-widgets"} {:command "(def title (op/satom \"Ertus\"))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(def size (op/satom [650 :by 450]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content title\n :size size\n :visible? true)", :offset 127, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 500]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 300]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Ses ver\")", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Ses ver Türkiye!!!\")", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Aga selam\")", :offset 26, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Ataturk\")", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Deneme\")", :offset 23, :ns "seesaw.wiki.c-3-widgets"} {:command "(def kkk (op/satom {}))", :offset 23, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! kkk assoc-in [:a :b :c] 1)", :offset 33, :ns "seesaw.wiki.c-3-widgets"} {:command "@op/s", :offset 5, :ns "seesaw.wiki.c-3-widgets"} {:command "(vals (get @op/s title))", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(get @op/s title)", :offset 17, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Denemesa\")", :offset 25, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Hey\")", :offset 20, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [15000 :by 300]))", :offset 37, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [1500 :by 300]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [150 :by 300]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :menubar\n (sw/menubar :items\n [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])]))", :offset 170, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :visible? true\n :menubar\n (sw/menubar :items\n [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])]))", :offset 213, :ns "seesaw.wiki.c-3-widgets"} {:command "(def file (op/satom \"File\"))", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :visible? true\n :menubar\n (sw/menubar :items\n [(sw/menu :text file :items [])\n (sw/menu :text \"Edit\" :items [])]))", :offset 211, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! file \"Aga\")", :offset 19, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! file \"File\")", :offset 20, :ns "seesaw.wiki.c-3-widgets"} {:command "(def items (op/satom [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])\n (sw/menu :text \"Exit\" :items [])]))", :offset 167, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :visible? true\n :menubar\n (sw/menubar :items\n items))", :offset 128, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! items [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])\n (sw/menu :text \"Exit 2\" :items [])])", :offset 147, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! items [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])])", :offset 97, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! items [(sw/menu :text \"File\" :items [])])", :offset 49, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/menubar :items\n [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])\n (sw/menu :text \"Exit\" :items [])])", :offset 158, :ns "seesaw.wiki.c-3-widgets"} {:command "(defn setup-reference*\n [^clojure.lang.ARef r options]\n (let [opts (apply hash-map options)]\n (when (:meta opts)\n (.resetMeta r (:meta opts)))\n (when (:validator opts)\n (.setValidator r (:validator opts)))\n r))", :offset 231, :ns "seesaw.options"} {:command "(defn satom\n ([x] (SAtom. (atom x) nil nil nil))\n ([x & options] (setup-reference* (satom x) options)))", :offset 105, :ns "seesaw.options"} {:command "(def a (satom {}))", :offset 18, :ns "seesaw.options"} {:command "(ns ^{:doc \"Functions for dealing with options.\"\n :author \"Dave Ray\"}\nseesaw.options\n (:use [seesaw.util :only [camelize illegal-argument check-args\n resource resource-key?]])\n (:import (clojure.lang IAtom IDeref IMeta IRef)))", :offset 263, :ns "user"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this (swap! state f)))\n (swap [this f x]\n (apply-setter this (swap! state f x)))\n (swap [this f x y]\n (apply-setter this (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this new)))\n (reset [this new]\n (apply-setter this (reset! state new)))\n\n IDeref\n (deref [this]\n @state)\n\n IRef\n (addWatch [this k call]\n (.addWatch state k call))\n (removeWatch [this k]\n (.removeWatch state k))\n\n IMeta\n (meta [_] meta))", :offset 669, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this (swap! state f)))\n (swap [this f x]\n (apply-setter this (swap! state f x)))\n (swap [this f x y]\n (apply-setter this (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this new)))\n (reset [this new]\n (apply-setter this (reset! state new)))\n\n IDeref\n (deref [this]\n @state)\n\n IRef\n (addWatch [this k call]\n (.addWatch this k call))\n (removeWatch [this k]\n (.removeWatch this k))\n\n IMeta\n (meta [_] meta))", :offset 667, :ns "seesaw.options"} {:command "(add-watch a :watcher\n (fn [key atom old-state new-state]\n (prn \"-- Atom Changed --\")\n (prn \"key\" key)\n (prn \"atom\" atom)\n (prn \"old-state\" old-state)\n (prn \"new-state\" new-state)))", :offset 251, :ns "seesaw.options"} {:command "(.getWatches)", :offset 13, :ns "seesaw.options"} {:command "(.getWatches a)", :offset 15, :ns "seesaw.options"} {:command "(remove-watch a :watcher)", :offset 25, :ns "seesaw.options"} {:command "(reset! a {:foo \"bar\"})", :offset 23, :ns "seesaw.options"} {:command "(defprotocol IGetK\n (get-k [this & k] \"Gets the satom's key\")\n (get-k-in [this ks] \"Gets the satom's neste key\"))", :offset 36, :ns "user"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this state (swap! state f)))\n (swap [this f x]\n (apply-setter this state (swap! state f x)))\n (swap [this f x y]\n (apply-setter this state (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this state (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this state new)))\n (reset [this new]\n (apply-setter this state (reset! state new)))\n\n IDeref\n (deref [_]\n @state)\n\n IRef\n (addWatch [_ k call]\n (.addWatch state k call))\n (removeWatch [_ k]\n (.removeWatch state k))\n\n IGetK\n (get-k [this & ks]\n {:satom this :key ks})\n\n IMeta\n (meta [_] meta))", :offset 753, :ns "seesaw.options"} {:command "(defprotocol IGetK\n (get-k [this k & ks]))", :offset 43, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this state (swap! state f)))\n (swap [this f x]\n (apply-setter this state (swap! state f x)))\n (swap [this f x y]\n (apply-setter this state (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this state (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this state new)))\n (reset [this new]\n (apply-setter this state (reset! state new)))\n\n IDeref\n (deref [_]\n @state)\n\n IRef\n (addWatch [_ k call]\n (.addWatch state k call))\n (removeWatch [_ k]\n (.removeWatch state k))\n\n IGetK\n (get-k [this k & ks]\n {:satom this :key (cons k ks)})\n\n IMeta\n (meta [_] meta))", :offset 764, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this state (swap! state f)))\n (swap [this f x]\n (apply-setter this state (swap! state f x)))\n (swap [this f x y]\n (apply-setter this state (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this state (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this state new)))\n (reset [this new]\n (apply-setter this state (reset! state new)))\n\n IDeref\n (deref [_]\n @state)\n\n IRef\n (addWatch [_ k call]\n (.addWatch state k call))\n (removeWatch [_ k]\n (.removeWatch state k))\n\n IGetK\n (get-k [this k & ks]\n {:satom this :keys (cons k ks)})\n\n IMeta\n (meta [_] meta))", :offset 765, :ns "seesaw.options"} {:command "(map? {:A 1})", :offset 11, :ns "user"} {:command "(map? [:a 1])", :offset 11, :ns "user"} {:command "(def oo (op/satoms {:title \"<Menu>\"}))", :offset 38, :ns "seesaw.wiki.c-3-widgets"} {:command "(def size (op/satom {:as 12}))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title :a)\n :visible? true)", :offset 66, :ns "seesaw.wiki.c-3-widgets"} {:command "@oo", :offset 3, :ns "seesaw.wiki.c-3-widgets"} {:command "(def ooo (Option. :a nil nil nil))", :offset 34, :ns "seesaw.options"} {:command "ooo", :offset 3, :ns "seesaw.options"} {:command "(assoc ooo :ass \"sie\")", :offset 22, :ns "seesaw.options"} {:command "(sw/frame :title oo\n :visible? true)", :offset 45, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo \"asd\")", :offset 17, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! oo (fn [a] \"Ertu\"))", :offset 26, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo \"asdadadada\")", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(defn- apply-setter\n [this old-val new-val]\n (when-not (= old-val new-val)\n (println \"come\")\n (println this)\n (doseq [[ins m] (get @satoms this)]\n (println \"yy\")\n (doseq [opt (vals m)]\n (println \"aaa\")\n (if-let [setter (:setter opt)]\n (setter ins new-val)\n (illegal-argument \"No setter found for option %s\" (:name opt))))))\n new-val)", :offset 387, :ns "seesaw.options"} {:command "(reset! oo \"asdadadada22\")", :offset 26, :ns "seesaw.wiki.c-3-widgets"} {:command "oo", :offset 2, :ns "seesaw.wiki.c-3-widgets"} {:command "(def oo (op/satom {:title \"<Menu>\"}))", :offset 37, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title)\n :visible? true)", :offset 63, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title \"Deneme\"})", :offset 29, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title \"Deneme 22\"})", :offset 32, :ns "seesaw.wiki.c-3-widgets"} {:command "(def m {:a {:b {:c 3}}})", :offset 20, :ns "user"} {:command "(apply get-in m :a :b :c)", :offset 24, :ns "user"} {:command "(apply get-in [m :a :b :c])", :offset 25, :ns "user"} {:command "(apply get-in [m [:a :b :c]])", :offset 26, :ns "user"} {:command "(merge [m '(1 2 3)])", :offset 17, :ns "user"} {:command "(merge [[:a] '(1 2 3)])", :offset 11, :ns "user"} {:command "(merge '[l] [[:a :b]])", :offset 19, :ns "user"} {:command "(cons {:a 1} [:a :b :c])", :offset 22, :ns "user"} {:command "(reset! oo {:title {:name \"Menu 22 23\"}})", :offset 41, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Menu 22 \"}})", :offset 39, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Menu 22\"}})", :offset 38, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Menu\"}})", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo [:title :name])\n :visible? true)", :offset 71, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can Selam\"}})", :offset 40, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can s\"}})", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can2\"}})", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can23\"}})", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can\"}})", :offset 34, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Kerem\"}})", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo [:title ])\n :size [640 :by 400]\n :visible? true)", :offset 96, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title)\n :size [640 :by 400]\n :visible? true)", :offset 93, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo )\n :size [640 :by 400]\n :visible? true)", :offset 87, :ns "seesaw.wiki.c-3-widgets"} {:command "(defprotocol IGetK\n (get-k [this & ks]))", :offset 41, :ns "user"} {:command "(deftype SAtom [state meta validator watches]\n IGetK\n (get-k [this & ks]\n {:satom this :keys (vec ks)}))", :offset 108, :ns "user"} {:command "(SAtom. nil nil nil nil)", :offset 23, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil))", :offset 31, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b)", :offset 37, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b :c :D\n )", :offset 51, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b :c)", :offset 40, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b )", :offset 38, :ns "user"} {:command "(defn as\n [& k]\n (vec k))", :offset 25, :ns "user"} {:command "(as 1 2 3)", :offset 9, :ns "user"} {:command "(deftype SAtom []\n IGetK\n (get-k [this & ks]\n {:satom this :keys (vec ks)}))", :offset 16, :ns "user"} {:command "(get-k (SAtom. ) :a :b )", :offset 15, :ns "user"} {:command "(get-k (SAtom.) :a :b )", :offset 14, :ns "user"} {:command "(get-k (SAtom.) :a)", :offset 18, :ns "user"} {:command "(sw/frame :title (op/get-k oo [:title :name])\n :size [640 :by 400]\n :visible? true)", :offset 101, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Keremcik\"}})", :offset 39, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Keremcik a\"}})", :offset 41, :ns "seesaw.wiki.c-3-widgets"} {:command "(cons :a nil)", :offset 12, :ns "user"} {:command "(defn get-k\n [^SAtom a k & ks]\n {:satom a :keys (cons k ks)})", :offset 63, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :title)", :offset 38, :ns "user"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]\n [seesaw.options :as op]\n [seesaw.wiki.util :as util]\n [clojure.string :as str]))", :offset 175, :ns "user"} {:command "(def oo (op/satom {:title {:name \"Menu\"}}))", :offset 43, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title :name)\n :size [640 :by 400]\n :visible? true)", :offset 99, :ns "seesaw.wiki.c-3-widgets"} {:command "(def a (op/get-k oo :title :name))", :offset 34, :ns "seesaw.wiki.c-3-widgets"} {:command "(def aa (op/get-k oo :title :name))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "aa", :offset 2, :ns "seesaw.wiki.c-3-widgets"}], :remote []}} + {:repl-history {:ide [], :local [{:command "(com.sun.javafx.application.PlatformImpl/runLater (fn [_]\n (javafx.stage.Stage.)))", :offset 49, :ns "user"} {:command "(let [cls (Class/forName \"javafx.scene.control.ListCell\" false (clojure.lang.RT/baseLoader))] (.importClass *ns* cls))", :offset 21, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage.\" false (clojure.lang.RT/baseLoader))] (.importClass *ns* cls))", :offset 45, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))] (.importClass *ns* cls))", :offset 44, :ns "user"} {:command "cls", :offset 3, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)\n cls)", :offset 114, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)\n (.newInstance cls))", :offset 128, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)\n (.newInstance (.importClass *ns* cls)))", :offset 148, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls))", :offset 108, :ns "user"} {:command "(type (let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)))", :offset 121, :ns "user"} {:command "(run-later\n (javafx.stage.Stage.)\n )", :offset 38, :ns "seesaw.wiki.c-4-containers"} {:command "(com.sun.javafx.application.PlatformImpl/startup (fn [_] (javafx.stage.Stage .)))", :offset 81, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (javafx.stage.Stage))", :offset 34, :ns "seesaw.wiki.c-4-containers"} {:command "(javax.swing.JButton.)", :offset 22, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (println \"As\"))", :offset 28, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (javafx.stage.Stage.))", :offset 35, :ns "seesaw.wiki.c-4-containers"} {:command "(javafx.stage.Stage.)", :offset 21, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (javafx.stage.Stage.)\n )", :offset 39, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (eval \"(javafx.stage.Stage.)\")\n )", :offset 48, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (sw/construct javafx.stage.Stage)\n )", :offset 51, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (let [c (sw/construct javafx.stage.Stage)]\n (type c)\n ))", :offset 75, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (let [c (sw/construct javafx.stage.Stage)]\n (println (type c))\n ))", :offset 85, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (let [c (sw/construct javafx.stage.Stage)]\n (println (.newInstance javafx.stage.Stage))\n ))", :offset 110, :ns "seesaw.wiki.c-4-containers"} {:command "(extend-listener-protocol AddChangeListener add-change-listener addChangeListener\n javax.swing.BoundedRangeModel\n javax.swing.JProgressBar\n javax.swing.JSlider\n javax.swing.JTabbedPane\n javax.swing.JViewport\n javax.swing.AbstractButton\n javax.swing.SingleSelectionModel\n javax.swing.SpinnerModel\n javax.swing.JSpinner\n javax.swing.ButtonModel)", :offset 353, :ns "seesaw.event"} {:command "event-groups-by-listener-class", :offset 30, :ns "seesaw.event"} {:command "(defn camelize\n \"Convert input string to camelCase from hyphen-case\"\n [s]\n (clojure.string/replace s #\"-(.)\" #(.toUpperCase ^String (%1 1))))\n(-> :drag-mouse-moved name camelize symbol)", :offset 144, :ns "user"} {:command "(ns ^{:doc \"Functions for handling events. Do not use these functions directly.\n Use (seesaw.core/listen) instead.\"\n :author \"Dave Ray\"}\n seesaw.event\n (:use [seesaw.meta :only [put-meta! get-meta]]\n [seesaw.util :only [camelize illegal-argument to-seq check-args]])\n (:import [javax.swing.event ChangeListener\n CaretListener DocumentListener\n ListSelectionListener\n TreeSelectionListener TreeExpansionListener TreeWillExpandListener TreeModelListener\n HyperlinkListener]\n [javax.swing.text Document]\n [java.awt.event WindowListener FocusListener ActionListener ItemListener\n MouseListener MouseMotionListener MouseWheelListener\n KeyListener ComponentListener]\n [java.beans PropertyChangeListener]))", :offset 849, :ns "user"} {:command "(defmacro ^{:private true } extend-listener-protocol [proto proto-method java-method & classes]\n `(extend-protocol ~proto\n ~@(mapcat (fn [c] `(~c (~proto-method [this# v#] (. this# ~java-method v#)))) classes)))", :offset 216, :ns "seesaw.event"} {:command "(defprotocol ^{:private true} AddChangeListener\n (add-change-listener [this l]))", :offset 81, :ns "seesaw.event"} {:command "(defprotocol ^{:private true} AddActionListener\n (add-action-listener [this v]))", :offset 81, :ns "seesaw.event"} {:command "(defprotocol ^{:private true} AddListSelectionListener\n (add-list-selection-listener [this v]))", :offset 96, :ns "seesaw.event"} {:command "(macroexpand-1 '(extend-listener-protocol AddChangeListener add-change-listener addChangeListener\n javax.swing.BoundedRangeModel\n javax.swing.JProgressBar\n javax.swing.JSlider\n javax.swing.JTabbedPane\n javax.swing.JViewport\n javax.swing.AbstractButton\n javax.swing.SingleSelectionModel\n javax.swing.SpinnerModel\n javax.swing.JSpinner\n javax.swing.ButtonModel))", :offset 760, :ns "seesaw.event"} {:command "(extend-listener-protocol AddChangeListener add-change-listener addChangeListener\n javax.swing.BoundedRangeModel\n javax.swing.JProgressBar\n javax.swing.JSlider\n javax.swing.JTabbedPane\n javax.swing.JViewport\n javax.swing.AbstractButton\n javax.swing.SingleSelectionModel\n javax.swing.SpinnerModel\n javax.swing.JSpinner\n javax.swing.ButtonModel)", :offset 743, :ns "seesaw.event"} {:command "(extend-listener-protocol AddListSelectionListener add-list-selection-listener addListSelectionListener\n javax.swing.JList\n javax.swing.ListSelectionModel)", :offset 157, :ns "seesaw.event"} {:command "(extend-protocol AddListSelectionListener\n javax.swing.JTable\n (add-list-selection-listener [this l]\n (add-list-selection-listener (.getSelectionModel this) l)))", :offset 170, :ns "seesaw.event"} {:command "(def ^{:private true} event-groups {\n\n :component {\n :name :component\n :class ComponentListener\n :events #{:component-hidden\n :component-moved\n :component-resized\n :component-shown}\n :install #(.addComponentListener ^java.awt.Component %1 ^ComponentListener %2)\n }\n\n :property-change {\n :name :property-change\n :class PropertyChangeListener\n :events #{:property-change}\n :install #(.addPropertyChangeListener ^java.awt.Component %1 ^PropertyChangeListener %2)\n }\n :key {\n :name :key\n :class KeyListener\n :events #{:key-pressed :key-released :key-typed}\n :install #(.addKeyListener ^java.awt.Component %1 ^KeyListener %2)\n }\n :window {\n :name :window\n :class WindowListener\n :events #{:window-activated :window-deactivated\n :window-closed :window-closing :window-opened\n :window-deiconified :window-iconified}\n :install #(.addWindowListener ^java.awt.Window %1 ^WindowListener %2)\n }\n :focus {\n :name :focus\n :class FocusListener\n :events #{:focus-gained :focus-lost}\n :install #(.addFocusListener ^java.awt.Component %1 ^FocusListener %2)\n }\n :document {\n :name :document\n :class DocumentListener\n :events #{:changed-update :insert-update :remove-update}\n :install (fn [target listener]\n (.addDocumentListener\n (if (instance? Document target)\n ^Document target\n (.getDocument ^javax.swing.text.JTextComponent target))\n ^DocumentListener listener))\n }\n :caret {\n :name :caret\n :class CaretListener\n :events #{:caret-update}\n :install #(.addCaretListener ^javax.swing.text.JTextComponent %1 ^CaretListener %2)\n }\n :action {\n :name :action\n :class ActionListener\n :events #{:action-performed}\n :install add-action-listener\n }\n :change {\n :name :change\n :class ChangeListener\n :events #{:state-changed}\n :install add-change-listener\n }\n :item {\n :name :item\n :class ItemListener\n :events #{:item-state-changed}\n :install #(.addItemListener ^java.awt.ItemSelectable %1 ^ItemListener %2)\n }\n :mouse {\n :name :mouse\n :class MouseListener\n :events #{:mouse-clicked :mouse-entered :mouse-exited :mouse-pressed :mouse-released}\n :install #(.addMouseListener ^java.awt.Component %1 ^MouseListener %2)\n }\n :mouse-motion {\n :name :mouse-motion\n :class MouseMotionListener\n :events #{:mouse-moved :mouse-dragged}\n :install #(.addMouseMotionListener ^java.awt.Component %1 ^MouseMotionListener %2)\n }\n :mouse-wheel {\n :name :mouse-wheel\n :class MouseWheelListener\n :events #{:mouse-wheel-moved}\n :install #(.addMouseWheelListener ^java.awt.Component %1 ^MouseWheelListener %2)\n }\n :list-selection {\n :name :list-selection\n :class ListSelectionListener\n :events #{:value-changed}\n :named-events #{:list-selection} ; Suppress reversed map entry\n :install add-list-selection-listener\n }\n :tree-selection {\n :name :tree-selection\n :class TreeSelectionListener\n :events #{:value-changed}\n :named-events #{:tree-selection} ; Suppress reversed map entry\n :install #(.addTreeSelectionListener ^javax.swing.JTree %1 ^TreeSelectionListener %2)\n }\n :tree-expansion {\n :name :tree-expansion\n :class TreeExpansionListener\n :events #{:tree-expanded :tree-collapsed}\n :install #(.addTreeExpansionListener ^javax.swing.JTree %1 ^TreeExpansionListener %2)\n }\n ; Since one of the methods matches the listener name, we give the overall\n ; a slightly different name to distinguish registering for *all* events\n ; versus just one.\n :tree-will-expand* {\n :name :tree-will-expand*\n :class TreeWillExpandListener\n :events #{:tree-will-expand :tree-will-collapse}\n :install #(.addTreeWillExpandListener ^javax.swing.JTree %1 ^TreeWillExpandListener %2)\n }\n :tree-model {\n :name :tree-model\n :class TreeModelListener\n :events #{:tree-nodes-changed :tree-nodes-inserted :tree-nodes-removed :tree-structure-changed}\n :install #(.addTreeModelListener ^javax.swing.tree.TreeModel %1 ^TreeModelListener %2)\n }\n\n :drag-source {\n :name :drag-source\n :class java.awt.dnd.DragSourceListener\n :events #{:drag-drop-end :drag-enter :drag-exit :drag-over :drop-action-changed}\n ; Names are mostly the same as DragTarget events, so prefix with ds-\n ; See event-method-table below too!\n :named-events #{:ds-drag-drop-end :ds-drag-enter :ds-drag-exit :ds-drag-over :ds-drop-action-changed}\n :install #(.addDragSourceListener ^java.awt.dnd.DragSource %1 ^java.awt.dnd.DragSourceListener %2)\n }\n\n :drag-source-motion {\n :name :drag-source-motion\n :class java.awt.dnd.DragSourceMotionListener\n :events #{:drag-mouse-moved}\n :install #(.addDragSourceMotionListener ^java.awt.dnd.DragSource %1 ^java.awt.dnd.DragSourceMotionListener %2)\n }\n\n :drop-target {\n :name :drop-target\n :class java.awt.dnd.DropTargetListener\n :events #{:drag-enter :drag-exit :drag-over :drop :drop-action-changed}\n ; Names are mostly the same as DragSource events, so prefix with dt-\n ; See event-method-table below too!\n :named-events #{:dt-drag-enter :dt-drag-exit :dt-drag-over :dt-drop :dt-drop-action-changed}\n :install #(.addDropTargetListener ^java.awt.dnd.DropTarget %1 ^java.awt.dnd.DropTargetListener %2)\n }\n\n :hyperlink {\n :name :hyperlink\n :class HyperlinkListener\n :events #{:hyperlink-update}\n :install #(.addHyperlinkListener ^javax.swing.JEditorPane %1\n ^HyperlinkListener %2)\n }\n})", :offset 5808, :ns "seesaw.event"} {:command "(def ^{:private true} event-groups-by-listener-class\n (into {}\n (for [{:keys [class] :as group} (vals event-groups)]\n [class group])))", :offset 151, :ns "seesaw.event"} {:command "(defn- get-listener-class [^java.lang.reflect.Method m]\n (let [[arg] (.getParameterTypes m)]\n (if (and arg (.startsWith (.getName m) \"add\"))\n arg)))", :offset 157, :ns "seesaw.event"} {:command "(defn events-for\n \"Returns a sequence of event info maps for the given object which can\n be either a widget instance or class.\n\n Used by (seesaw.dev/show-events).\n\n See:\n (seesaw.dev/show-events)\n \"\n [v]\n (let [base (->> (.getMethods (if (class? v) ^java.lang.Class v (class v)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install)))\n selection (selection-group-for v)]\n (if selection\n (cons selection base)\n base)))", :offset 593, :ns "seesaw.event"} {:command "(seesaw.core/label)", :offset 19, :ns "seesaw.event"} {:command "(require 'seesaw.core)", :offset 22, :ns "seesaw.event"} {:command "(class \"as\")", :offset 12, :ns "seesaw.event"} {:command "(defn events-for\n \"Returns a sequence of event info maps for the given object which can\n be either a widget instance or class.\n\n Used by (seesaw.dev/show-events).\n\n See:\n (seesaw.dev/show-events)\n \"\n [v]\n (let [base (->> (.getMethods (if (class? v) ^java.lang.Class v (class v)))\n (map #(do\n (println (get-listener-class %))\n (get-listener-class %)))\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install)))\n selection (selection-group-for v)]\n (if selection\n (cons selection base)\n base)))", :offset 682, :ns "seesaw.event"} {:command "(.getMethods (class \"As\"))", :offset 26, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class \"As\"))]\n (println m)\n )", :offset 55, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class \"As\"))]\n (println (get-listener-class m))\n )", :offset 76, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (println (get-listener-class m)))", :offset 88, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (get-listener-class m)]\n (println l)))", :offset 109, :ns "seesaw.event"} {:command "(filter identity [nil nil 1 2 nil])", :offset 35, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (get-listener-class m)]\n (println (map event-groups-by-listener-class l))))", :offset 146, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n )", :offset 205, :ns "seesaw.event"} {:command "(clojure.pprint/pprint event-groups-by-listener-class)", :offset 54, :ns "seesaw.event"} {:command "(count (.getMethods (class (seesaw.core/label))))", :offset 49, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n ;(map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n )", :offset 206, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n ;(map #(dissoc % :install))\n )", :offset 204, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install))\n )", :offset 203, :ns "seesaw.event"} {:command "(defn events-for\n \"Returns a sequence of event info maps for the given object which can\n be either a widget instance or class.\n\n Used by (seesaw.dev/show-events).\n\n See:\n (seesaw.dev/show-events)\n \"\n [v]\n (let [base (->> (.getMethods (if (class? v) ^java.lang.Class v (class v)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install)))\n selection (selection-group-for v)]\n (if selection\n (cons selection base)\n base)))", :offset 638, :ns "seesaw.event"} {:command "(events-for (seesaw.core/label))", :offset 32, :ns "seesaw.event"} {:command "(util/show-events (saw/button))", :offset 31, :ns "seesaw.wiki.c-1-home-page"} {:command "(util/show-events (saw/label))", :offset 30, :ns "seesaw.wiki.c-1-home-page"} {:command "(apply + [1 2])", :offset 13, :ns "user"} {:command "(apply + [1 2] [3])", :offset 17, :ns "user"} {:command "apply", :offset 5} {:command "(apply + [1 2] 3)", :offset 16, :ns "user"} {:command "(apply + [1 2] [2])", :offset 17, :ns "user"} {:command "(apply + [1 2] [[2]])", :offset 18, :ns "user"} {:command "(apply + [1 2] [])", :offset 16, :ns "user"} {:command "(defn- get-listener-class-2 [^java.lang.reflect.Method m]\n (let [[arg] (.getParameterTypes m)]\n (if (and arg (.startsWith (.getName m) \"setOn\"))\n arg)))", :offset 161, :ns "seesaw.event"} {:command "(defn- get-listener-class-2 [^java.lang.reflect.Method m]\n (let [[arg] (.getParameterTypes m)]\n (if (and arg (.startsWith (.getName m) \"setOn\"))\n (.getName m))))", :offset 170, :ns "seesaw.event"} {:command "(->> (.getMethods javafx.scene.Node)\n (map get-listener-class-2)\n (filter identity)\n ;(map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n )", :offset 198, :ns "seesaw.event"} {:command "(apply + [1 2] )", :offset 15, :ns "user"} {:command "(count(->> (.getMethods javafx.scene.Node)\n (map get-listener-class-2)\n (filter identity)\n ;(map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n ))", :offset 211, :ns "seesaw.event"} {:command "^java.awt.Component", :offset 19, :ns "user"} {:command "(merge {:a 1} {:b 2})", :offset 19, :ns "user"} {:command "(merge {:a {:b 3\n :c 3}} {:b 2})", :offset 43, :ns "user"} {:command "(merge {:a {:b 3\n :c 3}} {:a {:b 2}})", :offset 45, :ns "user"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (.getParameterTypes m)]\n (println l)))", :offset 109, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0))))", :offset 118, :ns "seesaw.event"} {:command "(doseq [m (.getMethods javafx.scene.control.ButtonBase)]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0))))", :offset 122, :ns "seesaw.event"} {:command "(.getMethods javafx.scene.control.ButtonBase)", :offset 45, :ns "seesaw.event"} {:command "(.getDeclaredMethods javafx.scene.control.ButtonBase)", :offset 53, :ns "seesaw.event"} {:command "(class javafx.scene.control.ButtonBase)", :offset 39, :ns "seesaw.event"} {:command "(Class/forName \"javafx.scene.control.ButtonBase\")", :offset 49, :ns "seesaw.event"} {:command "(run-later\n (doseq [m (.getDeclaredMethods (Class/forName \"javafx.scene.control.ButtonBase\"))]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0)))))", :offset 166, :ns "seesaw.wiki.c-4-containers"} {:command "(.getMethods (Class/forName \"javafx.scene.control.ButtonBase\"))", :offset 63, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (doseq [m (.getMethods (Class/forName \"javafx.scene.control.ButtonBase\"))]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0)))))", :offset 158, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (.getMethods (Class/forName \"javafx.scene.control.ButtonBase\")))", :offset 77, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (.getMethods javafx.scene.control.ButtonBase))", :offset 59, :ns "seesaw.wiki.c-4-containers"} {:command "(Class/forName \"javafx.scene.control.Button\")", :offset 45, :ns "seesaw.event"} {:command "(.getDeclaredMethods javafx.scene.control.Button)", :offset 49, :ns "seesaw.event"} {:command "(.getMethods javafx.scene.control.Button)", :offset 41, :ns "seesaw.event"} {:command "(run-later\n (.getMethods javafx.scene.control.Button))", :offset 55, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n javafx.scene.control.Button)", :offset 41, :ns "seesaw.wiki.c-4-containers"} {:command "(.getMethods javafx.scene.layout VBox)", :offset 38, :ns "seesaw.event"} {:command "(.getMethods javafx.scene.layout.VBox)", :offset 38, :ns "seesaw.event"} {:command "(ns seesaw.wiki.c-4-containers\n (:require [seesaw.core :as sw :refer :all]\n [seesaw.mig :as mig]\n [seesaw.bind :as b]\n [seesaw.wiki.util :as util])\n (:import (javafx.application Platform)\n (java.lang.reflect Constructor Parameter)))", :offset 277, :ns "user"} {:command "(ns sadas)", :offset 10, :ns "seesaw.wiki.c-4-containers"} {:command "(defmacro run-later [& body]\n `(-run-later\n (fn []\n (try ~@body\n (catch Throwable ex#\n (println ex#))))))", :offset 140, :ns "seesaw.wiki.c-4-containers"} {:command "(in-ns 'user)", :offset 13, :ns "seesaw.wiki.c-4-containers"} {:command "(javafx.embed.swing.JFXPanel.)", :offset 30, :ns "seesaw.wiki.c-4-containers"} {:command "(Platform/setImplicitExit false)", :offset 32, :ns "seesaw.wiki.c-4-containers"} {:command "(defn -run-later [^java.lang.Runnable fn]\n (if (Platform/isFxApplicationThread)\n (do\n (println \"aaa\")\n (fn))\n (Platform/runLater fn)))", :offset 152, :ns "seesaw.wiki.c-4-containers"} {:command "\n\n(javafx.embed.swing.JFXPanel.)\n(javafx.application.Platform/setImplicitExit false)\n\n(defn -run-later [^java.lang.Runnable fn]\n (if (Platform/isFxApplicationThread)\n (do\n (println \"aaa\")\n (fn))\n (Platform/runLater fn)))\n\n(defmacro run-later [& body]\n `(-run-later\n (fn []\n (try ~@body\n (catch Throwable ex#\n (println ex#))))))", :offset 380, :ns "user"} {:command "javafx.application.Platform", :offset 27, :ns "user"} {:command "(javafx.application.Platform/setImplicitExit false)\n", :offset 52, :ns "user"} {:command "\n(defn -run-later [^java.lang.Runnable fn]\n (if (Platform/isFxApplicationThread)\n (do\n (println \"aaa\")\n (fn))\n (Platform/runLater fn)))\n\n(defmacro run-later [& body]\n `(-run-later\n (fn []\n (try ~@body\n (catch Throwable ex#\n (println ex#))))))\n", :offset 296, :ns "user"} {:command "(run-later\n (type javafx.scene.control.Button))", :offset 48, :ns "user"} {:command "(run-later\n (println (type javafx.scene.control.Button)))", :offset 56, :ns "user"} {:command "(run-later\n (println (.getMethods javafx.scene.control.Button)))", :offset 34, :ns "user"} {:command "(seesaw.core/user-data)", :offset 23, :ns "seesaw.core"} {:command "(def m {:a \"Example doc string\"})", :offset 30, :ns "user"} {:command "(defn a\n (:a m)\n [x y]\n (+ x y))", :offset 33, :ns "user"} {:command "(defmacro my-defn \n [] \n )", :offset 17} {:command "(let [doc (:a m)] \n (defn a\n doc\n [x y]\n (+ x y)))", :offset 36, :ns "user"} {:command "(let [doc (:a m)] \n (defn a\n ~doc\n [x y]\n (+ x y)))", :offset 34, :ns "user"} {:command "(let [doc (:a m)] \n (defn a\n \"ok\"\n [x y]\n (+ x y)))", :offset 36, :ns "user"} {:command "(defmacro my-defn \n [doc] \n `(defn my-fn ~doc []))", :offset 47, :ns "user"} {:command "(my-defn \"ses\")", :offset 13, :ns "user"} {:command "(meta (var my-fn))", :offset 16, :ns "user"} {:command "(ns ^{:doc\n\"Core functions and macros for Seesaw. Although there are many more\n Seesaw namespaces, usually what you want is in here. Most functions\n in other namespaces have a core wrapper which adds additional\n capability or makes them easier to use.\"\n :author \"Dave Ray\"}\n seesaw.core\n (:use [seesaw.util :only [illegal-argument to-seq check-args\n constant-map resource resource-key?\n to-dimension to-insets to-url try-cast\n cond-doto to-mnemonic-keycode]]\n [seesaw.config :only [Configurable config* config!*]]\n [seesaw.options :only [ignore-option default-option bean-option\n resource-option around-option\n apply-options\n option-map option-provider\n get-option-value]]\n [seesaw.widget-options :only [widget-option-provider]]\n [seesaw.meta :only [get-meta put-meta!]]\n [seesaw.to-widget :only [ToWidget to-widget*]]\n [seesaw.make-widget :only [make-widget*]])\n (:require clojure.java.io\n clojure.set\n [seesaw color font border invoke timer selection value\n event selector icon action cells table graphics cursor scroll dnd]\n [seesaw.layout :as layout])\n (:import [javax.swing\n SwingConstants UIManager ScrollPaneConstants DropMode\n BoxLayout\n JDialog JFrame JComponent Box JPanel JScrollPane JSplitPane JToolBar JTabbedPane\n JLabel JTextField JTextArea JTextPane\n AbstractButton JButton ButtonGroup\n JOptionPane]\n [javax.swing.text JTextComponent StyleConstants]\n [java.awt Component FlowLayout BorderLayout GridLayout\n GridBagLayout GridBagConstraints\n Dimension]))", :offset 1887, :ns "user"} {:command "(ns seesaw.wiki.c-1-home-page\n (:require [seesaw.core :as saw]\n [seesaw.event :as ev]\n [seesaw.options :as opt]\n [seesaw.wiki.util :as util]\n [clojure.string :as string]))", :offset 216, :ns "user"} {:command "(def p (sw/vertical-panel :items [\"This\" \"is\" \"a\" \"vertical\" \"stack of\" \"JLabels\"]))", :offset 84, :ns "seesaw.wiki.c-3-widgets"} {:command ":as", :offset 3, :ns "seesaw.wiki.c-3-widgets"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core]))", :offset 55, :ns "user"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]))", :offset 62, :ns "user"} {:command "(ns seesaw.widgets.log-window\n (:use [seesaw.core]\n [seesaw.bind :only [bind]]\n [seesaw.keymap :only [map-key]]\n [seesaw.invoke :only [signaller]]\n [seesaw.options :only [apply-options option-map default-option]]\n [seesaw.widget-options :only [WidgetOptionProvider]]))", :offset 304, :ns "user"} {:command "(def fl (let [choose (fn [e] (sw/alert \"I should open a file chooser\"))]\n (sw/flow-panel\n :items [\"File\" [:fill-h 5]\n (sw/text (System/getProperty \"user.dir\")) [:fill-h 5]\n (sw/action :handler choose :name \"...\")])))", :offset 274, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content (java.net.URL. \"https://github.com/daveray/seesaw/wiki/Widgets\")\n :size [640 :by 400]\n :visible? true)", :offset 195, :ns "seesaw.wiki.c-3-widgets"} {:command "(util/show-options (sw/label))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/button :id :the-button :text \"Push me\")", :offset 43, :ns "seesaw.wiki.c-3-widgets"} {:command "(def fl (let [choose (fn [e] (sw/alert \"I should open a file chooser\"))]pr\n (sw/flow-panel\n :items [\"File\" [:fill-h 5]\n (sw/text (System/getProperty \"user.dir\")) [:fill-h 5]\n (sw/action :handler choose :name \"...\")])))", :offset 276, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content fl\n :size [640 :by 400]\n :visible? true)", :offset 133, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content \"Saas\"\n :size [640 :by 400]\n :visible? true)", :offset 137, :ns "seesaw.wiki.c-3-widgets"} {:command "(def a (atom 1))", :offset 14, :ns "user"} {:command "(type @a)", :offset 8, :ns "user"} {:command "(.hashCode a)", :offset 12, :ns "user"} {:command "(.hashCode @a)", :offset 13, :ns "user"} {:command "(def b (atom 1))", :offset 6, :ns "user"} {:command "(.hashCode @b)", :offset 13, :ns "user"} {:command "(def o (Option. :deneme (fn [] ) (fn [] ) nil))", :offset 47, :ns "seesaw.options"} {:command "(def o2 (Option. :deneme (fn [] ) (fn [] ) nil))", :offset 48, :ns "seesaw.options"} {:command "(== o o2)", :offset 9, :ns "seesaw.options"} {:command "(= o o2)", :offset 8, :ns "seesaw.options"} {:command "(= o o)", :offset 7, :ns "seesaw.options"} {:command "(def m {o \"deneme\"})", :offset 20, :ns "seesaw.options"} {:command "(get m o)", :offset 9, :ns "seesaw.options"} {:command "( + 1 1)", :offset 7, :ns "user"} {:command "(def k (atom \"As\"))", :offset 16, :ns "user"} {:command "(def mm {k \"den\"})", :offset 15, :ns "user"} {:command "(get mm k)", :offset 9, :ns "user"} {:command "(ns ^{:doc\n \"Core functions and macros for Seesaw. Although there are many more\n Seesaw namespaces, usually what you want is in here. Most functions\n in other namespaces have a core wrapper which adds additional\n capability or makes them easier to use.\"\n :author \"Dave Ray\"}\nseesaw.core\n (:use [seesaw.util :only [illegal-argument to-seq check-args\n constant-map resource resource-key?\n to-dimension to-insets to-url try-cast\n cond-doto to-mnemonic-keycode]]\n [seesaw.config :only [Configurable config* config!*]]\n [seesaw.options :only [ignore-option default-option bean-option\n resource-option around-option\n apply-options\n option-map option-provider\n get-option-value]]\n [seesaw.widget-options :only [widget-option-provider]]\n [seesaw.meta :only [get-meta put-meta!]]\n [seesaw.to-widget :only [ToWidget to-widget*]]\n [seesaw.make-widget :only [make-widget*]])\n (:require clojure.java.io\n clojure.set\n [seesaw color font border invoke timer selection value\n event selector icon action cells table graphics cursor scroll dnd]\n [seesaw.layout :as layout])\n (:import [javax.swing\n SwingConstants UIManager ScrollPaneConstants DropMode\n BoxLayout\n JDialog JFrame JComponent Box JPanel JScrollPane JSplitPane JToolBar JTabbedPane\n JLabel JTextField JTextArea JTextPane\n AbstractButton JButton ButtonGroup\n JOptionPane]\n [javax.swing.text JTextComponent StyleConstants]\n [java.awt Component FlowLayout BorderLayout GridLayout\n GridBagLayout GridBagConstraints\n Dimension]\n (clojure.lang IAtom IDeref IMeta)))", :offset 1994, :ns "user"} {:command "(deftype SAtom [^:mutable state meta validator ^:mutable watches]\n IAtom\n\n\n IDeref\n (deref [this]\n (println \"Derefeedd!!!\")\n state)\n\n IMeta\n (meta [_] meta))", :offset 168, :ns "seesaw.core"} {:command "(defn stom\n ([x] (new SAtom x))\n ([x & options] (setup-reference (stom x) options)))", :offset 86, :ns "seesaw.core"} {:command "(defn stom\n ([x] (new SAtom))\n ([x & options] (setup-reference (stom x) options)))", :offset 84, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom.))\n ([x & options] (setup-reference (stom x) options)))", :offset 81, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (setup-reference (stom x) options)))", :offset 95, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (#'setup-reference (stom x) options)))", :offset 97, :ns "seesaw.core"} {:command "(defn s-reference \n [^clojure.lang.ARef r options]\n (let [opts (apply hash-map options)]\n (when (:meta opts)\n (.resetMeta r (:meta opts)))\n (when (:validator opts)\n (.setValidator r (:validator opts)))\n r))", :offset 227, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (s-reference (stom x) options)))", :offset 91, :ns "seesaw.core"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content \"Ertus\"\n :size [640 :by 400]\n :visible? true)", :offset 138, :ns "seesaw.wiki.c-3-widgets"} {:command "(deftype SAtom [^:mutable state meta validator ^:mutable watches]\n IAtom\n\n\n IDeref\n (deref [this]\n (println (type this))\n (println state)\n state)\n\n IMeta\n (meta [_] meta))", :offset 185, :ns "seesaw.core"} {:command "(defn satom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (s-reference (satom x) options)))", :offset 93, :ns "seesaw.core"} {:command "@ak", :offset 3, :ns "seesaw.core"} {:command "(deftype SAtom [state meta validator watches]\n IAtom\n (swap [this f]\n (swap! state f))\n (swap [this f x]\n (swap! state f x))\n (swap [this f x y]\n (swap! state f x y))\n (swap [this f x y args]\n (swap! state f x y args))\n (compareAndSet [this old new]\n (compare-and-set! state old new))\n (reset [this new]\n (reset! state new))\n\n IDeref\n (deref [this]\n (println (type this))\n @state)\n\n IMeta\n (meta [_] meta))", :offset 441, :ns "seesaw.core"} {:command "(def ak (satom 1))", :offset 18, :ns "seesaw.core"} {:command "(swap! ak inc)", :offset 14, :ns "seesaw.core"} {:command "(def kol (atom 5))", :offset 18, :ns "seesaw.core"} {:command "(swap! kol inc)", :offset 15, :ns "seesaw.core"} {:command "(type ak)", :offset 9, :ns "seesaw.core"} {:command "(val {:a 1})", :offset 10, :ns "user"} {:command "(vals {:a 1})", :offset 5, :ns "user"} {:command "(vals {:a {:b 1}})", :offset 15, :ns "user"} {:command "(first (vals {:a {:b 1}}))", :offset 25, :ns "user"} {:command "(ns ^{:doc \"Functions for dealing with options.\"\n :author \"Dave Ray\"}\nseesaw.options\n (:use [seesaw.util :only [camelize illegal-argument check-args\n resource resource-key?]])\n (:import (clojure.lang IAtom IDeref IMeta)))", :offset 258, :ns "user"} {:command "(def s (atom {}))", :offset 17, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n IAtom\n (swap [this f]\n (let [v (swap! state f)\n target-ins (get s state)\n options (vals (first (vals target-ins)))]\n (doseq [opt options]\n (if-let [setter (:setter opt)]\n (setter target-ins v)\n (illegal-argument \"No setter found for option %s\" (:name opt))))))\n (swap [this f x]\n (swap! state f x))\n (swap [this f x y]\n (swap! state f x y))\n (swap [this f x y args]\n (swap! state f x y args))\n (compareAndSet [this old new]\n (compare-and-set! state old new))\n (reset [this new]\n (reset! state new))\n\n IDeref\n (deref [this]\n (println (type this))\n @state)\n\n IMeta\n (meta [_] meta))", :offset 722, :ns "seesaw.options"} {:command "(defn s-reference\n [^clojure.lang.ARef r options]\n (let [opts (apply hash-map options)]\n (when (:meta opts)\n (.resetMeta r (:meta opts)))\n (when (:validator opts)\n (.setValidator r (:validator opts)))\n r))", :offset 226, :ns "seesaw.options"} {:command "(defn satom\n ([x] (SAtom. (atom x) nil nil nil))\n ([x & options] (s-reference (satom x) options)))", :offset 100, :ns "seesaw.options"} {:command "(def k (satom 1))", :offset 17, :ns "seesaw.options"} {:command "(type k)", :offset 8, :ns "seesaw.options"} {:command "(= seesaw.options.SAtom (type k))", :offset 33, :ns "seesaw.options"} {:command "(= seesaw.options.SAtom (class k))", :offset 34, :ns "seesaw.options"} {:command "(= SAtom (class k))", :offset 19, :ns "seesaw.options"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]\n [seesaw.wiki.util :as util]))", :offset 102, :ns "user"} {:command "@title", :offset 6, :ns "seesaw.wiki.c-3-widgets"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]\n [seesaw.options :as op]\n [seesaw.wiki.util :as util]))", :offset 138, :ns "user"} {:command "(def title (op/satom 1))", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content 12\n :size [640 :by 400]\n :visible? true)", :offset 133, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"DEneme\"))", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "op/s", :offset 4, :ns "seesaw.wiki.c-3-widgets"} {:command "(vals (first (vals (get @op/s title))))", :offset 39, :ns "seesaw.wiki.c-3-widgets"} {:command "(first (vals (get @op/s title)))", :offset 32, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content title\n :size [640 :by 400]\n :visible? true)", :offset 136, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"sesver\"))", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"Deneme\"))", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] [1200 :by 800]))", :offset 37, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"G]zel\"))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [1200 :by 800]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [200 :by 800]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 800]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 800]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 10]))", :offset 34, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 1000]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 200]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(doseq [a {:a 1 :b 2}]\n a)", :offset 26, :ns "user"} {:command "(doseq [a {:a 1 :b 2}]\n (println a))", :offset 35, :ns "user"} {:command "(doseq [[a b] {:a 1 :b 2}]\n (println a b))", :offset 41, :ns "user"} {:command "(doseq [[x y] {:a {:b 2 :c 3}}]\n (println x y))", :offset 46, :ns "user"} {:command "(swap! title (fn [a] \"aaaa\"))", :offset 29, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"bbb\"))", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [1600 :by 200]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 100]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 200]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 400]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(def chp (atom 1))", :offset 16, :ns "user"} {:command "(compare-and-set! chp 2)", :offset 23, :ns "user"} {:command "(compare-and-set! chp 1 2)", :offset 24, :ns "user"} {:command "(compare-and-set! chp 2 2)", :offset 23, :ns "user"} {:command "(compare-and-set! chp 3 2)", :offset 23, :ns "user"} {:command "(reset! chp 8)", :offset 13, :ns "user"} {:command "(swap! title (fn [a] \"bbb22\"))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a ] a) \"ses\")", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] a) \"ses\" \"aa\")", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] a) )", :offset 25, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] a) \"aa\")", :offset 29, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title str/capitalize)", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title str/upper-case)", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title str/lower-case)", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"deneme\")", :offset 23, :ns "seesaw.wiki.c-3-widgets"} {:command "(def kkk (satom 1))", :offset 19, :ns "seesaw.wiki.c-3-widgets"} {:command "(defn- apply-setter\n [this val]\n (doseq [[ins m] (get @s this)]\n (doseq [opt (vals m)]\n (if-let [setter (:setter opt)]\n (do\n (setter ins val)\n val)\n (illegal-argument \"No setter found for option %s\" (:name opt))))))", :offset 257, :ns "seesaw.options"} {:command "(defn- apply-setter\n [this val]\n (doseq [[ins m] (get @s this)]\n (doseq [opt (vals m)]\n (if-let [setter (:setter opt)]\n (setter ins val)\n (illegal-argument \"No setter found for option %s\" (:name opt)))))\n val)", :offset 234, :ns "seesaw.options"} {:command "(def kkk (op/satom 1))", :offset 22, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! kkk inc)", :offset 15, :ns "seesaw.wiki.c-3-widgets"} {:command "(def title (op/satom \"Ertus\"))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(def size (op/satom [650 :by 450]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content title\n :size size\n :visible? true)", :offset 127, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 500]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 300]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Ses ver\")", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Ses ver Türkiye!!!\")", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Aga selam\")", :offset 26, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Ataturk\")", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Deneme\")", :offset 23, :ns "seesaw.wiki.c-3-widgets"} {:command "(def kkk (op/satom {}))", :offset 23, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! kkk assoc-in [:a :b :c] 1)", :offset 33, :ns "seesaw.wiki.c-3-widgets"} {:command "@op/s", :offset 5, :ns "seesaw.wiki.c-3-widgets"} {:command "(vals (get @op/s title))", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(get @op/s title)", :offset 17, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Denemesa\")", :offset 25, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Hey\")", :offset 20, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [15000 :by 300]))", :offset 37, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [1500 :by 300]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [150 :by 300]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :menubar\n (sw/menubar :items\n [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])]))", :offset 170, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :visible? true\n :menubar\n (sw/menubar :items\n [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])]))", :offset 213, :ns "seesaw.wiki.c-3-widgets"} {:command "(def file (op/satom \"File\"))", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :visible? true\n :menubar\n (sw/menubar :items\n [(sw/menu :text file :items [])\n (sw/menu :text \"Edit\" :items [])]))", :offset 211, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! file \"Aga\")", :offset 19, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! file \"File\")", :offset 20, :ns "seesaw.wiki.c-3-widgets"} {:command "(def items (op/satom [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])\n (sw/menu :text \"Exit\" :items [])]))", :offset 167, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :visible? true\n :menubar\n (sw/menubar :items\n items))", :offset 128, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! items [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])\n (sw/menu :text \"Exit 2\" :items [])])", :offset 147, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! items [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])])", :offset 97, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! items [(sw/menu :text \"File\" :items [])])", :offset 49, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/menubar :items\n [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])\n (sw/menu :text \"Exit\" :items [])])", :offset 158, :ns "seesaw.wiki.c-3-widgets"} {:command "(defn setup-reference*\n [^clojure.lang.ARef r options]\n (let [opts (apply hash-map options)]\n (when (:meta opts)\n (.resetMeta r (:meta opts)))\n (when (:validator opts)\n (.setValidator r (:validator opts)))\n r))", :offset 231, :ns "seesaw.options"} {:command "(defn satom\n ([x] (SAtom. (atom x) nil nil nil))\n ([x & options] (setup-reference* (satom x) options)))", :offset 105, :ns "seesaw.options"} {:command "(def a (satom {}))", :offset 18, :ns "seesaw.options"} {:command "(ns ^{:doc \"Functions for dealing with options.\"\n :author \"Dave Ray\"}\nseesaw.options\n (:use [seesaw.util :only [camelize illegal-argument check-args\n resource resource-key?]])\n (:import (clojure.lang IAtom IDeref IMeta IRef)))", :offset 263, :ns "user"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this (swap! state f)))\n (swap [this f x]\n (apply-setter this (swap! state f x)))\n (swap [this f x y]\n (apply-setter this (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this new)))\n (reset [this new]\n (apply-setter this (reset! state new)))\n\n IDeref\n (deref [this]\n @state)\n\n IRef\n (addWatch [this k call]\n (.addWatch state k call))\n (removeWatch [this k]\n (.removeWatch state k))\n\n IMeta\n (meta [_] meta))", :offset 669, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this (swap! state f)))\n (swap [this f x]\n (apply-setter this (swap! state f x)))\n (swap [this f x y]\n (apply-setter this (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this new)))\n (reset [this new]\n (apply-setter this (reset! state new)))\n\n IDeref\n (deref [this]\n @state)\n\n IRef\n (addWatch [this k call]\n (.addWatch this k call))\n (removeWatch [this k]\n (.removeWatch this k))\n\n IMeta\n (meta [_] meta))", :offset 667, :ns "seesaw.options"} {:command "(add-watch a :watcher\n (fn [key atom old-state new-state]\n (prn \"-- Atom Changed --\")\n (prn \"key\" key)\n (prn \"atom\" atom)\n (prn \"old-state\" old-state)\n (prn \"new-state\" new-state)))", :offset 251, :ns "seesaw.options"} {:command "(.getWatches)", :offset 13, :ns "seesaw.options"} {:command "(.getWatches a)", :offset 15, :ns "seesaw.options"} {:command "(remove-watch a :watcher)", :offset 25, :ns "seesaw.options"} {:command "(reset! a {:foo \"bar\"})", :offset 23, :ns "seesaw.options"} {:command "(defprotocol IGetK\n (get-k [this & k] \"Gets the satom's key\")\n (get-k-in [this ks] \"Gets the satom's neste key\"))", :offset 36, :ns "user"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this state (swap! state f)))\n (swap [this f x]\n (apply-setter this state (swap! state f x)))\n (swap [this f x y]\n (apply-setter this state (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this state (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this state new)))\n (reset [this new]\n (apply-setter this state (reset! state new)))\n\n IDeref\n (deref [_]\n @state)\n\n IRef\n (addWatch [_ k call]\n (.addWatch state k call))\n (removeWatch [_ k]\n (.removeWatch state k))\n\n IGetK\n (get-k [this & ks]\n {:satom this :key ks})\n\n IMeta\n (meta [_] meta))", :offset 753, :ns "seesaw.options"} {:command "(defprotocol IGetK\n (get-k [this k & ks]))", :offset 43, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this state (swap! state f)))\n (swap [this f x]\n (apply-setter this state (swap! state f x)))\n (swap [this f x y]\n (apply-setter this state (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this state (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this state new)))\n (reset [this new]\n (apply-setter this state (reset! state new)))\n\n IDeref\n (deref [_]\n @state)\n\n IRef\n (addWatch [_ k call]\n (.addWatch state k call))\n (removeWatch [_ k]\n (.removeWatch state k))\n\n IGetK\n (get-k [this k & ks]\n {:satom this :key (cons k ks)})\n\n IMeta\n (meta [_] meta))", :offset 764, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this state (swap! state f)))\n (swap [this f x]\n (apply-setter this state (swap! state f x)))\n (swap [this f x y]\n (apply-setter this state (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this state (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this state new)))\n (reset [this new]\n (apply-setter this state (reset! state new)))\n\n IDeref\n (deref [_]\n @state)\n\n IRef\n (addWatch [_ k call]\n (.addWatch state k call))\n (removeWatch [_ k]\n (.removeWatch state k))\n\n IGetK\n (get-k [this k & ks]\n {:satom this :keys (cons k ks)})\n\n IMeta\n (meta [_] meta))", :offset 765, :ns "seesaw.options"} {:command "(map? {:A 1})", :offset 11, :ns "user"} {:command "(map? [:a 1])", :offset 11, :ns "user"} {:command "(def oo (op/satoms {:title \"<Menu>\"}))", :offset 38, :ns "seesaw.wiki.c-3-widgets"} {:command "(def size (op/satom {:as 12}))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title :a)\n :visible? true)", :offset 66, :ns "seesaw.wiki.c-3-widgets"} {:command "@oo", :offset 3, :ns "seesaw.wiki.c-3-widgets"} {:command "(def ooo (Option. :a nil nil nil))", :offset 34, :ns "seesaw.options"} {:command "ooo", :offset 3, :ns "seesaw.options"} {:command "(assoc ooo :ass \"sie\")", :offset 22, :ns "seesaw.options"} {:command "(sw/frame :title oo\n :visible? true)", :offset 45, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo \"asd\")", :offset 17, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! oo (fn [a] \"Ertu\"))", :offset 26, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo \"asdadadada\")", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(defn- apply-setter\n [this old-val new-val]\n (when-not (= old-val new-val)\n (println \"come\")\n (println this)\n (doseq [[ins m] (get @satoms this)]\n (println \"yy\")\n (doseq [opt (vals m)]\n (println \"aaa\")\n (if-let [setter (:setter opt)]\n (setter ins new-val)\n (illegal-argument \"No setter found for option %s\" (:name opt))))))\n new-val)", :offset 387, :ns "seesaw.options"} {:command "(reset! oo \"asdadadada22\")", :offset 26, :ns "seesaw.wiki.c-3-widgets"} {:command "oo", :offset 2, :ns "seesaw.wiki.c-3-widgets"} {:command "(def oo (op/satom {:title \"<Menu>\"}))", :offset 37, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title)\n :visible? true)", :offset 63, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title \"Deneme\"})", :offset 29, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title \"Deneme 22\"})", :offset 32, :ns "seesaw.wiki.c-3-widgets"} {:command "(def m {:a {:b {:c 3}}})", :offset 20, :ns "user"} {:command "(apply get-in m :a :b :c)", :offset 24, :ns "user"} {:command "(apply get-in [m :a :b :c])", :offset 25, :ns "user"} {:command "(apply get-in [m [:a :b :c]])", :offset 26, :ns "user"} {:command "(merge [m '(1 2 3)])", :offset 17, :ns "user"} {:command "(merge [[:a] '(1 2 3)])", :offset 11, :ns "user"} {:command "(merge '[l] [[:a :b]])", :offset 19, :ns "user"} {:command "(cons {:a 1} [:a :b :c])", :offset 22, :ns "user"} {:command "(reset! oo {:title {:name \"Menu 22 23\"}})", :offset 41, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Menu 22 \"}})", :offset 39, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Menu 22\"}})", :offset 38, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Menu\"}})", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo [:title :name])\n :visible? true)", :offset 71, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can Selam\"}})", :offset 40, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can s\"}})", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can2\"}})", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can23\"}})", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can\"}})", :offset 34, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Kerem\"}})", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo [:title ])\n :size [640 :by 400]\n :visible? true)", :offset 96, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title)\n :size [640 :by 400]\n :visible? true)", :offset 93, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo )\n :size [640 :by 400]\n :visible? true)", :offset 87, :ns "seesaw.wiki.c-3-widgets"} {:command "(defprotocol IGetK\n (get-k [this & ks]))", :offset 41, :ns "user"} {:command "(deftype SAtom [state meta validator watches]\n IGetK\n (get-k [this & ks]\n {:satom this :keys (vec ks)}))", :offset 108, :ns "user"} {:command "(SAtom. nil nil nil nil)", :offset 23, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil))", :offset 31, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b)", :offset 37, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b :c :D\n )", :offset 51, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b :c)", :offset 40, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b )", :offset 38, :ns "user"} {:command "(defn as\n [& k]\n (vec k))", :offset 25, :ns "user"} {:command "(as 1 2 3)", :offset 9, :ns "user"} {:command "(deftype SAtom []\n IGetK\n (get-k [this & ks]\n {:satom this :keys (vec ks)}))", :offset 16, :ns "user"} {:command "(get-k (SAtom. ) :a :b )", :offset 15, :ns "user"} {:command "(get-k (SAtom.) :a :b )", :offset 14, :ns "user"} {:command "(get-k (SAtom.) :a)", :offset 18, :ns "user"} {:command "(sw/frame :title (op/get-k oo [:title :name])\n :size [640 :by 400]\n :visible? true)", :offset 101, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Keremcik\"}})", :offset 39, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Keremcik a\"}})", :offset 41, :ns "seesaw.wiki.c-3-widgets"} {:command "(cons :a nil)", :offset 12, :ns "user"} {:command "(defn get-k\n [^SAtom a k & ks]\n {:satom a :keys (cons k ks)})", :offset 63, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :title)", :offset 38, :ns "user"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]\n [seesaw.options :as op]\n [seesaw.wiki.util :as util]\n [clojure.string :as str]))", :offset 175, :ns "user"} {:command "(def oo (op/satom {:title {:name \"Menu\"}}))", :offset 43, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title :name)\n :size [640 :by 400]\n :visible? true)", :offset 99, :ns "seesaw.wiki.c-3-widgets"} {:command "(def a (op/get-k oo :title :name))", :offset 34, :ns "seesaw.wiki.c-3-widgets"} {:command "(def aa (op/get-k oo :title :name))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "aa", :offset 2, :ns "seesaw.wiki.c-3-widgets"}], :remote []}} - @@ -782,7 +699,7 @@ - + @@ -796,7 +713,7 @@ - + @@ -825,21 +742,21 @@ - + - + - - + + - + - - + + From 09df21c2f360ef5ebc9c55c29ff242b8208f2b4b Mon Sep 17 00:00:00 2001 From: ertugrulcetin Date: Wed, 27 Jun 2018 19:42:04 +0300 Subject: [PATCH 04/10] removed files... --- .gitignore | 2 + .idea/ClojureProjectResolveSettings.xml | 6 - .idea/codeStyles/Project.xml | 7 - .idea/codeStyles/codeStyleConfig.xml | 5 - .idea/compiler.xml | 19 - .idea/encodings.xml | 6 - .idea/inspectionProfiles/Project_Default.xml | 6 - .../Leiningen__cider_cider_nrepl_0_16_0.xml | 9 - .../Leiningen__clojure_complete_0_2_4.xml | 9 - ...en__com_fifesoft_rsyntaxtextarea_2_5_6.xml | 9 - .../Leiningen__com_jgoodies_forms_1_2_1.xml | 9 - ...iningen__com_miglayout_miglayout_3_7_4.xml | 9 - ...ingen__com_stuartsierra_lazytest_1_1_2.xml | 9 - .idea/libraries/Leiningen__j18n_1_0_2.xml | 9 - .../Leiningen__lein_autodoc_0_9_0.xml | 9 - .../Leiningen__org_clojure_clojure_1_8_0.xml | 11 - ...gen__org_clojure_clojure_contrib_1_2_0.xml | 9 - ...ningen__org_clojure_tools_nrepl_0_2_12.xml | 9 - ...g_swinglabs_swingx_swingx_action_1_6_3.xml | 9 - ...glabs_swingx_swingx_autocomplete_1_6_3.xml | 9 - ...g_swinglabs_swingx_swingx_common_1_6_3.xml | 9 - ...org_swinglabs_swingx_swingx_core_1_6_3.xml | 9 - ...swinglabs_swingx_swingx_painters_1_6_3.xml | 9 - ...org_swinglabs_swingx_swingx_plaf_1_6_3.xml | 9 - ...Leiningen__org_tcrawley_dynapath_1_0_0.xml | 9 - .../Leiningen__swank_clojure_1_2_1.xml | 9 - .idea/misc.xml | 87 -- .idea/modules.xml | 8 - .idea/vcs.xml | 6 - .idea/workspace.xml | 863 ------------------ seesaw.iml | 37 - 31 files changed, 2 insertions(+), 1223 deletions(-) delete mode 100644 .idea/ClojureProjectResolveSettings.xml delete mode 100644 .idea/codeStyles/Project.xml delete mode 100644 .idea/codeStyles/codeStyleConfig.xml delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/encodings.xml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/libraries/Leiningen__cider_cider_nrepl_0_16_0.xml delete mode 100644 .idea/libraries/Leiningen__clojure_complete_0_2_4.xml delete mode 100644 .idea/libraries/Leiningen__com_fifesoft_rsyntaxtextarea_2_5_6.xml delete mode 100644 .idea/libraries/Leiningen__com_jgoodies_forms_1_2_1.xml delete mode 100644 .idea/libraries/Leiningen__com_miglayout_miglayout_3_7_4.xml delete mode 100644 .idea/libraries/Leiningen__com_stuartsierra_lazytest_1_1_2.xml delete mode 100644 .idea/libraries/Leiningen__j18n_1_0_2.xml delete mode 100644 .idea/libraries/Leiningen__lein_autodoc_0_9_0.xml delete mode 100644 .idea/libraries/Leiningen__org_clojure_clojure_1_8_0.xml delete mode 100644 .idea/libraries/Leiningen__org_clojure_clojure_contrib_1_2_0.xml delete mode 100644 .idea/libraries/Leiningen__org_clojure_tools_nrepl_0_2_12.xml delete mode 100644 .idea/libraries/Leiningen__org_swinglabs_swingx_swingx_action_1_6_3.xml delete mode 100644 .idea/libraries/Leiningen__org_swinglabs_swingx_swingx_autocomplete_1_6_3.xml delete mode 100644 .idea/libraries/Leiningen__org_swinglabs_swingx_swingx_common_1_6_3.xml delete mode 100644 .idea/libraries/Leiningen__org_swinglabs_swingx_swingx_core_1_6_3.xml delete mode 100644 .idea/libraries/Leiningen__org_swinglabs_swingx_swingx_painters_1_6_3.xml delete mode 100644 .idea/libraries/Leiningen__org_swinglabs_swingx_swingx_plaf_1_6_3.xml delete mode 100644 .idea/libraries/Leiningen__org_tcrawley_dynapath_1_0_0.xml delete mode 100644 .idea/libraries/Leiningen__swank_clojure_1_2_1.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/workspace.xml delete mode 100644 seesaw.iml diff --git a/.gitignore b/.gitignore index f22125ec..163f20fd 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ autodoc/** /.classpath /.project /.settings +.idea/ +*.iml \ No newline at end of file diff --git a/.idea/ClojureProjectResolveSettings.xml b/.idea/ClojureProjectResolveSettings.xml deleted file mode 100644 index df470b16..00000000 --- a/.idea/ClojureProjectResolveSettings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - IDE - - \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index b3295c5b..00000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 8f1a3b79..00000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index c57b3c50..00000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 97626ba4..00000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 0970a10f..00000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__cider_cider_nrepl_0_16_0.xml b/.idea/libraries/Leiningen__cider_cider_nrepl_0_16_0.xml deleted file mode 100644 index a60ee795..00000000 --- a/.idea/libraries/Leiningen__cider_cider_nrepl_0_16_0.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__clojure_complete_0_2_4.xml b/.idea/libraries/Leiningen__clojure_complete_0_2_4.xml deleted file mode 100644 index 5c3a95e9..00000000 --- a/.idea/libraries/Leiningen__clojure_complete_0_2_4.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__com_fifesoft_rsyntaxtextarea_2_5_6.xml b/.idea/libraries/Leiningen__com_fifesoft_rsyntaxtextarea_2_5_6.xml deleted file mode 100644 index 78b49742..00000000 --- a/.idea/libraries/Leiningen__com_fifesoft_rsyntaxtextarea_2_5_6.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__com_jgoodies_forms_1_2_1.xml b/.idea/libraries/Leiningen__com_jgoodies_forms_1_2_1.xml deleted file mode 100644 index 770cdf07..00000000 --- a/.idea/libraries/Leiningen__com_jgoodies_forms_1_2_1.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__com_miglayout_miglayout_3_7_4.xml b/.idea/libraries/Leiningen__com_miglayout_miglayout_3_7_4.xml deleted file mode 100644 index c0e7469f..00000000 --- a/.idea/libraries/Leiningen__com_miglayout_miglayout_3_7_4.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__com_stuartsierra_lazytest_1_1_2.xml b/.idea/libraries/Leiningen__com_stuartsierra_lazytest_1_1_2.xml deleted file mode 100644 index 5c76e259..00000000 --- a/.idea/libraries/Leiningen__com_stuartsierra_lazytest_1_1_2.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__j18n_1_0_2.xml b/.idea/libraries/Leiningen__j18n_1_0_2.xml deleted file mode 100644 index 0e265a82..00000000 --- a/.idea/libraries/Leiningen__j18n_1_0_2.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__lein_autodoc_0_9_0.xml b/.idea/libraries/Leiningen__lein_autodoc_0_9_0.xml deleted file mode 100644 index 1aa18b6c..00000000 --- a/.idea/libraries/Leiningen__lein_autodoc_0_9_0.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_clojure_clojure_1_8_0.xml b/.idea/libraries/Leiningen__org_clojure_clojure_1_8_0.xml deleted file mode 100644 index df42c10a..00000000 --- a/.idea/libraries/Leiningen__org_clojure_clojure_1_8_0.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_clojure_clojure_contrib_1_2_0.xml b/.idea/libraries/Leiningen__org_clojure_clojure_contrib_1_2_0.xml deleted file mode 100644 index d6d430bc..00000000 --- a/.idea/libraries/Leiningen__org_clojure_clojure_contrib_1_2_0.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_clojure_tools_nrepl_0_2_12.xml b/.idea/libraries/Leiningen__org_clojure_tools_nrepl_0_2_12.xml deleted file mode 100644 index 9e0ab2d3..00000000 --- a/.idea/libraries/Leiningen__org_clojure_tools_nrepl_0_2_12.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_action_1_6_3.xml b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_action_1_6_3.xml deleted file mode 100644 index cb0318e3..00000000 --- a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_action_1_6_3.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_autocomplete_1_6_3.xml b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_autocomplete_1_6_3.xml deleted file mode 100644 index 19078e1c..00000000 --- a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_autocomplete_1_6_3.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_common_1_6_3.xml b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_common_1_6_3.xml deleted file mode 100644 index 68fbdd75..00000000 --- a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_common_1_6_3.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_core_1_6_3.xml b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_core_1_6_3.xml deleted file mode 100644 index 760b0547..00000000 --- a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_core_1_6_3.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_painters_1_6_3.xml b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_painters_1_6_3.xml deleted file mode 100644 index 5ce254d3..00000000 --- a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_painters_1_6_3.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_plaf_1_6_3.xml b/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_plaf_1_6_3.xml deleted file mode 100644 index 023514d9..00000000 --- a/.idea/libraries/Leiningen__org_swinglabs_swingx_swingx_plaf_1_6_3.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__org_tcrawley_dynapath_1_0_0.xml b/.idea/libraries/Leiningen__org_tcrawley_dynapath_1_0_0.xml deleted file mode 100644 index 58bf9abd..00000000 --- a/.idea/libraries/Leiningen__org_tcrawley_dynapath_1_0_0.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Leiningen__swank_clojure_1_2_1.xml b/.idea/libraries/Leiningen__swank_clojure_1_2_1.xml deleted file mode 100644 index 25485b38..00000000 --- a/.idea/libraries/Leiningen__swank_clojure_1_2_1.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 2ed49eda..00000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - /usr/local/bin/ghc - /usr/local/bin/cabal - /usr/local/bin/stack - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 85c385b0..00000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddf..00000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 35e527ab..00000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,863 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - p - require - ppr - ppron - pprin - pprint - :size - :content - :aliceblue - [640 :by 480] - OptionProvider - option-provider - option-provider J - jframe - defn agent - ertus - validator - hashse - hashs - Option. - atom - dlg-result - options - defn atom - burada - ops: - watches - remove-wat - SAtom - get-k - - - sw/text - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {:repl-history {:ide [], :local [{:command "(com.sun.javafx.application.PlatformImpl/runLater (fn [_]\n (javafx.stage.Stage.)))", :offset 49, :ns "user"} {:command "(let [cls (Class/forName \"javafx.scene.control.ListCell\" false (clojure.lang.RT/baseLoader))] (.importClass *ns* cls))", :offset 21, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage.\" false (clojure.lang.RT/baseLoader))] (.importClass *ns* cls))", :offset 45, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))] (.importClass *ns* cls))", :offset 44, :ns "user"} {:command "cls", :offset 3, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)\n cls)", :offset 114, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)\n (.newInstance cls))", :offset 128, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)\n (.newInstance (.importClass *ns* cls)))", :offset 148, :ns "user"} {:command "(let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls))", :offset 108, :ns "user"} {:command "(type (let [cls (Class/forName \"javafx.stage.Stage\" false (clojure.lang.RT/baseLoader))]\n (.importClass *ns* cls)))", :offset 121, :ns "user"} {:command "(run-later\n (javafx.stage.Stage.)\n )", :offset 38, :ns "seesaw.wiki.c-4-containers"} {:command "(com.sun.javafx.application.PlatformImpl/startup (fn [_] (javafx.stage.Stage .)))", :offset 81, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (javafx.stage.Stage))", :offset 34, :ns "seesaw.wiki.c-4-containers"} {:command "(javax.swing.JButton.)", :offset 22, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (println \"As\"))", :offset 28, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (javafx.stage.Stage.))", :offset 35, :ns "seesaw.wiki.c-4-containers"} {:command "(javafx.stage.Stage.)", :offset 21, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (javafx.stage.Stage.)\n )", :offset 39, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (eval \"(javafx.stage.Stage.)\")\n )", :offset 48, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (sw/construct javafx.stage.Stage)\n )", :offset 51, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (let [c (sw/construct javafx.stage.Stage)]\n (type c)\n ))", :offset 75, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (let [c (sw/construct javafx.stage.Stage)]\n (println (type c))\n ))", :offset 85, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (let [c (sw/construct javafx.stage.Stage)]\n (println (.newInstance javafx.stage.Stage))\n ))", :offset 110, :ns "seesaw.wiki.c-4-containers"} {:command "(extend-listener-protocol AddChangeListener add-change-listener addChangeListener\n javax.swing.BoundedRangeModel\n javax.swing.JProgressBar\n javax.swing.JSlider\n javax.swing.JTabbedPane\n javax.swing.JViewport\n javax.swing.AbstractButton\n javax.swing.SingleSelectionModel\n javax.swing.SpinnerModel\n javax.swing.JSpinner\n javax.swing.ButtonModel)", :offset 353, :ns "seesaw.event"} {:command "event-groups-by-listener-class", :offset 30, :ns "seesaw.event"} {:command "(defn camelize\n \"Convert input string to camelCase from hyphen-case\"\n [s]\n (clojure.string/replace s #\"-(.)\" #(.toUpperCase ^String (%1 1))))\n(-> :drag-mouse-moved name camelize symbol)", :offset 144, :ns "user"} {:command "(ns ^{:doc \"Functions for handling events. Do not use these functions directly.\n Use (seesaw.core/listen) instead.\"\n :author \"Dave Ray\"}\n seesaw.event\n (:use [seesaw.meta :only [put-meta! get-meta]]\n [seesaw.util :only [camelize illegal-argument to-seq check-args]])\n (:import [javax.swing.event ChangeListener\n CaretListener DocumentListener\n ListSelectionListener\n TreeSelectionListener TreeExpansionListener TreeWillExpandListener TreeModelListener\n HyperlinkListener]\n [javax.swing.text Document]\n [java.awt.event WindowListener FocusListener ActionListener ItemListener\n MouseListener MouseMotionListener MouseWheelListener\n KeyListener ComponentListener]\n [java.beans PropertyChangeListener]))", :offset 849, :ns "user"} {:command "(defmacro ^{:private true } extend-listener-protocol [proto proto-method java-method & classes]\n `(extend-protocol ~proto\n ~@(mapcat (fn [c] `(~c (~proto-method [this# v#] (. this# ~java-method v#)))) classes)))", :offset 216, :ns "seesaw.event"} {:command "(defprotocol ^{:private true} AddChangeListener\n (add-change-listener [this l]))", :offset 81, :ns "seesaw.event"} {:command "(defprotocol ^{:private true} AddActionListener\n (add-action-listener [this v]))", :offset 81, :ns "seesaw.event"} {:command "(defprotocol ^{:private true} AddListSelectionListener\n (add-list-selection-listener [this v]))", :offset 96, :ns "seesaw.event"} {:command "(macroexpand-1 '(extend-listener-protocol AddChangeListener add-change-listener addChangeListener\n javax.swing.BoundedRangeModel\n javax.swing.JProgressBar\n javax.swing.JSlider\n javax.swing.JTabbedPane\n javax.swing.JViewport\n javax.swing.AbstractButton\n javax.swing.SingleSelectionModel\n javax.swing.SpinnerModel\n javax.swing.JSpinner\n javax.swing.ButtonModel))", :offset 760, :ns "seesaw.event"} {:command "(extend-listener-protocol AddChangeListener add-change-listener addChangeListener\n javax.swing.BoundedRangeModel\n javax.swing.JProgressBar\n javax.swing.JSlider\n javax.swing.JTabbedPane\n javax.swing.JViewport\n javax.swing.AbstractButton\n javax.swing.SingleSelectionModel\n javax.swing.SpinnerModel\n javax.swing.JSpinner\n javax.swing.ButtonModel)", :offset 743, :ns "seesaw.event"} {:command "(extend-listener-protocol AddListSelectionListener add-list-selection-listener addListSelectionListener\n javax.swing.JList\n javax.swing.ListSelectionModel)", :offset 157, :ns "seesaw.event"} {:command "(extend-protocol AddListSelectionListener\n javax.swing.JTable\n (add-list-selection-listener [this l]\n (add-list-selection-listener (.getSelectionModel this) l)))", :offset 170, :ns "seesaw.event"} {:command "(def ^{:private true} event-groups {\n\n :component {\n :name :component\n :class ComponentListener\n :events #{:component-hidden\n :component-moved\n :component-resized\n :component-shown}\n :install #(.addComponentListener ^java.awt.Component %1 ^ComponentListener %2)\n }\n\n :property-change {\n :name :property-change\n :class PropertyChangeListener\n :events #{:property-change}\n :install #(.addPropertyChangeListener ^java.awt.Component %1 ^PropertyChangeListener %2)\n }\n :key {\n :name :key\n :class KeyListener\n :events #{:key-pressed :key-released :key-typed}\n :install #(.addKeyListener ^java.awt.Component %1 ^KeyListener %2)\n }\n :window {\n :name :window\n :class WindowListener\n :events #{:window-activated :window-deactivated\n :window-closed :window-closing :window-opened\n :window-deiconified :window-iconified}\n :install #(.addWindowListener ^java.awt.Window %1 ^WindowListener %2)\n }\n :focus {\n :name :focus\n :class FocusListener\n :events #{:focus-gained :focus-lost}\n :install #(.addFocusListener ^java.awt.Component %1 ^FocusListener %2)\n }\n :document {\n :name :document\n :class DocumentListener\n :events #{:changed-update :insert-update :remove-update}\n :install (fn [target listener]\n (.addDocumentListener\n (if (instance? Document target)\n ^Document target\n (.getDocument ^javax.swing.text.JTextComponent target))\n ^DocumentListener listener))\n }\n :caret {\n :name :caret\n :class CaretListener\n :events #{:caret-update}\n :install #(.addCaretListener ^javax.swing.text.JTextComponent %1 ^CaretListener %2)\n }\n :action {\n :name :action\n :class ActionListener\n :events #{:action-performed}\n :install add-action-listener\n }\n :change {\n :name :change\n :class ChangeListener\n :events #{:state-changed}\n :install add-change-listener\n }\n :item {\n :name :item\n :class ItemListener\n :events #{:item-state-changed}\n :install #(.addItemListener ^java.awt.ItemSelectable %1 ^ItemListener %2)\n }\n :mouse {\n :name :mouse\n :class MouseListener\n :events #{:mouse-clicked :mouse-entered :mouse-exited :mouse-pressed :mouse-released}\n :install #(.addMouseListener ^java.awt.Component %1 ^MouseListener %2)\n }\n :mouse-motion {\n :name :mouse-motion\n :class MouseMotionListener\n :events #{:mouse-moved :mouse-dragged}\n :install #(.addMouseMotionListener ^java.awt.Component %1 ^MouseMotionListener %2)\n }\n :mouse-wheel {\n :name :mouse-wheel\n :class MouseWheelListener\n :events #{:mouse-wheel-moved}\n :install #(.addMouseWheelListener ^java.awt.Component %1 ^MouseWheelListener %2)\n }\n :list-selection {\n :name :list-selection\n :class ListSelectionListener\n :events #{:value-changed}\n :named-events #{:list-selection} ; Suppress reversed map entry\n :install add-list-selection-listener\n }\n :tree-selection {\n :name :tree-selection\n :class TreeSelectionListener\n :events #{:value-changed}\n :named-events #{:tree-selection} ; Suppress reversed map entry\n :install #(.addTreeSelectionListener ^javax.swing.JTree %1 ^TreeSelectionListener %2)\n }\n :tree-expansion {\n :name :tree-expansion\n :class TreeExpansionListener\n :events #{:tree-expanded :tree-collapsed}\n :install #(.addTreeExpansionListener ^javax.swing.JTree %1 ^TreeExpansionListener %2)\n }\n ; Since one of the methods matches the listener name, we give the overall\n ; a slightly different name to distinguish registering for *all* events\n ; versus just one.\n :tree-will-expand* {\n :name :tree-will-expand*\n :class TreeWillExpandListener\n :events #{:tree-will-expand :tree-will-collapse}\n :install #(.addTreeWillExpandListener ^javax.swing.JTree %1 ^TreeWillExpandListener %2)\n }\n :tree-model {\n :name :tree-model\n :class TreeModelListener\n :events #{:tree-nodes-changed :tree-nodes-inserted :tree-nodes-removed :tree-structure-changed}\n :install #(.addTreeModelListener ^javax.swing.tree.TreeModel %1 ^TreeModelListener %2)\n }\n\n :drag-source {\n :name :drag-source\n :class java.awt.dnd.DragSourceListener\n :events #{:drag-drop-end :drag-enter :drag-exit :drag-over :drop-action-changed}\n ; Names are mostly the same as DragTarget events, so prefix with ds-\n ; See event-method-table below too!\n :named-events #{:ds-drag-drop-end :ds-drag-enter :ds-drag-exit :ds-drag-over :ds-drop-action-changed}\n :install #(.addDragSourceListener ^java.awt.dnd.DragSource %1 ^java.awt.dnd.DragSourceListener %2)\n }\n\n :drag-source-motion {\n :name :drag-source-motion\n :class java.awt.dnd.DragSourceMotionListener\n :events #{:drag-mouse-moved}\n :install #(.addDragSourceMotionListener ^java.awt.dnd.DragSource %1 ^java.awt.dnd.DragSourceMotionListener %2)\n }\n\n :drop-target {\n :name :drop-target\n :class java.awt.dnd.DropTargetListener\n :events #{:drag-enter :drag-exit :drag-over :drop :drop-action-changed}\n ; Names are mostly the same as DragSource events, so prefix with dt-\n ; See event-method-table below too!\n :named-events #{:dt-drag-enter :dt-drag-exit :dt-drag-over :dt-drop :dt-drop-action-changed}\n :install #(.addDropTargetListener ^java.awt.dnd.DropTarget %1 ^java.awt.dnd.DropTargetListener %2)\n }\n\n :hyperlink {\n :name :hyperlink\n :class HyperlinkListener\n :events #{:hyperlink-update}\n :install #(.addHyperlinkListener ^javax.swing.JEditorPane %1\n ^HyperlinkListener %2)\n }\n})", :offset 5808, :ns "seesaw.event"} {:command "(def ^{:private true} event-groups-by-listener-class\n (into {}\n (for [{:keys [class] :as group} (vals event-groups)]\n [class group])))", :offset 151, :ns "seesaw.event"} {:command "(defn- get-listener-class [^java.lang.reflect.Method m]\n (let [[arg] (.getParameterTypes m)]\n (if (and arg (.startsWith (.getName m) \"add\"))\n arg)))", :offset 157, :ns "seesaw.event"} {:command "(defn events-for\n \"Returns a sequence of event info maps for the given object which can\n be either a widget instance or class.\n\n Used by (seesaw.dev/show-events).\n\n See:\n (seesaw.dev/show-events)\n \"\n [v]\n (let [base (->> (.getMethods (if (class? v) ^java.lang.Class v (class v)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install)))\n selection (selection-group-for v)]\n (if selection\n (cons selection base)\n base)))", :offset 593, :ns "seesaw.event"} {:command "(seesaw.core/label)", :offset 19, :ns "seesaw.event"} {:command "(require 'seesaw.core)", :offset 22, :ns "seesaw.event"} {:command "(class \"as\")", :offset 12, :ns "seesaw.event"} {:command "(defn events-for\n \"Returns a sequence of event info maps for the given object which can\n be either a widget instance or class.\n\n Used by (seesaw.dev/show-events).\n\n See:\n (seesaw.dev/show-events)\n \"\n [v]\n (let [base (->> (.getMethods (if (class? v) ^java.lang.Class v (class v)))\n (map #(do\n (println (get-listener-class %))\n (get-listener-class %)))\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install)))\n selection (selection-group-for v)]\n (if selection\n (cons selection base)\n base)))", :offset 682, :ns "seesaw.event"} {:command "(.getMethods (class \"As\"))", :offset 26, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class \"As\"))]\n (println m)\n )", :offset 55, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class \"As\"))]\n (println (get-listener-class m))\n )", :offset 76, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (println (get-listener-class m)))", :offset 88, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (get-listener-class m)]\n (println l)))", :offset 109, :ns "seesaw.event"} {:command "(filter identity [nil nil 1 2 nil])", :offset 35, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (get-listener-class m)]\n (println (map event-groups-by-listener-class l))))", :offset 146, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n )", :offset 205, :ns "seesaw.event"} {:command "(clojure.pprint/pprint event-groups-by-listener-class)", :offset 54, :ns "seesaw.event"} {:command "(count (.getMethods (class (seesaw.core/label))))", :offset 49, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n ;(map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n )", :offset 206, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n ;(map #(dissoc % :install))\n )", :offset 204, :ns "seesaw.event"} {:command "(->> (.getMethods (class (seesaw.core/label)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install))\n )", :offset 203, :ns "seesaw.event"} {:command "(defn events-for\n \"Returns a sequence of event info maps for the given object which can\n be either a widget instance or class.\n\n Used by (seesaw.dev/show-events).\n\n See:\n (seesaw.dev/show-events)\n \"\n [v]\n (let [base (->> (.getMethods (if (class? v) ^java.lang.Class v (class v)))\n (map get-listener-class)\n (filter identity)\n (map event-groups-by-listener-class)\n (filter identity)\n (map #(dissoc % :install)))\n selection (selection-group-for v)]\n (if selection\n (cons selection base)\n base)))", :offset 638, :ns "seesaw.event"} {:command "(events-for (seesaw.core/label))", :offset 32, :ns "seesaw.event"} {:command "(util/show-events (saw/button))", :offset 31, :ns "seesaw.wiki.c-1-home-page"} {:command "(util/show-events (saw/label))", :offset 30, :ns "seesaw.wiki.c-1-home-page"} {:command "(apply + [1 2])", :offset 13, :ns "user"} {:command "(apply + [1 2] [3])", :offset 17, :ns "user"} {:command "apply", :offset 5} {:command "(apply + [1 2] 3)", :offset 16, :ns "user"} {:command "(apply + [1 2] [2])", :offset 17, :ns "user"} {:command "(apply + [1 2] [[2]])", :offset 18, :ns "user"} {:command "(apply + [1 2] [])", :offset 16, :ns "user"} {:command "(defn- get-listener-class-2 [^java.lang.reflect.Method m]\n (let [[arg] (.getParameterTypes m)]\n (if (and arg (.startsWith (.getName m) \"setOn\"))\n arg)))", :offset 161, :ns "seesaw.event"} {:command "(defn- get-listener-class-2 [^java.lang.reflect.Method m]\n (let [[arg] (.getParameterTypes m)]\n (if (and arg (.startsWith (.getName m) \"setOn\"))\n (.getName m))))", :offset 170, :ns "seesaw.event"} {:command "(->> (.getMethods javafx.scene.Node)\n (map get-listener-class-2)\n (filter identity)\n ;(map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n )", :offset 198, :ns "seesaw.event"} {:command "(apply + [1 2] )", :offset 15, :ns "user"} {:command "(count(->> (.getMethods javafx.scene.Node)\n (map get-listener-class-2)\n (filter identity)\n ;(map event-groups-by-listener-class)\n ;(filter identity)\n ;(map #(dissoc % :install))\n ))", :offset 211, :ns "seesaw.event"} {:command "^java.awt.Component", :offset 19, :ns "user"} {:command "(merge {:a 1} {:b 2})", :offset 19, :ns "user"} {:command "(merge {:a {:b 3\n :c 3}} {:b 2})", :offset 43, :ns "user"} {:command "(merge {:a {:b 3\n :c 3}} {:a {:b 2}})", :offset 45, :ns "user"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (.getParameterTypes m)]\n (println l)))", :offset 109, :ns "seesaw.event"} {:command "(doseq [m (.getMethods (class (seesaw.core/label)))]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0))))", :offset 118, :ns "seesaw.event"} {:command "(doseq [m (.getMethods javafx.scene.control.ButtonBase)]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0))))", :offset 122, :ns "seesaw.event"} {:command "(.getMethods javafx.scene.control.ButtonBase)", :offset 45, :ns "seesaw.event"} {:command "(.getDeclaredMethods javafx.scene.control.ButtonBase)", :offset 53, :ns "seesaw.event"} {:command "(class javafx.scene.control.ButtonBase)", :offset 39, :ns "seesaw.event"} {:command "(Class/forName \"javafx.scene.control.ButtonBase\")", :offset 49, :ns "seesaw.event"} {:command "(run-later\n (doseq [m (.getDeclaredMethods (Class/forName \"javafx.scene.control.ButtonBase\"))]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0)))))", :offset 166, :ns "seesaw.wiki.c-4-containers"} {:command "(.getMethods (Class/forName \"javafx.scene.control.ButtonBase\"))", :offset 63, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (doseq [m (.getMethods (Class/forName \"javafx.scene.control.ButtonBase\"))]\n (when-let [l (.getParameterTypes m)]\n (println (aget l 0)))))", :offset 158, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (.getMethods (Class/forName \"javafx.scene.control.ButtonBase\")))", :offset 77, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n (.getMethods javafx.scene.control.ButtonBase))", :offset 59, :ns "seesaw.wiki.c-4-containers"} {:command "(Class/forName \"javafx.scene.control.Button\")", :offset 45, :ns "seesaw.event"} {:command "(.getDeclaredMethods javafx.scene.control.Button)", :offset 49, :ns "seesaw.event"} {:command "(.getMethods javafx.scene.control.Button)", :offset 41, :ns "seesaw.event"} {:command "(run-later\n (.getMethods javafx.scene.control.Button))", :offset 55, :ns "seesaw.wiki.c-4-containers"} {:command "(run-later\n javafx.scene.control.Button)", :offset 41, :ns "seesaw.wiki.c-4-containers"} {:command "(.getMethods javafx.scene.layout VBox)", :offset 38, :ns "seesaw.event"} {:command "(.getMethods javafx.scene.layout.VBox)", :offset 38, :ns "seesaw.event"} {:command "(ns seesaw.wiki.c-4-containers\n (:require [seesaw.core :as sw :refer :all]\n [seesaw.mig :as mig]\n [seesaw.bind :as b]\n [seesaw.wiki.util :as util])\n (:import (javafx.application Platform)\n (java.lang.reflect Constructor Parameter)))", :offset 277, :ns "user"} {:command "(ns sadas)", :offset 10, :ns "seesaw.wiki.c-4-containers"} {:command "(defmacro run-later [& body]\n `(-run-later\n (fn []\n (try ~@body\n (catch Throwable ex#\n (println ex#))))))", :offset 140, :ns "seesaw.wiki.c-4-containers"} {:command "(in-ns 'user)", :offset 13, :ns "seesaw.wiki.c-4-containers"} {:command "(javafx.embed.swing.JFXPanel.)", :offset 30, :ns "seesaw.wiki.c-4-containers"} {:command "(Platform/setImplicitExit false)", :offset 32, :ns "seesaw.wiki.c-4-containers"} {:command "(defn -run-later [^java.lang.Runnable fn]\n (if (Platform/isFxApplicationThread)\n (do\n (println \"aaa\")\n (fn))\n (Platform/runLater fn)))", :offset 152, :ns "seesaw.wiki.c-4-containers"} {:command "\n\n(javafx.embed.swing.JFXPanel.)\n(javafx.application.Platform/setImplicitExit false)\n\n(defn -run-later [^java.lang.Runnable fn]\n (if (Platform/isFxApplicationThread)\n (do\n (println \"aaa\")\n (fn))\n (Platform/runLater fn)))\n\n(defmacro run-later [& body]\n `(-run-later\n (fn []\n (try ~@body\n (catch Throwable ex#\n (println ex#))))))", :offset 380, :ns "user"} {:command "javafx.application.Platform", :offset 27, :ns "user"} {:command "(javafx.application.Platform/setImplicitExit false)\n", :offset 52, :ns "user"} {:command "\n(defn -run-later [^java.lang.Runnable fn]\n (if (Platform/isFxApplicationThread)\n (do\n (println \"aaa\")\n (fn))\n (Platform/runLater fn)))\n\n(defmacro run-later [& body]\n `(-run-later\n (fn []\n (try ~@body\n (catch Throwable ex#\n (println ex#))))))\n", :offset 296, :ns "user"} {:command "(run-later\n (type javafx.scene.control.Button))", :offset 48, :ns "user"} {:command "(run-later\n (println (type javafx.scene.control.Button)))", :offset 56, :ns "user"} {:command "(run-later\n (println (.getMethods javafx.scene.control.Button)))", :offset 34, :ns "user"} {:command "(seesaw.core/user-data)", :offset 23, :ns "seesaw.core"} {:command "(def m {:a \"Example doc string\"})", :offset 30, :ns "user"} {:command "(defn a\n (:a m)\n [x y]\n (+ x y))", :offset 33, :ns "user"} {:command "(defmacro my-defn \n [] \n )", :offset 17} {:command "(let [doc (:a m)] \n (defn a\n doc\n [x y]\n (+ x y)))", :offset 36, :ns "user"} {:command "(let [doc (:a m)] \n (defn a\n ~doc\n [x y]\n (+ x y)))", :offset 34, :ns "user"} {:command "(let [doc (:a m)] \n (defn a\n \"ok\"\n [x y]\n (+ x y)))", :offset 36, :ns "user"} {:command "(defmacro my-defn \n [doc] \n `(defn my-fn ~doc []))", :offset 47, :ns "user"} {:command "(my-defn \"ses\")", :offset 13, :ns "user"} {:command "(meta (var my-fn))", :offset 16, :ns "user"} {:command "(ns ^{:doc\n\"Core functions and macros for Seesaw. Although there are many more\n Seesaw namespaces, usually what you want is in here. Most functions\n in other namespaces have a core wrapper which adds additional\n capability or makes them easier to use.\"\n :author \"Dave Ray\"}\n seesaw.core\n (:use [seesaw.util :only [illegal-argument to-seq check-args\n constant-map resource resource-key?\n to-dimension to-insets to-url try-cast\n cond-doto to-mnemonic-keycode]]\n [seesaw.config :only [Configurable config* config!*]]\n [seesaw.options :only [ignore-option default-option bean-option\n resource-option around-option\n apply-options\n option-map option-provider\n get-option-value]]\n [seesaw.widget-options :only [widget-option-provider]]\n [seesaw.meta :only [get-meta put-meta!]]\n [seesaw.to-widget :only [ToWidget to-widget*]]\n [seesaw.make-widget :only [make-widget*]])\n (:require clojure.java.io\n clojure.set\n [seesaw color font border invoke timer selection value\n event selector icon action cells table graphics cursor scroll dnd]\n [seesaw.layout :as layout])\n (:import [javax.swing\n SwingConstants UIManager ScrollPaneConstants DropMode\n BoxLayout\n JDialog JFrame JComponent Box JPanel JScrollPane JSplitPane JToolBar JTabbedPane\n JLabel JTextField JTextArea JTextPane\n AbstractButton JButton ButtonGroup\n JOptionPane]\n [javax.swing.text JTextComponent StyleConstants]\n [java.awt Component FlowLayout BorderLayout GridLayout\n GridBagLayout GridBagConstraints\n Dimension]))", :offset 1887, :ns "user"} {:command "(ns seesaw.wiki.c-1-home-page\n (:require [seesaw.core :as saw]\n [seesaw.event :as ev]\n [seesaw.options :as opt]\n [seesaw.wiki.util :as util]\n [clojure.string :as string]))", :offset 216, :ns "user"} {:command "(def p (sw/vertical-panel :items [\"This\" \"is\" \"a\" \"vertical\" \"stack of\" \"JLabels\"]))", :offset 84, :ns "seesaw.wiki.c-3-widgets"} {:command ":as", :offset 3, :ns "seesaw.wiki.c-3-widgets"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core]))", :offset 55, :ns "user"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]))", :offset 62, :ns "user"} {:command "(ns seesaw.widgets.log-window\n (:use [seesaw.core]\n [seesaw.bind :only [bind]]\n [seesaw.keymap :only [map-key]]\n [seesaw.invoke :only [signaller]]\n [seesaw.options :only [apply-options option-map default-option]]\n [seesaw.widget-options :only [WidgetOptionProvider]]))", :offset 304, :ns "user"} {:command "(def fl (let [choose (fn [e] (sw/alert \"I should open a file chooser\"))]\n (sw/flow-panel\n :items [\"File\" [:fill-h 5]\n (sw/text (System/getProperty \"user.dir\")) [:fill-h 5]\n (sw/action :handler choose :name \"...\")])))", :offset 274, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content (java.net.URL. \"https://github.com/daveray/seesaw/wiki/Widgets\")\n :size [640 :by 400]\n :visible? true)", :offset 195, :ns "seesaw.wiki.c-3-widgets"} {:command "(util/show-options (sw/label))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/button :id :the-button :text \"Push me\")", :offset 43, :ns "seesaw.wiki.c-3-widgets"} {:command "(def fl (let [choose (fn [e] (sw/alert \"I should open a file chooser\"))]pr\n (sw/flow-panel\n :items [\"File\" [:fill-h 5]\n (sw/text (System/getProperty \"user.dir\")) [:fill-h 5]\n (sw/action :handler choose :name \"...\")])))", :offset 276, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content fl\n :size [640 :by 400]\n :visible? true)", :offset 133, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content \"Saas\"\n :size [640 :by 400]\n :visible? true)", :offset 137, :ns "seesaw.wiki.c-3-widgets"} {:command "(def a (atom 1))", :offset 14, :ns "user"} {:command "(type @a)", :offset 8, :ns "user"} {:command "(.hashCode a)", :offset 12, :ns "user"} {:command "(.hashCode @a)", :offset 13, :ns "user"} {:command "(def b (atom 1))", :offset 6, :ns "user"} {:command "(.hashCode @b)", :offset 13, :ns "user"} {:command "(def o (Option. :deneme (fn [] ) (fn [] ) nil))", :offset 47, :ns "seesaw.options"} {:command "(def o2 (Option. :deneme (fn [] ) (fn [] ) nil))", :offset 48, :ns "seesaw.options"} {:command "(== o o2)", :offset 9, :ns "seesaw.options"} {:command "(= o o2)", :offset 8, :ns "seesaw.options"} {:command "(= o o)", :offset 7, :ns "seesaw.options"} {:command "(def m {o \"deneme\"})", :offset 20, :ns "seesaw.options"} {:command "(get m o)", :offset 9, :ns "seesaw.options"} {:command "( + 1 1)", :offset 7, :ns "user"} {:command "(def k (atom \"As\"))", :offset 16, :ns "user"} {:command "(def mm {k \"den\"})", :offset 15, :ns "user"} {:command "(get mm k)", :offset 9, :ns "user"} {:command "(ns ^{:doc\n \"Core functions and macros for Seesaw. Although there are many more\n Seesaw namespaces, usually what you want is in here. Most functions\n in other namespaces have a core wrapper which adds additional\n capability or makes them easier to use.\"\n :author \"Dave Ray\"}\nseesaw.core\n (:use [seesaw.util :only [illegal-argument to-seq check-args\n constant-map resource resource-key?\n to-dimension to-insets to-url try-cast\n cond-doto to-mnemonic-keycode]]\n [seesaw.config :only [Configurable config* config!*]]\n [seesaw.options :only [ignore-option default-option bean-option\n resource-option around-option\n apply-options\n option-map option-provider\n get-option-value]]\n [seesaw.widget-options :only [widget-option-provider]]\n [seesaw.meta :only [get-meta put-meta!]]\n [seesaw.to-widget :only [ToWidget to-widget*]]\n [seesaw.make-widget :only [make-widget*]])\n (:require clojure.java.io\n clojure.set\n [seesaw color font border invoke timer selection value\n event selector icon action cells table graphics cursor scroll dnd]\n [seesaw.layout :as layout])\n (:import [javax.swing\n SwingConstants UIManager ScrollPaneConstants DropMode\n BoxLayout\n JDialog JFrame JComponent Box JPanel JScrollPane JSplitPane JToolBar JTabbedPane\n JLabel JTextField JTextArea JTextPane\n AbstractButton JButton ButtonGroup\n JOptionPane]\n [javax.swing.text JTextComponent StyleConstants]\n [java.awt Component FlowLayout BorderLayout GridLayout\n GridBagLayout GridBagConstraints\n Dimension]\n (clojure.lang IAtom IDeref IMeta)))", :offset 1994, :ns "user"} {:command "(deftype SAtom [^:mutable state meta validator ^:mutable watches]\n IAtom\n\n\n IDeref\n (deref [this]\n (println \"Derefeedd!!!\")\n state)\n\n IMeta\n (meta [_] meta))", :offset 168, :ns "seesaw.core"} {:command "(defn stom\n ([x] (new SAtom x))\n ([x & options] (setup-reference (stom x) options)))", :offset 86, :ns "seesaw.core"} {:command "(defn stom\n ([x] (new SAtom))\n ([x & options] (setup-reference (stom x) options)))", :offset 84, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom.))\n ([x & options] (setup-reference (stom x) options)))", :offset 81, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (setup-reference (stom x) options)))", :offset 95, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (#'setup-reference (stom x) options)))", :offset 97, :ns "seesaw.core"} {:command "(defn s-reference \n [^clojure.lang.ARef r options]\n (let [opts (apply hash-map options)]\n (when (:meta opts)\n (.resetMeta r (:meta opts)))\n (when (:validator opts)\n (.setValidator r (:validator opts)))\n r))", :offset 227, :ns "seesaw.core"} {:command "(defn stom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (s-reference (stom x) options)))", :offset 91, :ns "seesaw.core"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content \"Ertus\"\n :size [640 :by 400]\n :visible? true)", :offset 138, :ns "seesaw.wiki.c-3-widgets"} {:command "(deftype SAtom [^:mutable state meta validator ^:mutable watches]\n IAtom\n\n\n IDeref\n (deref [this]\n (println (type this))\n (println state)\n state)\n\n IMeta\n (meta [_] meta))", :offset 185, :ns "seesaw.core"} {:command "(defn satom\n ([x] (SAtom. x nil nil nil))\n ([x & options] (s-reference (satom x) options)))", :offset 93, :ns "seesaw.core"} {:command "@ak", :offset 3, :ns "seesaw.core"} {:command "(deftype SAtom [state meta validator watches]\n IAtom\n (swap [this f]\n (swap! state f))\n (swap [this f x]\n (swap! state f x))\n (swap [this f x y]\n (swap! state f x y))\n (swap [this f x y args]\n (swap! state f x y args))\n (compareAndSet [this old new]\n (compare-and-set! state old new))\n (reset [this new]\n (reset! state new))\n\n IDeref\n (deref [this]\n (println (type this))\n @state)\n\n IMeta\n (meta [_] meta))", :offset 441, :ns "seesaw.core"} {:command "(def ak (satom 1))", :offset 18, :ns "seesaw.core"} {:command "(swap! ak inc)", :offset 14, :ns "seesaw.core"} {:command "(def kol (atom 5))", :offset 18, :ns "seesaw.core"} {:command "(swap! kol inc)", :offset 15, :ns "seesaw.core"} {:command "(type ak)", :offset 9, :ns "seesaw.core"} {:command "(val {:a 1})", :offset 10, :ns "user"} {:command "(vals {:a 1})", :offset 5, :ns "user"} {:command "(vals {:a {:b 1}})", :offset 15, :ns "user"} {:command "(first (vals {:a {:b 1}}))", :offset 25, :ns "user"} {:command "(ns ^{:doc \"Functions for dealing with options.\"\n :author \"Dave Ray\"}\nseesaw.options\n (:use [seesaw.util :only [camelize illegal-argument check-args\n resource resource-key?]])\n (:import (clojure.lang IAtom IDeref IMeta)))", :offset 258, :ns "user"} {:command "(def s (atom {}))", :offset 17, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n IAtom\n (swap [this f]\n (let [v (swap! state f)\n target-ins (get s state)\n options (vals (first (vals target-ins)))]\n (doseq [opt options]\n (if-let [setter (:setter opt)]\n (setter target-ins v)\n (illegal-argument \"No setter found for option %s\" (:name opt))))))\n (swap [this f x]\n (swap! state f x))\n (swap [this f x y]\n (swap! state f x y))\n (swap [this f x y args]\n (swap! state f x y args))\n (compareAndSet [this old new]\n (compare-and-set! state old new))\n (reset [this new]\n (reset! state new))\n\n IDeref\n (deref [this]\n (println (type this))\n @state)\n\n IMeta\n (meta [_] meta))", :offset 722, :ns "seesaw.options"} {:command "(defn s-reference\n [^clojure.lang.ARef r options]\n (let [opts (apply hash-map options)]\n (when (:meta opts)\n (.resetMeta r (:meta opts)))\n (when (:validator opts)\n (.setValidator r (:validator opts)))\n r))", :offset 226, :ns "seesaw.options"} {:command "(defn satom\n ([x] (SAtom. (atom x) nil nil nil))\n ([x & options] (s-reference (satom x) options)))", :offset 100, :ns "seesaw.options"} {:command "(def k (satom 1))", :offset 17, :ns "seesaw.options"} {:command "(type k)", :offset 8, :ns "seesaw.options"} {:command "(= seesaw.options.SAtom (type k))", :offset 33, :ns "seesaw.options"} {:command "(= seesaw.options.SAtom (class k))", :offset 34, :ns "seesaw.options"} {:command "(= SAtom (class k))", :offset 19, :ns "seesaw.options"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]\n [seesaw.wiki.util :as util]))", :offset 102, :ns "user"} {:command "@title", :offset 6, :ns "seesaw.wiki.c-3-widgets"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]\n [seesaw.options :as op]\n [seesaw.wiki.util :as util]))", :offset 138, :ns "user"} {:command "(def title (op/satom 1))", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content 12\n :size [640 :by 400]\n :visible? true)", :offset 133, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"DEneme\"))", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "op/s", :offset 4, :ns "seesaw.wiki.c-3-widgets"} {:command "(vals (first (vals (get @op/s title))))", :offset 39, :ns "seesaw.wiki.c-3-widgets"} {:command "(first (vals (get @op/s title)))", :offset 32, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content title\n :size [640 :by 400]\n :visible? true)", :offset 136, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"sesver\"))", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"Deneme\"))", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] [1200 :by 800]))", :offset 37, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"G]zel\"))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [1200 :by 800]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [200 :by 800]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 800]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 800]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 10]))", :offset 34, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 1000]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [600 :by 200]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(doseq [a {:a 1 :b 2}]\n a)", :offset 26, :ns "user"} {:command "(doseq [a {:a 1 :b 2}]\n (println a))", :offset 35, :ns "user"} {:command "(doseq [[a b] {:a 1 :b 2}]\n (println a b))", :offset 41, :ns "user"} {:command "(doseq [[x y] {:a {:b 2 :c 3}}]\n (println x y))", :offset 46, :ns "user"} {:command "(swap! title (fn [a] \"aaaa\"))", :offset 29, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] \"bbb\"))", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [1600 :by 200]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 100]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 200]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 400]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(def chp (atom 1))", :offset 16, :ns "user"} {:command "(compare-and-set! chp 2)", :offset 23, :ns "user"} {:command "(compare-and-set! chp 1 2)", :offset 24, :ns "user"} {:command "(compare-and-set! chp 2 2)", :offset 23, :ns "user"} {:command "(compare-and-set! chp 3 2)", :offset 23, :ns "user"} {:command "(reset! chp 8)", :offset 13, :ns "user"} {:command "(swap! title (fn [a] \"bbb22\"))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a ] a) \"ses\")", :offset 31, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] a) \"ses\" \"aa\")", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] a) )", :offset 25, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title (fn [a] a) \"aa\")", :offset 29, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title str/capitalize)", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title str/upper-case)", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! title str/lower-case)", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"deneme\")", :offset 23, :ns "seesaw.wiki.c-3-widgets"} {:command "(def kkk (satom 1))", :offset 19, :ns "seesaw.wiki.c-3-widgets"} {:command "(defn- apply-setter\n [this val]\n (doseq [[ins m] (get @s this)]\n (doseq [opt (vals m)]\n (if-let [setter (:setter opt)]\n (do\n (setter ins val)\n val)\n (illegal-argument \"No setter found for option %s\" (:name opt))))))", :offset 257, :ns "seesaw.options"} {:command "(defn- apply-setter\n [this val]\n (doseq [[ins m] (get @s this)]\n (doseq [opt (vals m)]\n (if-let [setter (:setter opt)]\n (setter ins val)\n (illegal-argument \"No setter found for option %s\" (:name opt)))))\n val)", :offset 234, :ns "seesaw.options"} {:command "(def kkk (op/satom 1))", :offset 22, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! kkk inc)", :offset 15, :ns "seesaw.wiki.c-3-widgets"} {:command "(def title (op/satom \"Ertus\"))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(def size (op/satom [650 :by 450]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"An example\"\n :on-close :hide\n :content title\n :size size\n :visible? true)", :offset 127, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 500]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [300 :by 300]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Ses ver\")", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Ses ver Türkiye!!!\")", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Aga selam\")", :offset 26, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Ataturk\")", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Deneme\")", :offset 23, :ns "seesaw.wiki.c-3-widgets"} {:command "(def kkk (op/satom {}))", :offset 23, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! kkk assoc-in [:a :b :c] 1)", :offset 33, :ns "seesaw.wiki.c-3-widgets"} {:command "@op/s", :offset 5, :ns "seesaw.wiki.c-3-widgets"} {:command "(vals (get @op/s title))", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(get @op/s title)", :offset 17, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Denemesa\")", :offset 25, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! title \"Hey\")", :offset 20, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [15000 :by 300]))", :offset 37, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [1500 :by 300]))", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! size (fn [a] [150 :by 300]))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :menubar\n (sw/menubar :items\n [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])]))", :offset 170, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :visible? true\n :menubar\n (sw/menubar :items\n [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])]))", :offset 213, :ns "seesaw.wiki.c-3-widgets"} {:command "(def file (op/satom \"File\"))", :offset 28, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :visible? true\n :menubar\n (sw/menubar :items\n [(sw/menu :text file :items [])\n (sw/menu :text \"Edit\" :items [])]))", :offset 211, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! file \"Aga\")", :offset 19, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! file \"File\")", :offset 20, :ns "seesaw.wiki.c-3-widgets"} {:command "(def items (op/satom [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])\n (sw/menu :text \"Exit\" :items [])]))", :offset 167, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title \"MENUS!\"\n :visible? true\n :menubar\n (sw/menubar :items\n items))", :offset 128, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! items [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])\n (sw/menu :text \"Exit 2\" :items [])])", :offset 147, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! items [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])])", :offset 97, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! items [(sw/menu :text \"File\" :items [])])", :offset 49, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/menubar :items\n [(sw/menu :text \"File\" :items [])\n (sw/menu :text \"Edit\" :items [])\n (sw/menu :text \"Exit\" :items [])])", :offset 158, :ns "seesaw.wiki.c-3-widgets"} {:command "(defn setup-reference*\n [^clojure.lang.ARef r options]\n (let [opts (apply hash-map options)]\n (when (:meta opts)\n (.resetMeta r (:meta opts)))\n (when (:validator opts)\n (.setValidator r (:validator opts)))\n r))", :offset 231, :ns "seesaw.options"} {:command "(defn satom\n ([x] (SAtom. (atom x) nil nil nil))\n ([x & options] (setup-reference* (satom x) options)))", :offset 105, :ns "seesaw.options"} {:command "(def a (satom {}))", :offset 18, :ns "seesaw.options"} {:command "(ns ^{:doc \"Functions for dealing with options.\"\n :author \"Dave Ray\"}\nseesaw.options\n (:use [seesaw.util :only [camelize illegal-argument check-args\n resource resource-key?]])\n (:import (clojure.lang IAtom IDeref IMeta IRef)))", :offset 263, :ns "user"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this (swap! state f)))\n (swap [this f x]\n (apply-setter this (swap! state f x)))\n (swap [this f x y]\n (apply-setter this (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this new)))\n (reset [this new]\n (apply-setter this (reset! state new)))\n\n IDeref\n (deref [this]\n @state)\n\n IRef\n (addWatch [this k call]\n (.addWatch state k call))\n (removeWatch [this k]\n (.removeWatch state k))\n\n IMeta\n (meta [_] meta))", :offset 669, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this (swap! state f)))\n (swap [this f x]\n (apply-setter this (swap! state f x)))\n (swap [this f x y]\n (apply-setter this (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this new)))\n (reset [this new]\n (apply-setter this (reset! state new)))\n\n IDeref\n (deref [this]\n @state)\n\n IRef\n (addWatch [this k call]\n (.addWatch this k call))\n (removeWatch [this k]\n (.removeWatch this k))\n\n IMeta\n (meta [_] meta))", :offset 667, :ns "seesaw.options"} {:command "(add-watch a :watcher\n (fn [key atom old-state new-state]\n (prn \"-- Atom Changed --\")\n (prn \"key\" key)\n (prn \"atom\" atom)\n (prn \"old-state\" old-state)\n (prn \"new-state\" new-state)))", :offset 251, :ns "seesaw.options"} {:command "(.getWatches)", :offset 13, :ns "seesaw.options"} {:command "(.getWatches a)", :offset 15, :ns "seesaw.options"} {:command "(remove-watch a :watcher)", :offset 25, :ns "seesaw.options"} {:command "(reset! a {:foo \"bar\"})", :offset 23, :ns "seesaw.options"} {:command "(defprotocol IGetK\n (get-k [this & k] \"Gets the satom's key\")\n (get-k-in [this ks] \"Gets the satom's neste key\"))", :offset 36, :ns "user"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this state (swap! state f)))\n (swap [this f x]\n (apply-setter this state (swap! state f x)))\n (swap [this f x y]\n (apply-setter this state (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this state (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this state new)))\n (reset [this new]\n (apply-setter this state (reset! state new)))\n\n IDeref\n (deref [_]\n @state)\n\n IRef\n (addWatch [_ k call]\n (.addWatch state k call))\n (removeWatch [_ k]\n (.removeWatch state k))\n\n IGetK\n (get-k [this & ks]\n {:satom this :key ks})\n\n IMeta\n (meta [_] meta))", :offset 753, :ns "seesaw.options"} {:command "(defprotocol IGetK\n (get-k [this k & ks]))", :offset 43, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this state (swap! state f)))\n (swap [this f x]\n (apply-setter this state (swap! state f x)))\n (swap [this f x y]\n (apply-setter this state (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this state (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this state new)))\n (reset [this new]\n (apply-setter this state (reset! state new)))\n\n IDeref\n (deref [_]\n @state)\n\n IRef\n (addWatch [_ k call]\n (.addWatch state k call))\n (removeWatch [_ k]\n (.removeWatch state k))\n\n IGetK\n (get-k [this k & ks]\n {:satom this :key (cons k ks)})\n\n IMeta\n (meta [_] meta))", :offset 764, :ns "seesaw.options"} {:command "(deftype SAtom [state meta validator watches]\n\n IAtom\n (swap [this f]\n (apply-setter this state (swap! state f)))\n (swap [this f x]\n (apply-setter this state (swap! state f x)))\n (swap [this f x y]\n (apply-setter this state (swap! state f x y)))\n (swap [this f x y args]\n (apply-setter this state (swap! state f x y args)))\n (compareAndSet [this old new]\n (when (compare-and-set! state old new)\n (apply-setter this state new)))\n (reset [this new]\n (apply-setter this state (reset! state new)))\n\n IDeref\n (deref [_]\n @state)\n\n IRef\n (addWatch [_ k call]\n (.addWatch state k call))\n (removeWatch [_ k]\n (.removeWatch state k))\n\n IGetK\n (get-k [this k & ks]\n {:satom this :keys (cons k ks)})\n\n IMeta\n (meta [_] meta))", :offset 765, :ns "seesaw.options"} {:command "(map? {:A 1})", :offset 11, :ns "user"} {:command "(map? [:a 1])", :offset 11, :ns "user"} {:command "(def oo (op/satoms {:title \"<Menu>\"}))", :offset 38, :ns "seesaw.wiki.c-3-widgets"} {:command "(def size (op/satom {:as 12}))", :offset 30, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title :a)\n :visible? true)", :offset 66, :ns "seesaw.wiki.c-3-widgets"} {:command "@oo", :offset 3, :ns "seesaw.wiki.c-3-widgets"} {:command "(def ooo (Option. :a nil nil nil))", :offset 34, :ns "seesaw.options"} {:command "ooo", :offset 3, :ns "seesaw.options"} {:command "(assoc ooo :ass \"sie\")", :offset 22, :ns "seesaw.options"} {:command "(sw/frame :title oo\n :visible? true)", :offset 45, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo \"asd\")", :offset 17, :ns "seesaw.wiki.c-3-widgets"} {:command "(swap! oo (fn [a] \"Ertu\"))", :offset 26, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo \"asdadadada\")", :offset 24, :ns "seesaw.wiki.c-3-widgets"} {:command "(defn- apply-setter\n [this old-val new-val]\n (when-not (= old-val new-val)\n (println \"come\")\n (println this)\n (doseq [[ins m] (get @satoms this)]\n (println \"yy\")\n (doseq [opt (vals m)]\n (println \"aaa\")\n (if-let [setter (:setter opt)]\n (setter ins new-val)\n (illegal-argument \"No setter found for option %s\" (:name opt))))))\n new-val)", :offset 387, :ns "seesaw.options"} {:command "(reset! oo \"asdadadada22\")", :offset 26, :ns "seesaw.wiki.c-3-widgets"} {:command "oo", :offset 2, :ns "seesaw.wiki.c-3-widgets"} {:command "(def oo (op/satom {:title \"<Menu>\"}))", :offset 37, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title)\n :visible? true)", :offset 63, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title \"Deneme\"})", :offset 29, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title \"Deneme 22\"})", :offset 32, :ns "seesaw.wiki.c-3-widgets"} {:command "(def m {:a {:b {:c 3}}})", :offset 20, :ns "user"} {:command "(apply get-in m :a :b :c)", :offset 24, :ns "user"} {:command "(apply get-in [m :a :b :c])", :offset 25, :ns "user"} {:command "(apply get-in [m [:a :b :c]])", :offset 26, :ns "user"} {:command "(merge [m '(1 2 3)])", :offset 17, :ns "user"} {:command "(merge [[:a] '(1 2 3)])", :offset 11, :ns "user"} {:command "(merge '[l] [[:a :b]])", :offset 19, :ns "user"} {:command "(cons {:a 1} [:a :b :c])", :offset 22, :ns "user"} {:command "(reset! oo {:title {:name \"Menu 22 23\"}})", :offset 41, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Menu 22 \"}})", :offset 39, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Menu 22\"}})", :offset 38, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Menu\"}})", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo [:title :name])\n :visible? true)", :offset 71, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can Selam\"}})", :offset 40, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can s\"}})", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can2\"}})", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can23\"}})", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Can\"}})", :offset 34, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Kerem\"}})", :offset 36, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo [:title ])\n :size [640 :by 400]\n :visible? true)", :offset 96, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title)\n :size [640 :by 400]\n :visible? true)", :offset 93, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo )\n :size [640 :by 400]\n :visible? true)", :offset 87, :ns "seesaw.wiki.c-3-widgets"} {:command "(defprotocol IGetK\n (get-k [this & ks]))", :offset 41, :ns "user"} {:command "(deftype SAtom [state meta validator watches]\n IGetK\n (get-k [this & ks]\n {:satom this :keys (vec ks)}))", :offset 108, :ns "user"} {:command "(SAtom. nil nil nil nil)", :offset 23, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil))", :offset 31, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b)", :offset 37, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b :c :D\n )", :offset 51, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b :c)", :offset 40, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :a :b )", :offset 38, :ns "user"} {:command "(defn as\n [& k]\n (vec k))", :offset 25, :ns "user"} {:command "(as 1 2 3)", :offset 9, :ns "user"} {:command "(deftype SAtom []\n IGetK\n (get-k [this & ks]\n {:satom this :keys (vec ks)}))", :offset 16, :ns "user"} {:command "(get-k (SAtom. ) :a :b )", :offset 15, :ns "user"} {:command "(get-k (SAtom.) :a :b )", :offset 14, :ns "user"} {:command "(get-k (SAtom.) :a)", :offset 18, :ns "user"} {:command "(sw/frame :title (op/get-k oo [:title :name])\n :size [640 :by 400]\n :visible? true)", :offset 101, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Keremcik\"}})", :offset 39, :ns "seesaw.wiki.c-3-widgets"} {:command "(reset! oo {:title {:name \"Keremcik a\"}})", :offset 41, :ns "seesaw.wiki.c-3-widgets"} {:command "(cons :a nil)", :offset 12, :ns "user"} {:command "(defn get-k\n [^SAtom a k & ks]\n {:satom a :keys (cons k ks)})", :offset 63, :ns "user"} {:command "(get-k (SAtom. nil nil nil nil) :title)", :offset 38, :ns "user"} {:command "(ns seesaw.wiki.c-3-widgets\n (:require [seesaw.core :as sw]\n [seesaw.options :as op]\n [seesaw.wiki.util :as util]\n [clojure.string :as str]))", :offset 175, :ns "user"} {:command "(def oo (op/satom {:title {:name \"Menu\"}}))", :offset 43, :ns "seesaw.wiki.c-3-widgets"} {:command "(sw/frame :title (op/get-k oo :title :name)\n :size [640 :by 400]\n :visible? true)", :offset 99, :ns "seesaw.wiki.c-3-widgets"} {:command "(def a (op/get-k oo :title :name))", :offset 34, :ns "seesaw.wiki.c-3-widgets"} {:command "(def aa (op/get-k oo :title :name))", :offset 35, :ns "seesaw.wiki.c-3-widgets"} {:command "aa", :offset 2, :ns "seesaw.wiki.c-3-widgets"}], :remote []}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1510870004380 - - - 1530117175994 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No facets are configured - - - - - - - - scala-sdk-2.11.7 - - - - - - - - 1.8 (1) - - - - - - - - seesaw - - - - - - - - 1.8 - - - - - - - - Leiningen: clojure-complete:0.2.4 - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seesaw.iml b/seesaw.iml deleted file mode 100644 index 06df9c2d..00000000 --- a/seesaw.iml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From c0156c256a04b0ec8db06beef31a4598f21afcf7 Mon Sep 17 00:00:00 2001 From: ertugrulcetin Date: Tue, 28 Aug 2018 13:29:40 +0300 Subject: [PATCH 05/10] small changes --- .gitignore | 3 +- src/seesaw/options.clj | 1 + src/seesaw/rsyntax.clj | 2 +- src/seesaw/wiki/c_3_widgets.clj | 62 +++++++++++++++------------------ src/seesaw/wiki/util.clj | 2 +- 5 files changed, 34 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index 163f20fd..90bde282 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ autodoc/** /.project /.settings .idea/ -*.iml \ No newline at end of file +*.iml +src/seesaw/wiki \ No newline at end of file diff --git a/src/seesaw/options.clj b/src/seesaw/options.clj index f3da3daa..260068cb 100644 --- a/src/seesaw/options.clj +++ b/src/seesaw/options.clj @@ -109,6 +109,7 @@ seesaw.options [(str "A i18n prefix for a resource with keys") (pr-str keys)])) +;;TODO there is a small memory leak, find out how to fix it! (def satoms (atom {})) (defn- apply-setter diff --git a/src/seesaw/rsyntax.clj b/src/seesaw/rsyntax.clj index 70eb7765..87c8942c 100644 --- a/src/seesaw/rsyntax.clj +++ b/src/seesaw/rsyntax.clj @@ -54,4 +54,4 @@ http://javadoc.fifesoft.com/rsyntaxtextarea/ " [& opts] - (apply core/config! (org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.) opts)) + (apply core/config! (org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.) opts)) \ No newline at end of file diff --git a/src/seesaw/wiki/c_3_widgets.clj b/src/seesaw/wiki/c_3_widgets.clj index e3529dba..36c36689 100644 --- a/src/seesaw/wiki/c_3_widgets.clj +++ b/src/seesaw/wiki/c_3_widgets.clj @@ -2,37 +2,22 @@ (:require [seesaw.core :as sw] [seesaw.options :as op] [seesaw.wiki.util :as util] + [seesaw.rsyntax :as rs] [clojure.string :as str])) -(comment - (seesaw.core/make-widget)) +(def size (op/satom [150 :by 300])) +(def title (op/satom "Title")) -(def p (sw/vertical-panel :items ["This" "is" "a" "vertical" "stack of" "JLabels"])) +(swap! size (fn [a] [600 :by 600])) +(swap! title (fn [_] "asdbsahd")) -(def fl (let [choose (fn [e] (sw/alert "I should open a file chooser"))] - (sw/flow-panel - :items ["File" [:fill-h 5] - (sw/text (System/getProperty "user.dir")) [:fill-h 5] - (sw/action :handler choose :name "...")]))) - -(def title (op/satom "Ertus")) - -(vals (get @op/satoms title)) - -(swap! title str/lower-case) - -(reset! title "Hey") - - -(def size (op/satom {:as 12})) - -(swap! size (fn [a] [150 :by 300])) - -(sw/frame :title "An example" - :on-close :hide - :content title - :size size - :visible? true) +(def ff (sw/frame :title title + :on-close :hide + :content (sw/scrollable (rs/text-area :syntax :clojure + :background "#F5EEDF" + :selection-color :aliceblue)) + :size size + :visible? true)) (sw/frame :title "An example" :on-close :hide @@ -40,7 +25,7 @@ :size [640 :by 400] :visible? true) -(util/show-options (sw/label)) +(util/show-options (rs/text-area :syntax :clojure)) (sw/button :id :the-button :text "Push me") @@ -48,7 +33,6 @@ (sw/select root [:#the-button]) - (def kkk (op/satom {})) (swap! kkk assoc-in [:a :b :c] 1) @@ -66,10 +50,22 @@ (sw/menu :text "Edit" :items []) (sw/menu :text "Exit" :items [])]) -(def oo (op/satom {:title {:name "Menu"}})) +(def oo (op/satom {:title {:name "Menu" :age "12"}})) -(reset! oo {:title {:name "Keremcik aa"}}) +(reset! oo {:title {:name "aaa22as34" :age "15"}}) -(sw/frame :title (op/get-k oo :title ) +(sw/frame :title (op/get-k oo :title :age) :size [640 :by 400] - :visible? true) \ No newline at end of file + :visible? true) + + +({:a 1} :a) +[1 2 3] +#{1 2 3} +'(1 2 3 4) + +(defn my-add + [x y] + (+ x y)) + +(my-add 1 1) \ No newline at end of file diff --git a/src/seesaw/wiki/util.clj b/src/seesaw/wiki/util.clj index f1467182..64925e93 100644 --- a/src/seesaw/wiki/util.clj +++ b/src/seesaw/wiki/util.clj @@ -3,7 +3,7 @@ [seesaw.util :as util] [clojure.string :as string] [seesaw.event :as ev])) - +g (defn show-events "Given a class or instance, print information about all supported events. From 8148a6abc670ca1ac4e4f3084cefafc05a2015c0 Mon Sep 17 00:00:00 2001 From: ertugrulcetin Date: Tue, 28 Aug 2018 13:29:58 +0300 Subject: [PATCH 06/10] remove dir wiki --- src/seesaw/wiki/c_1_home_page.clj | 12 -- src/seesaw/wiki/c_2_frames.clj | 15 -- src/seesaw/wiki/c_3_widgets.clj | 71 --------- src/seesaw/wiki/c_4_containers.clj | 227 ----------------------------- src/seesaw/wiki/util.clj | 41 ------ 5 files changed, 366 deletions(-) delete mode 100644 src/seesaw/wiki/c_1_home_page.clj delete mode 100644 src/seesaw/wiki/c_2_frames.clj delete mode 100644 src/seesaw/wiki/c_3_widgets.clj delete mode 100644 src/seesaw/wiki/c_4_containers.clj delete mode 100644 src/seesaw/wiki/util.clj diff --git a/src/seesaw/wiki/c_1_home_page.clj b/src/seesaw/wiki/c_1_home_page.clj deleted file mode 100644 index 3ea10027..00000000 --- a/src/seesaw/wiki/c_1_home_page.clj +++ /dev/null @@ -1,12 +0,0 @@ -(ns seesaw.wiki.c-1-home-page - (:require [seesaw.core :as saw] - [seesaw.event :as ev] - [seesaw.options :as opt] - [seesaw.wiki.util :as util] - [clojure.string :as string])) - -(util/show-options (saw/label)) - -(util/show-events (saw/label)) - -(util/show-events (saw/button)) \ No newline at end of file diff --git a/src/seesaw/wiki/c_2_frames.clj b/src/seesaw/wiki/c_2_frames.clj deleted file mode 100644 index 9718a151..00000000 --- a/src/seesaw/wiki/c_2_frames.clj +++ /dev/null @@ -1,15 +0,0 @@ -(ns seesaw.wiki.c-2-frames - (:require [seesaw.core :as sw] - [seesaw.wiki.util :as util])) - -(def f (sw/frame :title "An example" - :on-close :hide - :content "Some Content" - :size [640 :by 400] - :visible? true)) - -(-> f sw/show!) - -(util/show-options f) - -(seesaw.core/to-root f) \ No newline at end of file diff --git a/src/seesaw/wiki/c_3_widgets.clj b/src/seesaw/wiki/c_3_widgets.clj deleted file mode 100644 index 36c36689..00000000 --- a/src/seesaw/wiki/c_3_widgets.clj +++ /dev/null @@ -1,71 +0,0 @@ -(ns seesaw.wiki.c-3-widgets - (:require [seesaw.core :as sw] - [seesaw.options :as op] - [seesaw.wiki.util :as util] - [seesaw.rsyntax :as rs] - [clojure.string :as str])) - -(def size (op/satom [150 :by 300])) -(def title (op/satom "Title")) - -(swap! size (fn [a] [600 :by 600])) -(swap! title (fn [_] "asdbsahd")) - -(def ff (sw/frame :title title - :on-close :hide - :content (sw/scrollable (rs/text-area :syntax :clojure - :background "#F5EEDF" - :selection-color :aliceblue)) - :size size - :visible? true)) - -(sw/frame :title "An example" - :on-close :hide - :content (java.net.URL. "https://github.com/daveray/seesaw/wiki/Widgets") - :size [640 :by 400] - :visible? true) - -(util/show-options (rs/text-area :syntax :clojure)) - - -(sw/button :id :the-button :text "Push me") - -(sw/select root [:#the-button]) - - -(def kkk (op/satom {})) - -(swap! kkk assoc-in [:a :b :c] 1) - -(def file (op/satom "File")) - -(reset! file "File") - -(def items (op/satom [(sw/menu :text "File" :items []) - (sw/menu :text "Edit" :items []) - (sw/menu :text "Exit" :items [])])) - -(sw/menubar :items - [(sw/menu :text "File" :items []) - (sw/menu :text "Edit" :items []) - (sw/menu :text "Exit" :items [])]) - -(def oo (op/satom {:title {:name "Menu" :age "12"}})) - -(reset! oo {:title {:name "aaa22as34" :age "15"}}) - -(sw/frame :title (op/get-k oo :title :age) - :size [640 :by 400] - :visible? true) - - -({:a 1} :a) -[1 2 3] -#{1 2 3} -'(1 2 3 4) - -(defn my-add - [x y] - (+ x y)) - -(my-add 1 1) \ No newline at end of file diff --git a/src/seesaw/wiki/c_4_containers.clj b/src/seesaw/wiki/c_4_containers.clj deleted file mode 100644 index faa43cf1..00000000 --- a/src/seesaw/wiki/c_4_containers.clj +++ /dev/null @@ -1,227 +0,0 @@ -(ns seesaw.wiki.c-4-containers - (:require [seesaw.core :as sw :refer :all] - [seesaw.mig :as mig] - [seesaw.bind :as b] - [seesaw.wiki.util :as util]) - (:import (javafx.application Platform) - (java.lang.reflect Constructor Parameter))) - - -(sw/frame :title "An example" - :on-close :hide - :content (sw/flow-panel - :align :left - :hgap 20 - :items ["Label" "Another label"]) - :size [640 :by 400] - :visible? true) - - -(sw/frame :title "An example" - :on-close :hide - :content (sw/grid-panel - :border "Properties" - :columns 2 - :items ["Name" (sw/text "Frank") - "Address" (sw/text "123 Main St")]) - :size [640 :by 400] - :visible? true) - -(sw/frame :title "An example" - :on-close :hide - :content (sw/border-panel :hgap 10 :vgap 10 - :center "CENTER" - :north "NORTH" - :south "SOUTH" - :east "EAST" - :west "WEST") - :size [400 :by 400] - :visible? true) - - -(sw/frame :title "An example" - :on-close :hide - :content (mig/mig-panel - :constraints ["wrap 2" - "[shrink 0]20px[200, grow, fill]" - "[shrink 0]5px[]"] - :items [["name:"] [(sw/text "ert")] - ["category:"] [(sw/text "ce")] - ["date:"] [(sw/text "ass")] - ["comment:"] [(sw/text "asda")]]) - :size [400 :by 400] - :visible? true) - - -(sw/frame :title "An example" - :on-close :hide - :content (let [lw 100, tw 200, wh 25] - (form-panel - :border 10 - :items [[(label :text "Name:" - :preferred-size [lw :by wh]) - :gridy 0 :gridx 0] - [(text :text "asdsad" - :preferred-size [tw :by wh]) - :gridy 0 :gridx 1 - :gridwidth :remainder] - - [(label :text "category:" - :preferred-size [lw :by wh]) - :gridy 1 :gridx 0 - :gridwidth 1] - [(text :text "asdsad" - :preferred-size [tw :by wh]) - :gridy 1 :gridx 1 - :gridwidth :remainder] - - [(label :text "date:" - :preferred-size [lw :by wh]) - :gridy 2 :gridx 0 - :gridwidth 1] - [(text :text "asdsad" - :preferred-size [tw :by wh]) - :gridy 2 :gridx 1 - :gridwidth :remainder] - - [(label :text "comment:" - :preferred-size [lw :by wh]) - :gridy 3 :gridx 0 - :gridwidth 1] - [(text :text "asdsad" - :preferred-size [tw :by wh]) - :gridy 3 :gridx 1 - :gridwidth :remainder] - ])) - :size [400 :by 400] - :visible? true) - - -(let [open-action (action - :handler (fn [e] (alert "I should open a new something.")) - :name "Open ..." - :key "menu O" - :tip "Open a new something something.") - exit-action (action - :handler (fn [e] (.dispose (to-frame e))) - :name "Exit" - :tip "Close this window")] - (frame - :title "Toolbar action test" - :content (border-panel - :north (toolbar :items [open-action exit-action]) - :center "Insert content here") - :visible? true)) - - - -(input "Pick a city" - :choices [{:name "New York" :population 8000000} - {:name "Ann Arbor" :population 100000} - {:name "Twin Peaks" :population 5201}] - :to-string :name) - -(alert "Something terrible has happened") - - -(def f (let [bg (button-group) - f (-> (frame :title "test" - :content (border-panel :center (text :id :text :text "hi") - :south (horizontal-panel :items - [(radio :group bg :text "enabled") - (radio :group bg :text "disabled")]))) - pack! - show!)] - - (b/bind (b/selection bg) - ; when a radio button is clicked the selection temporarily goes to nil - ; so filter those out - (b/filter identity) - (b/transform #(= "enabled" (text %))) - (b/property (select f [:#text]) :enabled?)) - f)) - -(let [open-action (action - :handler (fn [e] (alert "I should open a new something.")) - :name "Open ..." - :key "menu O" - :tip "Open a new something something.") - exit-action (action - :handler (fn [e] (.dispose (to-frame e))) - :name "Exit" - :tip "Close this window")] - (frame :title "MENUS!" - :menubar - (menubar :items - [(menu :text "File" :items [open-action exit-action]) - (menu :text "Edit" :items [open-action exit-action])]) - :visible? true)) - - -(let [open-action (action - :handler (fn [e] (alert "I should open a new something.")) - :name "Open ..." - :key "menu O" - :tip "Open a new something something.") - exit-action (action - :handler (fn [e] (.dispose (to-frame e))) - :name "Exit" - :tip "Close this window")] - (frame :title "MENUS!" - :content (listbox :popup (fn [e] [open-action exit-action]) - :model ["a" "b"]) - :visible? true - :size [640 :by 400])) - -(frame :title "MENUS!" - :content (table - :model [ - :columns [{:key :name, :text "Name"} :likes] - :rows '[["Bobby" "Laura Palmer"] - ["Agent Cooper" "Cherry Pie"] - {:likes "Laura Palmer" :name "James"} - {:name "Big Ed" :likes "Norma Jennings"}]]) - :visible? true - :size [640 :by 400]) - - -(javax.swing.JButton.) -(sw/construct javafx.stage.Stage) -(javafx.stage.Stage.) - - -(javafx.embed.swing.JFXPanel.) -(javafx.application.Platform/setImplicitExit false) - -(defn -run-later [^java.lang.Runnable fn] - (if (Platform/isFxApplicationThread) - (do - (println "aaa") - (fn)) - (Platform/runLater fn))) - -(defmacro run-later [& body] - `(-run-later - (fn [] - (try ~@body - (catch Throwable ex# - (println ex#)))))) - -(run-later - (type javafx.scene.control.Button)) - - -(com.sun.javafx.application.PlatformImpl/startup (fn [_] (javafx.stage.Stage .))) - -(defn ctor-fn [^Class k] - (let [^Constructor ctor (->> (.getDeclaredConstructors k) - (sort-by #(count (.getParameters ^Constructor %))) - first) - _ (assert ctor (str "No ctor for class " k))] - (.setAccessible ctor true) - (fn [] - (let [^objects arr (into-array Object (map - (fn [^Parameter p] - (convert-value default-value (.getType p))) - (.getParameters ctor)))] - (.newInstance ctor arr))))) \ No newline at end of file diff --git a/src/seesaw/wiki/util.clj b/src/seesaw/wiki/util.clj deleted file mode 100644 index 64925e93..00000000 --- a/src/seesaw/wiki/util.clj +++ /dev/null @@ -1,41 +0,0 @@ -(ns seesaw.wiki.util - (:require [seesaw.options :as opt] - [seesaw.util :as util] - [clojure.string :as string] - [seesaw.event :as ev])) -g - -(defn show-events - "Given a class or instance, print information about all supported events. - From there, you can look up javadocs, etc. - - Examples: - - (show-events javax.swing.JButton) - ... lots of output ... - - (show-events (button)) - ... lots of output ... - " - [v] - (doseq [{:keys [name ^Class class events]} (->> (ev/events-for v) - (sort-by :name))] - (printf "%s [%s]%n" name (if class (.getName class) "?")) - (doseq [e (sort events)] - (printf " %s%n" e)))) - -(defn- examples-str [examples] - (string/join (format "%n %24s " "") (util/to-seq examples))) - -(defn show-options - "Given an object, print information about the options it supports. These - are all the options you can legally pass to (seesaw.core/config) and - friends." - [v] - (printf "%s%n" (.getName (class v))) - (printf " %24s Notes/Examples%n" "Option") - (printf "--%24s --------------%n" (apply str (repeat 24 \-))) - (doseq [{:keys [name setter examples]} (sort-by :name (vals (opt/get-option-map v)))] - (printf " %24s %s%n" - name - (if examples (examples-str examples) "")))) From 5962bb03d7c4049bbf68f724bf4396affd8472b3 Mon Sep 17 00:00:00 2001 From: ertugrulcetin Date: Tue, 28 Aug 2018 13:35:37 +0300 Subject: [PATCH 07/10] update gitignore --- .gitignore | 3 +-- .nrepl-port | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 .nrepl-port diff --git a/.gitignore b/.gitignore index 90bde282..163f20fd 100644 --- a/.gitignore +++ b/.gitignore @@ -16,5 +16,4 @@ autodoc/** /.project /.settings .idea/ -*.iml -src/seesaw/wiki \ No newline at end of file +*.iml \ No newline at end of file diff --git a/.nrepl-port b/.nrepl-port deleted file mode 100644 index ca4be4ac..00000000 --- a/.nrepl-port +++ /dev/null @@ -1 +0,0 @@ -60201 \ No newline at end of file From 0d0790035d5671475fd5635961cb681ba309f448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ertu=C4=9Frul=20=C3=87etin?= Date: Thu, 30 Aug 2018 22:50:17 +0300 Subject: [PATCH 08/10] revert clojure version --- project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index b284882d..38b720f9 100644 --- a/project.clj +++ b/project.clj @@ -20,7 +20,7 @@ ; :aliases { "examples" ["run" "-m" "seesaw.test.examples.launcher"] } - :dependencies [[org.clojure/clojure "1.8.0"] + :dependencies [[org.clojure/clojure "1.4.0"] [com.miglayout/miglayout "3.7.4"] [com.jgoodies/forms "1.2.1"] [org.swinglabs.swingx/swingx-core "1.6.3"] From 7e82b6a154b7aaba76c8aece47b72b3fe303f9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ertu=C4=9Frul=20=C3=87etin?= Date: Thu, 30 Aug 2018 22:59:21 +0300 Subject: [PATCH 09/10] update clojure version --- project.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project.clj b/project.clj index 38b720f9..9be24bd6 100644 --- a/project.clj +++ b/project.clj @@ -12,7 +12,7 @@ :distribution :repo :comments "same as Clojure"} - :warn-on-reflection false + :warn-on-reflection true ; To run the examples: ; @@ -20,7 +20,7 @@ ; :aliases { "examples" ["run" "-m" "seesaw.test.examples.launcher"] } - :dependencies [[org.clojure/clojure "1.4.0"] + :dependencies [[org.clojure/clojure "1.8.0"] [com.miglayout/miglayout "3.7.4"] [com.jgoodies/forms "1.2.1"] [org.swinglabs.swingx/swingx-core "1.6.3"] From e27ea5f21b34b312002b336b7886fa30e22a6a3f Mon Sep 17 00:00:00 2001 From: ertugrulcetin Date: Mon, 16 Sep 2019 17:56:16 +0300 Subject: [PATCH 10/10] update readme and libs --- README.md | 22 ++++++++++++++++++++-- project.clj | 30 ++++++++++++++++-------------- src/seesaw/core.clj | 6 +++--- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 67773088..7dfe252b 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/project.clj b/project.clj index 9be24bd6..af36c327 100644 --- a/project.clj +++ b/project.clj @@ -3,14 +3,14 @@ :url "http://seesaw-clj.org" - :mailing-list {:name "seesaw-clj" + :mailing-list {:name "seesaw-clj" :archive "https://groups.google.com/group/seesaw-clj" - :post "seesaw-clj@googlegroups.com"} + :post "seesaw-clj@googlegroups.com"} - :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 @@ -18,20 +18,22 @@ ; ; $ 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"]) diff --git a/src/seesaw/core.clj b/src/seesaw/core.clj index 2ec9bf38..889c0d5b 100644 --- a/src/seesaw/core.clj +++ b/src/seesaw/core.clj @@ -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 @@ -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 :( @@ -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 :(