private static boolean enabledOn(Object sourceComponent) {
    if (sourceComponent instanceof JTree) {
      return true;
    }
    if (sourceComponent instanceof TreeTable) {
      return true;
    }
    return false;
  }
private static boolean enabledOn(Object sourceComponent)