com.intellij.ui.SeparatorFactory Java Examples
The following examples show how to use
com.intellij.ui.SeparatorFactory.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TemplateConfigurable.java From android-codegenerator-plugin-intellij with Apache License 2.0 | 5 votes |
@Nullable @Override public JComponent createComponent() { templateSettings = TemplateSettings.getInstance(); editor = createEditorInPanel(templateSettings.provideTemplateForName(templateName)); JPanel panel = new JPanel(new BorderLayout()); panel.setPreferredSize(new Dimension(400, 300)); panel.add(SeparatorFactory.createSeparator(templateHeaderText, null), BorderLayout.PAGE_START); panel.add(new ToolbarPanel(editorPanel, new DefaultActionGroup(new ResetToDefaultAction())), BorderLayout.CENTER); return panel; }
Example #2
Source File: AbstractFindUsagesDialog.java From consulo with Apache License 2.0 | 5 votes |
@Nullable private JComponent createSearchScopePanel() { if (isInFileOnly()) return null; JPanel optionsPanel = new JPanel(new BorderLayout()); String scope = myFindUsagesOptions.searchScope.getDisplayName(); myScopeCombo = new ScopeChooserCombo(myProject, mySearchInLibrariesAvailable, true, scope); Disposer.register(myDisposable, myScopeCombo); optionsPanel.add(myScopeCombo, BorderLayout.CENTER); JComponent separator = SeparatorFactory.createSeparator(FindBundle.message("find.scope.label"), myScopeCombo.getComboBox()); optionsPanel.add(separator, BorderLayout.NORTH); return optionsPanel; }
Example #3
Source File: MemberSelectionPanelBase.java From consulo with Apache License 2.0 | 5 votes |
/** * @param title if title contains 'm' - it would look and feel as mnemonic */ public MemberSelectionPanelBase(String title, Table table) { super(); setLayout(new BorderLayout()); myTable = table; JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTable); add(SeparatorFactory.createSeparator(title, myTable), BorderLayout.NORTH); add(scrollPane, BorderLayout.CENTER); }
Example #4
Source File: ChangeListViewerDialog.java From consulo with Apache License 2.0 | 4 votes |
public JComponent createCenterPanel() { final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); final Splitter splitter = new Splitter(true, 0.8f); myChangesBrowser = new RepositoryChangesBrowser(myProject, Collections.singletonList(myChangeList), new ArrayList<Change>(myChangeList.getChanges()), myChangeList, myToSelect) { @Override protected void buildToolBar(DefaultActionGroup toolBarGroup) { super.buildToolBar(toolBarGroup); toolBarGroup.add(ActionManager.getInstance().getAction("Vcs.CopyRevisionNumberAction")); } @Override public Object getData(@Nonnull @NonNls Key dataId) { Object data = super.getData(dataId); if (data != null) { return data; } return ChangeListViewerDialog.this.getData(dataId); } @Override protected void showDiffForChanges(final Change[] changesArray, final int indexInSelection) { if (myInAir && (myConvertor != null)) { final Change[] convertedChanges = new Change[changesArray.length]; for (int i = 0; i < changesArray.length; i++) { Change change = changesArray[i]; convertedChanges[i] = myConvertor.fun(change); } super.showDiffForChanges(convertedChanges, indexInSelection); } else { super.showDiffForChanges(changesArray, indexInSelection); } } }; myChangesBrowser.setUseCase(myInAir ? CommittedChangesBrowserUseCase.IN_AIR : null); splitter.setFirstComponent(myChangesBrowser); if (myCommitMessageArea != null) { JPanel commitPanel = new JPanel(new BorderLayout()); JComponent separator = SeparatorFactory.createSeparator(VcsBundle.message("label.commit.comment"), myCommitMessageArea); commitPanel.add(separator, BorderLayout.NORTH); commitPanel.add(commitMessageScroll, BorderLayout.CENTER); splitter.setSecondComponent(commitPanel); } mainPanel.add(splitter, BorderLayout.CENTER); final String description = getDescription(); if (description != null) { JPanel descPanel = new JPanel(); descPanel.add(new JLabel(XmlStringUtil.wrapInHtml(description))); descPanel.setBorder(BorderFactory.createEtchedBorder()); mainPanel.add(descPanel, BorderLayout.NORTH); } return mainPanel; }
Example #5
Source File: MacrosDialog.java From consulo with Apache License 2.0 | 4 votes |
@Override protected JComponent createCenterPanel() { JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints constr; // list label constr = new GridBagConstraints(); constr.gridy = 0; constr.anchor = GridBagConstraints.WEST; constr.fill = GridBagConstraints.HORIZONTAL; panel.add(SeparatorFactory.createSeparator(IdeBundle.message("label.macros"), null), constr); // macros list constr = new GridBagConstraints(); constr.gridy = 1; constr.weightx = 1; constr.weighty = 1; constr.fill = GridBagConstraints.BOTH; constr.anchor = GridBagConstraints.WEST; panel.add(ScrollPaneFactory.createScrollPane(myMacrosList), constr); myMacrosList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); myMacrosList.setPreferredSize(null); // preview label constr = new GridBagConstraints(); constr.gridx = 0; constr.gridy = 2; constr.anchor = GridBagConstraints.WEST; constr.fill = GridBagConstraints.HORIZONTAL; panel.add(SeparatorFactory.createSeparator(IdeBundle.message("label.macro.preview"), null), constr); // preview constr = new GridBagConstraints(); constr.gridx = 0; constr.gridy = 3; constr.weightx = 1; constr.weighty = 1; constr.fill = GridBagConstraints.BOTH; constr.anchor = GridBagConstraints.WEST; panel.add(ScrollPaneFactory.createScrollPane(myPreviewTextarea), constr); myPreviewTextarea.setEditable(false); myPreviewTextarea.setLineWrap(true); myPreviewTextarea.setPreferredSize(null); panel.setPreferredSize(new Dimension(400, 500)); return panel; }