本文整理汇总了Java中com.intellij.ui.components.JBScrollPane.setMinimumSize方法的典型用法代码示例。如果您正苦于以下问题:Java JBScrollPane.setMinimumSize方法的具体用法?Java JBScrollPane.setMinimumSize怎么用?Java JBScrollPane.setMinimumSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.components.JBScrollPane
的用法示例。
在下文中一共展示了JBScrollPane.setMinimumSize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: modifySettingsStep
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
ModuleWizardStep javaSettingsStep =
ProjectWizardStepFactory.getInstance().createJavaSettingsStep(settingsStep, this, Conditions.alwaysTrue());
Function<JTextField, String> getValue = JTextComponent::getText;
getWizardInputField("ccname", "", "Name:", myPanel.getNameField(), getValue).addToSettings(settingsStep);
getWizardInputField("ccauthor", "", "Author:", myPanel.getAuthorField(), getValue).addToSettings(settingsStep);
myLanguageComboBox.removeAllItems();
for (LanguageExtensionPoint extension : Extensions.<LanguageExtensionPoint>getExtensions(EduPluginConfigurator.EP_NAME, null)) {
String languageId = extension.getKey();
Language language = Language.findLanguageByID(languageId);
if (language == null) {
LOG.info("Language with id " + languageId + " not found");
continue;
}
myLanguageComboBox.addItem(new LanguageWrapper(language));
}
getWizardInputField("cclang", "", "Language:", myLanguageComboBox, comboBox -> (String) comboBox.getSelectedItem())
.addToSettings(settingsStep);
JTextArea descriptionField = myPanel.getDescriptionField();
descriptionField.setRows(4);
descriptionField.setBorder(null);
descriptionField.invalidate();
JBScrollPane scrollPane = new JBScrollPane(descriptionField);
scrollPane.setMinimumSize(scrollPane.getUI().getPreferredSize(descriptionField));
getWizardInputField("ccdescr", "", "Description:", scrollPane, pane -> descriptionField.getText()).addToSettings(settingsStep);
return javaSettingsStep;
}
示例2: createCenterPanel
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
@Override
protected JComponent createCenterPanel() {
panel = new JPanel();
JBScrollPane scrollPane = new JBScrollPane(panel);
panel.setBorder(new EmptyBorder(PADDING, PADDING, PADDING, PADDING));
scrollPane.setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
return scrollPane;
}
示例3: createCenterPanel
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
@Override
protected JComponent createCenterPanel() {
panel = new JPanel();
JBScrollPane scrollPane = new JBScrollPane(panel);
scrollPane.setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
return scrollPane;
}
示例4: createCenterPanel
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
@Override
protected JComponent createCenterPanel() {
setModal(false);
panel = new JPanel();
JBScrollPane scrollPane = new JBScrollPane(panel);
scrollPane.setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
return scrollPane;
}
示例5: createErrorList
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
private JComponent createErrorList() {
final int DEFAULT_HEIGHT = 200;
final JComponent errorPanel = Box.createVerticalBox();
final JBScrollPane pane = new JBScrollPane(errorPanel);
for (Map.Entry<String, VcsRootChecker> entry : myCheckers.entrySet()) {
VcsRootChecker checker = entry.getValue();
for (final String root : checker.getUnregisteredRoots()) {
final String vcs = entry.getKey();
String title = "Unregistered " + vcs + " root: " + FileUtil.toSystemDependentName(root);
final VcsRootErrorLabel vcsRootErrorLabel = new VcsRootErrorLabel(title);
vcsRootErrorLabel.setAddRootLinkHandler(new Runnable() {
@Override
public void run() {
addMapping(new VcsDirectoryMapping(root, vcs));
errorPanel.remove(vcsRootErrorLabel);
if (errorPanel.getComponentCount() == 0) {
pane.setVisible(false);
}
pane.setMinimumSize(new Dimension(-1, calcMinHeight(errorPanel, DEFAULT_HEIGHT)));
validate();
}
});
errorPanel.add(vcsRootErrorLabel);
}
}
if (errorPanel.getComponentCount() == 0) {
pane.setVisible(false);
}
pane.setMinimumSize(new Dimension(-1, calcMinHeight(errorPanel, DEFAULT_HEIGHT)));
pane.setMaximumSize(new Dimension(-1, DEFAULT_HEIGHT));
return pane;
}
示例6: createPane
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
private JBScrollPane createPane(Component component) {
JBScrollPane pane = new JBScrollPane(component);
pane.setPreferredSize(new Dimension(600, 30));
pane.setMinimumSize(new Dimension(300, 30));
return pane;
}