JavaTM 2 Platform
Standard Ed. 6

类 java.awt.Rectangle
的使用

使用 Rectangle 的软件包
java.awt 包含用于创建用户界面和绘制图形图像的所有类。 
java.awt.event 提供处理由 AWT 组件所激发的各类事件的接口和类。 
java.awt.font 提供与字体相关的类和接口。 
java.awt.geom 提供用于在与二维几何形状相关的对象上定义和执行操作的 Java 2D 类。 
java.awt.im 提供输入方法框架所需的类和接口。 
java.awt.im.spi 提供启用可以与 Java 运行时环境一起使用的输入方法开发的接口。 
java.awt.image 提供创建和修改图像的各种类。 
java.beans 包含与开发 beans 有关的类,即基于 JavaBeansTM 架构的组件。 
javax.accessibility 定义了用户界面组件与提供对这些组件进行访问的辅助技术之间的协定。 
javax.imageio Java Image I/O API 的主要包。 
javax.swing 提供一组“轻量级”(全部是 Java 语言)组件,尽量让这些组件在所有平台上的工作方式都相同。 
javax.swing.border 提供围绕 Swing 组件绘制特殊边框的类和接口。 
javax.swing.plaf 提供一个接口和许多抽象类,Swing 用它们来提供自己的可插入外观功能。 
javax.swing.plaf.basic 提供了根据基本外观构建的用户界面对象。 
javax.swing.plaf.metal 提供根据 Java 外观(曾经代称为 Metal)构建的用户界面对象,Java 外观是默认外观。 
javax.swing.plaf.multi 提供了组合两个或多个外观的用户界面对象。 
javax.swing.plaf.synth Synth 是一个可更换皮肤 (skinnable) 的外观,在其中可委托所有绘制。 
javax.swing.table 提供用于处理 javax.swing.JTable 的类和接口。 
javax.swing.text 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。 
javax.swing.text.html 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。 
javax.swing.tree 提供处理 javax.swing.JTree 的类和接口。 
 

java.awtRectangle 的使用
 

声明为 Rectanglejava.awt 中的字段
protected  Rectangle Polygon.bounds
          此 Polygon 的边界。
 

返回 Rectanglejava.awt 中的方法
 Rectangle Component.bounds()
          已过时。 从 JDK version 1.1 开始,由 getBounds() 取代。
 Rectangle Polygon.getBoundingBox()
          已过时。 从 JDK version 1.1 开始,由 getBounds() 取代。
 Rectangle List.AccessibleAWTList.AccessibleAWTListChild.getBounds()
          以 Rectangle 对象的形式获取此对象的界限。
 Rectangle Polygon.getBounds()
          获取此 Polygon 的边界框。
 Rectangle SplashScreen.getBounds()
          以 Rectangle 形式返回闪现屏幕窗口的边界。
 Rectangle MenuComponent.AccessibleAWTMenuComponent.getBounds()
          以 Rectangle 对象的形式获取此对象的边界。
 Rectangle Rectangle.getBounds()
          获取此 Rectangle 的边界 Rectangle
abstract  Rectangle GraphicsConfiguration.getBounds()
          返回 GraphicsConfiguration 在设备坐标中的边界。
 Rectangle Shape.getBounds()
          返回一个完全包围 Shape 的整型 Rectangle
 Rectangle Component.getBounds()
          以 Rectangle 对象的形式获取组件的边界。
 Rectangle Component.AccessibleAWTComponent.getBounds()
          获取此对象的边界,用 Rectangle 对象的形式表示它。
 Rectangle Component.getBounds(Rectangle rv)
          将组件的边界存储到“返回值”rv 中并返回 rv
 Rectangle TextComponent.AccessibleAWTTextComponent.getCharacterBounds(int i)
          确定字符串中给定索引处的字符的边界框。
abstract  Rectangle Graphics.getClipBounds()
          返回当前剪贴区域的边界矩形。
 Rectangle Graphics.getClipBounds(Rectangle r)
          返回当前剪贴区域的边界矩形。
 Rectangle Graphics.getClipRect()
          已过时。 从 JDK version 1.1 开始,由 getClipBounds() 取代。
 Rectangle Frame.getMaximizedBounds()
          获取此窗体的最大化边界。
 Rectangle GraphicsEnvironment.getMaximumWindowBounds()
          返回居中 Windows 的最大边界。
 Rectangle Rectangle.intersection(Rectangle r)
          计算此 Rectangle 与指定 Rectangle 的交集。
 Rectangle Rectangle.union(Rectangle r)
          计算此 Rectangle 与指定 Rectangle 的并集。
 

参数类型为 Rectanglejava.awt 中的方法
 void Rectangle.add(Rectangle r)
          将一个 Rectangle 添加到此 Rectangle 中。
protected  void GridBagLayout.adjustForGravity(GridBagConstraints constraints, Rectangle r)
          根据约束几何结构和填充将 x、y、宽度和高度四个字段调整为正确值。
