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


Groups > comp.lang.java.gui > #2199 > unrolled thread

HyperlinkListener in JTre

Started by"andre.sept" <andre.sept@THRWHITE.remove-dii-this>
First post2011-04-27 15:37 +0000
Last post2011-04-27 15:37 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.java.gui


Contents

  HyperlinkListener in JTre "andre.sept" <andre.sept@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
    Re: HyperlinkListener in "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000

#2199 — HyperlinkListener in JTre

From"andre.sept" <andre.sept@THRWHITE.remove-dii-this>
Date2011-04-27 15:37 +0000
SubjectHyperlinkListener in JTre
Message-ID<1186389899.365210.8560@b79g2000hse.googlegroups.com>
  To: comp.lang.java.gui
Hello,

I have a Problem with a JTree. I want display the Text in the Nodes
with HTML.

- RootNode
    - Node1 text bla bla <Link1> normal text <Link2>
    - Node2 text bla bla <Link3> normal text <Link4>

I create a TreeCellRenderer and a TreeCellEditor who extend from
JEditorPane and registered a HyperlinkListener. I think that is the
wrong way.
I do not know, where I can register the HyperLinkListener in JTree
that the HyperlinkListener fired.

THX and greetings,

Andr=E9 Sept

---
 * 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

[toc] | [next] | [standalone]


#2200 — Re: HyperlinkListener in

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:37 +0000
SubjectRe: HyperlinkListener in
Message-ID<7648b3763fe01@uwe>
In reply to#2199
  To: comp.lang.java.gui
andre.sept@gmail.com wrote:
..
>I have a Problem with a JTree. 

I do not know the immediate technical answer to 
your question, but..

>...I want display the Text in the Nodes
>with HTML.

Is that really a good idea?  Any clickable links
within a JTreeNode will interfere with, or at the very
least need to 'interact with' the normal tree events.

I would guess it amounts to a kludgy GUI at the least.

Would these 'bits of HTML with links' be of variable
size?
..
>I create a TreeCellRenderer and a TreeCellEditor who extend from
>JEditorPane 

Why not display the JEP* in the NORTH of a BorderLayout in
which the JTree is WEST.  If the user selects a JTree node,
the HTML appears in the NORTH JEP, and if the user clicks 
a link, display the content in a JEP in the CENTER.

If OTOH, an external browser is used for the HTML that 
is linked, the JEP with your HTML might go in the 
CENTER.

-- 
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200708/1

---
 * 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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web