com.alee.laf.tree.TreeSelectionStyle Java Examples

The following examples show how to use com.alee.laf.tree.TreeSelectionStyle. 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 File: ClassTree.java    From Cafebabe with GNU General Public License v3.0 6 votes vote down vote up
public ClassTree(ClassMemberList ml) {
	ClassEditorPanel editor = new ClassEditorPanel(this);
	this.setRootVisible(false);
	this.setShowsRootHandles(true);
	this.setFocusable(false);
	this.setCellRenderer(new ClassTreeCellRenderer());
	this.setSelectionStyle(TreeSelectionStyle.group);

	this.addTreeSelectionListener(new TreeSelectionListener() {
		@Override
		public void valueChanged(TreeSelectionEvent e) {
			SortedTreeClassNode node = (SortedTreeClassNode) getLastSelectedPathComponent();
			if (node != null && node.getClazz() != null) {
				ml.setMethods(node.getClazz());
				Cafebabe.gui.smallEditorPanel.setViewportView(editor);
				editor.editClass(node.getClazz());
			}
		}
	});
	this.model = new DefaultTreeModel(root = new SortedTreeClassNode(""));
	this.setModel(model);
	this.setTransferHandler(new JarDropHandler(this, 0));
	this.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
}
 
Example #2
Source File: CXLookAndFeel.java    From CXTouch with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void initialize() {
    WebButtonStyle.margin = new Insets(2, 8, 2, 8);
    WebToolBarStyle.borderColor = StyleConstants.LIGHT_ALPHA;
    WebTreeStyle.selectionStyle = TreeSelectionStyle.group;

    //font
    Font defaultFont = FontUtil.getDefaultFont(12);
    textPaneFont = defaultFont;
    editorPaneFont = defaultFont;
    globalControlFont = defaultFont;
    globalTooltipFont = defaultFont;
    globalAlertFont = defaultFont;
    globalMenuFont = defaultFont;
    globalAcceleratorFont = defaultFont;
    globalTitleFont = defaultFont;
    globalTextFont = defaultFont;
    toolTipFont =  defaultFont;

    super.initialize();
}
 
Example #3
Source File: ExamplesTree.java    From weblaf with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Constructs new {@link ExamplesTree}.
 */
public ExamplesTree ()
{
    super ( DemoStyles.examplesTree, new ExamplesTreeDataProvider () );
    setEditable ( false );
    setRootVisible ( false );
    setShowsRootHandles ( true );
    setMultipleSelectionAllowed ( false );
    setSelectionStyle ( TreeSelectionStyle.line );
    expandAll ();
}