类的用途
java.awt.Rectangle
使用 Rectangle 的包
包
描述
提供组成 Java 辅助功能实用程序的接口和类的集合。
包含用于创建用户界面以及绘制图形和图像的所有类。
提供用于处理 AWT 组件触发的不同类型事件的接口和类。
提供与字体相关的类和接口。
提供 Java 2D 类,用于定义和执行与二维几何相关的对象的操作。
为输入方法框架提供类和接口。
提供接口,支持开发可与任何 Java 运行时环境一起使用的输入方法。
提供用于创建和修改图像的类。
包含与开发 beans 相关的类——基于 JavaBeans 体系结构的组件。
定义用户界面组件和提供对这些组件的访问的辅助技术之间的契约。
Java Image I/O API 的主要包。
提供一组“轻量级”(全 Java 语言)组件,尽可能在所有平台上以相同的方式工作。
提供用于在 Swing 组件周围绘制专用边框的类和接口。
提供一个接口和许多抽象类,Swing 使用这些抽象类来提供其可插入的外观功能。
提供根据基本外观构建的用户界面对象。
提供根据 Java 外观(曾经代号为 Metal )构建的用户界面对象,这是默认外观。
提供组合了两种或多种外观的用户界面对象。
Synth 是一种可换肤的外观和感觉,其中所有绘画都是委托的。
提供用于处理
javax.swing.JTable 的类和接口。
提供处理可编辑和不可编辑文本组件的类和接口。
提供用于创建 HTML 文本编辑器的类
HTMLEditorKit 和支持类。
提供用于处理
javax.swing.JTree 的类和接口。
-
Rectangle 在 com.sun.java.accessibility.util 中的用法
com.sun.java.accessibility.util 中的方法,参数类型为 Rectangle -
Rectangle 在 java.awt 中的用法
修饰符和类型方法描述Component.bounds()已弃用。Polygon.getBoundingBox()已弃用。从 JDK 1.1 版开始,由getBounds()取代。Component.AccessibleAWTComponent.getBounds()以 Rectangle 对象的形式获取此对象的边界。Component.getBounds()以Rectangle对象的形式获取此组件的边界。将此组件的边界存储到“返回值”中房车并返回房车.abstract RectangleGraphicsConfiguration.getBounds()返回设备坐标中GraphicsConfiguration的边界。List.AccessibleAWTList.AccessibleAWTListChild.getBounds()以 Rectangle 对象的形式获取此对象的边界。MenuComponent.AccessibleAWTMenuComponent.getBounds()以Rectangle对象的形式获取此对象的边界。Polygon.getBounds()获取此Polygon的边界框。Rectangle.getBounds()获取此Rectangle的边界Rectangle。Shape.getBounds()返回一个整数Rectangle完全包围Shape。SplashScreen.getBounds()将闪屏窗口的边界作为Rectangle返回。TextComponent.AccessibleAWTTextComponent.getCharacterBounds(int i) 确定字符串中给定索引处字符的边界框。abstract RectangleGraphics.getClipBounds()返回当前裁剪区域的边界矩形。Graphics.getClipBounds(Rectangle r) 返回当前裁剪区域的边界矩形。Graphics.getClipRect()已弃用。从 JDK 1.1 版开始,由getClipBounds()取代。Frame.getMaximizedBounds()获取此帧的最大化边界。GraphicsEnvironment.getMaximumWindowBounds()返回居中窗口的最大边界。Rectangle.intersection(Rectangle r) 计算此Rectangle与指定的Rectangle的交集。计算此Rectangle与指定Rectangle的并集。修饰符和类型方法描述void添加一个Rectangle到这个Rectangle。protected voidGridBagLayout.adjustForGravity(GridBagConstraints constraints, Rectangle r) 根据约束几何形状和焊盘将 x、y、宽度和高度字段调整为正确的值。protected voidGridBagLayout.AdjustForGravity(GridBagConstraints constraints, Rectangle r) 根据约束几何形状和焊盘将 x、y、宽度和高度字段调整为正确的值。boolean检查此Rectangle是否完全包含指定的Rectangle。Color.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) 创建并返回用于生成纯色场模式的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。Paint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) 创建并返回用于生成颜色模式的PaintContext。RadialGradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform transform, RenderingHints hints) 创建并返回一个PaintContext用于生成圆形径向颜色渐变图案。TexturePaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) 创建并返回用于生成平铺图像模式的PaintContext。Robot.createMultiResolutionScreenCapture(Rectangle screenRect) 创建包含从屏幕读取的像素的图像。Robot.createScreenCapture(Rectangle screenRect) 创建包含从屏幕读取的像素的图像。将此组件的边界存储到“返回值”中房车并返回房车.Graphics.getClipBounds(Rectangle r) 返回当前裁剪区域的边界矩形。abstract boolean检查指定的Shape是否与设备空间中指定的Rectangle相交。Rectangle.intersection(Rectangle r) 计算此Rectangle与指定的Rectangle的交集。booleanRectangle.intersects(Rectangle r) 确定此Rectangle和指定的Rectangle是否相交。void以Rectangle对象的形式设置此对象的边界。void移动此组件并调整其大小以符合新的边界矩形r。void以 Rectangle 对象的形式设置此对象的边界。void以Rectangle对象的形式设置此对象的边界。void设置此Rectangle的边界Rectangle以匹配指定的Rectangle。void移动此组件并调整其大小以符合新的边界矩形r。voidFrame.setMaximizedBounds(Rectangle bounds) 设置此帧的最大化边界。计算此Rectangle与指定Rectangle的并集。 -
Rectangle 在 java.awt.event 中的用法
java.awt.event 中返回 Rectangle 的方法java.awt.event 中的方法,参数类型为 Rectanglejava.awt.event 中的构造函数,参数类型为 Rectangle -
Rectangle 在 java.awt.font 中的用法
java.awt.font 中返回 Rectangle 的方法修饰符和类型方法描述GlyphVector.getGlyphPixelBounds(int index, FontRenderContext renderFRC, float x, float y) 当此GlyphVector在给定位置处具有给定FontRenderContext的Graphics中呈现时,返回索引处字形的像素边界。GlyphVector.getPixelBounds(FontRenderContext renderFRC, float x, float y) 返回在给定位置处具有给定FontRenderContext的图形中呈现时此GlyphVector的像素边界。TextLayout.getPixelBounds(FontRenderContext frc, float x, float y) 返回在给定位置处具有给定FontRenderContext的图形中呈现时此TextLayout的像素边界。 -
Rectangle 在 java.awt.geom 中的用法
java.awt.geom 中返回 Rectangle 的方法修饰符和类型方法描述Area.getBounds()返回完全包围此Area的边界Rectangle。CubicCurve2D.getBounds()返回一个整数Rectangle完全包围Shape。Line2D.getBounds()返回一个整数Rectangle完全包围Shape。final RectanglePath2D.getBounds()返回一个整数Rectangle完全包围Shape。QuadCurve2D.getBounds()返回一个整数Rectangle完全包围Shape。RectangularShape.getBounds()返回一个整数Rectangle完全包围Shape。 -
Rectangle 在 java.awt.im 中的用法
java.awt.im 中返回 Rectangle 的方法修饰符和类型方法描述InputMethodRequests.getTextLocation(TextHitInfo offset) 获取当前组合文本中指定偏移量的位置,或已提交文本中所选内容的位置。 -
Rectangle 在 java.awt.im.spi 中的用法
java.awt.im.spi 中的方法,参数类型为 Rectangle -
Rectangle 在 java.awt.image 中的用法
java.awt.image 中返回 Rectangle 的方法java.awt.image 中的方法,参数类型为 Rectangle修饰符和类型方法描述Raster.createCompatibleWritableRaster(Rectangle rect) 创建一个兼容的 WritableRaster,其位置(minX、minY)和大小(宽度、高度)由 rect、一个新的 SampleModel 和一个新的初始化 DataBuffer 指定。计算并返回BufferedImage的任意区域。计算并返回 RenderedImage 的任意区域。java.awt.image 中的构造函数,参数类型为 Rectangle修饰符构造方法描述protectedRaster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, Raster parent) 使用给定的 SampleModel、DataBuffer 和父级构造一个 Raster。protectedWritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, WritableRaster parent) 使用给定的 SampleModel、DataBuffer 和父级构造一个 WritableRaster。 -
Rectangle 在 java.beans 中的用法
java.beans 中的方法,参数类型为 Rectangle修饰符和类型方法描述voidPropertyEditor.paintValue(Graphics gfx, Rectangle box) 将值的表示绘制到屏幕空间的给定区域中。voidPropertyEditorSupport.paintValue(Graphics gfx, Rectangle box) 将值的表示绘制到屏幕空间的给定区域中。 -
Rectangle 在 javax.accessibility 中的用法
javax.accessibility 中返回 Rectangle 的方法修饰符和类型方法描述AccessibleComponent.getBounds()以Rectangle对象的形式获取此对象的边界。AccessibleText.getCharacterBounds(int i) 确定字符串中给定索引处字符的边界框。AccessibleExtendedText.getTextBounds(int startIndex, int endIndex) 返回两个索引之间文本的边界矩形。javax.accessibility 中的方法,参数类型为 Rectangle -
Rectangle 在 javax.imageio 中的用法
javax.imageio 中的字段声明为 Rectanglejavax.imageio 中返回 Rectangle 的方法修饰符和类型方法描述IIOParam.getSourceRegion()返回要使用的源区域。protected static RectangleImageReader.getSourceRegion(ImageReadParam param, int srcWidth, int srcHeight) 读者可以使用一种实用方法来计算应读取的源图像区域,同时考虑所提供的ImageReadParam中的任何源区域和子采样偏移设置。javax.imageio 中的方法,参数类型为 Rectangle修饰符和类型方法描述protected static voidImageReader.computeRegions(ImageReadParam param, int srcWidth, int srcHeight, BufferedImage image, Rectangle srcRegion, Rectangle destRegion) 计算源感兴趣区域和目标感兴趣区域,同时考虑源图像的宽度和高度、可选的目标图像和可选的ImageReadParam。voidImageWriter.prepareReplacePixels(int imageIndex, Rectangle region) 准备编写器以处理对replacePixels方法的一系列调用。voidIIOParam.setSourceRegion(Rectangle sourceRegion) 设置感兴趣的源区域。 -
Rectangle 在 javax.swing 中的用法
javax.swing 中返回 Rectangle 的方法修饰符和类型方法描述static RectangleSwingUtilities.calculateInnerArea(JComponent c, Rectangle r) 将指定组件的内部绘制区域的位置和大小存储在r中并返回r。static Rectangle[]SwingUtilities.computeDifference(Rectangle rectA, Rectangle rectB) 方便地返回一个矩形数组,表示rectA中不与rectB重叠的区域。static RectangleSwingUtilities.computeIntersection(int x, int y, int width, int height, Rectangle dest) 无需分配新矩形即可方便地计算两个矩形的交集。static RectangleSwingUtilities.computeUnion(int x, int y, int width, int height, Rectangle dest) 在不分配新矩形的情况下计算两个矩形并集的便捷方法。static RectangleSwingUtilities.convertRectangle(Component source, Rectangle aRectangle, Component destination) 将source坐标系中的矩形aRectangle转换为destination坐标系。将此组件的边界存储到“返回值”rv并返回rv。JList.AccessibleJList.AccessibleJListChild.getBounds()JTable.AccessibleJTable.AccessibleJTableCell.getBounds()JTree.AccessibleJTree.AccessibleJTreeNode.getBounds()JTabbedPane.getBoundsAt(int index) 返回index处的制表符边界。protected RectangleDefaultDesktopManager.getBoundsForIconOf(JInternalFrame f) iconifyFrame()代码调用它来确定 desktopIcon 的正确边界。JList.getCellBounds(int index0, int index1) 返回列表坐标系中由两个索引指定的单元格范围的边界矩形。JTable.getCellRect(int row, int column, boolean includeSpacing) 返回位于row和column交集处的单元格的矩形。AbstractButton.AccessibleAbstractButton.getCharacterBounds(int i) 确定字符串中给定索引处字符的边界框。JLabel.AccessibleJLabel.getCharacterBounds(int i) 返回字符串中给定索引处字符的边界框。JSpinner.AccessibleJSpinner.getCharacterBounds(int i) 确定字符串中给定索引处字符的边界框。ProgressMonitor.AccessibleProgressMonitor.getCharacterBounds(int i) 确定字符串中给定索引处字符的边界框。DebugGraphics.getClipBounds()重写Graphics.getClipBoundsRepaintManager.getDirtyRegion(JComponent aComponent) 返回组件的当前脏区。static RectangleSwingUtilities.getLocalBounds(Component aComponent) 返回组件aComponent的矩形 (0,0,bounds.width,bounds.height)JInternalFrame.getNormalBounds()如果JInternalFrame未处于最大化状态,则返回getBounds();否则,返回JInternalFrame将恢复到的边界。JTree.getPathBounds(TreePath path) 返回指定节点将被绘制到的Rectangle。protected RectangleDefaultDesktopManager.getPreviousBounds(JInternalFrame f) 在组件最大化之前获取组件的法线边界。JTree.getRowBounds(int row) 返回绘制指定行节点的Rectangle。JScrollPane.getViewportBorderBounds()返回视口边界的边界。ScrollPaneLayout.getViewportBorderBounds(JScrollPane scrollpane) 已弃用。从 JDK 版本 Swing1.1 开始,由JScrollPane.getViewportBorderBounds()取代。JViewport.getViewRect()返回原点为getViewPosition且大小为getExtentSize的矩形。JComponent.getVisibleRect()返回Component的“可见矩形”——此组件的可见矩形new Rectangle(0, 0, getWidth(), getHeight())及其所有祖先可见矩形的交集。javax.swing 中的方法,参数类型为 Rectangle修饰符和类型方法描述static RectangleSwingUtilities.calculateInnerArea(JComponent c, Rectangle r) 将指定组件的内部绘制区域的位置和大小存储在r中并返回r。protected booleanJViewport.computeBlit(int dx, int dy, Point blitFrom, Point blitTo, Dimension blitSize, Rectangle blitPaint) 计算 blit 的参数,其中后备存储图像当前在左上角包含oldLoc,我们正在滚动到newLoc。static Rectangle[]SwingUtilities.computeDifference(Rectangle rectA, Rectangle rectB) 方便地返回一个矩形数组,表示rectA中不与rectB重叠的区域。static RectangleSwingUtilities.computeIntersection(int x, int y, int width, int height, Rectangle dest) 无需分配新矩形即可方便地计算两个矩形的交集。static RectangleSwingUtilities.computeUnion(int x, int y, int width, int height, Rectangle dest) 在不分配新矩形的情况下计算两个矩形并集的便捷方法。voidJComponent.computeVisibleRect(Rectangle visibleRect) 返回Component的“可见矩形”——此组件及其所有祖先的可见矩形的交集。static RectangleSwingUtilities.convertRectangle(Component source, Rectangle aRectangle, Component destination) 将source坐标系中的矩形aRectangle转换为destination坐标系。将此组件的边界存储到“返回值”rv并返回rv。intJLayer.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) 返回一个滚动增量,对于显示逻辑行或列的组件来说,这是必需的,以便根据 orientation 的值完全暴露一个行或列块。intJList.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) 返回滚动以显示下一个或上一个块的距离。intJTable.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) 返回visibleRect.height或visibleRect.width,具体取决于此表的方向。intJTree.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) 返回块增量的数量,即visibleRect的高度或宽度,基于orientation。intScrollable.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) 根据 orientation 的值计算将完全显示一个行或列块的滚动增量。intJLayer.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) 返回一个滚动增量,对于显示逻辑行或列的组件来说,这是必需的,以便根据 orientation 的值完全暴露一个新行或新列。intJList.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) 返回滚动以显示下一行或上一行(对于垂直滚动)或列(对于水平滚动)的距离。intJTable.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) 返回完全显示新行或新列(取决于方向)的滚动增量(以像素为单位)。intJTextArea.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) 显示逻辑行或列的组件应根据 orientation 的值计算将完全显示新行或新列的滚动增量。intJTree.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) 返回滚动时增加的量。intScrollable.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) 显示逻辑行或列的组件应根据 orientation 的值计算将完全显示新行或新列的滚动增量。static final booleanSwingUtilities.isRectangleContainingRectangle(Rectangle a, Rectangle b) 如果a包含b,则返回truestatic StringSwingUtilities.layoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) 计算并返回图标原点的位置、文本基线的原点位置以及复合标签字符串的可能裁剪版本。static StringSwingUtilities.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) 计算并返回图标原点的位置、文本基线的原点位置以及复合标签字符串的可能裁剪版本。voidCellRendererPane.paintComponent(Graphics g, Component c, Container p, Rectangle r) 调用 this.paintComponent(g, c, p, rx, ry, r.width, r.height) 其中r是输入Rectangle参数。static voidSwingUtilities.paintComponent(Graphics g, Component c, Container p, Rectangle r) 将组件绘制到指定的Graphics。voidJComponent.paintImmediately(Rectangle r) 现在绘制指定区域。void出于性能原因被重写。void如果组件正在显示,则将指定区域添加到脏区域列表。voidJComponent.scrollRectToVisible(Rectangle aRect) 将scrollRectToVisible()消息转发给JComponent的父级。voidJTextField.scrollRectToVisible(Rectangle r) 向左或向右滚动字段。voidJViewport.scrollRectToVisible(Rectangle contentRect) 滚动视图,使视图中的Rectangle变得可见。voidvoidvoidvoidJInternalFrame.setNormalBounds(Rectangle r) 设置此内部框架的正常边界,此内部框架将从其最大化状态恢复到的边界。protected voidDefaultDesktopManager.setPreviousBounds(JInternalFrame f, Rectangle r) 在最大化调用之前存储组件的边界。 -
Rectangle 在 javax.swing.border 中的用法
javax.swing.border 中返回 Rectangle 的方法修饰符和类型方法描述AbstractBorder.getInteriorRectangle(Component c, int x, int y, int width, int height) 此便捷方法调用静态方法。static RectangleAbstractBorder.getInteriorRectangle(Component c, Border b, int x, int y, int width, int height) 使用参数减去边框的insets返回一个矩形。 -
Rectangle 在 javax.swing.plaf 中的用法
javax.swing.plaf 中返回 Rectangle 的方法修饰符和类型方法描述abstract RectangleListUI.getCellBounds(JList<?> list, int index1, int index2) 返回给定列表坐标系中两个索引指定的单元格范围的边界矩形。abstract RectangleTreeUI.getPathBounds(JTree tree, TreePath path) 返回包含标签部分的矩形,路径中的最后一项将被绘制到该标签部分中。abstract RectangleTabbedPaneUI.getTabBounds(JTabbedPane pane, int index) 返回制表符边界的矩形。abstract RectangleTextUI.modelToView(JTextComponent t, int pos) abstract RectangleTextUI.modelToView(JTextComponent t, int pos, Position.Bias bias) -
Rectangle 在 javax.swing.plaf.basic 中的用法
javax.swing.plaf.basic 中的字段声明为 Rectangle修饰符和类型Field描述protected RectangleBasicProgressBarUI.boxRect用于保存要绘制的弹跳框(由 getBox 返回)的位置和大小。protected RectangleBasicTabbedPaneUI.calcRect用于一般布局计算的矩形,以避免动态构建许多新的矩形。protected RectangleBasicSliderUI.contentRectContent 矩形protected RectangleBasicSliderUI.focusRect焦点矩形protected RectangleBasicSliderUI.labelRectLabel 矩形protected Rectangle[]BasicTabbedPaneUI.rects制表符protected RectangleBasicScrollBarUI.thumbRectThumb 矩形protected RectangleBasicSliderUI.thumbRectThumb 矩形protected RectangleBasicSliderUI.tickRect勾选矩形protected RectangleBasicScrollBarUI.trackRectTrack 矩形protected RectangleBasicSliderUI.trackRectTrack 矩形javax.swing.plaf.basic 中返回 Rectangle 的方法修饰符和类型方法描述protected RectangleBasicComboPopup.computePopupBounds(int px, int py, int pw, int ph) 位置和封闭屏幕边界计算组合框弹出部分的位置和大小。protected Rectangle在r中存储将为当前动画索引绘制的弹跳框的位置和大小,并返回r。BasicListUI.getCellBounds(JList<?> list, int index1, int index2) 返回给定列表坐标系中两个索引指定的单元格范围的边界矩形。protected RectangleBasicTreeUI.getDropLineRect(JTree.DropLocation loc) 返回下垂线的无边界框。BasicTreeUI.NodeDimensionsHandler.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size) 负责获取特定节点的大小。BasicTreeUI.getPathBounds(JTree tree, TreePath path) 返回包含标签部分的矩形,路径中的最后一项将被绘制到该标签部分中。protected RectangleBasicTabbedPaneUI.getTabBounds(int tabIndex, Rectangle dest) 返回 JTabbedPane 组件坐标空间中指定选项卡的边界。BasicTabbedPaneUI.getTabBounds(JTabbedPane pane, int i) 返回指定选项卡索引的边界。protected RectangleBasicScrollBarUI.getThumbBounds()返回拇指的当前大小/位置。protected RectangleBasicScrollBarUI.getTrackBounds()返回轨道的当前边界,即递增和递减按钮之间的空间,减去insets。protected RectangleBasicTextUI.getVisibleEditorRect()获取分配给根视图。BasicTextUI.modelToView(JTextComponent tc, int pos) BasicTextUI.modelToView(JTextComponent tc, int pos, Position.Bias bias) protected RectangleBasicComboBoxUI.rectangleForCurrentValue()返回为绘制当前所选项目保留的区域。javax.swing.plaf.basic 中的方法,参数类型为 Rectangle修饰符和类型方法描述protected Rectangle在r中存储将为当前动画索引绘制的弹跳框的位置和大小,并返回r。BasicTreeUI.NodeDimensionsHandler.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size) 负责获取特定节点的大小。protected RectangleBasicTabbedPaneUI.getTabBounds(int tabIndex, Rectangle dest) 返回 JTabbedPane 组件坐标空间中指定选项卡的边界。protected StringBasicLabelUI.layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR) 将调用转发给 SwingUtilities.layoutCompoundLabel()。protected voidBasicTabbedPaneUI.layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected) 放置一个标签。protected voidBasicListUI.paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer<Object> cellRenderer, ListModel<Object> dataModel, ListSelectionModel selModel, int leadIndex) 绘制一个 List 单元格:计算相关状态,获取“橡皮图章”单元格渲染器组件,然后使用CellRendererPane对其进行绘制。voidBasicComboBoxUI.paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) 绘制当前选定的项目。voidBasicComboBoxUI.paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus) 绘制当前所选项目的背景。protected voidBasicTreeUI.paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) 绘制一行的展开(切换)部分。protected voidBasicButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect) 绘制一个聚焦按钮。protected voidBasicRadioButtonUI.paintFocus(Graphics g, Rectangle textRect, Dimension size) 绘制聚焦单选按钮。protected voidBasicTabbedPaneUI.paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) 绘制焦点指示器。protected voidBasicTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) 绘制腿的水平部分。protected voidBasicButtonUI.paintIcon(Graphics g, JComponent c, Rectangle iconRect) 绘制当前按钮的图标。protected voidBasicTabbedPaneUI.paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected) 绘制一个图标。protected voidBasicToggleButtonUI.paintIcon(Graphics g, AbstractButton b, Rectangle iconRect) 在指定位置绘制图标。protected voidBasicSliderUI.paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) 绘制水平滑块的主要刻度。protected voidBasicSliderUI.paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) 绘制垂直滑块的主要刻度。protected voidBasicSliderUI.paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) 绘制水平滑块的小刻度。protected voidBasicSliderUI.paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) 绘制垂直滑块的小刻度。protected voidBasicTreeUI.paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) 绘制一行的渲染器部分。protected voidBasicTabbedPaneUI.paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect) 绘制一个选项卡。protected voidBasicButtonUI.paintText(Graphics g, AbstractButton b, Rectangle textRect, String text) 呈现当前按钮文本的方法。protected voidBasicButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text) 呈现当前按钮文本的方法。protected void呈现当前菜单项的文本。protected voidBasicTabbedPaneUI.paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected) 绘制文本。protected voidBasicScrollBarUI.paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) 画拇指。protected voidBasicScrollBarUI.paintTrack(Graphics g, JComponent c, Rectangle trackBounds) 绘制轨道。protected voidBasicTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path) 绘制腿的垂直部分。 -
Rectangle 在 javax.swing.plaf.metal 中的用法
javax.swing.plaf.metal 中的方法,参数类型为 Rectangle修饰符和类型方法描述voidMetalComboBoxUI.paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) 如有必要,绘制当前选定的项目。voidMetalComboBoxUI.paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus) 如有必要,绘制当前所选项目的背景。protected voidMetalToggleButtonUI.paintIcon(Graphics g, AbstractButton b, Rectangle iconRect) 在空间iconRect中绘制按钮b的相应图标。 -
Rectangle 在 javax.swing.plaf.multi 中的用法
javax.swing.plaf.multi 中返回 Rectangle 的方法修饰符和类型方法描述MultiListUI.getCellBounds(JList<?> a, int b, int c) 在此对象处理的每个 UI 上调用getCellBounds方法。MultiTreeUI.getPathBounds(JTree a, TreePath b) 在此对象处理的每个 UI 上调用getPathBounds方法。MultiTabbedPaneUI.getTabBounds(JTabbedPane a, int b) 在此对象处理的每个 UI 上调用getTabBounds方法。MultiTextUI.modelToView(JTextComponent a, int b) MultiTextUI.modelToView(JTextComponent a, int b, Position.Bias c) -
Rectangle 在 javax.swing.plaf.synth 中的用法
javax.swing.plaf.synth 中的方法,参数类型为 Rectangle修饰符和类型方法描述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) 布置文本和图标,通过引用返回放置图标和文本的位置。protected voidSynthToolBarUI.paintContent(SynthContext context, Graphics g, Rectangle bounds) 绘制工具栏内容。voidSynthComboBoxUI.paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) 绘制当前选定的项目。voidSynthGraphicsUtils.paintText(SynthContext ss, Graphics g, String text, Rectangle bounds, int mnemonicIndex) 在指定位置绘制文本。protected voidSynthScrollBarUI.paintThumb(SynthContext context, Graphics g, Rectangle thumbBounds) 绘制滚动条拇指。protected voidSynthSliderUI.paintThumb(SynthContext context, Graphics g, Rectangle thumbBounds) 绘制滑块拇指。protected voidSynthScrollBarUI.paintTrack(SynthContext context, Graphics g, Rectangle trackBounds) 绘制滚动条轨道。protected voidSynthSliderUI.paintTrack(SynthContext context, Graphics g, Rectangle trackBounds) 绘制滑块轨道。 -
Rectangle 在 javax.swing.table 中的用法
javax.swing.table 中返回 Rectangle 的方法修饰符和类型方法描述JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getBounds()JTableHeader.getHeaderRect(int column) 返回包含位于column的标题图块的矩形。javax.swing.table 中的方法,参数类型为 Rectangle -
Rectangle 在 javax.swing.text 中的用法
javax.swing.text 中 Rectangle 的子类javax.swing.text 中的字段声明为 Rectangle修饰符和类型Field描述protected RectangleAsyncBoxView.ChildLocator.childAlloc用于子分配的形状以避免产生大量垃圾。protected RectangleAsyncBoxView.ChildLocator.lastAlloc最后看到的分配(用于向上刷新更改时重新绘制)。javax.swing.text 中返回 Rectangle 的方法修饰符和类型方法描述JTextComponent.AccessibleJTextComponent.getCharacterBounds(int i) 确定字符串中给定索引处字符的边界框。protected RectangleCompositeView.getInsideAllocation(Shape a) 将提供给视图的不可变分配转换为代表内部分配的可变分配(即给定分配的边界,删除了顶部、左侧、底部和右侧的insets。JTextComponent.AccessibleJTextComponent.getTextBounds(int startIndex, int endIndex) 返回包含两个索引之间文本的Rectangle。protected RectanglePlainView.lineToRect(Shape a, int line) 确定代表给定线的矩形。JTextComponent.modelToView(int pos) 已弃用。javax.swing.text 中的方法,参数类型为 Rectangle修饰符和类型方法描述protected voidDefaultCaret.adjustVisibility(Rectangle nloc) 滚动关联的视图(如有必要)以使插入符号可见。voidFlowView.FlowStrategy.changedUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) 从文档发出通知,通知该视图负责的位置的属性已更改。protected voidBoxView.childAllocation(int index, Rectangle alloc) 为子视图分配区域。protected abstract voidCompositeView.childAllocation(int index, Rectangle a) 返回给定子项的分配。protected void损坏插入符周围的区域,使其在新位置重新绘制。intJTextComponent.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) 根据 orientation 的值计算将完全显示一个行或列块的滚动增量。intJTextComponent.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) 显示逻辑行或列的组件应根据 orientation 的值计算将完全显示新行或新列的滚动增量。protected ViewBoxView.getViewAtPoint(int x, int y, Rectangle alloc) 获取给定坐标处的子视图。protected abstract ViewCompositeView.getViewAtPoint(int x, int y, Rectangle alloc) 获取给定坐标处的子视图。protected ViewCompositeView.getViewAtPosition(int pos, Rectangle a) 获取表示模型中给定位置的子视图。protected ViewTableView.getViewAtPosition(int pos, Rectangle a) 获取表示模型中给定位置的子视图。protected ViewTableView.TableRow.getViewAtPosition(int pos, Rectangle a) 获取表示模型中给定位置的子视图。voidFlowView.FlowStrategy.insertUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) 通知某些内容已插入文档中给定流视图负责的位置。protected boolean确定点是否落在分配的区域之后。protected abstract boolean测试点是否位于矩形范围之后。protected boolean确定点是否落在分配的区域之前。protected abstract boolean测试点是否位于矩形范围之前。protected voidBoxView.paintChild(Graphics g, Rectangle alloc, int index) 画一个子级。voidFlowView.FlowStrategy.removeUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) 通知某些内容已从给定流视图负责的位置的文档中删除。 -
Rectangle 在 javax.swing.text.html 中的用法
javax.swing.text.html 中的方法,参数类型为 Rectangle修饰符和类型方法描述protected voidListView.paintChild(Graphics g, Rectangle alloc, int index) 给其中一个子级画画;由 paint() 调用。 -
Rectangle 在 javax.swing.tree 中的用法
javax.swing.tree 中返回 Rectangle 的方法修饰符和类型方法描述abstract Rectangle返回一个矩形,给出绘制路径所需的边界。返回一个矩形,给出绘制路径所需的边界。返回包含标签部分的Rectangle,由path标识的项目将被绘制到该标签部分中。protected RectangleAbstractLayoutCache.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle placeIn) 通过在placeIn中的引用返回表示value所需的大小。abstract RectangleAbstractLayoutCache.NodeDimensions.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle bounds) 通过在边界中的引用返回放置值的大小和 x 原点。javax.swing.tree 中的方法,参数类型为 Rectangle修饰符和类型方法描述abstract Rectangle返回一个矩形,给出绘制路径所需的边界。返回一个矩形,给出绘制路径所需的边界。返回包含标签部分的Rectangle,由path标识的项目将被绘制到该标签部分中。protected RectangleAbstractLayoutCache.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle placeIn) 通过在placeIn中的引用返回表示value所需的大小。abstract RectangleAbstractLayoutCache.NodeDimensions.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle bounds) 通过在边界中的引用返回放置值的大小和 x 原点。intAbstractLayoutCache.getPreferredWidth(Rectangle bounds) 返回传入区域的首选宽度。intVariableHeightLayoutCache.getPreferredWidth(Rectangle bounds) 返回visibleRegion中区域的首选宽度和高度。void出于性能原因被重写。
getBounds()取代。