public ScrollGroup() {
super();
component.setViewportView(canvas);
component.getVerticalScrollBar().setUnitIncrement(10);
component.setBorder(null);
canvas.setLayout(new MigLayout("flowy, fillx, gap 0! 0!, insets 0"));
component.setInheritsPopupMenu(true);
canvas.setInheritsPopupMenu(true);
/*
* The cursor line in GBrowserView has to be redrawn when the scroll pane is scrolled.
* This is not a perfect solution, because the component is shown for a while before
* the cursor line is painted (the line flickers during the scrolling).
*/
component.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() {
@Override
public void adjustmentValueChanged(AdjustmentEvent e) {
if (view != null){
view.getComponent().repaint();
}
}
});
}
ScrollGroup.java 文件源码
java
阅读 33
收藏 0
点赞 0
评论 0
项目:chipster
作者:
评论列表
文章目录