Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.java.* > Newsgroup comp.lang.java.gui

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 08-07-2012, 09:54 PM
FredK
Guest
 
Posts: n/a
Default JTree indentation

How do I control the amount of indentation for a JTree?

I have found documentation for properties "Tree.leftChildIndent"
and "Tree.rightTreeIndent" that is confusing to me as to what
they do. The documentation for leftChildIndent says:

This plus Tree.rightChildIndent account for the
total space, along the y axis, to offset nodes
from their parent.

I don't understand this. Indentation is horizontal (along the
x axis, not y).

Regardless, I tried setting either or both of these properties
with no effect.
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 08-07-2012, 10:22 PM
Jeff Higgins
Guest
 
Posts: n/a
Default Re: JTree indentation

On 08/07/2012 05:54 PM, FredK wrote:
> How do I control the amount of indentation for a JTree?
>
> I have found documentation for properties "Tree.leftChildIndent"
> and "Tree.rightTreeIndent" that is confusing to me as to what
> they do. The documentation for leftChildIndent says:
>
> This plus Tree.rightChildIndent account for the
> total space, along the y axis, to offset nodes
> from their parent.
>
> I don't understand this. Indentation is horizontal (along the
> x axis, not y).


Please provide a pointer to the documentation you found.

>
> Regardless, I tried setting either or both of these properties
> with no effect.


Please provide a small compilable code example
that demonstrates the problem.

The first hit for a web search using;
"How do I control the amount of indentation for a JTree"
<http://www.rgagnon.com/javadetails/java-0398.html>

Reply With Quote
  #3 (permalink)  
Old 08-08-2012, 02:36 PM
FredK
Guest
 
Posts: n/a
Default Re: JTree indentation

On Aug 7, 6:22*pm, Jeff Higgins <j...@invalid.invalid> wrote:
> On 08/07/2012 05:54 PM, FredK wrote:
>
> > How do I control the amount of indentation for a JTree?

>
> > I have found documentation for properties "Tree.leftChildIndent"
> > and "Tree.rightTreeIndent" that is confusing to me as to what
> > they do. The documentation for leftChildIndent says:

>
> > * * * *This plus Tree.rightChildIndent account for the
> > * * * *total space, along the y axis, to offset nodes
> > * * * *from their parent.

>
> > I don't understand this. Indentation is horizontal (along the
> > x axis, not y).

>
> Please provide a pointer to the documentation you found.
>


See:
http://docs.oracle.com/javase/1.5.0/...roperties.html


>
>
> > Regardless, I tried setting either or both of these properties
> > with no effect.

>
> Please provide a small compilable code example
> that demonstrates the problem.
>
> The first hit for a web search using;
> "How do I control the amount of indentation for a JTree"
> <http://www.rgagnon.com/javadetails/java-0398.html>


The suggestion there works. Thanks!
Reply With Quote
  #4 (permalink)  
Old 08-09-2012, 10:00 AM
Roedy Green
Guest
 
Posts: n/a
Default Re: JTree indentation

On Tue, 7 Aug 2012 14:54:43 -0700 (PDT), FredK
<fred.l.kleinschmidt@gmail.com> wrote, quoted or indirectly quoted
someone who said :

>Regardless, I tried setting either or both of these properties
>with no effect.


perhaps there is something you have to do to tell it to re-render.
--
Roedy Green Canadian Mind Products http://mindprod.com
A new scientific truth does not triumph by convincing its opponents and making them see the light,
but rather because its opponents eventually die, and a new generation grows up that is familiar with it.
~ Max Planck 1858-04-23 1947-10-04


Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 01:39 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.