@Override public void actionPerformed(ActionEvent e) { stateUpdated(getState()); }
/** * Sets the selection state. It could be one of the three states as defined - {@link #STATE_SELECTED}, {@link * #STATE_UNSELECTED} and {@link #STATE_MIXED}. * * @param state one of the three selection states. */ public void setState(int state) { if (model instanceof TristateButtonModel) { int old = ((TristateButtonModel) model).getState(); if (old != state) ((TristateButtonModel) model).setState(state); stateUpdated(state); } else { throw new IllegalStateException("TristateButtonModel is required for TristateCheckBox"); } }