本文整理了Java中javax.swing.JScrollPane.createVerticalScrollBar()
方法的一些代码示例,展示了JScrollPane.createVerticalScrollBar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.createVerticalScrollBar()
方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:createVerticalScrollBar
暂无
代码示例来源:origin: apache/pdfbox
private JScrollPane getScrollPane()
{
JScrollPane scrollPane = new JScrollPane();
scrollPane.setBorder(new LineBorder(Color.LIGHT_GRAY));
Action blankAction = new AbstractAction()
{
@Override
public void actionPerformed(ActionEvent actionEvent)
{
}
};
scrollPane.getActionMap().put("unitScrollDown", blankAction);
scrollPane.getActionMap().put("unitScrollLeft", blankAction);
scrollPane.getActionMap().put("unitScrollRight", blankAction);
scrollPane.getActionMap().put("unitScrollUp", blankAction);
JScrollBar verticalScrollBar = scrollPane.createVerticalScrollBar();
verticalScrollBar.setUnitIncrement(HexView.CHAR_HEIGHT);
verticalScrollBar.setBlockIncrement(HexView.CHAR_HEIGHT * 20);
verticalScrollBar.setValues(0, 1, 0, HexView.CHAR_HEIGHT * (model.totalLine()+1));
scrollPane.setVerticalScrollBar(verticalScrollBar);
return scrollPane;
}
代码示例来源:origin: stackoverflow.com
_pane.setVerticalScrollBar(_pane.createVerticalScrollBar());
_pane.setBorder(new EmptyBorder(0,0,0,0));
_pane.setToolTipText(value != null ? value.toString() : "");
内容来源于网络,如有侵权,请联系作者删除!