本文整理了Java中javax.swing.JScrollPane.getViewportBorder()
方法的一些代码示例,展示了JScrollPane.getViewportBorder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.getViewportBorder()
方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:getViewportBorder
暂无
代码示例来源:origin: khuxtable/seaglass
protected void paint(SynthContext context, Graphics g) {
Border vpBorder = scrollpane.getViewportBorder();
if (vpBorder != null) {
Rectangle r = scrollpane.getViewportBorderBounds();
vpBorder.paintBorder(scrollpane, g, r.x, r.y, r.width, r.height);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
protected void uninstallDefaults(JScrollPane c) {
LookAndFeel.uninstallBorder(scrollpane);
if (scrollpane.getViewportBorder() instanceof UIResource) {
scrollpane.setViewportBorder(null);
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-project
public MyTree() {
setBorder(scrollPane.getBorder());
setViewportBorder(scrollPane.getViewportBorder());
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
Border inner = pane.getViewportBorder();
Insets ins2;
if (inner != null) {
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-project
public MyTree() {
setBorder(scrollPane.getBorder());
setViewportBorder(scrollPane.getViewportBorder());
}
代码示例来源:origin: jpcsp/jpcsp
/**
* Gets the sub-rectangle of a JScrollPane's area that
* is actually showing the view
*/
private Rectangle getShowingRect (JScrollPane pane) {
Insets ins1 = pane.getViewport().getInsets();
Border inner = pane.getViewportBorder();
Insets ins2;
if (inner != null) {
ins2 = inner.getBorderInsets(pane);
} else {
ins2 = new Insets (0,0,0,0);
}
Insets ins3 = new Insets(0,0,0,0);
if (pane.getBorder() != null) {
ins3 = pane.getBorder().getBorderInsets(pane);
}
Rectangle r = pane.getViewportBorderBounds();
r.translate(-r.x, -r.y);
r.width -= ins1.left + ins1.right;
r.width -= ins2.left + ins2.right;
r.height -= ins1.top + ins1.bottom;
r.height -= ins2.top + ins2.bottom;
r.x -= ins2.left;
r.x -= ins3.left;
Point p = pane.getViewport().getViewPosition();
r.translate (p.x, p.y);
r = SwingUtilities.convertRectangle(pane.getViewport(), r, pane);
return r;
}
代码示例来源:origin: org.netbeans.api/org-netbeans-swing-plaf
SLIDING_TAB_BUTTON_UI, "org.netbeans.swing.tabcontrol.plaf.SlidingTabDisplayerButtonUI", //NOI18N
SLIDING_BUTTON_UI, "org.netbeans.swing.tabcontrol.plaf.NimbusSlidingButtonUI", //NOI18N
SCROLLPANE_BORDER, new JScrollPane().getViewportBorder(),
代码示例来源:origin: khuxtable/seaglass
protected void installDefaults(JScrollPane scrollpane) {
LookAndFeel.installBorder(scrollpane, "ScrollPane.border");
LookAndFeel.installColorsAndFont(scrollpane, "ScrollPane.background", "ScrollPane.foreground", "ScrollPane.font");
Border vpBorder = scrollpane.getViewportBorder();
if ((vpBorder == null) || (vpBorder instanceof UIResource)) {
vpBorder = UIManager.getBorder("ScrollPane.viewportBorder");
scrollpane.setViewportBorder(vpBorder);
}
Object obj = UIManager.get("ScrollPane.cornerPainter");
if (obj != null && obj instanceof SeaGlassPainter) {
cornerPainter = (SeaGlassPainter) obj;
}
LookAndFeel.installProperty(scrollpane, "opaque", Boolean.TRUE);
updateStyle(scrollpane);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-project
@Override
public void updateUI() {
super.updateUI();
setBorder(scrollPane.getBorder());
setViewportBorder(scrollPane.getViewportBorder());
}
}
代码示例来源:origin: com.synaptix/SynaptixTattoo
Border border = scroller.getViewportBorder();
if (border != null) {
Insets insets = border.getBorderInsets(null);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-project
@Override
public void updateUI() {
super.updateUI();
setBorder(scrollPane.getBorder());
setViewportBorder(scrollPane.getViewportBorder());
}
}
代码示例来源:origin: khuxtable/seaglass
protected void uninstallDefaults(JScrollPane c) {
SeaGlassContext context = getContext(c, ENABLED);
style.uninstallDefaults(context);
context.dispose();
if (scrollpane.getViewportBorder() instanceof UIResource) {
scrollpane.setViewportBorder(null);
}
}
代码示例来源:origin: net.sf.nimrod/nimrod-laf
if ( sp.getViewportBorder() != null ) {
JComponent ccc = (JComponent)cc;
Border bb = sp.getViewportBorder();
if ( bb != null && bb instanceof NimRODBorders.NimRODGenBorder ) {
int x = bb.getBorderInsets( sp).left + bb.getBorderInsets( sp).right - 1;
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
protected void installDefaults(JScrollPane scrollpane)
{
LookAndFeel.installBorder(scrollpane, "ScrollPane.border");
LookAndFeel.installColorsAndFont(scrollpane,
"ScrollPane.background",
"ScrollPane.foreground",
"ScrollPane.font");
Border vpBorder = scrollpane.getViewportBorder();
if ((vpBorder == null) ||( vpBorder instanceof UIResource)) {
vpBorder = UIManager.getBorder("ScrollPane.viewportBorder");
scrollpane.setViewportBorder(vpBorder);
}
scrollpane.setLayout(new TonicScrollPaneLayout());
scrollpane.setCorner(JScrollPane.UPPER_RIGHT_CORNER, new UpperRightCorner());
}
代码示例来源:origin: org.netbeans.api/org-netbeans-swing-plaf
SCROLLPANE_BORDER, new JScrollPane().getViewportBorder(),
代码示例来源:origin: com.eas.platypus/platypus-js-forms
Border viewportBorder = scrollPane.getViewportBorder();
if (viewportBorder != null) {
Insets vpbInsets = viewportBorder.getBorderInsets(parent);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
Border viewportBorder = scrollPane.getViewportBorder();
if (viewportBorder != null) {
Insets vpbInsets = viewportBorder.getBorderInsets(parent);
代码示例来源:origin: com.synaptix/SynaptixSwing
Border viewportBorder = scrollPane.getViewportBorder();
if (viewportBorder != null) {
Insets vpbInsets = viewportBorder.getBorderInsets(parent);
代码示例来源:origin: com.jidesoft/jide-oss
Border viewportBorder = scrollPane.getViewportBorder();
if (viewportBorder != null) {
Insets vpbInsets = viewportBorder.getBorderInsets(parent);
代码示例来源:origin: khuxtable/seaglass
private void updateStyle(JScrollPane c) {
SeaGlassContext context = getContext(c, ENABLED);
SynthStyle oldStyle = style;
style = SeaGlassLookAndFeel.updateStyle(context, this);
if (style != oldStyle) {
Border vpBorder = scrollpane.getViewportBorder();
if ((vpBorder == null) || (vpBorder instanceof UIResource)) {
scrollpane.setViewportBorder(new ViewportBorder(context));
}
if (oldStyle != null) {
uninstallKeyboardActions(c);
installKeyboardActions(c);
}
}
context.dispose();
}
内容来源于网络,如有侵权,请联系作者删除!