本文整理汇总了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();
}
示例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;
}
示例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);
}
示例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);
}