Liking cljdoc? Tell your friends :D

seesaw.event

Functions for handling events. Do not use these functions directly. Use (seesaw.core/listen) instead.

Functions for handling events. Do not use these functions directly.
Use (seesaw.core/listen) instead.
raw docstring

add-action-listenerclj

(add-action-listener this v)
source

add-change-listenerclj

(add-change-listener this l)
source

add-list-selection-listenerclj

(add-list-selection-listener this v)
source

append-listenerclj

(append-listener listeners k l)
source

def-reify-listenercljmacro

(def-reify-listener klass events)
source

events-forclj

(events-for v)

Returns a sequence of event info maps for the given object which can be either a widget instance or class.

Used by (seesaw.dev/show-events).

See: (seesaw.dev/show-events)

Returns a sequence of event info maps for the given object which can
be either a widget instance or class.

Used by (seesaw.dev/show-events).

See:
  (seesaw.dev/show-events)
sourceraw docstring

get-handlersclj

(get-handlers target event-group-name)
source

listenclj

(listen targets & more)

note: use seesaw.core/listen rather than calling this directly

Install listeners for one or more events on the given target. For example:

(listen (button "foo") :mouse-entered (fn [e] ...) :focus-gained (fn [e] ...) :key-pressed (fn [e] ...) :mouse-wheel-moved (fn [e] ...))

one function can be registered for multiple events by using a set of event names instead of one:

(listen (text) #{:remove-update :insert-update} (fn [e] ...))

Note in this case that it's smart enough to add a document listener to the JTextFields document.

Similarly, an event can be registered for all events in a particular swing listener interface by just using the keyword-ized prefix of the interface name. For example, to get all callbacks in the MouseListener interface:

(listen my-widget :mouse (fn [e] ...))

Returns a function which, when called, removes all listeners registered with this call.

When the target is a JTable and listener type is :selection, only row selection events are reported. Also note that the source table is not retrievable from the event object.

*note: use seesaw.core/listen rather than calling this directly*

Install listeners for one or more events on the given target. For example:

  (listen (button "foo")
    :mouse-entered     (fn [e] ...)
    :focus-gained      (fn [e] ...)
    :key-pressed       (fn [e] ...)
    :mouse-wheel-moved (fn [e] ...))

one function can be registered for multiple events by using a set
of event names instead of one:

  (listen (text)
    #{:remove-update :insert-update} (fn [e] ...))

Note in this case that it's smart enough to add a document listener
to the JTextFields document.

Similarly, an event can be registered for all events in a particular swing
listener interface by just using the keyword-ized prefix of the interface
name. For example, to get all callbacks in the MouseListener interface:

  (listen my-widget :mouse (fn [e] ...))

Returns a function which, when called, removes all listeners registered
with this call.

When the target is a JTable and listener type is :selection, only
row selection events are reported. Also note that the source table is
*not* retrievable from the event object.
sourceraw docstring

listen-for-named-eventcljmultimethod

experimental and subject to change

A multi-method that allows the set of events in the (listen) to be extended or for an existing event to be extended to a new type. Basically performs double-dispatch on the type of the target and the name of the event.

This multi-method is an extension point, but is not meant to be called directly by client code.

Register the given event handler on this for the given event name which is a keyword like :selection, etc. If the handler is registered, returns a zero-arg function that undoes the listener. Otherwise, must return nil indicating that no listener was registered, i.e. this doesn't support the given event.

TODO try using this to implement all of the event system rather than the mess above.

See: (seesaw.swingx/color-selection-button) for an example.

*experimental and subject to change*

A multi-method that allows the set of events in the (listen) to be extended or
for an existing event to be extended to a new type. Basically performs
double-dispatch on the type of the target and the name of the event.

This multi-method is an extension point, but is not meant to be called directly
by client code.

Register the given event handler on this for the given event
name which is a keyword like :selection, etc. If the handler
is registered, returns a zero-arg function that undoes the
listener. Otherwise, must return nil indicating that no listener
was registered, i.e. this doesn't support the given event.

TODO try using this to implement all of the event system rather than the mess
above.

See:
  (seesaw.swingx/color-selection-button) for an example.
sourceraw docstring

listen-to-propertyclj

(listen-to-property target property event-fn)

Listen to propertyChange events on a target for a particular named property. Like (listen), returns a function that, when called removes the installed listener.

Listen to propertyChange events on a target for a particular named property.
Like (listen), returns a function that, when called removes the installed
listener.
sourceraw docstring

reify-listenercljmultimethod

source

unappend-listenerclj

(unappend-listener listeners k l)
source

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

× close