类的用途
java.awt.Insets
使用 Insets 的包
包
描述
包含用于创建用户界面以及绘制图形和图像的所有类。
拖放是一种在许多图形用户界面系统中发现的直接操作手势,它提供了一种机制,可以在逻辑上与 GUI 中的表示元素相关联的两个实体之间传输信息。
提供一组“轻量级”(全 Java 语言)组件,尽可能在所有平台上以相同的方式工作。
提供用于在 Swing 组件周围绘制专用边框的类和接口。
提供一个接口和许多抽象类,Swing 使用这些抽象类来提供其可插入的外观功能。
提供根据基本外观构建的用户界面对象。
提供根据 Java 外观(曾经代号为 Metal )构建的用户界面对象,这是默认外观。
提供根据跨平台 Nimbus 外观构建的用户界面对象。
Synth 是一种可换肤的外观和感觉,其中所有绘画都是委托的。
提供处理可编辑和不可编辑文本组件的类和接口。
-
Insets 在 java.awt 中的用法
修饰符和类型方法描述Container.getInsets()确定此容器的 insets,它指示容器边框的大小。Toolkit.getScreenInsets(GraphicsConfiguration gc) 获取屏幕的insets。Container.insets()已弃用。修饰符构造方法描述GridBagConstraints(int gridx, int gridy, int gridwidth, int gridheight, double weightx, double weighty, int anchor, int fill, Insets insets, int ipadx, int ipady) 创建一个GridBagConstraints对象,其所有字段都设置为传入的参数。 -
Insets 在 java.awt.dnd 中的用法
java.awt.dnd 中返回 Insets 的方法 -
Insets 在 javax.swing 中的用法
javax.swing 中返回 Insets 的方法修饰符和类型方法描述JComponent.getInsets()如果已在此组件上设置了边框,则返回边框的 insets;否则调用super.getInsets。返回包含此组件的插入值的Insets对象。final InsetsJViewport.getInsets()将insets(边框)尺寸返回为 (0,0,0,0),因为JViewport不支持边框。final Insets返回包含此JViewport的插入值的Insets对象。如果key的值是一个Insets返回它,否则返回null。如果给定Locale的key的值是一个Insets返回它,否则返回null。static Insets从默认值返回一个Insets对象。static Insets从适合给定locale的默认值返回一个Insets对象。AbstractButton.getMargin()返回按钮边框和标签之间的边距。JMenuBar.getMargin()返回菜单栏边框与其菜单之间的边距。JPopupMenu.getMargin()返回弹出菜单的边框与其容器之间的边距(以像素为单位)。JToolBar.getMargin()返回工具栏边框与其按钮之间的边距。javax.swing 中的方法,参数类型为 Insets修饰符和类型方法描述返回包含此组件的插入值的Insets对象。final Insets返回包含此JViewport的插入值的Insets对象。void设置按钮边框和标签之间的边距空间。void设置菜单栏边框与其菜单之间的边距。void设置工具栏边框与其按钮之间的边距。 -
Insets 在 javax.swing.border 中的用法
javax.swing.border 中返回 Insets 的方法修饰符和类型方法描述AbstractBorder.getBorderInsets(Component c) 此默认实现返回一个新的Insets对象,该对象由AbstractBorder.getBorderInsets(Component,Insets)方法初始化。AbstractBorder.getBorderInsets(Component c, Insets insets) 使用此 Border 的当前 Insets 重新初始化 insets 参数。BevelBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。Border.getBorderInsets(Component c) 返回边框的insets。CompoundBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。EmptyBorder.getBorderInsets()返回边框的insets。EmptyBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。EtchedBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。LineBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。MatteBorder.getBorderInsets()返回边框的insets。MatteBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。SoftBevelBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。StrokeBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前insets重新初始化insets参数。TitledBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。javax.swing.border 中的方法,参数类型为 Insets修饰符和类型方法描述AbstractBorder.getBorderInsets(Component c, Insets insets) 使用此 Border 的当前 Insets 重新初始化 insets 参数。BevelBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。CompoundBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。EmptyBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。EtchedBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。LineBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。MatteBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。SoftBevelBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。StrokeBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前insets重新初始化insets参数。TitledBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。javax.swing.border 中的构造函数,参数类型为 Insets修饰符构造方法描述EmptyBorder(Insets borderInsets) 创建具有指定insets的空边框。MatteBorder(Insets borderInsets, Color matteColor) 创建具有指定insets和颜色的无光泽边框。MatteBorder(Insets borderInsets, Icon tileIcon) 使用指定的insets和平铺图标创建磨砂边框。 -
Insets 在 javax.swing.plaf 中的用法
javax.swing.plaf 中 Insets 的子类javax.swing.plaf 中返回 Insets 的方法javax.swing.plaf 中的构造函数,参数类型为 Insets -
Insets 在 javax.swing.plaf.basic 中的用法
javax.swing.plaf.basic 中的字段声明为 Insets修饰符和类型Field描述protected InsetsBasicTabbedPaneUI.contentBorderInsets内容边框插入protected InsetsBasicSliderUI.focusInsets焦点insetsprotected InsetsBasicSliderUI.insetCache插入缓存protected InsetsBasicComboBoxUI.padding如果指定,这些insets在布局和绘制组合框中的“选定”项目时充当单元格渲染器周围的填充。protected InsetsBasicTabbedPaneUI.selectedTabPadInsets选定的标签insetsprotected InsetsBasicTabbedPaneUI.tabAreaInsets选项卡区域插入protected InsetsBasicTabbedPaneUI.tabInsets标签内嵌javax.swing.plaf.basic 中返回 Insets 的方法修饰符和类型方法描述BasicBorders.SplitPaneBorder.getBorderInsets(Component c) protected InsetsBasicTabbedPaneUI.getContentBorderInsets(int tabPlacement) 返回内容边框insets。static InsetsBasicGraphicsUtils.getEtchedInsets()返回由drawEtchedRect()绘制的边框占用的空间量static InsetsBasicGraphicsUtils.getGrooveInsets()返回由drawGroove()绘制的边框占用的空间量protected InsetsBasicComboBoxUI.getInsets()从 JComboBox 获取insets。BasicDesktopIconUI.getInsets(JComponent c) 返回insets。BasicSplitPaneDivider.getInsets()如果已在此组件上设置了边框,则返回边框的 insets,否则调用 super.getInsets。BasicSplitPaneUI.getInsets(JComponent jc) 返回insets。protected InsetsBasicTabbedPaneUI.getSelectedTabPadInsets(int tabPlacement) 返回选定的标签垫insets。protected InsetsBasicTabbedPaneUI.getTabAreaInsets(int tabPlacement) 返回选项卡区域insets。protected InsetsBasicTabbedPaneUI.getTabInsets(int tabPlacement, int tabIndex) 返回制表符插入。javax.swing.plaf.basic 中的方法,参数类型为 Insets修饰符和类型方法描述protected intBasicProgressBarUI.getAmountFull(Insets b, int width, int height) 这将根据从模型收集的完成百分比确定应填充的进度条的数量。protected intBasicSplitPaneUI.BasicHorizontalLayoutManager.getAvailableSize(Dimension containerSize, Insets insets) 根据容器大小和Insets返回可用宽度。protected intBasicSplitPaneUI.BasicHorizontalLayoutManager.getInitialLocation(Insets insets) 返回左insets,除非Insets为空,在这种情况下返回 0。protected voidBasicTreeUI.paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) 绘制一行的展开(切换)部分。protected voidBasicTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) 绘制腿的水平部分。protected voidBasicTreeUI.paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) 绘制一行的渲染器部分。protected voidBasicProgressBarUI.paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) 绘制进度字符串。protected voidBasicTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path) 绘制腿的垂直部分。protected static voidBasicTabbedPaneUI.rotateInsets(Insets topInsets, Insets targetInsets, int targetPlacement) 旋转insets。protected voidBasicSplitPaneUI.BasicHorizontalLayoutManager.setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize) 将组件c的宽度设置为size,将其 x 位置放置在location,将 y 放置在insets.top并将高度放置在containerSize.height减去顶部和底部insets。 -
Insets 在 javax.swing.plaf.metal 中的用法
javax.swing.plaf.metal 中的字段声明为 Insets修饰符和类型Field描述protected static InsetsMetalBorders.ButtonBorder.borderInsets边框插入。protected static InsetsMetalBorders.MenuBarBorder.borderInsets边框插入。protected static InsetsMetalBorders.MenuItemBorder.borderInsets边框插入。protected static InsetsMetalBorders.PopupMenuBorder.borderInsets边框插入。protected InsetsMetalBorders.TableHeaderBorder.editorBorderInsets边框插入。protected static InsetsMetalComboBoxEditor.editorBorderInsets默认编辑器边框Insets。 -
Insets 在 javax.swing.plaf.nimbus 中的用法
javax.swing.plaf.nimbus 中返回 Insets 的方法javax.swing.plaf.nimbus 中的方法,参数类型为 Insetsjavax.swing.plaf.nimbus 中的构造函数,参数类型为 Insets修饰符构造方法描述PaintContext(Insets insets, Dimension canvasSize, boolean inverted) 创建一个新的 PaintContext,它不会尝试缓存或缩放任何缓存的图像。PaintContext(Insets insets, Dimension canvasSize, boolean inverted, AbstractRegionPainter.PaintContext.CacheMode cacheMode, double maxH, double maxV) 创建一个新的 PaintContext。 -
Insets 在 javax.swing.plaf.synth 中的用法
javax.swing.plaf.synth 中返回 Insets 的方法javax.swing.plaf.synth 中的方法,参数类型为 Insets -
Insets 在 javax.swing.text 中的用法
javax.swing.text 中返回 Insets 的方法javax.swing.text 中的方法,参数类型为 Insets
getInsets()取代。