boolean isExpanded(int row) {
      TreeUI tree = getUI();
      if (tree != null) {
        TreePath path = tree.getPathForRow(Tree.this, row);
        if (path != null) {
          Boolean value = expandedState.get(path);
          return value != null && value.booleanValue();
        }
      }
      return false;
    }
boolean isExpanded(int row)