Java Code Examples for javax.swing.plaf.TreeUI

The following examples show how to use javax.swing.plaf.TreeUI. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: netbeans   Source File: TemplatesPanelGUI.java    License: Apache License 2.0 6 votes vote down vote up
/** Make a path visible.
* @param path the path
*/
private void showPathWithoutExpansion(TreePath path) {
    Rectangle rect = tree.getPathBounds(path);
    if (rect != null) { //PENDING
        TreeUI tmp = tree.getUI();
        int correction = 0;
        if (tmp instanceof BasicTreeUI) {
            correction = ((BasicTreeUI) tmp).getLeftChildIndent();
            correction += ((BasicTreeUI) tmp).getRightChildIndent();
        }
        rect.x = Math.max(0, rect.x - correction);
        rect.y += rect.height;
        if (rect.y >= 0) { //#197514 - do not scroll to negative y values
            tree.scrollRectToVisible(rect);
        }
    }
}
 
Example 2
Source Project: jdk1.8-source-analysis   Source File: MultiTreeUI.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPathBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getPathBounds(JTree a, TreePath b) {
    Rectangle returnValue =
        ((TreeUI) (uis.elementAt(0))).getPathBounds(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getPathBounds(a,b);
    }
    return returnValue;
}
 
Example 3
Source Project: jdk1.8-source-analysis   Source File: MultiTreeUI.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPathForRow</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public TreePath getPathForRow(JTree a, int b) {
    TreePath returnValue =
        ((TreeUI) (uis.elementAt(0))).getPathForRow(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getPathForRow(a,b);
    }
    return returnValue;
}
 
Example 4
Source Project: jdk1.8-source-analysis   Source File: MultiTreeUI.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>getRowForPath</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int getRowForPath(JTree a, TreePath b) {
    int returnValue =
        ((TreeUI) (uis.elementAt(0))).getRowForPath(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getRowForPath(a,b);
    }
    return returnValue;
}
 
Example 5
Source Project: jdk8u-jdk   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPathBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getPathBounds(JTree a, TreePath b) {
    Rectangle returnValue =
        ((TreeUI) (uis.elementAt(0))).getPathBounds(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getPathBounds(a,b);
    }
    return returnValue;
}
 
Example 6
Source Project: jdk1.8-source-analysis   Source File: MultiTreeUI.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>getClosestPathForLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public TreePath getClosestPathForLocation(JTree a, int b, int c) {
    TreePath returnValue =
        ((TreeUI) (uis.elementAt(0))).getClosestPathForLocation(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getClosestPathForLocation(a,b,c);
    }
    return returnValue;
}
 
Example 7
Source Project: Bytecoder   Source File: MultiTreeUI.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>stopEditing</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean stopEditing(JTree a) {
    boolean returnValue =
        ((TreeUI) (uis.elementAt(0))).stopEditing(a);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).stopEditing(a);
    }
    return returnValue;
}
 
Example 8
Source Project: jdk1.8-source-analysis   Source File: MultiTreeUI.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>stopEditing</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean stopEditing(JTree a) {
    boolean returnValue =
        ((TreeUI) (uis.elementAt(0))).stopEditing(a);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).stopEditing(a);
    }
    return returnValue;
}
 
Example 9
Source Project: jdk1.8-source-analysis   Source File: MultiTreeUI.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>getEditingPath</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public TreePath getEditingPath(JTree a) {
    TreePath returnValue =
        ((TreeUI) (uis.elementAt(0))).getEditingPath(a);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getEditingPath(a);
    }
    return returnValue;
}
 
Example 10
Source Project: dragonwell8_jdk   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPathBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getPathBounds(JTree a, TreePath b) {
    Rectangle returnValue =
        ((TreeUI) (uis.elementAt(0))).getPathBounds(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getPathBounds(a,b);
    }
    return returnValue;
}
 
Example 11
Source Project: dragonwell8_jdk   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPathForRow</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public TreePath getPathForRow(JTree a, int b) {
    TreePath returnValue =
        ((TreeUI) (uis.elementAt(0))).getPathForRow(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getPathForRow(a,b);
    }
    return returnValue;
}
 
Example 12
Source Project: dragonwell8_jdk   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getRowForPath</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int getRowForPath(JTree a, TreePath b) {
    int returnValue =
        ((TreeUI) (uis.elementAt(0))).getRowForPath(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getRowForPath(a,b);
    }
    return returnValue;
}
 
Example 13
Source Project: Bytecoder   Source File: MultiTreeUI.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>getEditingPath</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public TreePath getEditingPath(JTree a) {
    TreePath returnValue =
        ((TreeUI) (uis.elementAt(0))).getEditingPath(a);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getEditingPath(a);
    }
    return returnValue;
}
 
