grabFocus();
setState(getNextState(getState()));
}
});
// Reset the keyboard action map
ActionMap map = new ActionMapUIResource();
map.put("pressed", new AbstractAction() {
private static final long serialVersionUID = 7121802319351334948L;
public void actionPerformed(ActionEvent e) {
grabFocus();
setState(getNextState(getState()));
}
});
map.put("released", null);
SwingUtilities.replaceUIActionMap(this, map);
// set the model to the adapted model
model = new TristateDecorator(getModel());
setModel(model);
setState(initial);