本文整理了Java中javax.swing.JScrollPane.getVisibleRect()
方法的一些代码示例,展示了JScrollPane.getVisibleRect()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.getVisibleRect()
方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:getVisibleRect
暂无
代码示例来源:origin: stackoverflow.com
Rectangle rect = scrollPane.getVisibleRect();
JScrollBar bar = scrollPane.getVerticalScrollBar();
int blockIncr = scrollPane.getViewport().getViewRect().height;
代码示例来源:origin: net.imagej/ij-ui-swing
public void setNormalSize() {
JScrollPane scrollPane = getScrollPane();
Insets scrollInsets = getScrollPaneInsets();
if (scrollPane != null) {
Dimension d = scrollPane.getVisibleRect().getSize();
if (scrollPane.getBorder() != null) {
d.setSize(d.getWidth() - scrollInsets.left - scrollInsets.right,
d.getHeight() - scrollInsets.top - scrollInsets.bottom);
}
d.setSize(d.getWidth() - 20, d.getHeight() - 20);
desktop.setAllSize(d);
scrollPane.invalidate();
scrollPane.validate();
}
}
代码示例来源:origin: org.scijava/scijava-ui-swing
public void setNormalSize() {
JScrollPane scrollPane = getScrollPane();
Insets scrollInsets = getScrollPaneInsets();
if (scrollPane != null) {
Dimension d = scrollPane.getVisibleRect().getSize();
if (scrollPane.getBorder() != null) {
d.setSize(d.getWidth() - scrollInsets.left - scrollInsets.right,
d.getHeight() - scrollInsets.top - scrollInsets.bottom);
}
d.setSize(d.getWidth() - 20, d.getHeight() - 20);
desktop.setAllSize(d);
scrollPane.invalidate();
scrollPane.validate();
}
}
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
public void setNormalSize() {
JScrollPane scrollPane = getScrollPane();
Insets scrollInsets = getScrollPaneInsets();
if (scrollPane != null) {
Dimension d = scrollPane.getVisibleRect().getSize();
if (scrollPane.getBorder() != null) {
d.setSize(d.getWidth() - scrollInsets.left - scrollInsets.right,
d.getHeight() - scrollInsets.top - scrollInsets.bottom);
}
d.setSize(d.getWidth() - 20, d.getHeight() - 20);
desktop.setAllSize(d);
scrollPane.invalidate();
scrollPane.validate();
}
}
代码示例来源:origin: khuxtable/seaglass
translateX = 15 + insets.right;
Rectangle visibleRect = scrollpane.getVisibleRect();
代码示例来源:origin: fcrepo3/fcrepo
public void setNormalSize() {
JScrollPane scrollPane = getScrollPane();
int x = 0;
int y = 0;
Insets scrollInsets = getScrollPaneInsets();
if (scrollPane != null) {
Dimension d = scrollPane.getVisibleRect().getSize();
if (scrollPane.getBorder() != null) {
d
.setSize(d.getWidth() - scrollInsets.left
- scrollInsets.right, d.getHeight()
- scrollInsets.top - scrollInsets.bottom);
}
d.setSize(d.getWidth() - 20, d.getHeight() - 20);
desktop.setAllSize(x, y);
scrollPane.invalidate();
scrollPane.validate();
}
}
代码示例来源:origin: fcrepo3/fcrepo
Dimension d = scrollPane.getVisibleRect().getSize();
if (scrollPane.getBorder() != null) {
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
Dimension d=scrollPane.getVisibleRect().getSize();
if (scrollPane.getBorder() != null) {
d.setSize(d.getWidth() - scrollInsets.left - scrollInsets.right,
代码示例来源:origin: org.scijava/scijava-ui-swing
Dimension d=scrollPane.getVisibleRect().getSize();
if (scrollPane.getBorder() != null) {
d.setSize(d.getWidth() - scrollInsets.left - scrollInsets.right,
代码示例来源:origin: net.imagej/ij-ui-swing
Dimension d=scrollPane.getVisibleRect().getSize();
if (scrollPane.getBorder() != null) {
d.setSize(d.getWidth() - scrollInsets.left - scrollInsets.right,
代码示例来源:origin: MegaMek/megamek
Rectangle viewRect = scrollpane.getVisibleRect();
if (bvBgShouldTile && (bvBgImage != null)) {
Rectangle clipping = g.getClipBounds();
内容来源于网络,如有侵权,请联系作者删除!