protected  void GridBagLayout.AdjustForGravity(GridBagConstraints constraints, Rectangle r)
          此方法已过时,仅为提供向后兼容性;新代码应该调用 adjustForGravity 来代替。
 boolean Rectangle.contains(Rectangle r)
          检查此 Rectangle 是否完全包含指定的 Rectangle
 PaintContext GradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
          创建并返回用来生成颜色模式的上下文。
 PaintContext LinearGradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform transform, RenderingHints hints)
          创建并返回用来生成颜色模式的 PaintContext
 PaintContext RadialGradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform transform, RenderingHints hints)
          创建并返回用来生成颜色模式的 PaintContext
 PaintContext TexturePaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
          创建并返回用于生成颜色模式的上下文。
 PaintContext SystemColor.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints)
          创建并返回用来生成纯色模式的 PaintContext
 PaintContext Color.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints)
          创建并返回用来生成固定颜色模式的 PaintContext
 PaintContext Paint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
          创建并返回用来生成颜色模式的 PaintContext
 BufferedImage Robot.createScreenCapture(Rectangle screenRect)
          创建包含从屏幕中读取的像素的图像。
 Rectangle Component.getBounds(Rectangle rv)
          将组件的边界存储到“返回值”rv 中并返回 rv
 Rectangle Graphics.getClipBounds(Rectangle r)
          返回当前剪贴区域的边界矩形。
abstract  boolean Graphics2D.hit(Rectangle rect, Shape s, boolean onStroke)
          检查指定的 Shape 是否与设备空间中的指定 Rectangle 相交。
 Rectangle Rectangle.intersection(Rectangle r)
          计算此 Rectangle 与指定 Rectangle 的交集。
 boolean Rectangle.intersects(Rectangle r)
          确定此 Rectangle 是否与指定的 Rectangle 相交。
 void List.AccessibleAWTList.AccessibleAWTListChild.setBounds(Rectangle r)
          以 Rectangle 对象的形式设置此对象的界限。
 void MenuComponent.AccessibleAWTMenuComponent.setBounds(Rectangle r)
          以 Rectangle 对象的形式设置此对象的边界。
 void Rectangle.setBounds(Rectangle r)
          设置此 Rectangle 的边界 Rectangle,以匹配指定的 Rectangle
 void Window.setBounds(Rectangle r)
          移动组件并调整其大小,使其符合新的有界矩形 r
 void Component.setBounds(Rectangle r)
          移动组件并调整其大小,使其符合新的有界矩形 r
 void Component.AccessibleAWTComponent.setBounds(Rectangle r)
          设置此对象的边界,用 Rectangle 对象的形式表示它。
 void Frame.setMaximizedBounds(Rectangle bounds)
          设置此窗体的最大化边界。
 Rectangle Rectangle.union(Rectangle r)
          计算此 Rectangle 与指定 Rectangle 的并集。
 

参数类型为 Rectanglejava.awt 中的构造方法
Rectangle(Rectangle r)
          构造一个新的 Rectangle,并将其初始化,以与指定 Rectangle 的值匹配。
 

java.awt.eventRectangle 的使用
 

返回 Rectanglejava.awt.event 中的方法
 Rectangle PaintEvent.getUpdateRect()
          返回表示需要重绘区域以响应此事件的矩形。
 

参数类型为 Rectanglejava.awt.event 中的方法
 void PaintEvent.setUpdateRect(Rectangle updateRect)
          设置表示需要进行重绘区域以响应此事件的矩形。
 

参数类型为 Rectanglejava.awt.event 中的构造方法
PaintEvent(Component source, int id, Rectangle updateRect)
          构造一个具有指定源组件和类型的 PaintEvent 对象。
 

java.awt.fontRectangle 的使用
 

返回 Rectanglejava.awt.font 中的方法
 Rectangle GlyphVector.getGlyphPixelBounds(int index, FontRenderContext renderFRC, float x, float y)
          返回当此 GlyphVectorGraphics 中以给定 FontRenderContext 在给定位置呈现时,index 处字形的像素边界。
 Rectangle TextLayout.getPixelBounds(FontRenderContext frc, float x, float y)
          返回在图形中使用给定 FontRenderContext 在给定位置处呈现 TextLayout 时的像素边界。
 Rectangle GlyphVector.getPixelBounds(FontRenderContext renderFRC, float x, float y)
          返回此 GlyphVector 在图形中以给定 FontRenderContext 在给定位置处呈现时的像素边界。
 

java.awt.geomRectangle 的使用
 

返回 Rectanglejava.awt.geom 中的方法
 Rectangle Area.getBounds()
          返回完全包围此 Area 的边界 Rectangle
 Rectangle CubicCurve2D.getBounds()
          返回一个完全包围 Shape 的整型 Rectangle
 Rectangle Line2D.getBounds()
          返回一个完全包围 Shape 的整型 Rectangle
 Rectangle Path2D.getBounds()
          返回一个完全包围 Shape 的整型 Rectangle
 Rectangle QuadCurve2D.getBounds()
          返回一个完全包围 Shape 的整型 Rectangle
 Rectangle RectangularShape.getBounds()
          返回一个完全包围 Shape 的整型 Rectangle
 

