本文整理汇总了Java中com.intellij.uiDesigner.radComponents.RadVSpacer类的典型用法代码示例。如果您正苦于以下问题:Java RadVSpacer类的具体用法?Java RadVSpacer怎么用?Java RadVSpacer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RadVSpacer类属于com.intellij.uiDesigner.radComponents包,在下文中一共展示了RadVSpacer类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: appliesTo
import com.intellij.uiDesigner.radComponents.RadVSpacer; //导入依赖的package包/类
@Override public boolean appliesTo(final RadComponent component) {
return !(component instanceof RadVSpacer);
}
示例2: getFieldNames
import com.intellij.uiDesigner.radComponents.RadVSpacer; //导入依赖的package包/类
private static String[] getFieldNames(final RadComponent component, final String currentName) {
final ArrayList<String> result = new ArrayList<String>();
if (currentName != null){
result.add(currentName);
}
final IRootContainer root = FormEditingUtil.getRoot(component);
final String className = root.getClassToBind();
if (className == null) {
return ArrayUtil.toStringArray(result);
}
final PsiClass aClass = FormEditingUtil.findClassToBind(component.getModule(), className);
if (aClass == null) {
return ArrayUtil.toStringArray(result);
}
final PsiField[] fields = aClass.getFields();
for (final PsiField field : fields) {
if (field.hasModifierProperty(PsiModifier.STATIC)) {
continue;
}
final String fieldName = field.getName();
if (Comparing.equal(currentName, fieldName)) {
continue;
}
if (!FormEditingUtil.isBindingUnique(component, fieldName, root)) {
continue;
}
final String componentClassName;
if (component instanceof RadErrorComponent) {
componentClassName = component.getComponentClassName();
}
else if (component instanceof RadHSpacer || component instanceof RadVSpacer) {
componentClassName = Spacer.class.getName();
}
else {
componentClassName = component.getComponentClass().getName();
}
final PsiType componentType;
try {
componentType =
JavaPsiFacade.getInstance(component.getProject()).getElementFactory().createTypeFromText(componentClassName, null);
}
catch (IncorrectOperationException e) {
continue;
}
final PsiType fieldType = field.getType();
if (!fieldType.isAssignableFrom(componentType)) {
continue;
}
result.add(fieldName);
}
String text = FormInspectionUtil.getText(component.getModule(), component);
if (text != null) {
String binding = BindingProperty.suggestBindingFromText(component, text);
if (binding != null && !result.contains(binding)) {
result.add(binding);
}
}
final String[] names = ArrayUtil.toStringArray(result);
Arrays.sort(names);
return names;
}