• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

tomahawk t:tree2 doubt

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way to increase the length of the branch using <t:tree2> ?

I want this so that the tree will look spacious.

A
|________________B

Suppose A is the root node with B as its child, do I have control over the
bold line distance ?
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi again Joshua,

Not that I know of. But if it turns out that it's not possible, you could always set the showLines attribute to false and use an image instead, just before your node.description... Make the image a longer line...

Mm, that would work, but I spose then you'd have the problem of your first node also having a long line.. like this
|---------A
|---------B

Which is not so nice. You got me. I'll hunt around though and see if I can find something.

cheers
Darryl
 
Darryl Nortje
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok this is what I've found so far. Will keep digging though.

All that those lines are any way is gif's. They come with tomahawk and sit on your webserver.

/YourWebContext/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12162986/tree2.HtmlTreeRenderer/images/line-middle.gif

So we must try find a way to use more other images. I see there is an attribute on the tree2 component called imageLocation. Maybe you could make your own images, and point imageLocation to them. Call them the same name for example line-middle.gif...

That sounds like it'll work hey? Let me know if it does.

cheers
Darryl
 
Joshua Antony
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Darryl,

I tried replacing the image, but it is not getting rendered properly. May be the width is predefined in the api.

However increase of width is possible in t:tree, the problem occurs in t:tree2.

Regards,
Joshua
 
Joshua Antony
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I looked into the org.apache.myfaces.custom.tree2.HtmlTreeRenderer class.

Yes line-middle.gif and line-last.gif is hardcoded with values where as line-trunk.gif is set as background hence only its size can be increased.

This might help someone.

Regards,
Joshua
 
reply
    Bookmark Topic Watch Topic
  • New Topic