Example usage for javax.swing JTree setShowsRootHandles

List of usage examples for javax.swing JTree setShowsRootHandles

Introduction

In this page you can find the example usage for javax.swing JTree setShowsRootHandles.

Prototype

@BeanProperty(description = "Whether the node handles are to be displayed.")
public void setShowsRootHandles(boolean newValue) 

Source Link

Document

Sets the value of the showsRootHandles property, which specifies whether the node handles should be displayed.

Usage

From source file:org.openmicroscopy.shoola.agents.util.SelectionWizardUI.java

/**
 * Initializes the specified tree//w w  w . j  a v a 2s .  c o m
 * 
 * @param tree The tree to handle.
 * @param user The user currently logged in.
 */
private void initializeTree(JTree tree, ExperimenterData user) {
    tree.setVisible(true);
    tree.setRootVisible(false);
    ToolTipManager.sharedInstance().registerComponent(tree);
    tree.setCellRenderer(new TreeCellRenderer(user.getId()));
    tree.setShowsRootHandles(true);
    TreeImageSet root = new TreeImageSet("");
    tree.setModel(new DefaultTreeModel(root));
}