Java 类com.intellij.uiDesigner.radComponents.RadGridLayoutManager 实例源码

项目:intellij-ce-playground    文件:IntrospectedProperty.java   
@Override
public boolean appliesTo(final RadComponent component) {
  @NonNls String name = getName();
  //noinspection SimplifiableIfStatement
  if (name.equals(SwingProperties.PREFERRED_SIZE) ||
      name.equals(SwingProperties.MINIMUM_SIZE) ||
      name.equals(SwingProperties.MAXIMUM_SIZE)) {
    // our own properties must be used instead
    final RadContainer parent = component.getParent();
    return parent != null && !(parent.getLayoutManager() instanceof RadGridLayoutManager);
  }

  // check if property is available in the JDK used by the module containing the component
  final PsiManager psiManager = PsiManager.getInstance(component.getProject());
  final GlobalSearchScope scope = component.getModule().getModuleWithDependenciesAndLibrariesScope(true);
  PsiClass componentClass = JavaPsiFacade.getInstance(psiManager.getProject()).findClass(component.getComponentClassName(), scope);
  if (componentClass == null) return true;
  final PsiMethod[] psiMethods = componentClass.findMethodsByName(myReadMethod.getName(), true);
  for(PsiMethod method: psiMethods) {
    if (!method.hasModifierProperty(PsiModifier.STATIC) &&
        method.getParameterList().getParametersCount() == 0) {
      return true;
    }
  }
  return false;
}
项目:tools-idea    文件:IntrospectedProperty.java   
@Override
public boolean appliesTo(final RadComponent component) {
  @NonNls String name = getName();
  //noinspection SimplifiableIfStatement
  if (name.equals(SwingProperties.PREFERRED_SIZE) ||
      name.equals(SwingProperties.MINIMUM_SIZE) ||
      name.equals(SwingProperties.MAXIMUM_SIZE)) {
    // our own properties must be used instead
    final RadContainer parent = component.getParent();
    return parent != null && !(parent.getLayoutManager() instanceof RadGridLayoutManager);
  }

  // check if property is available in the JDK used by the module containing the component
  final PsiManager psiManager = PsiManager.getInstance(component.getProject());
  final GlobalSearchScope scope = component.getModule().getModuleWithDependenciesAndLibrariesScope(true);
  PsiClass componentClass = JavaPsiFacade.getInstance(psiManager.getProject()).findClass(component.getComponentClassName(), scope);
  if (componentClass == null) return true;
  final PsiMethod[] psiMethods = componentClass.findMethodsByName(myReadMethod.getName(), true);
  for(PsiMethod method: psiMethods) {
    if (!method.hasModifierProperty(PsiModifier.STATIC) &&
        method.getParameterList().getParametersCount() == 0) {
      return true;
    }
  }
  return false;
}
项目:consulo-ui-designer    文件:IntrospectedProperty.java   
@Override
public boolean appliesTo(final RadComponent component) {
  @NonNls String name = getName();
  //noinspection SimplifiableIfStatement
  if (name.equals(SwingProperties.PREFERRED_SIZE) ||
      name.equals(SwingProperties.MINIMUM_SIZE) ||
      name.equals(SwingProperties.MAXIMUM_SIZE)) {
    // our own properties must be used instead
    final RadContainer parent = component.getParent();
    return parent != null && !(parent.getLayoutManager() instanceof RadGridLayoutManager);
  }

  // check if property is available in the JDK used by the module containing the component
  final PsiManager psiManager = PsiManager.getInstance(component.getProject());
  final GlobalSearchScope scope = component.getModule().getModuleWithDependenciesAndLibrariesScope(true);
  PsiClass componentClass = JavaPsiFacade.getInstance(psiManager.getProject()).findClass(component.getComponentClassName(), scope);
  if (componentClass == null) return true;
  final PsiMethod[] psiMethods = componentClass.findMethodsByName(myReadMethod.getName(), true);
  for(PsiMethod method: psiMethods) {
    if (!method.hasModifierProperty(PsiModifier.STATIC) &&
        method.getParameterList().getParametersCount() == 0) {
      return true;
    }
  }
  return false;
}