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


Java TabbedConfigurable类代码示例

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


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

示例1: actionPerformed

import com.intellij.openapi.options.TabbedConfigurable; //导入依赖的package包/类
public void actionPerformed(AnActionEvent e) {
  final Project project = PlatformDataKeys.PROJECT.getData(e.getDataContext());

  Disposable disposable = Disposer.newDisposable();
  final CompositeConfigurable configurable = new TabbedConfigurable(disposable) {
    protected List<Configurable> createConfigurables() {
      ArrayList<Configurable> array = new ArrayList<Configurable>();
      array.add(new DebuggerDataViewsConfigurable(project));
      array.add(new UserRenderersConfigurable(project));
      return array;
    }

    public void apply() throws ConfigurationException {
      super.apply();
      NodeRendererSettings.getInstance().fireRenderersChanged();
    }

    public String getDisplayName() {
      return DebuggerBundle.message("title.customize.data.views");
    }

    public String getHelpTopic() {
      return null;
    }
  };

  SingleConfigurableEditor editor = new SingleConfigurableEditor(project, configurable);
  Disposer.register(editor.getDisposable(), disposable);
  editor.show();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:31,代码来源:CustomizeContextViewAction.java

示例2: isWorthToShowApplyButton

import com.intellij.openapi.options.TabbedConfigurable; //导入依赖的package包/类
private static boolean isWorthToShowApplyButton(@NotNull Configurable configurable) {
  return configurable instanceof Place.Navigator ||
         configurable instanceof Composite ||
         configurable instanceof TabbedConfigurable;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ShowSettingsUtilImpl.java

示例3: MemberChooserHeaderPanel

import com.intellij.openapi.options.TabbedConfigurable; //导入依赖的package包/类
public MemberChooserHeaderPanel(final PsiClass clazz) {
    super(new GridBagLayout());

    final Collection<TemplateResource> templates = ToStringTemplatesManager.getInstance().getAllTemplates();
    final TemplateResource[] all = templates.toArray(new TemplateResource[templates.size()]);

    final JButton settingsButton = new JButton("Settings");
    settingsButton.setMnemonic(KeyEvent.VK_S);

    comboBox = new ComboBox(all);
    settingsButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          final TemplatesPanel ui = new TemplatesPanel(clazz.getProject());
          Disposable disposable = Disposer.newDisposable();
          Configurable composite = new TabbedConfigurable(disposable) {
                protected List<Configurable> createConfigurables() {
                    List<Configurable> res = new ArrayList<Configurable>();
                    res.add(new GenerateToStringConfigurable(clazz.getProject()));
                    res.add(ui);
                    return res;
                }

                public String getDisplayName() {
                    return "toString() Generation Settings";
                }

                public String getHelpTopic() {
                    return "editing.altInsert.tostring.settings";
                }

                @Override
                public void apply() throws ConfigurationException {
                    super.apply();
                    updateDialog(clazz, chooser);

                    comboBox.removeAllItems();
                    for (TemplateResource resource : ToStringTemplatesManager.getInstance().getAllTemplates()) {
                      comboBox.addItem(resource);
                    }
                    comboBox.setSelectedItem(ToStringTemplatesManager.getInstance().getDefaultTemplate());
                }
            };

            ShowSettingsUtil.getInstance().editConfigurable(MemberChooserHeaderPanel.this, composite, new Runnable() {
                public void run() {
                    ui.selectItem(ToStringTemplatesManager.getInstance().getDefaultTemplate());
                }
            });
          Disposer.dispose(disposable);
        }
    });

    comboBox.setSelectedItem(ToStringTemplatesManager.getInstance().getDefaultTemplate());

    final JLabel templatesLabel = new JLabel("Template: ");
    templatesLabel.setDisplayedMnemonic('T');
    templatesLabel.setLabelFor(comboBox);

    final GridBagConstraints constraints = new GridBagConstraints();
    constraints.anchor = GridBagConstraints.BASELINE;
    constraints.gridx = 0;
    add(templatesLabel, constraints);
    constraints.gridx = 1;
    constraints.weightx = 1.0;
    constraints.fill = GridBagConstraints.HORIZONTAL;
    add(comboBox, constraints);
    constraints.gridx = 2;
    constraints.weightx = 0.0;
    add(settingsButton, constraints);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:71,代码来源:GenerateToStringActionHandlerImpl.java

示例4: MemberChooserHeaderPanel

import com.intellij.openapi.options.TabbedConfigurable; //导入依赖的package包/类
public MemberChooserHeaderPanel(final PsiClass clazz) {
    super(new BorderLayout());

    final Collection<TemplateResource> templates = TemplatesManager.getInstance().getAllTemplates();
    final TemplateResource[] all = templates.toArray(new TemplateResource[templates.size()]);

    final JButton settingsButton = new JButton("Settings");
    settingsButton.setMnemonic(KeyEvent.VK_S);

    comboBox = new JComboBox(all);
    settingsButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            final TemplatesPanel ui = new TemplatesPanel();
          Disposable disposable = Disposer.newDisposable();
          Configurable composite = new TabbedConfigurable(disposable) {
                protected List<Configurable> createConfigurables() {
                    List<Configurable> res = new ArrayList<Configurable>();
                    res.add(new GenerateToStringConfigurable(clazz.getProject()));
                    res.add(ui);
                    return res;
                }

                public String getDisplayName() {
                    return "toString() Generation Settings";
                }

                public String getHelpTopic() {
                    return null; // TODO:
                }

                @Override
                public void apply() throws ConfigurationException {
                    super.apply();
                    updateDialog(clazz, chooser);

                    comboBox.removeAllItems();
                    for (TemplateResource resource : TemplatesManager.getInstance().getAllTemplates()) {
                      comboBox.addItem(resource);
                    }
                    comboBox.setSelectedItem(TemplatesManager.getInstance().getDefaultTemplate());
                }
            };

            ShowSettingsUtil.getInstance().editConfigurable(MemberChooserHeaderPanel.this, composite, new Runnable() {
                public void run() {
                    ui.selectItem(TemplatesManager.getInstance().getDefaultTemplate());
                }
            });
          Disposer.dispose(disposable);
        }
    });

    add(settingsButton, BorderLayout.EAST);
    add(comboBox, BorderLayout.CENTER);
    comboBox.setSelectedItem(TemplatesManager.getInstance().getDefaultTemplate());

    final JLabel templatesLabel = new JLabel("Template: ");
    templatesLabel.setDisplayedMnemonic('T');
    templatesLabel.setLabelFor(comboBox);

    add(templatesLabel, BorderLayout.WEST);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:63,代码来源:GenerateToStringActionHandlerImpl.java


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