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


Java TextFieldWithBrowseButton.setEnabled方法代码示例

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


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

示例1: EnableCustomPaths

import com.intellij.openapi.ui.TextFieldWithBrowseButton; //导入方法依赖的package包/类
private void EnableCustomPaths(boolean isEnabled) {

        for (TextFieldWithBrowseButton c : new TextFieldWithBrowseButton[] {
                handlerOutputLocationBrowseButton,
                intentOutputLocationBrowseButton,
                utterancesOutputLocationBrowseButton,
                customTypesOutputLocationBrowseButton
        }) {

            c.setEditable(isEnabled);
            c.setEnabled(isEnabled);
            c.setButtonEnabled(isEnabled);
        }

        handlerOutputFileLabel.setEnabled(isEnabled);
        intentOutputFileLabel.setEnabled(isEnabled);
        utterancesOutputFileLabel.setEnabled(isEnabled);
        customTypesOutputFileLabel.setEnabled(isEnabled);

        configProvider.useCustomPaths(isEnabled);

        handlerOutputLocationBrowseButton.setText(configProvider.getHandlerOutputLocation());
        intentOutputLocationBrowseButton.setText(configProvider.getIntentOutputLocation());
        utterancesOutputLocationBrowseButton.setText(configProvider.getUtterancesOutputLocation());
        customTypesOutputLocationBrowseButton.setText(configProvider.getCustomTypesOutputLocation());

    }
 
开发者ID:SlalomConsulting,项目名称:sutr-io,代码行数:28,代码来源:SutrConfigPanel.java

示例2: createCenterPanel

import com.intellij.openapi.ui.TextFieldWithBrowseButton; //导入方法依赖的package包/类
protected JComponent createCenterPanel() {
  final JPanel panel = new JPanel(new GridBagLayout());
  final JLabel header = new JLabel(UIBundle.message("label.class.filter.editor.add.dialog.filter.pattern"));
  myClassName = new TextFieldWithBrowseButton(new JTextField(35));
  final JLabel iconLabel = new JLabel(Messages.getQuestionIcon());
  
  panel.add(header, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 0, 0), 0, 0));
  panel.add(myClassName, new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 0, 0), 0, 0));
  panel.add(iconLabel, new GridBagConstraints(0, 0, 1, 2, 0.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(15, 0, 0, 0), 0, 0));

  myClassName.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      PsiClass currentClass = getSelectedClass();
      TreeClassChooser chooser = TreeClassChooserFactory.getInstance(myProject).createNoInnerClassesScopeChooser(
        UIBundle.message("class.filter.editor.choose.class.title"), GlobalSearchScope.allScope(myProject), null, null);
      if (currentClass != null) {
        PsiFile containingFile = currentClass.getContainingFile();
        if (containingFile != null) {
          PsiDirectory containingDirectory = containingFile.getContainingDirectory();
          if (containingDirectory != null) {
            chooser.selectDirectory(containingDirectory);
          }
        }
      }
      chooser.showDialog();
      PsiClass selectedClass = chooser.getSelected();
      if (selectedClass != null) {
        myClassName.setText(selectedClass.getQualifiedName());
      }
    }
  });

  myClassName.setEnabled(myProject != null);

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


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