本文整理汇总了Java中com.intellij.openapi.ui.LabeledComponent.setText方法的典型用法代码示例。如果您正苦于以下问题:Java LabeledComponent.setText方法的具体用法?Java LabeledComponent.setText怎么用?Java LabeledComponent.setText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.ui.LabeledComponent
的用法示例。
在下文中一共展示了LabeledComponent.setText方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createCenterPanel
import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
@Override
protected JComponent createCenterPanel() {
final JPanel panel = new JPanel(new GridBagLayout());
final GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST,
GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 0), 0, 0);
final PsiType type = getRootType();
final String typeText = type != null ? type.getPresentableText() : "<unknown>";
panel.add(new JLabel("Migrate " + getElementPresentation(myRoot) + " \"" + typeText + "\" to"), gc);
panel.add(myToTypeEditor, gc);
LabeledComponent<ScopeChooserCombo> scopeChooserComponent = new LabeledComponent<ScopeChooserCombo>();
scopeChooserComponent.setComponent(myScopeChooserCombo);
scopeChooserComponent.setText("Choose scope where change signature may occur");
panel.add(scopeChooserComponent, gc);
return panel;
}
示例2: createOptionsPanel
import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
@Nullable
public JComponent createOptionsPanel() {
final LabeledComponent<JTextField> definedGroups = new LabeledComponent<JTextField>();
definedGroups.setText("&Defined Groups");
final JTextField textField = new JTextField(StringUtil.join(ArrayUtil.toStringArray(groups), ","));
textField.getDocument().addDocumentListener(new DocumentAdapter() {
protected void textChanged(final DocumentEvent e) {
groups.clear();
final String[] groupsFromString = textField.getText().split("[, ]");
ContainerUtil.addAll(groups, groupsFromString);
}
});
definedGroups.setComponent(textField);
final JPanel optionsPanel = new JPanel(new BorderLayout());
optionsPanel.add(definedGroups, BorderLayout.NORTH);
return optionsPanel;
}
示例3: getMainComponent
import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
public JComponent getMainComponent() {
final LabeledComponent<JComboBox> component = new LabeledComponent<JComboBox>();
component.setText("Default &project copyright:");
component.setLabelLocation(BorderLayout.WEST);
component.setComponent(myProfilesComboBox);
ElementProducer<ScopeSetting> producer = new ElementProducer<ScopeSetting>() {
@Override
public ScopeSetting createElement() {
return new ScopeSetting(DefaultScopesProvider.getAllScope(), myProfilesModel.getAllProfiles().values().iterator().next());
}
@Override
public boolean canCreateElement() {
return !myProfilesModel.getAllProfiles().isEmpty();
}
};
ToolbarDecorator decorator = ToolbarDecorator.createDecorator(myScopeMappingTable, producer);
return JBUI.Panels.simplePanel(0, 10)
.addToTop(component)
.addToCenter(decorator.createPanel())
.addToBottom(myScopesLink);
}
示例4: getMainComponent
import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
public JComponent getMainComponent() {
final JPanel panel = new JPanel(new BorderLayout(0, 10));
final LabeledComponent<JComboBox> component = new LabeledComponent<JComboBox>();
component.setText("Default &project copyright:");
component.setLabelLocation(BorderLayout.WEST);
component.setComponent(myProfilesComboBox);
panel.add(component, BorderLayout.NORTH);
ElementProducer<ScopeSetting> producer = new ElementProducer<ScopeSetting>() {
@Override
public ScopeSetting createElement() {
return new ScopeSetting(DefaultScopesProvider.getAllScope(), myProfilesModel.getAllProfiles().values().iterator().next());
}
@Override
public boolean canCreateElement() {
return !myProfilesModel.getAllProfiles().isEmpty();
}
};
ToolbarDecorator decorator = ToolbarDecorator.createDecorator(myScopeMappingTable, producer);
panel.add(decorator.createPanel(), BorderLayout.CENTER);
panel.add(myScopesLink, BorderLayout.SOUTH);
return panel;
}
示例5: createReplaceFieldsWithGettersPanel
import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
@Override
protected JPanel createReplaceFieldsWithGettersPanel() {
final LabeledComponent<JComboBox> component = new LabeledComponent<JComboBox>();
myReplaceFieldsCb = new JComboBox(new Integer[]{IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_ALL,
IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_INACCESSIBLE,
IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_NONE});
myReplaceFieldsCb.setRenderer(new ListCellRendererWrapper<Integer>() {
@Override
public void customize(JList list, Integer value, int index, boolean selected, boolean hasFocus) {
switch (value) {
case IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_NONE:
setText(UIUtil.removeMnemonic(RefactoringBundle.message("do.not.replace")));
break;
case IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_INACCESSIBLE:
setText(UIUtil.removeMnemonic(RefactoringBundle.message("replace.fields.inaccessible.in.usage.context")));
break;
default:
setText(UIUtil.removeMnemonic(RefactoringBundle.message("replace.all.fields")));
}
}
});
myReplaceFieldsCb.setSelectedItem(JavaRefactoringSettings.getInstance().INTRODUCE_PARAMETER_REPLACE_FIELDS_WITH_GETTERS);
KeyboardComboSwitcher.setupActions(myReplaceFieldsCb, myProject);
component.setComponent(myReplaceFieldsCb);
component.setText(RefactoringBundle.message("replace.fields.used.in.expressions.with.their.getters"));
component.getLabel().setDisplayedMnemonic('u');
component.setLabelLocation(BorderLayout.NORTH);
component.setBorder(IdeBorderFactory.createEmptyBorder(3, 3, 2, 2));
return component;
}
示例6: assignLabel
import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
public static LabeledComponent<TextFieldWithBrowseButton> assignLabel(TextFieldWithBrowseButton targetDirectoryField, Project project) {
LabeledComponent<TextFieldWithBrowseButton> labeledComponent = new LabeledComponent<TextFieldWithBrowseButton>();
labeledComponent.setText(CodeEditorBundle.message("export.to.html.output.directory.label"));
targetDirectoryField.addBrowseFolderListener(CodeEditorBundle.message("export.to.html.select.output.directory.title"),
CodeEditorBundle.message("export.to.html.select.output.directory.description"),
project, FileChooserDescriptorFactory.createSingleFolderDescriptor());
labeledComponent.setComponent(targetDirectoryField);
return labeledComponent;
}
示例7: createCenterPanel
import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
protected JComponent createCenterPanel() {
final JPanel panel = new JPanel(new GridBagLayout());
final GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST,
GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 0), 0, 0);
final PsiType type = getRootType();
panel.add(new JLabel("Migrate " + getElementPresentation(myRoot) + " \"" + (type != null ? type.getCanonicalText() : "<unknown>") + "\" to"), gc);
panel.add(myToTypeEditor, gc);
LabeledComponent<ScopeChooserCombo> scopeChooserComponent = new LabeledComponent<ScopeChooserCombo>();
scopeChooserComponent.setComponent(myScopeChooserCombo);
scopeChooserComponent.setText("Choose scope where change signature may occur");
panel.add(scopeChooserComponent, gc);
return panel;
}
示例8: getMainComponent
import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
public JComponent getMainComponent() {
final JPanel panel = new JPanel(new BorderLayout(0, 10));
final LabeledComponent<JComboBox> component = new LabeledComponent<JComboBox>();
component.setText("Default &project Nuxeo SDK:");
component.setLabelLocation(BorderLayout.WEST);
component.setComponent(nuxeoSDKsComboBox);
panel.add(component, BorderLayout.NORTH);
return panel;
}
示例9: createCenterPanel
import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
@Override
protected JComponent createCenterPanel()
{
final JPanel panel = new JPanel(new GridBagLayout());
final GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, JBUI.insets(5, 5, 0, 0), 0, 0);
appendMigrationTypeEditor(panel, gc);
LabeledComponent<ScopeChooserCombo> scopeChooserComponent = new LabeledComponent<>();
scopeChooserComponent.setComponent(myScopeChooserCombo);
scopeChooserComponent.setText("Choose scope where change signature may occur");
panel.add(scopeChooserComponent, gc);
return panel;
}