Example usage for javax.swing JTree setUI

List of usage examples for javax.swing JTree setUI

Introduction

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

Prototype

@BeanProperty(hidden = true, visualUpdate = true, description = "The UI object that implements the Component's LookAndFeel.")
public void setUI(TreeUI ui) 

Source Link

Document

Sets the L&F object that renders this component.

Usage

From source file:nz.govt.natlib.ndha.manualdeposit.ManualDepositPresenter.java

private void addTreeSelectionListener(JTree theTree) {
    if (theTree == null) {
        return;//from  w w  w . ja v a  2s. c  o  m
    }
    trees.add(theTree);
    theTree.setCellEditor(new DepositTreeEditor(theTree, new DefaultTreeCellRenderer(), new DefaultCellEditor(
            new TreeEditorField(applicationProperties.getApplicationData().getMaximumStructureLength()))));
    theTree.setUI(new CustomTreeUI());
    theTree.setCellRenderer(new IconRenderer(currentIconDirectory));
    theTree.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
        public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {
            treeValueChanged(evt);
        }
    });
}