本文整理匯總了Java中com.intellij.util.ui.UIUtil.DEFAULT_VGAP屬性的典型用法代碼示例。如果您正苦於以下問題:Java UIUtil.DEFAULT_VGAP屬性的具體用法?Java UIUtil.DEFAULT_VGAP怎麽用?Java UIUtil.DEFAULT_VGAP使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.intellij.util.ui.UIUtil
的用法示例。
在下文中一共展示了UIUtil.DEFAULT_VGAP屬性的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createCenterPanel
@Override
protected JComponent createCenterPanel() {
final JPanel panel = new JPanel(new BorderLayout(UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP));
myList = new JBList(myNamedElements);
myList.setCellRenderer(new FQNameCellRenderer());
panel.add(ScrollPaneFactory.createScrollPane(myList), BorderLayout.CENTER);
panel.add(new JBLabel(myContainsClassesOnly ?
CodeInsightBundle.message("dialog.paste.on.import.text") :
CodeInsightBundle.message("dialog.paste.on.import.text2"), SMALL, BRIGHTER), BorderLayout.NORTH);
final JPanel buttonPanel = new JPanel(new VerticalFlowLayout());
final JButton okButton = new JButton(CommonBundle.getOkButtonText());
getRootPane().setDefaultButton(okButton);
buttonPanel.add(okButton);
final JButton cancelButton = new JButton(CommonBundle.getCancelButtonText());
buttonPanel.add(cancelButton);
panel.setPreferredSize(JBUI.size(500, 400));
return panel;
}
示例2: createNorthPanel
@Override
protected JComponent createNorthPanel() {
JPanel panel = new JPanel(new GridBagLayout());
GridBagConstraints gbConstraints = new GridBagConstraints();
gbConstraints.insets = new Insets(0, 0, UIUtil.DEFAULT_VGAP, 0);
gbConstraints.fill = GridBagConstraints.NONE;
gbConstraints.weightx = 1;
gbConstraints.weighty = 1;
gbConstraints.anchor = GridBagConstraints.WEST;
final SimpleColoredComponent coloredComponent = new SimpleColoredComponent();
coloredComponent.setIpad(new Insets(0,0,0,0));
coloredComponent.setMyBorder(null);
configureLabelComponent(coloredComponent);
panel.add(coloredComponent, gbConstraints);
return panel;
}
示例3: createNorthPanel
@Override
protected JComponent createNorthPanel() {
final JComponent panel = new JPanel(new GridBagLayout());
GridBagConstraints gbConstraints = new GridBagConstraints();
gbConstraints.insets = new Insets(0, 0, UIUtil.DEFAULT_VGAP, 0);
gbConstraints.fill = GridBagConstraints.BOTH;
gbConstraints.weightx = 1;
gbConstraints.weighty = 1;
gbConstraints.anchor = GridBagConstraints.EAST;
myCbExns = new JComboBox (myRoots);
panel.add(myCbExns, gbConstraints);
return panel;
}
示例4: createCenterPanel
protected JComponent createCenterPanel() {
JPanel panel = new JPanel(new BorderLayout(UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP));
final JLabel label = new JLabel(RefactoringBundle.message("moveInstanceMethod.select.an.instance.parameter"));
panel.add(label, BorderLayout.NORTH);
panel.add(createListAndVisibilityPanels(), BorderLayout.CENTER);
return panel;
}
示例5: getBorderInsets
@Override
public Insets getBorderInsets(Component c, final Insets insets) {
insets.top += getTitledSeparator(c).getPreferredSize().getHeight() - TitledSeparator.TOP_INSET - TitledSeparator.BOTTOM_INSET;
insets.top += UIUtil.DEFAULT_VGAP;
insets.top += insideInsets.top;
insets.left += insideInsets.left;
insets.bottom += insideInsets.bottom;
insets.right += insideInsets.right;
insets.top += outsideInsets.top;
insets.left += outsideInsets.left;
insets.bottom += outsideInsets.bottom;
insets.right += outsideInsets.right;
return insets;
}
示例6: GitCompareBranchesLogPanel
GitCompareBranchesLogPanel(@NotNull Project project, @NotNull String branchName, @NotNull String currentBranchName,
@NotNull GitCommitCompareInfo compareInfo, @NotNull GitRepository initialRepo) {
super(new BorderLayout(UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP));
myProject = project;
myBranchName = branchName;
myCurrentBranchName = currentBranchName;
myCompareInfo = compareInfo;
myInitialRepo = initialRepo;
add(createNorthPanel(), BorderLayout.NORTH);
add(createCenterPanel());
}
示例7: createOptionsPanel
@Override
public JComponent createOptionsPanel() {
final JPanel panel = new JPanel(new GridLayout(1, 2, UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP));
final ListTable table1 = new ListTable(new ListWrappingTableModel(queryNames, InspectionGadgetsBundle.message("query.column.name")));
final JPanel tablePanel1 = UiUtils.createAddRemovePanel(table1);
final ListTable table2 = new ListTable(new ListWrappingTableModel(updateNames, InspectionGadgetsBundle.message("update.column.name")));
final JPanel tablePanel2 = UiUtils.createAddRemovePanel(table2);
panel.add(tablePanel1);
panel.add(tablePanel2);
return panel;
}
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:13,代碼來源:MismatchedCollectionQueryUpdateInspection.java
示例8: createEditor
@Override
@NotNull
public JComponent createEditor() {
myModules.fillModules(myPRC.getProject(), PluginModuleType.getInstance());
JPanel wholePanel = new JPanel(new GridBagLayout());
myVMParameters.setText(DevKitBundle.message("vm.parameters"));
myVMParameters.setComponent(new RawCommandLineEditor());
myVMParameters.getComponent().setDialogCaption(myVMParameters.getRawText());
myVMParameters.setLabelLocation(BorderLayout.WEST);
myProgramParameters.setText(DevKitBundle.message("program.parameters"));
myProgramParameters.setComponent(new RawCommandLineEditor());
myProgramParameters.getComponent().setDialogCaption(myProgramParameters.getRawText());
myProgramParameters.setLabelLocation(BorderLayout.WEST);
GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 0, 0), UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP);
wholePanel.add(myVMParameters, gc);
wholePanel.add(myProgramParameters, gc);
gc.gridwidth = 1;
gc.gridy = 3;
gc.weightx = 0;
wholePanel.add(myModuleLabel, gc);
gc.weighty = 1;
gc.gridx = 1;
gc.weightx = 1;
wholePanel.add(myModules, gc);
gc.gridx = 0;
gc.gridy = 4;
gc.gridwidth = 2;
wholePanel.add(myJrePathEditor, gc);
gc.gridy = 5;
wholePanel.add(myShowLogs, gc);
return wholePanel;
}
示例9: createPanel
public JPanel createPanel() {
JPanel panel = new JPanel();
panel.setLayout(new GridBagLayout());
for (int i = 0; i < myOptions.size(); i++) {
final int leftInset = Boolean.TRUE.equals(myIsShifted.get(i)) ? IdeBorderFactory.TITLED_BORDER_INDENT : 0;
final int topInset = i == 0 ? 0 : UIUtil.DEFAULT_VGAP;
final int rightInset = UIUtil.DEFAULT_HGAP;
final Object option = myOptions.get(i);
if (option instanceof JComponent) {
JComponent component = (JComponent)option;
panel.add(component,
new GridBagConstraints(0, i, GridBagConstraints.REMAINDER, 1, 1, 0, GridBagConstraints.WEST, getFill(component),
new Insets(topInset, leftInset, 0, 0), 0, 0));
}
else {
Pair pair = (Pair)option;
JComponent firstComponent = (JComponent)pair.first;
panel.add(firstComponent,
new GridBagConstraints(0, i, 1, 1, 1, 0, GridBagConstraints.WEST, getFill(firstComponent),
new Insets(topInset, leftInset, 0, 0), 0, 0));
JComponent secondComponent = (JComponent)pair.second;
panel.add(secondComponent,
new GridBagConstraints(1, i, 1, 1, 1, 0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL,
new Insets(topInset, rightInset, 0, 0), 0, 0));
}
}
JPanel p = new JPanel();
p.setPreferredSize(new Dimension(0, 0));
panel.add(p,
new GridBagConstraints(0, myOptions.size(), GridBagConstraints.REMAINDER, 1, 0, 1,
GridBagConstraints.NORTH, GridBagConstraints.NONE,
new Insets(0, 0, 0, 0), 0, 0));
if (myTitle != null) {
IdeaTitledBorder titledBorder = IdeBorderFactory.createTitledBorder(myTitle, true);
panel.setBorder(titledBorder);
titledBorder.acceptMinimumSize(panel);
}
return panel;
}
示例10: createCenterPanel
@Override
protected JComponent createCenterPanel() {
if (myCenterPanel == null) {
myCenterPanel = new JPanel(new GridBagLayout());
final GridBagConstraints gb =
new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(1, 1, 1, 1), 0, 0);
myPatchFileLabel = new JLabel(VcsBundle.message("patch.apply.file.name.field"));
myPatchFileLabel.setLabelFor(myPatchFile);
myCenterPanel.add(myPatchFileLabel, gb);
gb.fill = GridBagConstraints.HORIZONTAL;
++gb.gridy;
myCenterPanel.add(myPatchFile, gb);
final DefaultActionGroup group = new DefaultActionGroup();
final AnAction[] treeActions = myChangesTreeList.getTreeActions();
group.addAll(treeActions);
group.add(new MapDirectory());
final MyShowDiff diffAction = new MyShowDiff();
diffAction.registerCustomShortcutSet(CommonShortcuts.getDiff(), getRootPane());
group.add(diffAction);
group.add(new StripUp());
group.add(new StripDown());
group.add(new ResetStrip());
group.add(new ZeroStrip());
if (myCanChangePatchFile) {
group.add(new AnAction("Refresh", "Refresh", AllIcons.Actions.Refresh) {
@Override
public void actionPerformed(AnActionEvent e) {
queueRequest();
}
});
}
final ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("APPLY_PATCH", group, true);
++gb.gridy;
gb.fill = GridBagConstraints.HORIZONTAL;
myCenterPanel.add(toolbar.getComponent(), gb);
++gb.gridy;
gb.weighty = 1;
gb.fill = GridBagConstraints.BOTH;
myCenterPanel.add(myChangesTreeList, gb);
++gb.gridy;
gb.weighty = 0;
gb.fill = GridBagConstraints.NONE;
gb.insets.bottom = UIUtil.DEFAULT_VGAP;
myCenterPanel.add(myCommitLegendPanel.getComponent(), gb);
++gb.gridy;
gb.fill = GridBagConstraints.HORIZONTAL;
myCenterPanel.add(myChangeListChooser, gb);
}
return myCenterPanel;
}