Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2623

Re: Underlining a node in

From "bcd" <bcd@THRWHITE.remove-dii-this>
Subject Re: Underlining a node in
Message-ID <felcrs$4r8$1@orkan.itea.ntnu.no> (permalink)
Newsgroups comp.lang.java.gui
References <470E3269.5E4A@operamail.com>
Date 2011-04-27 15:40 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
In article <470E3269.5E4A@operamail.com>,
Hokan Lane  <H.L@operamail.com> wrote:
>How do I underline a specific node in JTree?

This isn't supported out of the box. You will have to write a custom
Renderer (and Editor if you want it to be editable while underlined)
and you will need to have some way for the Renderer to be able to
deduce if any given node is to be underlined or not (either by using
custom user objects, or through some other mechanism).

This isn't really any different from e.g. having different text
colours in different nodes so if you find an example that does
something along those lines, it should be easy to adapt it to
underlining the text instead.

Cheers,
	Bent D
-- 
Bent Dalager - bcd@pvv.org - http://www.pvv.org/~bcd
                                    powered by emacs

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Underlining a node in JTr "Håkan Lane" <håkan.lane@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
  Re: Underlining a node in "bcd" <bcd@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000

csiph-web