javax.swing.JScrollPane.setVerticalScrollBar()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(157)

本文整理了Java中javax.swing.JScrollPane.setVerticalScrollBar()方法的一些代码示例,展示了JScrollPane.setVerticalScrollBar()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.setVerticalScrollBar()方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:setVerticalScrollBar

JScrollPane.setVerticalScrollBar介绍

暂无

代码示例

代码示例来源: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: bedatadriven/activityinfo

headerScroll.setVerticalScrollBar(new HiddenScrollBar(headerScroll.getVerticalScrollBar()));

代码示例来源:origin: stackoverflow.com

fixedScroll.setVerticalScrollBar(dummyBar);

代码示例来源:origin: ron190/jsql-injection

private ControlPanel(JScrollPane scrollPane) {
    this.setLayout(new BorderLayout());
    this.setOpaque(false);
    this.vScrollBar = new JMyScrollBar(Adjustable.VERTICAL);
    scrollPane.setVerticalScrollBar(this.vScrollBar);
    scrollPane.remove(this.vScrollBar);
    if (scrollPane.getVerticalScrollBarPolicy() != ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER) {
      this.add(this.vScrollBar, BorderLayout.EAST);
    }
    this.hScrollBar = new JMyScrollBar(Adjustable.HORIZONTAL);
    scrollPane.setHorizontalScrollBar(this.hScrollBar);
    scrollPane.remove(this.hScrollBar);
    if (scrollPane.getHorizontalScrollBarPolicy() != ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER) {
      this.add(this.hScrollBar, BorderLayout.SOUTH);
    }
  }
}

代码示例来源:origin: stackoverflow.com

_pane.setVerticalScrollBar(_pane.createVerticalScrollBar());
_pane.setBorder(new EmptyBorder(0,0,0,0));
_pane.setToolTipText(value != null ? value.toString() : "");

代码示例来源:origin: leMaik/swing-material

@Override
protected JScrollPane createScroller() {
  JScrollPane scroller = super.createScroller();
  scroller.setVerticalScrollBar(new ScrollBar(comboBox, Adjustable.VERTICAL));
  scroller.setBorder(new MatteBorder(16, 0, 16, 0, Color.WHITE));
  return scroller;
}

代码示例来源:origin: org.xworker/xworker_core

public static void createVerticalScrollBar(ActionContext actionContext){
  JScrollPane parent = (JScrollPane) actionContext.get("parent");
  
  Thing thing = World.getInstance().getThing("xworker.javax.swing.JScrollBar");
  JScrollBar obj = (JScrollBar) thing.run("create", actionContext);
  if(obj != null){
    parent.setVerticalScrollBar(obj);
  }
}

代码示例来源:origin: stackoverflow.com

scroll.setVerticalScrollBar(scrollbar);

相关文章

JScrollPane类方法