java.awt.imRectangle 的使用
 

返回 Rectanglejava.awt.im 中的方法
 Rectangle InputMethodRequests.getTextLocation(TextHitInfo offset)
          获取当前撰写文本中指定偏移量的位置,或已提交文本中的选择位置。
 

java.awt.im.spiRectangle 的使用
 

参数类型为 Rectanglejava.awt.im.spi 中的方法
 void InputMethod.notifyClientWindowChange(Rectangle bounds)
          通知此输入方法客户端窗口位置或状态的更改。
 

java.awt.imageRectangle 的使用
 

返回 Rectanglejava.awt.image 中的方法
 Rectangle Raster.getBounds()
          返回此 Raster 的边界 Rectangle。
 

参数类型为 Rectanglejava.awt.image 中的方法
 WritableRaster Raster.createCompatibleWritableRaster(Rectangle rect)
          创建一个兼容的 WritableRaster,使其具有由 rect 指定的位置 (minX, minY) 和大小 (width, height)、新 SampleModel 和新初始化的 DataBuffer。
 Raster BufferedImage.getData(Rectangle rect)
          计算并返回 BufferedImage 的一个任意区域。
 Raster RenderedImage.getData(Rectangle rect)
          计算并返回 RenderedImage 的任意区域。
 

参数类型为 Rectanglejava.awt.image 中的构造方法
Raster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, Raster parent)
          构造具有给定 SampleModel、DataBuffer 和父 Raster 的 Raster。
WritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, WritableRaster parent)
          构造具有给定 SampleModel、DataBuffer 和父亲的 WritableRaster。
 

java.beansRectangle 的使用
 

参数类型为 Rectanglejava.beans 中的方法
 void PropertyEditor.paintValue(Graphics gfx, Rectangle box)
          在屏幕实际状态给定区域中绘制值的表示形式。
 void PropertyEditorSupport.paintValue(Graphics gfx, Rectangle box)
          在屏幕实际状态给定区域中绘制值的表示形式。
 

javax.accessibilityRectangle 的使用
 

返回 Rectanglejavax.accessibility 中的方法
 Rectangle AccessibleComponent.getBounds()
          获取 Rectangle 对象形式的此对象的边界。
 Rectangle AccessibleText.getCharacterBounds(int i)
          确定字符串中给定索引处的字符的边界框。
 Rectangle AccessibleExtendedText.getTextBounds(int startIndex, int endIndex)
          返回两个索引之间文本的边界矩形。
 

参数类型为 Rectanglejavax.accessibility 中的方法
 void AccessibleComponent.setBounds(Rectangle r)
          设置 Rectangle 对象形式的此对象的边界。
 

javax.imageioRectangle 的使用
 

声明为 Rectanglejavax.imageio 中的字段
protected  Rectangle IIOParam.sourceRegion
          源区域;如果没有设置源区域,则为 null
 

返回 Rectanglejavax.imageio 中的方法
 Rectangle IIOParam.getSourceRegion()
          返回将使用的源区域。
protected static Rectangle ImageReader.getSourceRegion(ImageReadParam param, int srcWidth, int srcHeight)
          reader 可用来计算应该读取的源图像区域的一个实用方法,计算时考虑任何源区域,并在所提供的 ImageReadParam 中对偏移量设置进行二次取样。
 

参数类型为 Rectanglejavax.imageio 中的方法
protected static void ImageReader.computeRegions(ImageReadParam param, int srcWidth, int srcHeight, BufferedImage image, Rectangle srcRegion, Rectangle destRegion)
          计算感兴趣的源区域和目标区域,将源图像的宽度和高度、可选目标图像和可选 ImageReadParam 都考虑在内。
 void ImageWriter.prepareReplacePixels(int imageIndex, Rectangle region)
          准备好 writer,处理一系列对 replacePixels 方法的调用。
 void IIOParam.setSourceRegion(Rectangle sourceRegion)
          设置感兴趣的源区域。
 

javax.swingRectangle 的使用
 

返回 Rectanglejavax.swing 中的方法
static Rectangle SwingUtilities.calculateInnerArea(JComponent c, Rectangle r)
          将指定组件的内部绘制区域的位置和大小存储在 r 中,然后返回 r
static Rectangle[] SwingUtilities.computeDifference(Rectangle rectA, Rectangle rectB)
          返回矩形数组的便捷方法,该矩形表示不与 rectB 重叠的 rectA 内的区域。
static Rectangle SwingUtilities.computeIntersection(int x, int y, int width, int height, Rectangle dest)
          在未分配新矩形的情况下计算两个矩形的交集的便捷方法。
static Rectangle SwingUtilities.computeUnion(int x, int y, int width, int height, Rectangle dest)
          在未分配新矩形的情况下计算两个矩形的并集的便捷方法。
