本文整理了Java中javax.swing.JLayeredPane.getBounds()
方法的一些代码示例,展示了JLayeredPane.getBounds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JLayeredPane.getBounds()
方法的具体详情如下:
包路径:javax.swing.JLayeredPane
类名称:JLayeredPane
方法名:getBounds
暂无
代码示例来源:origin: edu.toronto.cs.medsavant/mfiume-component-transition
private void rebound() {
for (Component c : layers.getComponents()) {
c.setBounds(layers.getBounds());
}
this.updateUI();
}
代码示例来源:origin: javax.help/javahelp
/**
* Gets the higest visible component in a ancestor hierarchy at
* specific x,y coordinates
*/
private static Object getDeepestObjectAt(Object parent, int x, int y) {
if (parent instanceof Container) {
Container cont = (Container)parent;
// use a copy of 1.3 Container.findComponentAt
Component child = findComponentAt(cont, cont.getWidth(), cont.getHeight(), x, y);
if (child != null && child != cont) {
if (child instanceof JRootPane) {
JLayeredPane lp = ((JRootPane)child).getLayeredPane();
Rectangle b = lp.getBounds();
child = (Component)getDeepestObjectAt(lp, x - b.x, y - b.y);
}
if (child != null) {
return child;
}
}
}
// if the parent is not a Container then it might be a MenuItem.
// But even if it isn't a MenuItem just return the parent because
// that's a close as we can come.
return parent;
}
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
public static Object getDeepestObjectAt(Object parent, int x, int y) {
if (parent != null && parent instanceof Container) {
// use a copy of 1.3 Container.findComponentAt
Component child = findComponentAt((Container) parent, x, y);
if (child != null && child != parent) {
if (child instanceof JRootPane) {
JLayeredPane lp = ((JRootPane) child).getLayeredPane();
Rectangle b = lp.getBounds();
child = (Component) getDeepestObjectAt(lp, x - b.x, y - b.y);
if (child != null) {
return child;
}
} else {
return child;
}
}
}
// if the parent is not a Container then it might be a MenuItem.
// But even if it isn't a MenuItem just return the parent because
// that's a close as we can come.
return parent;
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing
/**
* Gets the higest visible component in a ancestor hierarchy at
* specific x,y coordinates
* @param parent
* @param x
* @param y
* @return
*/
public static Component getDeepestObjectAt(Component parent, int x, int y) {
if (parent instanceof Container) {
Container cont = (Container) parent;
// use a copy of 1.3 Container.findComponentAt
Component child = findComponentAt(cont, cont.getWidth(), cont.getHeight(), x, y);
if (child != null && child != cont) {
//log.info("child find : " + child.getName());
if (child instanceof JRootPane) {
JLayeredPane lp = ((JRootPane) child).getLayeredPane();
Rectangle b = lp.getBounds();
child = getDeepestObjectAt(lp, x - b.x, y - b.y);
}
if (child != null) {
return child;
}
}
}
// if the parent is not a Container then it might be a MenuItem.
// But even if it isn't a MenuItem just return the parent because
// that's a close as we can come.
return parent;
}
代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-runtime
Rectangle b = lp.getBounds();
child = getDeepestObjectAt(lp, x - b.x, y - b.y);
代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime
Rectangle b = lp.getBounds();
child = getDeepestObjectAt(lp, x - b.x, y - b.y);
内容来源于网络,如有侵权,请联系作者删除!