public void actionPerformed(ActionEvent e) { if (owner != null && SwingUtilities.getRootPane(owner) == root) { ButtonModel model = owner.getModel(); if (press) { model.setArmed(true); model.setPressed(true); } else { model.setPressed(false); } } }
public boolean isEnabled() { return owner.getModel().isEnabled(); }