static Rectangle SwingUtilities.convertRectangle(Component source, Rectangle aRectangle, Component destination)
          将 source 坐标系统中的矩形 aRectangle 转换到 destination 坐标系统。
 Rectangle JTree.AccessibleJTree.AccessibleJTreeNode.getBounds()
           
 Rectangle JTable.AccessibleJTable.AccessibleJTableCell.getBounds()
           
 Rectangle JList.AccessibleJList.AccessibleJListChild.getBounds()
           
 Rectangle JComponent.getBounds(Rectangle rv)
          将此组件的边界存储到“返回值”rv 中并返回 rv
 Rectangle JTabbedPane.getBoundsAt(int index)
          返回 index 位置的选项卡边界。
protected  Rectangle DefaultDesktopManager.getBoundsForIconOf(JInternalFrame f)
          iconifyFrame() 代码调用此方法来确定 desktopIcon 的适当边界。
 Rectangle JList.getCellBounds(int index0, int index1)
          返回列表的坐标系统中两个索引所指定单元范围内的边界矩形。
 Rectangle JTable.getCellRect(int row, int column, boolean includeSpacing)
          返回位于 rowcolumn 相交位置的单元格矩形。
 Rectangle JSpinner.AccessibleJSpinner.getCharacterBounds(int i)
          确定给定字符串索引处字符的边界。
 Rectangle ProgressMonitor.AccessibleProgressMonitor.getCharacterBounds(int i)
          确定字符串中给定索引处的字符的边界框。
 Rectangle AbstractButton.AccessibleAbstractButton.getCharacterBounds(int i)
          确定字符串中给定索引处的字符的边界框。
 Rectangle JLabel.AccessibleJLabel.getCharacterBounds(int i)
          确定给定字符串索引处字符的边界框。
 Rectangle DebugGraphics.getClipBounds()
          重写 Graphics.getClipBounds
 Rectangle RepaintManager.getDirtyRegion(JComponent aComponent)
          返回组件的当前脏区。
static Rectangle SwingUtilities.getLocalBounds(Component aComponent)
          返回组件 aComponent 的矩形 (0,0,bounds.width,bounds.height)。
 Rectangle JInternalFrame.getNormalBounds()
          如果 JInternalFrame 未处于最大化状态,则返回 getBounds();否则返回还原 JInternalFrame 后的边界。
 Rectangle JTree.getPathBounds(TreePath path)
          返回将指定节点绘入的 Rectangle
protected  Rectangle DefaultDesktopManager.getPreviousBounds(JInternalFrame f)
          在将组件最大化之前,获得该组件的普通边界。
 Rectangle JTree.getRowBounds(int row)
          返回将指定行处的节点绘入的 Rectangle
 Rectangle JScrollPane.getViewportBorderBounds()
          返回视口边界的范围。
 Rectangle ScrollPaneLayout.getViewportBorderBounds(JScrollPane scrollpane)
          已过时。 从 JDK version Swing1.1 开始,由 JScrollPane.getViewportBorderBounds() 取代。
 Rectangle JViewport.getViewRect()
          返回一个矩形,其原位置在 getViewPosition,大小为 getExtentSize
 Rectangle JComponent.getVisibleRect()
          返回该 Component 的“可见矩形”,即此组件的可见矩形 new Rectangle(0, 0, getWidth(), getHeight()) 及其所有祖先的可见矩形的交集。
 

参数类型为 Rectanglejavax.swing 中的方法
static Rectangle SwingUtilities.calculateInnerArea(JComponent c, Rectangle r)
          将指定组件的内部绘制区域的位置和大小存储在 r 中,然后返回 r
protected  boolean JViewport.computeBlit(int dx, int dy, Point blitFrom, Point blitTo, Dimension blitSize, Rectangle blitPaint)
          计算 blit 的参数,其中后备存储图像当前在左上角包含 oldLoc,并且我们滚动到 newLoc
static Rectangle[] SwingUtilities.computeDifference(Rectangle rectA, Rectangle rectB)
          返回矩形数组的便捷方法,该矩形表示不与 rectB 重叠的 rectA 内的区域。
static Rectangle SwingUtilities.computeIntersection(int x, int y, int width, int height, Rectangle dest)
          在未分配新矩形的情况下计算两个矩形的交集的便捷方法。
static Rectangle SwingUtilities.computeUnion(int x, int y, int width, int height, Rectangle dest)
          在未分配新矩形的情况下计算两个矩形的并集的便捷方法。
 void JComponent.computeVisibleRect(Rectangle visibleRect)
          返回该 Component 的“可见 rect 矩形”,即此组件及其所有祖先的可见矩形的交集。
