code: private State computeState(List<Object> nodes)
      {
          Set<State> set = new LinkedHashSet<State>();
          for (Object node : nodes)
          {
              set.add(getSelectionState(node));
          }
          // Should never happen
          while (set.contains(null))
          {
              logger.warning("null found in selection states");
              set.remove(null);
          }
          if (set.size() == 0)
          {
              // Should never happen
              logger.warning("Empty selection states");
              return State.SELECTED;
          }
          if (set.size() > 1)
          {
              return State.MIXED;
          }
          return set.iterator().next();
      }
docs: Compute the state for a node with the given children
  
  @param nodes The nodes
  @return The state