FileDocCategorySizeDatePackage
UndoableToggleEdit.javaAPI DocExample965Mon Nov 09 12:45:50 GMT 1998None

UndoableToggleEdit

public class UndoableToggleEdit extends AbstractUndoableEdit

Fields Summary
private JToggleButton
button
private boolean
selected
Constructors Summary
public UndoableToggleEdit(JToggleButton button)

    this.button = button;
    selected = button.isSelected();
  
Methods Summary
public java.lang.StringgetPresentationName()

    return "Toggle " + button.getText() + " " +
    (selected ? "on" : "off");
  
public voidredo()

    super.redo();
    button.setSelected(selected);
  
public voidundo()

    super.undo();
    button.setSelected(!selected);