static Rectangle SwingUtilities.convertRectangle(Component source, Rectangle aRectangle, Component destination)
          将 source 坐标系统中的矩形 aRectangle 转换到 destination 坐标系统。
 Rectangle JComponent.getBounds(Rectangle rv)
          将此组件的边界存储到“返回值”rv 中并返回 rv
 int JTree.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
          返回块增量的数量,它是基于 orientationvisibleRect 高度或宽度。
 int JTable.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
          返回 visibleRect.heightvisibleRect.width,这取决于此表的方向。
 int JList.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
          返回为显露上一个或下一个块而滚动的距离。
 int Scrollable.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
          显示逻辑行或列的组件应计算滚动增量,它将根据方向的值完全公开一个行块或列块。
 int JTree.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
          返回滚动时增加的数量。
 int JTable.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
          返回完全呈现出一个新行或新列(取决于方向)的滚动增量(以像素为单位)。
 int JTextArea.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
          显示逻辑行或列的组件应根据方向的值计算滚动增量,此滚动增量将完全显示一个新行或新列。
 int JList.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
          返回为显露上一个或下一个行(垂直滚动)或列(水平滚动)而滚动的距离。
 int Scrollable.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
          显示逻辑行或列的组件应计算滚动增量,它将根据方向的值完全公开一个新的行或列。
static boolean SwingUtilities.isRectangleContainingRectangle(Rectangle a, Rectangle b)
          如果 a 包含 b,则返回 true。
static String SwingUtilities.layoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
          计算并返回图标原点的位置,文本基线的原点的位置,以及复合标签字符串的可能进行了修剪的版本。
static String SwingUtilities.layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
          计算并返回图标原点的位置,文本基线的原点的位置,以及复合标签字符串的可能进行了修剪的版本。
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, Rectangle r)
          使用矩形的 x、y、width 和 height 字段的调用 this.paintComponent()。
static void SwingUtilities.paintComponent(Graphics g, Component c, Container p, Rectangle r)
          在指定的 Graphics 上绘制组件。
 void JComponent.paintImmediately(Rectangle r)
          立即绘制指定的区域。
 void DefaultListCellRenderer.repaint(Rectangle r)
          因为性能原因而被重写。
 void JComponent.repaint(Rectangle r)
          如果要显示该组件,则将指定的区域添加到脏区列表。
 void JTextField.scrollRectToVisible(Rectangle r)
          将字段向左或向右滚动。
 void JViewport.scrollRectToVisible(Rectangle contentRect)
          滚动该视图,使该视图中的 Rectangle 变得可见。
 void JComponent.scrollRectToVisible(Rectangle aRect)
          将 scrollRectToVisible() 消息转发到 JComponent 的父组件。
 void JTree.AccessibleJTree.AccessibleJTreeNode.setBounds(Rectangle r)
           
 void JTable.AccessibleJTable.AccessibleJTableCell.setBounds(Rectangle r)
           
 void JList.AccessibleJList.AccessibleJListChild.setBounds(Rectangle r)
           
 void JInternalFrame.setNormalBounds(Rectangle r)
          设置此内部窗体的正常边界,即此内部窗体从其最大化状态还原后的边界。
protected  void DefaultDesktopManager.setPreviousBounds(JInternalFrame f, Rectangle r)
          在进行 maximize 调用之前存储组件的边界。
 

javax.swing.borderRectangle 的使用
 

返回 Rectanglejavax.swing.border 中的方法
static Rectangle AbstractBorder.getInteriorRectangle(Component c, Border b, int x, int y, int width, int height)
          返回一个用所给的参数减去边框 insets 得到的矩形。
 Rectangle AbstractBorder.getInteriorRectangle(Component c, int x, int y, int width, int height)
          此便捷方法调用静态方法。
 

javax.swing.plafRectangle 的使用
 

返回 Rectanglejavax.swing.plaf 中的方法
abstract  Rectangle ListUI.getCellBounds(JList list, int index1, int index2)
          返回给定列表坐标系统中的有界矩形,单元的范围由两个索引指定。
abstract  Rectangle TreeUI.getPathBounds(JTree tree, TreePath path)
          返回封闭标签部分的 Rectangle,路径中的最后一个项将在这一部分绘制。
abstract  Rectangle TabbedPaneUI.getTabBounds(JTabbedPane pane, int index)
           
abstract  Rectangle TextUI.modelToView(JTextComponent t, int pos)
          将模型中的给定位置转换成视图坐标系统中的某一个位置。
abstract  Rectangle TextUI.modelToView(JTextComponent t, int pos, Position.Bias bias)
          将模型中的给定位置转换成视图坐标系统中的某一个位置。
 

javax.swing.plaf.basicRectangle 的使用
 

javax.swing.plaf.basicRectangle 的子类
static class BasicTextUI.BasicCaret
           
 

声明为 Rectanglejavax.swing.plaf.basic 中的字段
protected  Rectangle BasicProgressBarUI.boxRect
          用于保存要绘制的跳动框(由 getBox 返回)的位置和大小。
protected  Rectangle BasicTabbedPaneUI.calcRect
          用于通用布局计算以避免运行中构造多个新 Rectangle 的矩形。
protected  Rectangle BasicSliderUI.contentRect
           
