本文整理汇总了Java中com.intellij.ui.components.JBScrollPane.setBorder方法的典型用法代码示例。如果您正苦于以下问题:Java JBScrollPane.setBorder方法的具体用法?Java JBScrollPane.setBorder怎么用?Java JBScrollPane.setBorder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.components.JBScrollPane
的用法示例。
在下文中一共展示了JBScrollPane.setBorder方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: EmojiCheckinHandler
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
public EmojiCheckinHandler(CheckinProjectPanel checkinProjectPanel) {
JPanel emojiPanel = new JPanel();
emojiPanel.setLayout(new VerticalFlowLayout());
VirtualFile emojirc = checkinProjectPanel.getProject().getBaseDir().findChild(".emojirc");
if (emojirc == null) return;
PsiFile psiFile = PsiManager.getInstance(checkinProjectPanel.getProject()).findFile(emojirc);
if (psiFile == null) return;
for (PsiElement psiElement : psiFile.getChildren()) {
if (!(psiElement instanceof EmojiResourceProperty)) continue;
emojiPanel.add(createEmojiButton(psiElement.getFirstChild().getText(), psiElement.getLastChild().getText(), false, buttonGroup));
}
emojiPanel.add(createEmojiButton(null, NO_EMOJI, true, buttonGroup));
Splitter splitter = (Splitter) checkinProjectPanel.getComponent();
CommitMessage commitMessage = (CommitMessage) splitter.getSecondComponent();
JComponent component = (JComponent) commitMessage.getComponent(1);
JBScrollPane scrollPane = new JBScrollPane(emojiPanel);
scrollPane.setBorder(null);
Splitter commitSplitter = new Splitter();
commitSplitter.setFirstComponent(scrollPane);
commitSplitter.setSecondComponent((JComponent) commitMessage.getComponent(0));
commitMessage.add(commitSplitter, 0);
for (EmojiPanelFactory factory : factories) {
factory.createPanel(commitMessage);
}
this.checkinProjectPanel = checkinProjectPanel;
}
示例2: SearchTextArea
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
public SearchTextArea(boolean search) {
myTextArea = new JTextArea();
setBorder(JBUI.Borders.empty(6, 6, 6, 8));
setLayout(new BorderLayout(JBUI.scale(4), 0));
myTextArea.addPropertyChangeListener("background", this);
myTextArea.addFocusListener(this);
myTextArea.setBorder(null);
myTextArea.setOpaque(false);
JBScrollPane scrollPane = new JBScrollPane(myTextArea,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrollPane.getVerticalScrollBar().setBackground(UIUtil.TRANSPARENT_COLOR);
scrollPane.getViewport().setBorder(null);
scrollPane.getViewport().setOpaque(false);
scrollPane.setBorder(JBUI.Borders.emptyRight(2));
scrollPane.setOpaque(false);
ShowHistoryAction historyAction = new ShowHistoryAction(search);
ActionButton button =
new ActionButton(historyAction, historyAction.getTemplatePresentation(), ActionPlaces.UNKNOWN, new Dimension(JBUI.scale(16), JBUI.scale(16)));
button.setLook(new InplaceActionButtonLook());
JPanel p = new NonOpaquePanel(new BorderLayout());
p.add(button, BorderLayout.NORTH);
add(p, BorderLayout.WEST);
add(scrollPane, BorderLayout.CENTER);
}
示例3: createPanel
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
@Override
public JPanel createPanel() {
final JPanel mainPanel = new JPanel(new BorderLayout());
final JLabel label = createErrorLabel();
final JButton button = createActionButton();
button.addActionListener(createCloseActionListener());
final JPanel scrollPanel = createAndFillContentPanel();
initGeneratorListeners();
registerValidators();
final JBScrollPane scrollPane = new JBScrollPane(scrollPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setBorder(null);
mainPanel.add(scrollPane, BorderLayout.CENTER);
final JPanel bottomPanel = new JPanel(new BorderLayout());
bottomPanel.add(label, BorderLayout.NORTH);
bottomPanel.add(button, BorderLayout.EAST);
mainPanel.add(bottomPanel, BorderLayout.SOUTH);
return mainPanel;
}
示例4: createCourseSpecificTab
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
public void createCourseSpecificTab(
ObjectFinder finder,
ProjectOpener opener,
String course,
JTabbedPane tabbedPaneBase,
CourseAndExerciseManager courseAndExerciseManager) {
logger.info("Creating course specific tab. @CourseTabFactory");
final JBScrollPane panel = new JBScrollPane();
final JBList list = new JBList();
list.setCellRenderer(new ProjectListRenderer());
DefaultListModel defaultListModel = new DefaultListModel();
panel.setBorder(BorderFactory.createTitledBorder(""));
ProjectListManagerHolder.get()
.addExercisesToList(finder, course, defaultListModel, courseAndExerciseManager);
if (defaultListModel.getSize() <= 0) {
return;
}
list.setName(course);
list.setModel(defaultListModel);
MouseListener mouseListener = createMouseListenerForWindow(opener, panel, list);
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
list.addMouseListener(mouseListener);
panel.setName(course);
panel.setViewportView(list);
ProjectListManagerHolder.get().addList(list);
tabbedPaneBase.addTab(course, panel);
tabbedPaneBase.addMouseListener(tabMouseListener(tabbedPaneBase));
setScrollBarToBottom(course, tabbedPaneBase, panel);
}
示例5: ErrorText
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
private ErrorText() {
setLayout(new BorderLayout());
myLabel.setIcon(AllIcons.Actions.Lightning);
myLabel.setBorder(JBUI.Borders.empty(4, 10, 0, 2));
JBScrollPane pane =
new JBScrollPane(myLabel, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
pane.setBorder(JBUI.Borders.empty());
pane.setBackground(null);
pane.getViewport().setBackground(null);
pane.setOpaque(false);
add(pane, BorderLayout.CENTER);
}
示例6: createScrollPane
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
public static JScrollPane createScrollPane(Component view, boolean withoutBorder) {
JBScrollPane scrollPane = new JBScrollPane(view);
if (withoutBorder) {
scrollPane.setBorder(IdeBorderFactory.createEmptyBorder()); // set empty border, because setting null doesn't always take effect
scrollPane.setViewportBorder(IdeBorderFactory.createEmptyBorder());
}
return scrollPane;
}
示例7: createScrollPane
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
static JBScrollPane createScrollPane(JPanel gridPanel) {
JBScrollPane scrollPane =
new JBScrollPane(gridPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.getVerticalScrollBar().setUnitIncrement(10);
scrollPane.setBorder(JBUI.Borders.empty()); // to disallow resetting border on LaF change
return scrollPane;
}
示例8: updateRightPanel
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
void updateRightPanel(final Configurable configurable) {
myRightPanel.removeAll();
mySelectedConfigurable = configurable;
JComponent configurableComponent = configurable.createComponent();
final JBScrollPane scrollPane = new JBScrollPane(configurableComponent);
scrollPane.getVerticalScrollBar().setUnitIncrement(10);
scrollPane.setBorder(null);
myRightPanel.add(scrollPane, BorderLayout.CENTER);
if (configurable instanceof SingleConfigurationConfigurable) {
myRightPanel.add(((SingleConfigurationConfigurable)configurable).getValidationComponent(), BorderLayout.SOUTH);
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
((SingleConfigurationConfigurable)configurable).updateWarning();
}
});
if (configurableComponent != null) {
DataProvider dataProvider = DataManager.getDataProvider(configurableComponent);
if (dataProvider != null) {
DataManager.registerDataProvider(myRightPanel, dataProvider);
}
}
}
setupDialogBounds();
}
示例9: ErrorText
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
private ErrorText() {
setLayout(new BorderLayout());
JBScrollPane pane =
new JBScrollPane(myLabel, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
pane.setBorder(IdeBorderFactory.createEmptyBorder());
pane.setBackground(null);
pane.getViewport().setBackground(null);
pane.setOpaque(false);
add(pane, BorderLayout.CENTER);
}
示例10: createScrollPane
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
public static JScrollPane createScrollPane(Component view, boolean withoutBorder) {
JBScrollPane scrollPane = new JBScrollPane(view);
if (withoutBorder) {
scrollPane.setBorder(IdeBorderFactory.createEmptyBorder()); // set empty border, because setting null doesn't always take effect
}
return scrollPane;
}
示例11: createCenterPanel
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
@Override
protected JComponent createCenterPanel() {
JEditorPane pane = new JEditorPane(UIUtil.HTML_MIME, myInformationText);
pane.addHyperlinkListener(new BrowserHyperlinkListener());
pane.setEditable(false);
pane.setBackground(UIUtil.getLabelBackground());
JBScrollPane scrollPane = new JBScrollPane(pane);
scrollPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
return scrollPane;
}
示例12: updateRightPanel
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
private void updateRightPanel(final Configurable configurable) {
myRightPanel.removeAll();
mySelectedConfigurable = configurable;
final JBScrollPane scrollPane = new JBScrollPane(configurable.createComponent());
scrollPane.setBorder(null);
myRightPanel.add(scrollPane, BorderLayout.CENTER);
if (configurable instanceof SingleConfigurationConfigurable) {
RunManagerEx.getInstanceEx(myProject)
.invalidateConfigurationIcon((RunnerAndConfigurationSettings)((SingleConfigurationConfigurable)configurable).getSettings());
}
setupDialogBounds();
}
示例13: ErrorText
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
private ErrorText(int horizontalAlignment) {
setLayout(new BorderLayout());
myLabel.setBorder(JBUI.Borders.empty(16, 13, 16, 13));
myLabel.setHorizontalAlignment(horizontalAlignment);
JBScrollPane pane = new JBScrollPane(myLabel, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
pane.setBorder(JBUI.Borders.empty());
pane.setBackground(null);
pane.getViewport().setBackground(null);
pane.setOpaque(false);
add(pane, BorderLayout.CENTER);
}
示例14: LookupUi
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
LookupUi(LookupImpl lookup, Advertiser advertiser, JBList list, Project project) {
myLookup = lookup;
myAdvertiser = advertiser;
myList = list;
myProject = project;
myIconPanel.setVisible(false);
myIconPanel.setBackground(Color.LIGHT_GRAY);
myIconPanel.add(myProcessIcon);
JComponent adComponent = advertiser.getAdComponent();
adComponent.setBorder(new EmptyBorder(0, 1, 1, 2 + AllIcons.Ide.LookupRelevance.getIconWidth()));
myLayeredPane.mainPanel.add(adComponent, BorderLayout.SOUTH);
myScrollBarIncreaseButton = new JButton();
myScrollBarIncreaseButton.setFocusable(false);
myScrollBarIncreaseButton.setRequestFocusEnabled(false);
myScrollPane = new JBScrollPane(lookup.getList());
myScrollPane.setViewportBorder(JBUI.Borders.empty());
myScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
myScrollPane.getVerticalScrollBar().setPreferredSize(new Dimension(13, -1));
myScrollPane.getVerticalScrollBar().setUI(new ButtonlessScrollBarUI() {
@Override
protected JButton createIncreaseButton(int orientation) {
return myScrollBarIncreaseButton;
}
});
lookup.getComponent().add(myLayeredPane, BorderLayout.CENTER);
//IDEA-82111
fixMouseCheaters();
myLayeredPane.mainPanel.add(myScrollPane, BorderLayout.CENTER);
myScrollPane.setBorder(null);
mySortingLabel.setBorder(new LineBorder(new JBColor(Color.LIGHT_GRAY, JBColor.background())));
mySortingLabel.setOpaque(true);
new ChangeLookupSorting().installOn(mySortingLabel);
updateSorting();
myModalityState = ModalityState.stateForComponent(lookup.getEditor().getComponent());
addListeners();
updateScrollbarVisibility();
Disposer.register(lookup, myProcessIcon);
Disposer.register(lookup, myHintAlarm);
}
示例15: createUIComponents
import com.intellij.ui.components.JBScrollPane; //导入方法依赖的package包/类
private void createUIComponents() {
myGalleryScroller = new JBScrollPane();
myGalleryScroller.setBorder(BorderFactory.createLoweredBevelBorder());
}