Liking cljdoc? Tell your friends :D

seesaw.util


atom?clj

(atom? a)

Return true if a is an atom

Return true if a is an atom
sourceraw docstring

boolean?clj

(boolean? b)

Return true if b is exactly true or false. Useful for handling optional boolean properties where we want to do nothing if the property isn't provided.

Return true if b is exactly true or false. Useful for handling optional
boolean properties where we want to do nothing if the property isn't
provided.
sourceraw docstring

camelizeclj

(camelize s)

Convert input string to camelCase from hyphen-case

Convert input string to camelCase from hyphen-case
sourceraw docstring

check-argsclj

(check-args condition message)
source

Childrencljprotocol

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

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

childrenclj

(children c)

Returns a seq of the children of the given widget

Returns a seq of the children of the given widget
sourceraw docstring

collectclj

(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)

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)
sourceraw docstring

cond-dotocljmacro

(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.

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.
sourceraw docstring

constant-mapclj

(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.

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.
sourceraw docstring

illegal-argumentclj

(illegal-argument fmt & args)

Throw an illegal argument exception formatted as with (clojure.core/format)

Throw an illegal argument exception formatted as with (clojure.core/format)
sourceraw docstring

resourceclj

(resource message)
source

resource-key?clj

(resource-key? v)

Returns true if v is a i18n resource key, i.e. a namespaced keyword

Returns true if v is a i18n resource key, i.e. a namespaced keyword
sourceraw docstring

root-causeclj

(root-cause e)
source

to-dimensionclj

(to-dimension v)
source

to-insetsclj

(to-insets v)
source

to-mnemonic-keycodeclj

(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

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
sourceraw docstring

to-seqclj

(to-seq v)

Stupid helper to turn possibly single values into seqs

Stupid helper to turn possibly single values into seqs
sourceraw docstring

to-uriclj

(to-uri s)

Try to make a java.net.URI from s

Try to make a java.net.URI from s
sourceraw docstring

to-urlclj

(to-url s)

Try to parse (str s) as a URL. Returns new java.net.URL on success, nil otherwise. This is different from clojure.java.io/as-url in that it doesn't throw an exception and it uses (str) on the input.

Try to parse (str s) as a URL. Returns new java.net.URL on success, nil
otherwise. This is different from clojure.java.io/as-url in that it doesn't
throw an exception and it uses (str) on the input.
sourceraw docstring

try-castclj

(try-cast c x)

Just like clojure.core/cast, but returns nil on failure rather than throwing ClassCastException

Just like clojure.core/cast, but returns nil on failure rather than throwing ClassCastException
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close