FileDocCategorySizeDatePackage
UndoableJToggleButton.javaAPI DocExample1200Mon Nov 09 12:45:50 GMT 1998None

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;