本文整理了Java中javax.swing.JScrollPane.setViewportBorder()
方法的一些代码示例,展示了JScrollPane.setViewportBorder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.setViewportBorder()
方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:setViewportBorder
暂无
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
JBPopup popup = builder.createPopup();
builder.getScrollPane().setBorder(null);
builder.getScrollPane().setViewportBorder(null);
popup.showInBestPositionFor(editor);
代码示例来源:origin: ballerina-platform/ballerina-lang
private void performImport(@NotNull List<String> packagesToImport, @NotNull BallerinaFile file,
@Nullable Editor editor) {
if (packagesToImport.size() > 1 && editor != null) {
JBList<String> list = new JBList<>(packagesToImport);
list.installCellRenderer(o -> {
JBLabel label = new JBLabel(o.toString(), BallerinaIcons.PACKAGE, SwingConstants.LEFT);
label.setBorder(JBUI.Borders.empty(2, 4));
return label;
});
PopupChooserBuilder popupChooserBuilder = JBPopupFactory.getInstance().createListPopupBuilder(list)
.setRequestFocus(true)
.setTitle("Package to import")
.setItemChoosenCallback(() -> {
int i = list.getSelectedIndex();
if (i < 0) {
return;
}
performImport(file, packagesToImport.get(i));
})
.setFilteringEnabled(item -> item instanceof String ? (String) item : item.toString());
JBPopup popup = popupChooserBuilder.createPopup();
popupChooserBuilder.getScrollPane().setBorder(null);
popupChooserBuilder.getScrollPane().setViewportBorder(null);
popup.showInBestPositionFor(editor);
}
}
代码示例来源:origin: magefree/mage
@Override
public void setBorder(Border border) {
super.setBorder(border);
if (jScrollPane1 != null) {
jScrollPane1.setViewportBorder(border);
jScrollPane1.setBorder(border);
}
}
代码示例来源:origin: stackoverflow.com
public static void main(String[] args) {
JScrollPane scroll = new JScrollPane(new JTree());
scroll.setViewportBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JFrame frame = new JFrame("Test");
frame.add(scroll);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
代码示例来源:origin: magefree/mage
/**
*
* Creates new form ChatPanel
*
*/
public ChatPanelBasic() {
initComponents();
setBackground(new Color(0, 0, 0, CHAT_ALPHA));
changeGUISize(GUISizeHelper.chatFont);
if (jScrollPaneTxt != null) {
jScrollPaneTxt.setBackground(new Color(0, 0, 0, CHAT_ALPHA));
jScrollPaneTxt.getViewport().setBackground(new Color(0, 0, 0, CHAT_ALPHA));
jScrollPaneTxt.setViewportBorder(null);
}
}
代码示例来源:origin: magefree/mage
private void initComponents() {
setOpaque(false);
jPanel = new JLayeredPane();
jPanel.setLayout(null);
jPanel.setOpaque(false);
jScrollPane = new JScrollPane(jPanel);
Border empty = new EmptyBorder(0, 0, 0, 0);
jScrollPane.setBorder(empty);
jScrollPane.setViewportBorder(empty);
jScrollPane.setOpaque(false);
jScrollPane.getViewport().setOpaque(false);
this.add(jScrollPane);
}
代码示例来源:origin: org.netbeans.api/org-openide-dialogs
scroll.setOpaque(false);
scroll.setViewportBorder(BorderFactory.createEmptyBorder());
代码示例来源:origin: magefree/mage
public void initComponents() {
hand = new mage.client.cards.Cards(true);
hand.setMinOffsetY(HAND_MIN_CARDS_OFFSET_Y);
hand.setCardDimension(GUISizeHelper.handCardDimension);
jPanel = new JPanel();
jScrollPane1 = new JScrollPane(jPanel);
jScrollPane1.getViewport().setBackground(new Color(0, 0, 0, 0));
jPanel.setLayout(new GridBagLayout()); // centers hand
jPanel.setBackground(new Color(0, 0, 0, 0));
jPanel.add(hand);
setOpaque(false);
jPanel.setOpaque(false);
jScrollPane1.setOpaque(false);
jPanel.setBorder(EMPTY_BORDER);
jScrollPane1.setBorder(EMPTY_BORDER);
jScrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
jScrollPane1.getHorizontalScrollBar().setUnitIncrement(8);
jScrollPane1.setViewportBorder(EMPTY_BORDER);
setLayout(new BorderLayout());
add(jScrollPane1, BorderLayout.CENTER);
hand.setHScrollSpeed(8);
hand.setBackgroundColor(new Color(0, 0, 0, 0));
hand.setVisibleIfEmpty(false);
hand.setBorder(EMPTY_BORDER);
hand.setZone(Zone.HAND.toString());
}
代码示例来源:origin: magefree/mage
textAreaScrollPane.getViewport().setOpaque(false);
textAreaScrollPane.setBorder(null);
textAreaScrollPane.setViewportBorder(null);
mainPanel.add(textAreaScrollPane);
代码示例来源:origin: bobbylight/RSyntaxTextArea
Border emptyBorder = BorderFactory.createEmptyBorder();
sp.setBorder(emptyBorder);
sp.setViewportBorder(emptyBorder);
sp.setBackground(textArea.getBackground());
sp.getViewport().setBackground(textArea.getBackground());
代码示例来源:origin: magefree/mage
public PlayersChatPanel() {
userTableModel = new UserTableModel(); // needs to be set before initComponents();
initComponents();
setBackground(new Color(0, 0, 0, CHAT_ALPHA));
jTablePlayers.setBackground(new Color(0, 0, 0, CHAT_ALPHA));
jTablePlayers.setForeground(Color.white);
jTablePlayers.setRowSorter(new MageTableRowSorter(userTableModel));
setGUISize();
TableUtil.setColumnWidthAndOrder(jTablePlayers, tableInfo.getColumnsWidth(), KEY_USERS_COLUMNS_WIDTH, KEY_USERS_COLUMNS_ORDER);
jTablePlayers.setDefaultRenderer(Icon.class, new CountryCellRenderer());
jScrollPaneTalk.setSystemMessagesPane(colorPaneSystem);
jScrollPaneTalk.setOpaque(false);
jScrollPaneSystem.getViewport().setOpaque(false);
jScrollPaneSystem.setViewportBorder(null);
colorPaneSystem.setExtBackgroundColor(new Color(0, 0, 0, CHAT_ALPHA)); // Alpha = 255 not transparent
colorPaneSystem.setBorder(new EmptyBorder(5, 5, 5, 5));
if (jScrollPanePlayers != null) {
jScrollPanePlayers.setBackground(new Color(0, 0, 0, CHAT_ALPHA));
jScrollPanePlayers.getViewport().setBackground(new Color(0, 0, 0, CHAT_ALPHA));
jScrollPanePlayers.setViewportBorder(null);
}
}
代码示例来源:origin: pentaho/mondrian
jScrollPaneT.setViewportBorder(
javax.swing.BorderFactory.createLineBorder(
new java.awt.Color(
代码示例来源:origin: magefree/mage
cardScroll.setOpaque(false);
cardScroll.getViewport().setOpaque(false);
cardScroll.setViewportBorder(BorderFactory.createEmptyBorder());
cardScroll.setBorder(BorderFactory.createLineBorder(Color.gray, 1));
cardScroll.getVerticalScrollBar().setUnitIncrement(CardRenderer.getCardTopHeight(getCardWidth()));
代码示例来源:origin: ron190/jsql-injection
scroller.scrollPane.setViewportBorder(BorderFactory.createEmptyBorder(0, 0, -1, -1));
代码示例来源:origin: magefree/mage
jScrollPaneTablesActive.setViewportBorder(null);
jScrollPaneTablesFinished.setViewportBorder(null);
jScrollPaneTablesFinished.setMinimumSize(new java.awt.Dimension(23, 0));
代码示例来源:origin: magefree/mage
jScrollPane2.setViewportBorder(BorderFactory.createEmptyBorder());
代码示例来源:origin: ron190/jsql-injection
scrollerNetwork.scrollPane.setViewportBorder(BorderFactory.createEmptyBorder(0, 0, -1, -1));
代码示例来源:origin: kaikramer/keystore-explorer
private void init() {
listPanel = new RdnPanelList(currentName, editable);
JScrollPane jScrollPane = new JScrollPane(listPanel);
jScrollPane.setViewportBorder(null);
jScrollPane.setBorder(BorderFactory.createEmptyBorder());
jScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
jScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
setLayout(new BorderLayout());
add(jScrollPane, BorderLayout.CENTER);
}
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_components
/**
* Creates a scroll pane containing the actual graph of the results.
*
* @return a scroll pane containing the graph
*/
private Component createGraphPanel() {
JScrollPane graphScrollPanel = makeScrollPane(graph, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
graphScrollPanel.setViewportBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
graphScrollPanel.setPreferredSize(graphScrollPanel.getMinimumSize());
return graphScrollPanel;
}
代码示例来源:origin: net.sf.tinylaf/tinylaf
FakeList() {
super(new FocusedListItem());
fakeList = this;
setViewportBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0));
init();
}
内容来源于网络,如有侵权,请联系作者删除!