FileDocCategorySizeDatePackage
UndoableJToggleButton.javaAPI DocExample1203Thu Oct 24 20:14:26 BST 2002None

UndoableJToggleButton

public class UndoableJToggleButton extends JToggleButton

Fields Summary
private UndoableEditListener
listener
Constructors Summary
public UndoableJToggleButton(String txt)

    super(txt);
  
Methods Summary
public voidaddUndoableEditListener(javax.swing.event.UndoableEditListener l)

    listener = l; // Should ideally throw an exception if listener != null
  
protected voidfireActionPerformed(java.awt.event.ActionEvent ev)


    // Fire the ActionEvent as usual.
    super.fireActionPerformed(ev);

    if (listener != null) {
      listener.undoableEditHappened(new UndoableEditEvent(this,
        new UndoableToggleEdit(this)));
    }
  
public voidremoveUndoableEditListener(javax.swing.event.UndoableEditListener l)

    listener = null;