/** * Returns the bounds of the border around the specified scroll pane's * viewport. * * @return the size and position of the viewport border * @deprecated As of JDK version Swing1.1 * replaced by <code>JScrollPane.getViewportBorderBounds()</code>. */ public Rectangle getViewportBorderBounds(JScrollPane scrollpane) { return scrollpane.getViewportBorderBounds(); }
/** * Returns the bounds of the border around the specified scroll pane's * viewport. * * @return the size and position of the viewport border * @deprecated As of JDK version Swing1.1 * replaced by <code>JScrollPane.getViewportBorderBounds()</code>. */ @Deprecated public Rectangle getViewportBorderBounds(JScrollPane scrollpane) { return scrollpane.getViewportBorderBounds(); }
public double getLayoutWidth() { if (enclosingScrollPane != null) { return enclosingScrollPane.getViewportBorderBounds().width; } else { return getSize().width; } }
public double getLayoutWidth() { if (enclosingScrollPane != null) { return enclosingScrollPane.getViewportBorderBounds().width; } else { return getSize().width; } }
public Rectangle getFixedRectangle() { if (enclosingScrollPane != null) { return enclosingScrollPane.getViewportBorderBounds(); } else { Dimension dim = getSize(); return new Rectangle(0, 0, dim.width, dim.height); } }
public Rectangle getFixedRectangle() { if (enclosingScrollPane != null) { return enclosingScrollPane.getViewportBorderBounds(); } else { Dimension dim = getSize(); return new Rectangle(0, 0, dim.width, dim.height); } }
public double getLayoutWidth() { if (enclosingScrollPane != null) { return enclosingScrollPane.getViewportBorderBounds().width; } else { return getSize().width; } }
public Rectangle getFixedRectangle() { if (enclosingScrollPane != null) { return enclosingScrollPane.getViewportBorderBounds(); } else { Dimension dim = getSize(); return new Rectangle(0, 0, dim.width, dim.height); } }
/** * Gets the fixedRectangle attribute of the BasicPanel object * * @return The fixedRectangle value */ public Rectangle getFixedRectangle() { if (enclosingScrollPane != null) { return enclosingScrollPane.getViewportBorderBounds(); } else { Dimension dim = getSize(); return new Rectangle(0, 0, dim.width, dim.height); } }
/** * Gets the fixedRectangle attribute of the BasicPanel object * * @return The fixedRectangle value */ public Rectangle getFixedRectangle() { if (enclosingScrollPane != null) { return enclosingScrollPane.getViewportBorderBounds(); } else { Dimension dim = getSize(); return new Rectangle(0, 0, dim.width, dim.height); } }
/** * Gets the fixedRectangle attribute of the BasicPanel object * * @return The fixedRectangle value */ public Rectangle getFixedRectangle() { if (enclosingScrollPane != null) { return enclosingScrollPane.getViewportBorderBounds(); } else { Dimension dim = getSize(); return new Rectangle(0, 0, dim.width, dim.height); } }
public Rectangle getScreenExtents() { Rectangle extents; if (enclosingScrollPane != null) { Rectangle bnds = enclosingScrollPane.getViewportBorderBounds(); extents = new Rectangle(0, 0, bnds.width, bnds.height); //Uu.p("bnds = " + bnds); } else { extents = new Rectangle(getWidth(), getHeight());//200, 200 ) ); } return extents; }
public Rectangle getScreenExtents() { Rectangle extents; if (enclosingScrollPane != null) { Rectangle bnds = enclosingScrollPane.getViewportBorderBounds(); extents = new Rectangle(0, 0, bnds.width, bnds.height); //Uu.p("bnds = " + bnds); } else { extents = new Rectangle(getWidth(), getHeight());//200, 200 ) ); Insets insets = getInsets(); extents.width -= insets.left + insets.right; extents.height -= insets.top + insets.bottom; } return extents; }
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); } }
public Rectangle getScreenExtents() { Rectangle extents; if (enclosingScrollPane != null) { Rectangle bnds = enclosingScrollPane.getViewportBorderBounds(); extents = new Rectangle(0, 0, bnds.width, bnds.height); //Uu.p("bnds = " + bnds); } else { extents = new Rectangle(getWidth(), getHeight());//200, 200 ) ); Insets insets = getInsets(); extents.width -= insets.left + insets.right; extents.height -= insets.top + insets.bottom; } return extents; }
@Override public void componentResized(ComponentEvent e) { Rectangle rect = scrollPane.getViewportBorderBounds();
Dimension v = scrollPane.getViewportBorderBounds().getSize(); if (v.height > p.height)
Rectangle r = pane.getViewportBorderBounds(); r.translate(-r.x, -r.y); r.width -= ins1.left + ins1.right;
/** * 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; }
@Override public Rectangle getViewportBorderBounds() { Rectangle borderR = super.getViewportBorderBounds(); boolean leftToRight = this.getComponentOrientation().isLeftToRight(); JViewport colFoot = getColumnFooter(); if ((colFoot != null) && (colFoot.isVisible())) { int colFootHeight = colFoot.getHeight(); borderR.y += colFootHeight; borderR.height -= colFootHeight; } JViewport rowFoot = getRowFooter(); if ((rowFoot != null) && (rowFoot.isVisible())) { int rowFootWidth = rowFoot.getWidth(); if (leftToRight) { borderR.x += rowFootWidth; } borderR.width -= rowFootWidth; } return borderR; } }