/**
* Returns the current x,y position within the child which is displayed
* at the 0,0 location of the scrolled panel's view port.
* This is a convenience method which interfaces with the adjustable
* objects which represent the state of the scrollbars.
* @return the coordinate position for the current scroll position
* @throws NullPointerException if the scrollpane does not contain
* a child
*/
@Transient
public Point getScrollPosition() {
synchronized (getTreeLock()) {
if (getComponentCount()==0) {
throw new NullPointerException("child is null");
}
return new Point(hAdjustable.getValue(), vAdjustable.getValue());
}
}
ScrollPane.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:OpenJSharp
作者:
评论列表
文章目录