Permalink
Browse files

get/set-icon -> get/set-icon* to make it clear these are extension po…

…ints, not public API.
  • Loading branch information...
daveray committed Dec 14, 2011
1 parent 00dbc76 commit aefe7a262bf58b60981683d3ff941943f2aff075
Showing with 17 additions and 17 deletions.
  1. +9 −9 src/seesaw/core.clj
  2. +8 −8 src/seesaw/swingx.clj
View
@@ -581,24 +581,24 @@
; get/setText is a common method on many types, but not in any common interface :(
(defprotocol ConfigIcon
- (set-icon [this v])
- (get-icon [this]))
+ (set-icon* [this v])
+ (get-icon* [this]))
(extend-protocol ConfigIcon
; most things don't have icons...
java.awt.Component
- (set-icon [this v]
+ (set-icon* [this v]
(illegal-argument "%s does not support the :icon option" (class this)))
- (get-icon [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 :(
@@ -834,7 +834,7 @@
; TODO I'd like to push these down but cells.clj uses them on non-attached
; widgets.
- (default-option :icon set-icon get-icon ["See (seesaw.icon/icon)"])
+ (default-option :icon set-icon* get-icon* ["See (seesaw.icon/icon)"])
(default-option :text set-text get-text ["A string" "Anything accepted by (clojure.core/slurp)"])
(default-option :drag-enabled? set-drag-enabled get-drag-enabled boolean-examples)
View
@@ -29,7 +29,7 @@
card-panel-options
default-options button-options label-options
listbox-options tree-options table-options
- ConfigIcon get-icon set-icon
+ ConfigIcon get-icon* set-icon*
config config!]]
[seesaw.options :only [option-map bean-option apply-options default-option resource-option around-option]])
(:import [org.jdesktop.swingx.decorator
@@ -334,17 +334,17 @@
(extend-protocol ConfigIcon
org.jdesktop.swingx.JXTaskPane
- (get-icon [this] (.getIcon this))
- (set-icon [this v]
+ (get-icon* [this] (.getIcon this))
+ (set-icon* [this v]
(.setIcon this (icon v))))
(def task-pane-options
(merge
default-options
(option-map
; TODO I have to add this manually because relying on the impl from default-options
- ; fails with "No implementation of method: :set-icon :(
- (default-option :icon set-icon get-icon)
+ ; fails with "No implementation of method: :set-icon* :(
+ (default-option :icon set-icon* get-icon*)
(resource-option :resource [:title :icon])
(bean-option :title org.jdesktop.swingx.JXTaskPane resource)
(bean-option :animated? org.jdesktop.swingx.JXTaskPane boolean)
@@ -474,15 +474,15 @@
(extend-protocol ConfigIcon
org.jdesktop.swingx.JXHeader
- (get-icon [this] (.getIcon this))
- (set-icon [this v] (.setIcon this (icon v))))
+ (get-icon* [this] (.getIcon this))
+ (set-icon* [this v] (.setIcon this (icon v))))
(def header-options
(merge
default-options
(option-map
(bean-option :title org.jdesktop.swingx.JXHeader resource)
- (default-option :icon set-icon get-icon)
+ (default-option :icon set-icon* get-icon*)
(bean-option :description org.jdesktop.swingx.JXHeader resource))))
(defn header

0 comments on commit aefe7a2

Please sign in to comment.