protected  Rectangle BasicSliderUI.focusRect
           
protected  Rectangle BasicSliderUI.labelRect
           
protected  Rectangle[] BasicTabbedPaneUI.rects
           
protected  Rectangle BasicSliderUI.thumbRect
           
protected  Rectangle BasicScrollBarUI.thumbRect
           
protected  Rectangle BasicSliderUI.tickRect
           
protected  Rectangle BasicSliderUI.trackRect
           
protected  Rectangle BasicScrollBarUI.trackRect
           
 

返回 Rectanglejavax.swing.plaf.basic 中的方法
protected  Rectangle BasicComboPopup.computePopupBounds(int px, int py, int pw, int ph)
          基于组合框的位置和封闭的屏幕界限计算组合框的弹出部分的位置和大小。
protected  Rectangle BasicProgressBarUI.getBox(Rectangle r)
          存储将为 r 中的当前动画索引绘制并返回 r 的跳动框中位置和大小。
 Rectangle BasicListUI.getCellBounds(JList list, int index1, int index2)
          返回给定列表坐标系统中的有界矩形,单元的范围由两个索引指定。
 Rectangle BasicTreeUI.NodeDimensionsHandler.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size)
          负责获取特定节点的大小。
 Rectangle BasicTreeUI.getPathBounds(JTree tree, TreePath path)
          返回封闭标签部分的 Rectangle,路径中的最后一个项将在这一部分绘制。
protected  Rectangle BasicTabbedPaneUI.getTabBounds(int tabIndex, Rectangle dest)
          返回 JTabbedPane 组件的坐标空间中指定选项卡的边界。
 Rectangle BasicTabbedPaneUI.getTabBounds(JTabbedPane pane, int i)
          返回指定选项卡索引的边界。
protected  Rectangle BasicScrollBarUI.getThumbBounds()
          返回 thumb 的当前大小/位置。
protected  Rectangle BasicScrollBarUI.getTrackBounds()
          返回滑道的当前边界,即递增和递减按钮之间的空间(减去 insets)。
protected  Rectangle BasicTextUI.getVisibleEditorRect()
          获取给出根 View 的分配。
 Rectangle BasicTextUI.modelToView(JTextComponent tc, int pos)
          将模型中的给定位置转换成视图坐标系统中的某一个位置。
 Rectangle BasicTextUI.modelToView(JTextComponent tc, int pos, Position.Bias bias)
          将模型中的给定位置转换成视图坐标系统中的某一个位置。
protected  Rectangle BasicComboBoxUI.rectangleForCurrentValue()
          返回为绘制当前所选项而保留的区域。
 

参数类型为 Rectanglejavax.swing.plaf.basic 中的方法
protected  Rectangle BasicProgressBarUI.getBox(Rectangle r)
          存储将为 r 中的当前动画索引绘制并返回 r 的跳动框中位置和大小。
 Rectangle BasicTreeUI.NodeDimensionsHandler.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size)
          负责获取特定节点的大小。
protected  Rectangle BasicTabbedPaneUI.getTabBounds(int tabIndex, Rectangle dest)
          返回 JTabbedPane 组件的坐标空间中指定选项卡的边界。
protected  String BasicLabelUI.layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
          将调用转发到 SwingUtilities.layoutCompoundLabel()。
protected  void BasicTabbedPaneUI.layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
           
protected  void BasicListUI.paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer cellRenderer, ListModel dataModel, ListSelectionModel selModel, int leadIndex)
          绘制一个 List 单元格:计算相关状态,获取“橡皮图章”单元格渲染器组件,然后使用 CellRendererPane 来绘制它。
 void BasicComboBoxUI.paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
          绘制当前所选项。
 void BasicComboBoxUI.paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
          绘制当前所选项的背景。
protected  void BasicTreeUI.paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
          绘制 row 的展开(切换)部分。
protected  void BasicButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
           
protected  void BasicRadioButtonUI.paintFocus(Graphics g, Rectangle textRect, Dimension size)
           
protected  void BasicTabbedPaneUI.paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
           
protected  void BasicTabbedPaneUI.paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
           
protected  void BasicTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
          绘制支路 (leg) 的水平部分。
protected  void BasicToggleButtonUI.paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
           
protected  void BasicTabbedPaneUI.paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
           
protected  void BasicButtonUI.paintIcon(Graphics g, JComponent c, Rectangle iconRect)
           
protected  void BasicSliderUI.paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
           
protected  void BasicSliderUI.paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
           
protected  void BasicSliderUI.paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
           
protected  void BasicSliderUI.paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
           
protected  void BasicTreeUI.paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
          绘制 row 的渲染器部分。
protected  void BasicTabbedPaneUI.paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
           
protected  void BasicTabbedPaneUI.paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
           
protected  void BasicButtonUI.paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
          呈现当前按钮文本的方法。
protected  void BasicTabbedPaneUI.paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
           
protected  void BasicButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
          从 Java 2 平台 v 1.4 开始,不应再使用或重写此方法。
