API for seesaw.util - Seesaw


Full namespace name: seesaw.util

Overview





Public Variables and Functions



Children

var

  
A protocol for retrieving the children of a widget as a seq. 
This takes care of idiosyncracies of frame vs. menus, etc.


camelize

function
Usage: (camelize s)
Convert input string to camelCase from hyphen-case


children

function
Usage: (children c)
Returns a seq of the children of the given widget


collect

function
Usage: (collect root)
Given a root widget or frame, returns a depth-fist seq of all the widgets
in the hierarchy. For example to disable everything:

  (config (collect (.getContentPane my-frame)) :enabled? false)


cond-doto

macro
Usage: (cond-doto x & forms)
Spawn of (cond) and (doto). Works like (doto), but each form has a condition
 which controls whether it is executed. Returns x.

(doto (new java.util.HashMap) 
  true    (.put "a" 1) 
  (< 2 1) (.put "b" 2))

Here, only (.put "a" 1) is executed.


constant-map

function
Usage: (constant-map klass & fields)
Given a class and a list of keywordized constant names returns the 
  values of those fields in a map. The name mapping upper-cases and replaces
  hyphens with underscore, e.g.

   :above-baseline --> ABOVE_BASELINE

  Note that the fields must be static and declared *in* the class, not a 
  supertype.
 


illegal-argument

function
Usage: (illegal-argument fmt & args)
Throw an illegal argument exception formatted as with (clojure.core/format)


resource-key?

function
Usage: (resource-key? v)
Returns true if v is a i18n resource key, i.e. a namespaced keyword


to-mnemonic-keycode

function
Usage: (to-mnemonic-keycode v)
Convert a character to integer to a mnemonic keycode. In the case of char
input, generates the correct keycode even if it's lower case. Input argument 
can be:

* i18n resource keyword - only first char is used
* string - only first char is used
* char   - lower or upper case
* int    - key event code

See:
  java.awt.event.KeyEvent for list of keycodes
  http://download.oracle.com/javase/6/docs/api/java/awt/event/KeyEvent.html
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.