本文整理匯總了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;
}