List of usage examples for com.intellij.openapi.ui LabeledComponent getLabel
public JBLabel getLabel()
From source file:com.intellij.execution.ui.CommonProgramParametersPanel.java
License:Apache License
protected void copyDialogCaption(final LabeledComponent<RawCommandLineEditor> component) { final RawCommandLineEditor rawCommandLineEditor = component.getComponent(); rawCommandLineEditor.setDialogCaption(component.getRawText()); component.getLabel().setLabelFor(rawCommandLineEditor.getTextField()); }
From source file:com.intellij.refactoring.introduceParameter.InplaceIntroduceParameterUI.java
License:Apache License
@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/*from w w w . ja va 2 s .co m*/ 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; }
From source file:com.perl5.lang.perl.idea.configuration.settings.PerlSettingsConfigurable.java
License:Apache License
protected LabeledComponent<RawCommandLineEditor> copyDialogCaption( final LabeledComponent<RawCommandLineEditor> component, String text) { final RawCommandLineEditor rawCommandLineEditor = component.getComponent(); rawCommandLineEditor.setDialogCaption(text); component.getLabel().setLabelFor(rawCommandLineEditor.getTextField()); return component; }
From source file:com.perl5.lang.perl.idea.configuration.settings.sdk.Perl5ProjectConfigurable.java
License:Apache License
private static LabeledComponent<RawCommandLineEditor> copyDialogCaption( final LabeledComponent<RawCommandLineEditor> component, String text) { final RawCommandLineEditor rawCommandLineEditor = component.getComponent(); rawCommandLineEditor.setDialogCaption(text); component.getLabel().setLabelFor(rawCommandLineEditor.getTextField()); return component; }
From source file:org.moe.idea.runconfig.configuration.ArgumentsPanel.java
License:Apache License
protected void copyDialogCaption(LabeledComponent<RawCommandLineEditor> component) { RawCommandLineEditor rawCommandLineEditor = (RawCommandLineEditor) component.getComponent(); rawCommandLineEditor.setDialogCaption(component.getRawText()); component.getLabel().setLabelFor(rawCommandLineEditor.getTextField()); }