class UpdaterTreeNode extends DefaultMutableTreeNode implements Comparable<UpdaterTreeNode>, SdkUpdaterConfigPanel.MultiStateRow {

  @Override
  public final void cycleState() {
    if (getCurrentState() == null) {
      return;
    }
    if (getCurrentState() == PackageNodeModel.SelectedState.NOT_INSTALLED) {
      if (canHaveMixedState()) {
        setState(PackageNodeModel.SelectedState.MIXED);
      }
      else {
        setState(PackageNodeModel.SelectedState.INSTALLED);
      }
    }
    else if (getCurrentState() == PackageNodeModel.SelectedState.INSTALLED) {
      setState(PackageNodeModel.SelectedState.NOT_INSTALLED);
    }
    else {
      setState(PackageNodeModel.SelectedState.INSTALLED);
    }
  }

}