protected  void BasicMenuItemUI.paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text)
          呈现当前菜单项的文本。
protected  void BasicScrollBarUI.paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
           
protected  void BasicScrollBarUI.paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
           
protected  void BasicTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
          绘制支路的垂直部分。
 

javax.swing.plaf.metalRectangle 的使用
 

参数类型为 Rectanglejavax.swing.plaf.metal 中的方法
 void MetalComboBoxUI.paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
          如有必要,绘制当前所选项。
 void MetalComboBoxUI.paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
          如有必要,绘制当前所选项的背景。
protected  void MetalToggleButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
           
protected  void MetalButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
           
protected  void MetalRadioButtonUI.paintFocus(Graphics g, Rectangle t, Dimension d)
           
protected  void MetalTabbedPaneUI.paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
           
protected  void MetalTabbedPaneUI.paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
           
protected  void MetalTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
           
protected  void MetalToggleButtonUI.paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
          在空间 iconRect 中绘制按钮 b 的适当图标。
protected  void MetalSliderUI.paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
           
protected  void MetalSliderUI.paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
           
protected  void MetalSliderUI.paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
           
protected  void MetalSliderUI.paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
           
protected  void MetalToggleButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
           
protected  void MetalButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
           
protected  void MetalScrollBarUI.paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
           
protected  void MetalScrollBarUI.paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
           
protected  void MetalTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
           
 

javax.swing.plaf.multiRectangle 的使用
 

返回 Rectanglejavax.swing.plaf.multi 中的方法
 Rectangle MultiListUI.getCellBounds(JList a, int b, int c)
          在由此对象处理的每个 UI 上调用 getCellBounds 方法。
 Rectangle MultiTreeUI.getPathBounds(JTree a, TreePath b)
          在由此对象处理的每个 UI 上调用 getPathBounds 方法。
 Rectangle MultiTabbedPaneUI.getTabBounds(JTabbedPane a, int b)
          在由此对象处理的每个 UI 上调用 getTabBounds 方法。
 Rectangle MultiTextUI.modelToView(JTextComponent a, int b)
          在由此对象处理的每个 UI 上调用 modelToView 方法。
 Rectangle MultiTextUI.modelToView(JTextComponent a, int b, Position.Bias c)
          在由此对象处理的每个 UI 上调用 modelToView 方法。
 

javax.swing.plaf.synthRectangle 的使用
 

参数类型为 Rectanglejavax.swing.plaf.synth 中的方法
 String SynthGraphicsUtils.layoutText(SynthContext ss, FontMetrics fm, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, int vTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int iconTextGap)
          根据通过引用返回的放置图标和文本的位置,布局文本和图标。
 void SynthGraphicsUtils.paintText(SynthContext ss, Graphics g, String text, Rectangle bounds, int mnemonicIndex)
          在指定位置上绘制文本。
 

javax.swing.tableRectangle 的使用
 

返回 Rectanglejavax.swing.table 中的方法
 Rectangle JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getBounds()
           
 Rectangle JTableHeader.getHeaderRect(int column)
          返回包含 column 处头 tile 的矩形。
 

参数类型为 Rectanglejavax.swing.table 中的方法
 void DefaultTableCellRenderer.repaint(Rectangle r)
          因为性能原因而被重写。
 void JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setBounds(Rectangle r)
           
 

javax.swing.textRectangle 的使用
 

javax.swing.textRectangle 的子类
 class DefaultCaret
          插入符的默认实现。
 

声明为 Rectanglejavax.swing.text 中的字段
protected  Rectangle AsyncBoxView.ChildLocator.childAlloc
          用于子级分配区域以避免创建大量垃圾的形状。
protected  Rectangle AsyncBoxView.ChildLocator.lastAlloc
          最后的可见分配区域(用于向上刷新更改时进行重新绘制)。
 

返回 Rectanglejavax.swing.text 中的方法
 Rectangle JTextComponent.AccessibleJTextComponent.getCharacterBounds(int i)
          确定字符串中给定索引处的字符的边界框。
protected  Rectangle CompositeView.getInsideAllocation(Shape a)
          将分配给视图的不可变分配区域转换为表示内部分配区域的可变分配区域(即给定分配区域的边界,其顶部、左部、底部和右部的 insets 已移除)。
 Rectangle JTextComponent.AccessibleJTextComponent.getTextBounds(int startIndex, int endIndex)
          返回包围两个索引之间文本的 Rectangle
protected  Rectangle PlainView.lineToRect(Shape a, int line)
          确定表示给定行的矩形。
 Rectangle JTextComponent.modelToView(int pos)
          将模型中给定位置转换为视图坐标系统中的位置。
 

参数类型为 Rectanglejavax.swing.text 中的方法
protected  void DefaultCaret.adjustVisibility(Rectangle nloc)
          滚动关联的视图(如果有)以使插入符可见。
 void FlowView.FlowStrategy.changedUpdate(FlowView fv, DocumentEvent e, Rectangle alloc)
          发出通知,通知文档中此视图负责的某个位置的属性已更改。
