当前位置: 首页>>代码示例>>Java>>正文


Java TextComponentAccessor类代码示例

本文整理汇总了Java中com.intellij.openapi.ui.TextComponentAccessor的典型用法代码示例。如果您正苦于以下问题:Java TextComponentAccessor类的具体用法?Java TextComponentAccessor怎么用?Java TextComponentAccessor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TextComponentAccessor类属于com.intellij.openapi.ui包,在下文中一共展示了TextComponentAccessor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: BuildoutConfigPanel

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
public BuildoutConfigPanel(Module module, BuildoutFacetConfiguration config) {
  myModule = module;
  myConfiguration = config;
  setLayout(new BorderLayout());
  add(myPanel);

  FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor();
  //descriptor.setRoot(myConfiguration.getRoot());
  myScript.addBrowseFolderListener(
    "Choose a buildout script", "Select the target script that will invoke your code",
    null, descriptor, TextComponentAccessor.STRING_COMBOBOX_WHOLE_TEXT, false
  );
  myScript.getComboBox().setEditable(true);

  initErrorValidation();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:BuildoutConfigPanel.java

示例2: createComponent

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
public JComponent createComponent() {
  // all listeners will be removed when dialog is closed
  mavenHomeComponent.getComponent().addBrowseFolderListener(ProjectBundle.message("maven.select.maven.home.directory"),
                                                            "",
                                                            null, BrowseFilesListener.SINGLE_DIRECTORY_DESCRIPTOR,
                                                            TextComponentAccessor.TEXT_FIELD_WITH_HISTORY_WHOLE_TEXT);
  mavenHomeField.addDocumentListener(new DocumentAdapter() {
    protected void textChanged(DocumentEvent e) {
      updateMavenVersionLabel();
    }
  });

  settingsFileComponent.getComponent().addBrowseFolderListener(ProjectBundle.message("maven.select.maven.settings.file"), "", null,
                                                               FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
  localRepositoryComponent.getComponent().addBrowseFolderListener(ProjectBundle.message("maven.select.local.repository"), "", null,
                                                                  FileChooserDescriptorFactory.createSingleFolderDescriptor());
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:MavenEnvironmentForm.java

示例3: createPanel

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
public JComponent createPanel(@NotNull TerminalOptionsProvider provider) {
  myOptionsProvider = provider;

  FileChooserDescriptor fileChooserDescriptor = new FileChooserDescriptor(true, false, false, false, false, false);

  myShellPathField.addBrowseFolderListener(
    "",
    "Shell Executable Path",
    null,
    fileChooserDescriptor,
    TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT,
    false
  );

  return myWholePanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:TerminalSettingsPanel.java

示例4: setupScriptPathField

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
private void setupScriptPathField(@NotNull final Project project) {
  final ComponentWithBrowseButton.BrowseFolderActionListener<JTextField> listener =
    new ComponentWithBrowseButton.BrowseFolderActionListener<JTextField>(
      "Select Script",
      "",
      myScriptPathField,
      project,
      FileChooserDescriptorFactory.createSingleFileDescriptor(TheRFileType.INSTANCE),
      TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT
    ) {
      @Override
      protected void onFileChosen(@NotNull final VirtualFile chosenFile) {
        super.onFileChosen(chosenFile);

        TheRRunConfigurationUtils.setSuggestedWorkingDirectoryPathIfNotSpecified(TheRRunConfigurationForm.this);
      }
    };

  myScriptPathField.addActionListener(listener);
}
 
开发者ID:ktisha,项目名称:TheRPlugin,代码行数:21,代码来源:TheRRunConfigurationForm.java

示例5: ToolPath

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
public ToolPath(JCheckBox checkBox, TextFieldWithBrowseButton textField, @Nullable JTextField parameters,
                StringProperty pathProperty, BooleanProperty enabledProperty, @Nullable StringProperty parametersProperty) {
  myCheckBox = checkBox;
  myTextField = textField;
  myPathProperty = pathProperty;
  myEnabledProperty = enabledProperty;
  myParameters = parameters;
  myParametersProperty = parametersProperty;
  final ButtonModel model = myCheckBox.getModel();
  model.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      updateEnabledEffect();
    }
  });
  myTextField.addBrowseFolderListener(DiffBundle.message("select.external.diff.program.dialog.title"), null, null,
                                      FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor(),
                                      TextComponentAccessor.TEXT_FIELD_SELECTED_TEXT);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:DiffOptionsForm.java

示例6: getTextComponentAccessor

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
private static TextComponentAccessor<EditorTextField> getTextComponentAccessor() {
    return new TextComponentAccessor<EditorTextField>() {
        @Override
        public String getText(EditorTextField component) {
            String text = component.getText();
            final VirtualFile file = VirtualFileManager.getInstance()
                            .findFileByUrl(VfsUtil.pathToUrl(text.replace(File.separatorChar, '/')));
            if (file != null && !file.isDirectory()) {
                final VirtualFile parent = file.getParent();
                assert parent != null;
                return parent.getPresentableUrl();
            }
            return text;
        }

        @Override
        public void setText(EditorTextField component, String text) {
            component.setText(text);
        }
    };
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:22,代码来源:ModuleSelector.java

示例7: ToolPath

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
public ToolPath(JCheckBox checkBox, TextFieldWithBrowseButton textField, @Nullable JTextField parameters,
                StringProperty pathProperty, BooleanProperty enabledProperty, @Nullable StringProperty parametersProperty) {
  myCheckBox = checkBox;
  myTextField = textField;
  myPathProperty = pathProperty;
  myEnabledProperty = enabledProperty;
  myParameters = parameters;
  myParametersProperty = parametersProperty;
  final ButtonModel model = myCheckBox.getModel();
  model.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      updateEnabledEffect();
    }
  });
  myTextField.addBrowseFolderListener(DiffBundle.message("select.external.diff.program.dialog.title"), null, null,
                                      FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor(),
                                      TextComponentAccessor.TEXT_FIELD_SELECTED_TEXT);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:20,代码来源:ExternalDiffSettingsConfigurable.java

示例8: MySourceCodeChooserActionListener

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
MySourceCodeChooserActionListener(final FileChooserDescriptor fileChooserDescriptor) {
    super(
        HybrisI18NBundleUtils.message("hybris.import.label.select.hybris.src.file"),
        "",
        HybrisWorkspaceRootStep.this.sourceCodeFilesInChooser,
        (Project) null,
        fileChooserDescriptor,
        TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT
    );
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:11,代码来源:HybrisWorkspaceRootStep.java

示例9: addBrowseFolderListener

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
@Override
public void addBrowseFolderListener(@Nullable String title,
                                    @Nullable String description,
                                    @Nullable Project project,
                                    FileChooserDescriptor fileChooserDescriptor,
                                    TextComponentAccessor<TextFieldWithHistory> accessor) {
  super.addBrowseFolderListener(title, description, project, fileChooserDescriptor, accessor);
  FileChooserFactory.getInstance().installFileCompletion(getChildComponent().getTextEditor(), fileChooserDescriptor, false, project);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:TextFieldWithHistoryWithBrowseButton.java

示例10: createCenterPanel

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
@Override
protected JComponent createCenterPanel() {
  myFilePattern.addBrowseFolderListener(UIBundle.message("file.chooser.default.title"), null, null, FileChooserDescriptorFactory.createSingleFileOrFolderDescriptor(), TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT);
  myFilePattern.getTextField().getDocument().addDocumentListener(new DocumentAdapter() {
    @Override
    protected void textChanged(DocumentEvent e) {
      setOKActionEnabled(myFilePattern.getText() != null && myFilePattern.getText().length() > 0);
    }
  });
  return myWholePanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:EditLogPatternDialog.java

示例11: PythonRunConfigurationForm

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
public PythonRunConfigurationForm(PythonRunConfiguration configuration) {
  myCommonOptionsForm = PyCommonOptionsFormFactory.getInstance().createForm(configuration.getCommonOptionsFormData());
  myCommonOptionsPlaceholder.add(myCommonOptionsForm.getMainPanel(), BorderLayout.CENTER);

  myProject = configuration.getProject();

  FileChooserDescriptor chooserDescriptor = new FileChooserDescriptor(true, false, false, false, false, false) {
    @Override
    public boolean isFileVisible(VirtualFile file, boolean showHiddenFiles) {
      return file.isDirectory() || file.getExtension() == null || Comparing.equal(file.getExtension(), "py");
    }
  };
  //chooserDescriptor.setRoot(s.getProject().getBaseDir());

  ComponentWithBrowseButton.BrowseFolderActionListener<JTextField> listener =
    new ComponentWithBrowseButton.BrowseFolderActionListener<JTextField>("Select Script", "", myScriptTextField, myProject,
                                                                         chooserDescriptor, TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT) {

      @Override
      protected void onFileChosen(@NotNull VirtualFile chosenFile) {
        super.onFileChosen(chosenFile);
        myCommonOptionsForm.setWorkingDirectory(chosenFile.getParent().getPath());
      }
    };

  myScriptTextField.addActionListener(listener);

  setAnchor(myCommonOptionsForm.getAnchor());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:PythonRunConfigurationForm.java

示例12: AppEngineSdkEditor

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
public AppEngineSdkEditor(final @Nullable Project project) {
  myPathEditor = new ComboboxWithBrowseButton(new ComboBox(100));
  myPathEditor.addBrowseFolderListener(project, new ComponentWithBrowseButton.BrowseFolderActionListener<JComboBox>("Google App Engine SDK",
                                   "Specify Google App Engine Java SDK home",
                                   myPathEditor, project,
                                   FileChooserDescriptorFactory.createSingleFolderDescriptor(),
                                   TextComponentAccessor.STRING_COMBOBOX_WHOLE_TEXT));
  final JComboBox comboBox = myPathEditor.getComboBox();
  comboBox.setEditable(true);
  comboBox.removeAllItems();
  for (AppEngineSdk sdk : AppEngineSdkManager.getInstance().getValidSdks()) {
    comboBox.addItem(FileUtil.toSystemDependentName(sdk.getSdkHomePath()));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:AppEngineSdkEditor.java

示例13: FileSelectorWithStoredHistory

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
private FileSelectorWithStoredHistory(TextFieldWithStoredHistory textField, String title) {
  super(textField, null);

  addBrowseFolderListener(
      title,
      "",
      null,
      BrowseFilesListener.SINGLE_FILE_DESCRIPTOR,
      TextComponentAccessor.TEXT_FIELD_WITH_STORED_HISTORY_WHOLE_TEXT);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:11,代码来源:FileSelectorWithStoredHistory.java

示例14: LocalAndServerPathsForm

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
public LocalAndServerPathsForm() {
  Disposer.register(this, myServerPathForm);

  myServerPathForm.addListener(new TfsTreeForm.SelectionListener() {
    @Override
    public void selectionChanged() {
      myEventDispatcher.getMulticaster().stateChanged(new ChangeEvent(this));
    }
  });

  myLocalPathLabel.setLabelFor(myLocalPathField.getChildComponent());
  myLocalPathField.getChildComponent().getDocument().addDocumentListener(new DocumentAdapter() {
    protected void textChanged(final DocumentEvent e) {
      myEventDispatcher.getMulticaster().stateChanged(new ChangeEvent(this));
    }
  });

  FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
  ComponentWithBrowseButton.BrowseFolderActionListener<JTextField> listener =
    new ComponentWithBrowseButton.BrowseFolderActionListener<JTextField>(TFSBundle.message("choose.local.path.title"),
                                                                         TFSBundle.message("choose.local.path.description"),
                                                                         myLocalPathField, null, descriptor,
                                                                         TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT);

  myServerPathLabel.setLabelFor(myServerPathForm.getPreferredFocusedComponent());
  myLocalPathField.addActionListener(listener);
  myMessageLabel.setIcon(UIUtil.getBalloonWarningIcon());
}
 
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:29,代码来源:LocalAndServerPathsForm.java

示例15: createComponent

import com.intellij.openapi.ui.TextComponentAccessor; //导入依赖的package包/类
@Nullable
@Override
public JComponent createComponent() {
    FileChooserDescriptor fcd = FileChooserDescriptorFactory.createSingleFileOrExecutableAppDescriptor();
    fcd.setShowFileSystemRoots(true);
    fcd.setTitle(DLangBundle.message("dub.config.selectexecutable.title"));
    fcd.setDescription(DLangBundle.message("dub.config.selectexecutable.description"));
    fcd.setHideIgnored(false);

    pathDubExecutable.addBrowseFolderListener(null,
            new TextFieldWithBrowseButton.BrowseFolderActionListener<JTextField>(fcd.getTitle(), fcd.getDescription(),
                    pathDubExecutable, null, fcd, TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT) );

    return panel;
}
 
开发者ID:shekn-itrtch,项目名称:DLangPlugin,代码行数:16,代码来源:DLangSettingsPanel.java


注:本文中的com.intellij.openapi.ui.TextComponentAccessor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。