Ejemplo n.º 1
0
 public final boolean isDefaultRecursively(@NotNull T container) throws Exception {
   if (!isDefaultValue(container)) return false;
   for (Property<T> child : getChildren(container)) {
     if (!child.isDefaultRecursively(container)) return false;
   }
   return true;
 }
  @Override
  public Object getValue(@NotNull RadViewComponent component) throws Exception {
    StringBuilder value = new StringBuilder("[");
    Set<String> options = getOptions(component);
    int index = 0;
    for (Property option : myOptions) {
      String name = null;

      if (option instanceof OptionProperty) {
        if (options.contains(((OptionProperty) option).getValueName())) {
          name = option.getName();
        }
      } else {
        name = ((ComboOptionProperty) option).getValue(options);
      }

      if (name != null) {
        if (index++ > 0) {
          value.append(", ");
        }
        value.append(name);
      }
    }
    return value.append("]").toString();
  }
Ejemplo n.º 3
0
 @NotNull
 public String getPath() {
   return myParent == null ? myName : myParent.getPath() + "/" + myName;
 }