protected  void BoxView.childAllocation(int index, Rectangle alloc)
          为子视图分配一个区域。
protected abstract  void CompositeView.childAllocation(int index, Rectangle a)
          返回给定子级的分配区域。
protected  void DefaultCaret.damage(Rectangle r)
          毁坏围绕插入符的区域以使该区域在新的位置重绘。
 int JTextComponent.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
          显示逻辑行或列的组件应计算滚动增量,它将根据方向的值完全公开一个行块或列块。
 int JTextComponent.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
          显示逻辑行或列的组件应计算滚动增量,它将根据方向的值完全公开一个新的行或列。
protected  View BoxView.getViewAtPoint(int x, int y, Rectangle alloc)
          获取给定坐标处的子视图。
protected abstract  View CompositeView.getViewAtPoint(int x, int y, Rectangle alloc)
          获取位于给定坐标的子视图。
protected  View CompositeView.getViewAtPosition(int pos, Rectangle a)
          获取表示模型中给定位置的子视图。
protected  View TableView.getViewAtPosition(int pos, Rectangle a)
          获取表示模型中给定位置的子视图。
protected  View TableView.TableRow.getViewAtPosition(int pos, Rectangle a)
          获取表示模型中给定位置的子视图。
 void FlowView.FlowStrategy.insertUpdate(FlowView fv, DocumentEvent e, Rectangle alloc)
          发出通知,通知在文档中此视图负责的某个位置已插入内容。
protected  boolean BoxView.isAfter(int x, int y, Rectangle innerAlloc)
          确定一个点是否位于分配区域的后面。
protected abstract  boolean CompositeView.isAfter(int x, int y, Rectangle alloc)
          测试一个点是否位于矩形范围之后。
protected  boolean BoxView.isBefore(int x, int y, Rectangle innerAlloc)
          确定一个点是否位于分配区域的前面。
protected abstract  boolean CompositeView.isBefore(int x, int y, Rectangle alloc)
          测试一个点是否位于矩形范围之前。
protected  void BoxView.paintChild(Graphics g, Rectangle alloc, int index)
          绘制一个子级。
 void FlowView.FlowStrategy.removeUpdate(FlowView fv, DocumentEvent e, Rectangle alloc)
          发出通知,通知已从文档中此给定流视图负责的某个位置移除某些内容。
 

javax.swing.text.htmlRectangle 的使用
 

参数类型为 Rectanglejavax.swing.text.html 中的方法
protected  void ListView.paintChild(Graphics g, Rectangle alloc, int index)
          通过调用 paint() 绘制其中的一个子级。
 

javax.swing.treeRectangle 的使用
 

返回 Rectanglejavax.swing.tree 中的方法
 Rectangle FixedHeightLayoutCache.getBounds(TreePath path, Rectangle placeIn)
          返回给出绘制路径所需边界的矩形。
 Rectangle VariableHeightLayoutCache.getBounds(TreePath path, Rectangle placeIn)
          返回 Rectangle,它包围在其中绘制 path 标识的项的标签部分。
abstract  Rectangle AbstractLayoutCache.getBounds(TreePath path, Rectangle placeIn)
          返回一个矩形,该矩形给出了绘制路径所需的 bounds。
protected  Rectangle AbstractLayoutCache.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle placeIn)
          返回通过 placeIn 中的引用,表示 value 所需的大小。
abstract  Rectangle AbstractLayoutCache.NodeDimensions.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle bounds)
          通过对 bounds 的引用,返回用于保存值的节点的大小和其在 x 轴上的起点。
 

参数类型为 Rectanglejavax.swing.tree 中的方法
 Rectangle FixedHeightLayoutCache.getBounds(TreePath path, Rectangle placeIn)
          返回给出绘制路径所需边界的矩形。
 Rectangle VariableHeightLayoutCache.getBounds(TreePath path, Rectangle placeIn)
          返回 Rectangle,它包围在其中绘制 path 标识的项的标签部分。
abstract  Rectangle AbstractLayoutCache.getBounds(TreePath path, Rectangle placeIn)
          返回一个矩形,该矩形给出了绘制路径所需的 bounds。
protected  Rectangle AbstractLayoutCache.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle placeIn)
          返回通过 placeIn 中的引用,表示 value 所需的大小。
abstract  Rectangle AbstractLayoutCache.NodeDimensions.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle bounds)
          通过对 bounds 的引用,返回用于保存值的节点的大小和其在 x 轴上的起点。
 int VariableHeightLayoutCache.getPreferredWidth(Rectangle bounds)
          返回 visibleRegion 中区域的首选宽度和高度。
 int AbstractLayoutCache.getPreferredWidth(Rectangle bounds)
          返回传入区域的首选宽度。
 void DefaultTreeCellRenderer.repaint(Rectangle r)
          因为性能原因而被重写。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only