jsint
Class Listener

java.lang.Object
  extended byjsint.JavaListener
      extended byjsint.Listener11
          extended byjsint.Listener11swing
              extended byjsint.Listener
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.AdjustmentListener, javax.swing.event.AncestorListener, java.awt.event.AWTEventListener, javax.swing.event.CaretListener, javax.swing.event.CellEditorListener, javax.swing.event.ChangeListener, java.awt.event.ComponentListener, java.awt.event.ContainerListener, javax.swing.event.DocumentListener, java.util.EventListener, java.awt.event.FocusListener, javax.swing.event.HyperlinkListener, java.awt.event.InputMethodListener, javax.swing.event.InternalFrameListener, java.awt.event.ItemListener, java.awt.event.KeyListener, javax.swing.event.ListDataListener, javax.swing.event.ListSelectionListener, javax.swing.event.MenuDragMouseListener, javax.swing.event.MenuKeyListener, javax.swing.event.MenuListener, javax.swing.event.MouseInputListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, javax.swing.event.PopupMenuListener, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener, java.awt.event.TextListener, javax.swing.event.TreeExpansionListener, javax.swing.event.TreeModelListener, javax.swing.event.TreeSelectionListener, javax.swing.event.TreeWillExpandListener, javax.swing.event.UndoableEditListener, java.awt.event.WindowListener

public class Listener
extends Listener11swing
implements java.awt.event.InputMethodListener, java.util.EventListener, java.awt.event.AWTEventListener

This class allows a Procedure to act as a listener to many events. For example, to add an action listener to a button, b:

            (import "java.awt.*")
            (import "javax.swing.*")
            (let ((f (JFrame. "Example"))
                  (b (JButton. "Press Me")))
              (.addActionListener 
               b
               (Listener. (lambda (e) (.println (System.out$) "Yow!"))))
              (.add (.getContentPane f) b (BorderLayout.CENTER$))
              (.pack f)
              (.show f))
            
NOTE: Listener.java IS GENERATED FROM listener.scm. EDIT AT YOUR OWN RISK.


Field Summary
 
Fields inherited from class jsint.JavaListener
handler
 
Constructor Summary
Listener(Procedure handler)
           
 
Method Summary
 void caretPositionChanged(java.awt.event.InputMethodEvent e)
           
 void eventDispatched(java.awt.AWTEvent e)
           
 void inputMethodTextChanged(java.awt.event.InputMethodEvent e)
           
 
Methods inherited from class jsint.Listener11swing
ancestorAdded, ancestorMoved, ancestorRemoved, caretUpdate, changedUpdate, columnAdded, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, contentsChanged, editingCanceled, editingStopped, hyperlinkUpdate, insertUpdate, internalFrameActivated, internalFrameClosed, internalFrameClosing, internalFrameDeactivated, internalFrameDeiconified, internalFrameIconified, internalFrameOpened, intervalAdded, intervalRemoved, menuCanceled, menuDeselected, menuDragMouseDragged, menuDragMouseEntered, menuDragMouseExited, menuDragMouseReleased, menuKeyPressed, menuKeyReleased, menuKeyTyped, menuSelected, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, popupMenuCanceled, popupMenuWillBecomeInvisible, popupMenuWillBecomeVisible, removeUpdate, stateChanged, tableChanged, treeCollapsed, treeExpanded, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged, treeWillCollapse, treeWillExpand, undoableEditHappened, valueChanged, valueChanged
 
Methods inherited from class jsint.Listener11
actionPerformed, adjustmentValueChanged, componentAdded, componentHidden, componentMoved, componentRemoved, componentResized, componentShown, focusGained, focusLost, itemStateChanged, keyPressed, keyReleased, keyTyped, textValueChanged, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Listener

public Listener(Procedure handler)
Method Detail

caretPositionChanged

public void caretPositionChanged(java.awt.event.InputMethodEvent e)
Specified by:
caretPositionChanged in interface java.awt.event.InputMethodListener

inputMethodTextChanged

public void inputMethodTextChanged(java.awt.event.InputMethodEvent e)
Specified by:
inputMethodTextChanged in interface java.awt.event.InputMethodListener

eventDispatched

public void eventDispatched(java.awt.AWTEvent e)
Specified by:
eventDispatched in interface java.awt.event.AWTEventListener