boolean (AbstractButton checkBox) { return "indeterminate".equals(checkBox.getClientProperty("JButton.selectedState")) || checkBox instanceof ThreeStateCheckBox && ((ThreeStateCheckBox)checkBox).getState() == ThreeStateCheckBox.State.DONT_CARE; }