java.awt.Container.setFocusCycleRoot()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中java.awt.Container.setFocusCycleRoot()方法的一些代码示例,展示了Container.setFocusCycleRoot()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Container.setFocusCycleRoot()方法的具体详情如下:
包路径:java.awt.Container
类名称:Container
方法名:setFocusCycleRoot

Container.setFocusCycleRoot介绍

[英]Sets whether this Container is the root of a focus traversal cycle. Once focus enters a traversal cycle, typically it cannot leave it via focus traversal unless one of the up- or down-cycle keys is pressed. Normal traversal is limited to this Container, and all of this Container's descendants that are not descendants of inferior focus cycle roots. Note that a FocusTraversalPolicy may bend these restrictions, however. For example, ContainerOrderFocusTraversalPolicy supports implicit down-cycle traversal.
[中]设置此容器是否为焦点遍历循环的根。一旦焦点进入遍历循环,通常它不能通过焦点遍历离开它,除非按下向上或向下循环键之一。正常遍历仅限于此容器,以及此容器的所有非次焦点循环根的后代。然而,请注意,聚焦反垄断政策可能会扭曲这些限制。例如,ContainerOrderFocusTraversalPolicy支持隐式下循环遍历。

代码示例

代码示例来源:origin: net.java.abeille/abeille

/**
 * Sets the focusCycleRoot to false for any child forms.
 */
private void disableChildFocusCycleRoots(Container cc) {
  if (cc == null)
    return;
  for (int index = 0; index < cc.getComponentCount(); index++) {
    Component comp = cc.getComponent(index);
    if (comp instanceof StandardComponent || comp instanceof FormPanel) {
      ((Container) comp).setFocusCycleRoot(false);
      disableChildFocusCycleRoots((Container) comp);
    }
    else if (comp instanceof Container) {
      disableChildFocusCycleRoots((Container) comp);
    }
  }
}

代码示例来源:origin: stackoverflow.com

p1.add(t1); p1.add(t2); p1.add(t3); p1.add(t4);
p1.setFocusTraversalPolicyProvider(true);
p1.setFocusCycleRoot(false);
p2.add(t5); p2.add(t6); p2.add(t7); p2.add(t8);
p2.setFocusTraversalPolicyProvider(true);
p2.setFocusCycleRoot(false);

代码示例来源:origin: stackoverflow.com

getContentPane().setLayout(new java.awt.GridLayout());
jPanel1.setFocusCycleRoot(true);
jPanel1.setLayout(new java.awt.GridBagLayout());

代码示例来源:origin: stackoverflow.com

getContentPane().setLayout(new java.awt.GridLayout());
jPanel1.setFocusCycleRoot(true);
jPanel1.setLayout(new java.awt.GridBagLayout());

代码示例来源:origin: de.richtercloud/flexdock-core

cachedFocusCycleRoot = desiredRoot.isFocusCycleRoot();
if(!cachedFocusCycleRoot) {
  desiredRoot.setFocusCycleRoot(true);
desiredRoot.setFocusCycleRoot(cachedFocusCycleRoot);

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

content.setFocusCycleRoot(!visible);

相关文章

微信公众号

最新文章

更多

Container类方法