Example 14
Source Project: dragonwell8_jdk   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getClosestPathForLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public TreePath getClosestPathForLocation(JTree a, int b, int c) {
    TreePath returnValue =
        ((TreeUI) (uis.elementAt(0))).getClosestPathForLocation(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getClosestPathForLocation(a,b,c);
    }
    return returnValue;
}
 
Example 15
Source Project: dragonwell8_jdk   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>isEditing</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isEditing(JTree a) {
    boolean returnValue =
        ((TreeUI) (uis.elementAt(0))).isEditing(a);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).isEditing(a);
    }
    return returnValue;
}
 
Example 16
Source Project: dragonwell8_jdk   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>stopEditing</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean stopEditing(JTree a) {
    boolean returnValue =
        ((TreeUI) (uis.elementAt(0))).stopEditing(a);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).stopEditing(a);
    }
    return returnValue;
}
 
Example 17
Source Project: openjdk-jdk9   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPathForRow</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public TreePath getPathForRow(JTree a, int b) {
    TreePath returnValue =
        ((TreeUI) (uis.elementAt(0))).getPathForRow(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getPathForRow(a,b);
    }
    return returnValue;
}
 
Example 18
Source Project: dragonwell8_jdk   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getEditingPath</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public TreePath getEditingPath(JTree a) {
    TreePath returnValue =
        ((TreeUI) (uis.elementAt(0))).getEditingPath(a);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getEditingPath(a);
    }
    return returnValue;
}
 
Example 19
Source Project: TencentKona-8   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPathBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getPathBounds(JTree a, TreePath b) {
    Rectangle returnValue =
        ((TreeUI) (uis.elementAt(0))).getPathBounds(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getPathBounds(a,b);
    }
    return returnValue;
}
 
Example 20
Source Project: TencentKona-8   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getRowForPath</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int getRowForPath(JTree a, TreePath b) {
    int returnValue =
        ((TreeUI) (uis.elementAt(0))).getRowForPath(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getRowForPath(a,b);
    }
    return returnValue;
}
 
Example 21
Source Project: TencentKona-8   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getRowCount</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int getRowCount(JTree a) {
    int returnValue =
        ((TreeUI) (uis.elementAt(0))).getRowCount(a);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getRowCount(a);
    }
    return returnValue;
}
 
Example 22
Source Project: TencentKona-8   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getClosestPathForLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public TreePath getClosestPathForLocation(JTree a, int b, int c) {
    TreePath returnValue =
        ((TreeUI) (uis.elementAt(0))).getClosestPathForLocation(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getClosestPathForLocation(a,b,c);
    }
    return returnValue;
}
 
Example 23
Source Project: TencentKona-8   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>isEditing</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isEditing(JTree a) {
    boolean returnValue =
        ((TreeUI) (uis.elementAt(0))).isEditing(a);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).isEditing(a);
    }
    return returnValue;
}
 
Example 24
Source Project: openjdk-jdk9   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getRowForPath</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int getRowForPath(JTree a, TreePath b) {
    int returnValue =
        ((TreeUI) (uis.elementAt(0))).getRowForPath(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getRowForPath(a,b);
    }
    return returnValue;
}
 
Example 25
Source Project: openjdk-jdk9   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>stopEditing</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean stopEditing(JTree a) {
    boolean returnValue =
        ((TreeUI) (uis.elementAt(0))).stopEditing(a);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).stopEditing(a);
    }
    return returnValue;
}
 
Example 26
Source Project: jdk8u60   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPathBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getPathBounds(JTree a, TreePath b) {
    Rectangle returnValue =
        ((TreeUI) (uis.elementAt(0))).getPathBounds(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getPathBounds(a,b);
    }
    return returnValue;
}
 
Example 27
Source Project: jdk8u60   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPathForRow</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public TreePath getPathForRow(JTree a, int b) {
    TreePath returnValue =
        ((TreeUI) (uis.elementAt(0))).getPathForRow(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getPathForRow(a,b);
    }
    return returnValue;
}
 
Example 28
Source Project: jdk8u60   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getRowForPath</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int getRowForPath(JTree a, TreePath b) {
    int returnValue =
        ((TreeUI) (uis.elementAt(0))).getRowForPath(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getRowForPath(a,b);
    }
    return returnValue;
}
 
Example 29
Source Project: jdk8u60   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getRowCount</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int getRowCount(JTree a) {
    int returnValue =
        ((TreeUI) (uis.elementAt(0))).getRowCount(a);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getRowCount(a);
    }
    return returnValue;
}
 
Example 30
Source Project: jdk8u60   Source File: MultiTreeUI.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getClosestPathForLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public TreePath getClosestPathForLocation(JTree a, int b, int c) {
    TreePath returnValue =
        ((TreeUI) (uis.elementAt(0))).getClosestPathForLocation(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((TreeUI) (uis.elementAt(i))).getClosestPathForLocation(a,b,c);
    }
    return returnValue;
}