本文整理汇总了Java中consulo.roots.ui.configuration.SdkComboBox类的典型用法代码示例。如果您正苦于以下问题:Java SdkComboBox类的具体用法?Java SdkComboBox怎么用?Java SdkComboBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SdkComboBox类属于consulo.roots.ui.configuration包,在下文中一共展示了SdkComboBox类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initComponents
import consulo.roots.ui.configuration.SdkComboBox; //导入依赖的package包/类
@Override
protected void initComponents()
{
myModuleBox = new ComboBox();
myModuleBox.setRenderer(new ModuleListCellRenderer());
myVmParametersComponent = LabeledComponent.create(new RawCommandLineEditor(), "VM arguments");
myVmParametersComponent.setLabelLocation(BorderLayout.WEST);
copyDialogCaption(myVmParametersComponent);
myUseAlternativeBundleCheckBox = new JCheckBox("Use alternative bundle: ");
ProjectSdksModel projectSdksModel = new ProjectSdksModel();
projectSdksModel.reset();
myAlternativeBundleComboBox = new SdkComboBox(projectSdksModel, Conditions.<SdkTypeId>is(NodeJSBundleType.getInstance()), true);
myAlternativeBundleComboBox.setEnabled(false);
myUseAlternativeBundleCheckBox.addItemListener(new ItemListener()
{
@Override
public void itemStateChanged(ItemEvent e)
{
myAlternativeBundleComboBox.setEnabled(myUseAlternativeBundleCheckBox.isSelected());
}
});
super.initComponents();
}
示例2: createEditor
import consulo.roots.ui.configuration.SdkComboBox; //导入依赖的package包/类
@NotNull
@Override
protected JComponent createEditor()
{
JPanel verticalLayout = new JPanel(new VerticalFlowLayout(0, 0));
ProjectSdksModel model = new ProjectSdksModel();
model.reset();
myBundleBox = new SdkComboBox(model, Conditions.equalTo(myBundleType), true);
verticalLayout.add(LabeledComponent.left(myBundleBox, J2EEBundle.message("label.run.configuration.properties.application.server")));
JPanel openBrowserPanel = new JPanel();
openBrowserPanel.setBorder(IdeBorderFactory.createTitledBorder("Open browser"));
verticalLayout.add(openBrowserPanel);
if(myBundleType.isJreCustomizable())
{
AlternativeJREPanel panel = new AlternativeJREPanel();
verticalLayout.add(panel);
}
verticalLayout.add(mySettingsWrapper);
return verticalLayout;
}
示例3: NodeJSNewModuleBuilderPanel
import consulo.roots.ui.configuration.SdkComboBox; //导入依赖的package包/类
public NodeJSNewModuleBuilderPanel()
{
super(new VerticalFlowLayout());
ProjectSdksModel model = new ProjectSdksModel();
model.reset();
myComboBox = new SdkComboBox(model, Conditions.equalTo(NodeJSBundleType.getInstance()), false);
add(LabeledComponent.create(myComboBox, "Bundle").setLabelLocation(BorderLayout.WEST));
}
示例4: insertCustomSdkItems
import consulo.roots.ui.configuration.SdkComboBox; //导入依赖的package包/类
@Override
public void insertCustomSdkItems(@Nullable DotNetSimpleModuleExtension extension, @NotNull SdkComboBox comboBox)
{
if(extension == null)
{
return;
}
if(extension.getId().equals(getExtensionId()))
{
Sdk sdk = extension.getSdk();
if(sdk == null)
{
return;
}
VirtualFile homeDirectory = sdk.getHomeDirectory();
if(homeDirectory == null)
{
return;
}
VirtualFile child = homeDirectory.findChild(CSharpCompilerUtil.COMPILER_NAME);
if(child != null)
{
comboBox.insertCustomSdkItem(CSharpModuleExtension.INTERNAL_SDK_KEY, "<internal>", getIcon());
}
}
}
示例5: CSharpSdkPanel
import consulo.roots.ui.configuration.SdkComboBox; //导入依赖的package包/类
public CSharpSdkPanel()
{
super(new VerticalFlowLayout());
myTargetComboBox = new ComboBox<>(DotNetTarget.values());
myTargetComboBox.setRenderer(new ColoredListCellRenderer<DotNetTarget>()
{
@Override
protected void customizeCellRenderer(@NotNull JList<? extends DotNetTarget> jList, DotNetTarget target, int i, boolean b, boolean b1)
{
append(target.getDescription());
}
});
add(myTargetComponent = LabeledComponent.left(myTargetComboBox, "Target"));
List<String> validSdkTypes = new SmartList<>();
for(Map.Entry<String, String[]> entry : CSharpNewModuleBuilder.ourExtensionMapping.entrySet())
{
// need check C# extension
ModuleExtensionProviderEP providerEP = ModuleExtensionProviders.findProvider(entry.getValue()[1]);
if(providerEP == null)
{
continue;
}
validSdkTypes.add(entry.getKey());
}
ProjectSdksModel model = new ProjectSdksModel();
model.reset();
myComboBox = new SdkComboBox(model, sdkTypeId -> validSdkTypes.contains(sdkTypeId.getName()), false);
add(LabeledComponent.left(myComboBox, ".NET SDK"));
}
示例6: JrePathEditor
import consulo.roots.ui.configuration.SdkComboBox; //导入依赖的package包/类
/**
* This constructor can be used in UI forms
*/
public JrePathEditor()
{
ProjectSdksModel model = new ProjectSdksModel();
model.reset();
mySdkComboBox = new SdkComboBox(model, id -> Objects.equals(JavaSdk.getInstance(), id), null, "Auto Select", AllIcons.Actions.FindPlain);
myLabeledComponent = LabeledComponent.create(mySdkComboBox, JavaExecutionBundle.message("run.configuration.jre.label"));
setContent(myLabeledComponent);
}
示例7: JavaNewModuleBuilderPanel
import consulo.roots.ui.configuration.SdkComboBox; //导入依赖的package包/类
public JavaNewModuleBuilderPanel()
{
super(new VerticalFlowLayout());
ProjectSdksModel sdksModel = new ProjectSdksModel();
sdksModel.reset();
myComboBox = new SdkComboBox(sdksModel, Conditions.instanceOf(JavaSdk.class), false);
add(LabeledComponent.create(myComboBox, "JDK").setLabelLocation(BorderLayout.WEST));
}
示例8: insertCustomSdkItems
import consulo.roots.ui.configuration.SdkComboBox; //导入依赖的package包/类
public void insertCustomSdkItems(@Nullable DotNetSimpleModuleExtension extension, @NotNull SdkComboBox comboBox)
{
}
示例9: isAlternativeJreSelected
import consulo.roots.ui.configuration.SdkComboBox; //导入依赖的package包/类
public boolean isAlternativeJreSelected()
{
SdkComboBox.SdkComboBoxItem selectedItem = mySdkComboBox.getSelectedItem();
return !(selectedItem instanceof SdkComboBox.NullSdkComboBoxItem);
}