Java 类com.intellij.ui.ReferenceEditorWithBrowseButton 实例源码

项目:consulo-java    文件:AdvancedSettingsUI.java   
/**
 * Adds textfield into placeholder panel and assigns a directly preceding label
 */
private void addField(JPanel panel, ReferenceEditorWithBrowseButton field)
{
    panel.add(field, BorderLayout.CENTER);

    final Component[] components = panel.getParent().getComponents();
    final int index = Arrays.asList(components).indexOf(panel);
    if(index > 0)
    {
        final Component component = components[index - 1];
        if(component instanceof JLabel)
        {
            ((JLabel) component).setLabelFor(field);
        }
    }
}
项目:intellij-ce-playground    文件:PsiTypeControl.java   
protected PsiTypePanel createMainComponent(PsiTypePanel boundedComponent, final Project project) {
  if (boundedComponent == null) {
    boundedComponent = new PsiTypePanel();
  }
  return PsiClassControl.initReferenceEditorWithBrowseButton(boundedComponent,
                                                              new ReferenceEditorWithBrowseButton(null, project, new Function<String, Document>() {
                                                                public Document fun(final String s) {
                                                                  return JavaReferenceEditorUtil.createTypeDocument(s, project);
                                                                }
                                                              }, ""), this);
}
项目:intellij-ce-playground    文件:TextControl.java   
@Override
protected EditorTextField getEditorTextField(@NotNull final TextPanel panel) {
  final Component component = panel.getComponent(0);
  if (component instanceof ReferenceEditorWithBrowseButton) {
    return ((ReferenceEditorWithBrowseButton)component).getEditorTextField();
  }
  return (EditorTextField)component;
}
项目:intellij-ce-playground    文件:AdvancedSettingsUI.java   
/**
 * Adds textfield into placeholder panel and assigns a directly preceding label
 */
private void addField(JPanel panel, ReferenceEditorWithBrowseButton field) {
  panel.add(field, BorderLayout.CENTER);

  final Component[] components = panel.getParent().getComponents();
  final int index = Arrays.asList(components).indexOf(panel);
  if (index > 0) {
    final Component component = components[index - 1];
    if (component instanceof JLabel) {
      ((JLabel)component).setLabelFor(field);
    }
  }
}
项目:tools-idea    文件:PsiTypeControl.java   
protected PsiTypePanel createMainComponent(PsiTypePanel boundedComponent, final Project project) {
  if (boundedComponent == null) {
    boundedComponent = new PsiTypePanel();
  }
  return PsiClassControl.initReferenceEditorWithBrowseButton(boundedComponent,
                                                              new ReferenceEditorWithBrowseButton(null, project, new Function<String, Document>() {
                                                                public Document fun(final String s) {
                                                                  return JavaReferenceEditorUtil.createTypeDocument(s, project);
                                                                }
                                                              }, ""), this);
}
项目:tools-idea    文件:TextControl.java   
protected EditorTextField getEditorTextField(@NotNull final TextPanel panel) {
  final Component component = panel.getComponent(0);
  if (component instanceof ReferenceEditorWithBrowseButton) {
    return ((ReferenceEditorWithBrowseButton)component).getEditorTextField();
  }
  return (EditorTextField)component;
}
项目:tools-idea    文件:AdvancedSettingsUI.java   
/**
 * Adds textfield into placeholder panel and assigns a directly preceding label
 */
private static void addField(JPanel panel, ReferenceEditorWithBrowseButton field) {
  panel.add(field, BorderLayout.CENTER);

  final Component[] components = panel.getParent().getComponents();
  final int index = Arrays.asList(components).indexOf(panel);
  if (index > 0) {
    final Component component = components[index - 1];
    if (component instanceof JLabel) {
      ((JLabel)component).setLabelFor(field);
    }
  }
}
项目:consulo-xml    文件:TextControl.java   
@Override
protected EditorTextField getEditorTextField(@NotNull final TextPanel panel)
{
    final Component component = panel.getComponent(0);
    if(component instanceof ReferenceEditorWithBrowseButton)
    {
        return ((ReferenceEditorWithBrowseButton) component).getEditorTextField();
    }
    return (EditorTextField) component;
}
项目:consulo-java    文件:PsiTypeControl.java   
protected PsiTypePanel createMainComponent(PsiTypePanel boundedComponent, final Project project) {
  if (boundedComponent == null) {
    boundedComponent = new PsiTypePanel();
  }
  return PsiClassControl.initReferenceEditorWithBrowseButton(boundedComponent,
                                                              new ReferenceEditorWithBrowseButton(null, project, new Function<String, Document>() {
                                                                public Document fun(final String s) {
                                                                  return JavaReferenceEditorUtil.createTypeDocument(s, project);
                                                                }
                                                              }, ""), this);
}
项目:intellij-ce-playground    文件:PsiTypeControl.java   
protected EditorTextField getEditorTextField(@NotNull final PsiTypePanel component) {
  return ((ReferenceEditorWithBrowseButton)component.getComponent(0)).getEditorTextField();
}
项目:intellij-ce-playground    文件:PsiClassControl.java   
protected EditorTextField getEditorTextField(@NotNull final PsiClassPanel component) {
  return ((ReferenceEditorWithBrowseButton)component.getComponent(0)).getEditorTextField();
}
项目:intellij-ce-playground    文件:AdvancedSettingsUI.java   
private BrowseClassListener(Project project, ReferenceEditorWithBrowseButton annotationField) {
  myProject = project;
  myField = annotationField;
}
项目:tools-idea    文件:PsiTypeControl.java   
protected EditorTextField getEditorTextField(@NotNull final PsiTypePanel component) {
  return ((ReferenceEditorWithBrowseButton)component.getComponent(0)).getEditorTextField();
}
项目:tools-idea    文件:PsiClassControl.java   
protected EditorTextField getEditorTextField(@NotNull final PsiClassPanel component) {
  return ((ReferenceEditorWithBrowseButton)component.getComponent(0)).getEditorTextField();
}
项目:tools-idea    文件:AdvancedSettingsUI.java   
private BrowseClassListener(Project project, ReferenceEditorWithBrowseButton annotationField) {
  myProject = project;
  myField = annotationField;
}
项目:consulo-java    文件:PsiTypeControl.java   
protected EditorTextField getEditorTextField(@NotNull final PsiTypePanel component) {
  return ((ReferenceEditorWithBrowseButton)component.getComponent(0)).getEditorTextField();
}
项目:consulo-java    文件:PsiClassControl.java   
protected EditorTextField getEditorTextField(@NotNull final PsiClassPanel component) {
  return ((ReferenceEditorWithBrowseButton)component.getComponent(0)).getEditorTextField();
}
项目:consulo-java    文件:AdvancedSettingsUI.java   
private BrowseClassListener(Project project, ReferenceEditorWithBrowseButton annotationField)
{
    myProject = project;
    myField = annotationField;
}