public class ComponentUtils
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
static java.awt.Rectangle |
computeVisibleRect(javax.swing.JComponent root)
计算组件root相对于其顶层容器的可见区域
|
static java.awt.Rectangle |
computeVisibleRectRel2Root(java.awt.Component root)
计算组件root相对于其顶层容器的可见区域
|
static void |
disableBuffer(java.awt.Component comp,
java.util.ArrayList<javax.swing.JComponent> dbcomponents)
禁止双缓冲状态,并将初始状态为启动双缓冲的组件保存到dbcomponents中
|
static java.awt.Container |
findAncestorScrollPane(java.awt.Component p) |
static java.awt.Rectangle |
getRelativeBounds(java.awt.Component component)
获取component所在的容器的绝对位置
|
static int |
indexOfComponent(java.awt.Container container,
java.awt.Component target) |
static boolean |
isChildOf(java.awt.Component component,
java.lang.Class parent) |
static boolean |
isComponentVisible(java.awt.Component comp) |
static boolean |
isRootComponent(java.awt.Component root) |
static void |
resetBuffer(java.util.ArrayList<javax.swing.JComponent> dbcomponents)
恢复双缓冲状态,dbcomponents保存着初始状态为启动双缓冲的组件
|
public static boolean isComponentVisible(java.awt.Component comp)
public static java.awt.Rectangle getRelativeBounds(java.awt.Component component)
public static void resetBuffer(java.util.ArrayList<javax.swing.JComponent> dbcomponents)
public static void disableBuffer(java.awt.Component comp, java.util.ArrayList<javax.swing.JComponent> dbcomponents)
public static int indexOfComponent(java.awt.Container container, java.awt.Component target)
public static java.awt.Rectangle computeVisibleRectRel2Root(java.awt.Component root)
public static java.awt.Rectangle computeVisibleRect(javax.swing.JComponent root)
public static java.awt.Container findAncestorScrollPane(java.awt.Component p)
public static boolean isRootComponent(java.awt.Component root)
public static boolean isChildOf(java.awt.Component component, java.lang.Class parent)