Storyboard format

This commit is contained in:
Alexander Lobas
2014-04-04 17:58:32 +04:00
parent d8a6130b5e
commit d2ee60be7c
@@ -465,7 +465,6 @@ public abstract class RadComponent extends PropertiesContainer {
//
//////////////////////////////////////////////////////////////////////////////////////////
public static List<ErrorInfo> getError(RadComponent component) {
List<ErrorInfo> errorInfos = component.getClientProperty(ERROR_KEY);
return errorInfos == null ? Collections.<ErrorInfo>emptyList() : errorInfos;
@@ -558,4 +557,17 @@ public abstract class RadComponent extends PropertiesContainer {
return components;
}
public boolean isAncestorFor(@NotNull RadComponent component, boolean strict) {
RadComponent parent = strict ? component.getParent() : component;
while (true) {
if (parent == null) {
return false;
}
if (parent == this) {
return true;
}
parent = parent.getParent();
}
}
}