⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 multitreeui.java

📁 gcc的组建
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    while (iterator.hasNext())      {        ComponentUI ui = (ComponentUI) iterator.next();        /* int ignored = */ ui.getAccessibleChildrenCount(c);      }    return result;  }    /**   * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method   * for all the UI delegates managed by this <code>MultiTreeUI</code>,    * returning the child for the UI delegate from the primary look and    * feel.    *    * @param c  the component   * @param i  the child index.   *    * @return The child returned by the UI delegate from the primary    *         look and feel.    */  public Accessible getAccessibleChild(JComponent c, int i)  {    Accessible result = null;    Iterator iterator = uis.iterator();    // first UI delegate provides the return value    if (iterator.hasNext())       {        ComponentUI ui = (ComponentUI) iterator.next();        result = ui.getAccessibleChild(c, i);      }    // return values from auxiliary UI delegates are ignored    while (iterator.hasNext())      {        ComponentUI ui = (ComponentUI) iterator.next();        /* Accessible ignored = */ ui.getAccessibleChild(c, i);      }    return result;  }    /**   * Calls the {@link TreeUI#getPathBounds(JTree, TreePath)} method   * for all the UI delegates managed by this <code>MultiTreeUI</code>,    * returning the bounds for the UI delegate from the primary look and    * feel.    *    * @param tree  the tree component.   *    * @return The bounds returned by the UI delegate from the primary    *         look and feel.    */  public Rectangle getPathBounds(JTree tree, TreePath path)   {    Rectangle result = null;    Iterator iterator = uis.iterator();    // first UI delegate provides the return value    if (iterator.hasNext())       {        TreeUI ui = (TreeUI) iterator.next();        result = ui.getPathBounds(tree, path);      }    // return values from auxiliary UI delegates are ignored    while (iterator.hasNext())      {        TreeUI ui = (TreeUI) iterator.next();        /* Rectangle ignored = */ ui.getPathBounds(tree, path);      }    return result;  }  /**   * Calls the {@link TreeUI#getPathForRow(JTree, int)} method   * for all the UI delegates managed by this <code>MultiTreeUI</code>,    * returning the path for the UI delegate from the primary look and    * feel.    *    * @param tree  the tree component.   *    * @return The path returned by the UI delegate from the primary    *         look and feel.    */  public TreePath getPathForRow(JTree tree, int row)   {    TreePath result = null;    Iterator iterator = uis.iterator();    // first UI delegate provides the return value    if (iterator.hasNext())       {        TreeUI ui = (TreeUI) iterator.next();        result = ui.getPathForRow(tree, row);      }    // return values from auxiliary UI delegates are ignored    while (iterator.hasNext())      {        TreeUI ui = (TreeUI) iterator.next();        /* TreePath ignored = */ ui.getPathForRow(tree, row);      }    return result;  }  /**   * Calls the {@link TreeUI#getRowForPath(JTree, TreePath)} method   * for all the UI delegates managed by this <code>MultiTreeUI</code>,    * returning the row index for the UI delegate from the primary look and    * feel.    *    * @param tree  the tree component.   *    * @return The row index returned by the UI delegate from the primary    *         look and feel.    */  public int getRowForPath(JTree tree, TreePath path)   {    int result = 0;    Iterator iterator = uis.iterator();    // first UI delegate provides the return value    if (iterator.hasNext())       {        TreeUI ui = (TreeUI) iterator.next();        result = ui.getRowForPath(tree, path);      }    // return values from auxiliary UI delegates are ignored    while (iterator.hasNext())      {        TreeUI ui = (TreeUI) iterator.next();        /* int ignored = */ ui.getRowForPath(tree, path);      }    return result;    }  /**   * Calls the {@link TreeUI#getRowCount(JTree)} method   * for all the UI delegates managed by this <code>MultiTreeUI</code>,    * returning the count for the UI delegate from the primary look and    * feel.    *    * @param tree  the tree component.   *    * @return The count returned by the UI delegate from the primary    *         look and feel.    */  public int getRowCount(JTree tree)   {    int result = 0;    Iterator iterator = uis.iterator();    // first UI delegate provides the return value    if (iterator.hasNext())       {        TreeUI ui = (TreeUI) iterator.next();        result = ui.getRowCount(tree);      }    // return values from auxiliary UI delegates are ignored    while (iterator.hasNext())      {        TreeUI ui = (TreeUI) iterator.next();        /* int ignored = */ ui.getRowCount(tree);      }    return result;    }  /**   * Calls the {@link TreeUI#getClosestPathForLocation(JTree, int, int)} method   * for all the UI delegates managed by this <code>MultiTreeUI</code>,    * returning the path for the UI delegate from the primary look and    * feel.    *    * @param tree  the tree component.   *    * @return The path returned by the UI delegate from the primary    *         look and feel.    */  public TreePath getClosestPathForLocation(JTree tree, int x, int y)   {    TreePath result = null;    Iterator iterator = uis.iterator();    // first UI delegate provides the return value    if (iterator.hasNext())       {        TreeUI ui = (TreeUI) iterator.next();        result = ui.getClosestPathForLocation(tree, x, y);      }    // return values from auxiliary UI delegates are ignored    while (iterator.hasNext())      {        TreeUI ui = (TreeUI) iterator.next();        /* TreePath ignored = */ ui.getClosestPathForLocation(tree, x, y);      }    return result;    }  /**   * Calls the {@link TreeUI#isEditing(JTree)} method for all   * the UI delegates managed by this <code>MultiTreeUI</code>,    * returning the result for the UI delegate from the primary look and    * feel.    *    * @param tree  the tree component.   *    * @return The result returned by the UI delegate from the primary    *         look and feel.    */  public boolean isEditing(JTree tree)   {    boolean result = false;    Iterator iterator = uis.iterator();    // first UI delegate provides the return value    if (iterator.hasNext())       {        TreeUI ui = (TreeUI) iterator.next();        result = ui.isEditing(tree);      }    // return values from auxiliary UI delegates are ignored    while (iterator.hasNext())      {        TreeUI ui = (TreeUI) iterator.next();        /* boolean ignored = */ ui.isEditing(tree);      }    return result;  }  /**   * Calls the {@link TreeUI#stopEditing(JTree)} method for all   * the UI delegates managed by this <code>MultiTreeUI</code>,    * returning the result for the UI delegate from the primary look and    * feel.    *    * @param tree  the tree component.   *    * @return The result returned by the UI delegate from the primary    *         look and feel.    */  public boolean stopEditing(JTree tree)   {    boolean result = false;    Iterator iterator = uis.iterator();    // first UI delegate provides the return value    if (iterator.hasNext())       {        TreeUI ui = (TreeUI) iterator.next();        result = ui.stopEditing(tree);      }    // return values from auxiliary UI delegates are ignored    while (iterator.hasNext())      {        TreeUI ui = (TreeUI) iterator.next();        /* boolean ignored = */ ui.stopEditing(tree);      }    return result;  }  /**   * Calls the {@link TreeUI#cancelEditing(JTree)} method for    * all the UI delegates managed by this <code>MultiTreeUI</code>.   *    * @param tree  the tree component.   */  public void cancelEditing(JTree tree)   {    Iterator iterator = uis.iterator();    while (iterator.hasNext())    {      TreeUI ui = (TreeUI) iterator.next();      ui.cancelEditing(tree);    }  }  /**   * Calls the {@link TreeUI#startEditingAtPath(JTree, TreePath)} method for    * all the UI delegates managed by this <code>MultiTreeUI</code>.   *    * @param tree  the tree component.   * @param path  the path.   */  public void startEditingAtPath(JTree tree, TreePath path)   {    Iterator iterator = uis.iterator();    while (iterator.hasNext())    {      TreeUI ui = (TreeUI) iterator.next();      ui.startEditingAtPath(tree, path);    }  }  /**   * Calls the {@link TreeUI#getEditingPath(JTree)} method for all   * the UI delegates managed by this <code>MultiTreeUI</code>,    * returning the path for the UI delegate from the primary look and    * feel.    *    * @param tree  the tree component.   *    * @return The path returned by the UI delegate from the primary    *         look and feel.    */  public TreePath getEditingPath(JTree tree)   {    TreePath result = null;    Iterator iterator = uis.iterator();    // first UI delegate provides the return value    if (iterator.hasNext())       {        TreeUI ui = (TreeUI) iterator.next();        result = ui.getEditingPath(tree);      }    // return values from auxiliary UI delegates are ignored    while (iterator.hasNext())      {        TreeUI ui = (TreeUI) iterator.next();        /* TreePath ignored = */ ui.getEditingPath(tree);      }    return result;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -