NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

VWP How to set the turner icon on the the Woodstock tree component.

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
Billy Draper
Posted via mailing list.





PostPosted: Mon Jun 09, 2008 1:00 pm    Post subject: VWP How to set the turner icon on the the Woodstock tree com Reply with quote

Hello everybody!

Could I get those of you who are familiar with the Woodstock tree component to point me to a good tutorial or provide hints on how to set the turner icon for dynamically created tree nodes. Unfortunately, the tutorial on the site does not provide guidance on that aspect. I have searched the net for 2 days with nothing to show for. I would really appreciate any code samples or guidance the community members could offer.

Thanks!

Billy
Back to top
Oddvard Myrnes
Posted via mailing list.





PostPosted: Mon Jun 09, 2008 6:53 pm    Post subject: VWP How to set the turner icon on the the Woodstock tree com Reply with quote

Hi Billy,

This piece of code can be used as a template:

List innerchildren = tree.getChildren();
if(!innerchildren.isEmpty())
{
// The tree has its "clientside" property set which means that expand and collapse
// events are handled in the browser. We need to clear the list for every paint
// so that we donn't add simular nodes to the list causing a server failiure
innerchildren.clear();
}
for(int i = 0; i < itemList.size(); i++) // itemList is some objct list
{
TreeNode siNode = new TreeNode();
siNode.setId("sysint" + i);
someItem ci = itemList.get(i);
Hyperlink hyp_si = new Hyperlink();
hyp_si.setUrl("/faces/someJspPage.jsp;
hyp_si.setTarget("someName"); // Sets the target of the linked page
hyp_si.setText(siNode.getid().toString());
siNode.getFacets().put(TreeNode.CONTENT_FACET_KEY, hyp_si);
ImageHyperlink img = new ImageHyperlink();
img.setImageURL("resources/someImage.gif");
siNode.getFacets().put(TreeNode.IMAGE_FACET_KEY, img);
innerchildren.add(siNode);
}

Hope it helps
Oddvard
Quote:
-----Original Message-----
From: Billy Draper [mailto:netbeansbilly@gmail.com]
Sent: Monday, June 09, 2008 3:00 PM
To: nbusers@netbeans.org
Subject: [nbusers] VWP How to set the turner icon on the the Woodstock tree component.


Hello everybody!

Could I get those of you who are familiar with the Woodstock tree component to point me to a good tutorial or provide hints on how to set the turner icon for dynamically created tree nodes. Unfortunately, the tutorial on the site does not provide guidance on that aspect. I have searched the net for 2 days with nothing to show for. I would really appreciate any code samples or guidance the community members could offer.

Thanks!

Billy
Back to top
Billy Draper
Posted via mailing list.





PostPosted: Tue Jun 10, 2008 10:43 pm    Post subject: VWP How to set the turner icon on the the Woodstock tree com Reply with quote

Oddvard,

Thanks for the code sample and the additional info when the component is client side. I'm sure I would have gotten frustrated when I ran into that situation because I am setting the tree to be client side. Again, thanks for the assistance.

Billy

On Mon, Jun 9, 2008 at 1:52 PM, Oddvard Myrnes <oddvardm@doremitechno.com (oddvardm@doremitechno.com)> wrote:
Quote:
Hi Billy,

This piece of code can be used as a template:

List innerchildren = tree.getChildren();
if(!innerchildren.isEmpty())
{
// The tree has its "clientside" property set which means that expand and collapse
// events are handled in the browser. We need to clear the list for every paint
// so that we donn't add simular nodes to the list causing a server failiure
innerchildren.clear();
}
for(int i = 0; i < itemList.size(); i++) // itemList is some objct list
{
TreeNode siNode = new TreeNode();
siNode.setId("sysint" + i);
someItem ci = itemList.get(i);
Hyperlink hyp_si = new Hyperlink();
hyp_si.setUrl("/faces/someJspPage.jsp;
hyp_si.setTarget("someName"); // Sets the target of the linked page
hyp_si.setText(siNode.getid().toString());
siNode.getFacets().put(TreeNode.CONTENT_FACET_KEY, hyp_si);
ImageHyperlink img = new ImageHyperlink();
img.setImageURL("resources/someImage.gif");
siNode.getFacets().put(TreeNode.IMAGE_FACET_KEY, img);
innerchildren.add(siNode);
}

Hope it helps
Oddvard

Quote:
-----Original Message-----
From: Billy Draper [mailto:netbeansbilly@gmail.com (netbeansbilly@gmail.com)]
Sent: Monday, June 09, 2008 3:00 PM
To: nbusers@netbeans.org (nbusers@netbeans.org)
Subject: [nbusers] VWP How to set the turner icon on the the Woodstock tree component.


Hello everybody!

Could I get those of you who are familiar with the Woodstock tree component to point me to a good tutorial or provide hints on how to set the turner icon for dynamically created tree nodes. Unfortunately, the tutorial on the site does not provide guidance on that aspect. I have searched the net for 2 days with nothing to show for. I would really appreciate any code samples or guidance the community members could offer.

Thanks!

Billy



Back to top
Alex Sherwin
Posted via mailing list.





PostPosted: Wed Jun 11, 2008 12:28 am    Post subject: VWP How to set the turner icon on the the Woodstock tree com Reply with quote

It’s pretty easy to override this using the theme settings rather then doing it explicitly on each component (that is, if you want to apply it to all trees).

The docs on doing this: http://webdev2.sun.com/woodstock-theme-doc/
Some more info on some of the properties used for each component: http://webdev2.sun.com/woodstock-theme-doc/theme-properties-table.html

It took me a few hours to get it worked out with the client side stuff, but once you override the theme properties in both the bundle and the JS bundle properties, it’s pretty easy to do.


Alex Sherwin
alex.sherwin@acadiasoft.com

From: Billy Draper [mailto:netbeansbilly@gmail.com]
Sent: Tuesday, June 10, 2008 9:07 AM
To: nbusers@netbeans.org
Subject: Re: [nbusers] VWP How to set the turner icon on the the Woodstock tree component.


Oddvard,

Thanks for the code sample and the additional info when the component is client side. I'm sure I would have gotten frustrated when I ran into that situation because I am setting the tree to be client side. Again, thanks for the assistance.

Billy
On Mon, Jun 9, 2008 at 1:52 PM, Oddvard Myrnes <oddvardm@doremitechno.com (oddvardm@doremitechno.com)> wrote:
Hi Billy,



This piece of code can be used as a template:



List innerchildren = tree.getChildren();
if(!innerchildren.isEmpty())
{
// The tree has its "clientside" property set which means that expand and collapse
// events are handled in the browser. We need to clear the list for every paint
// so that we donn't add simular nodes to the list causing a server failiure
innerchildren.clear();
}
for(int i = 0; i < itemList.size(); i++) // itemList is some objct list
{
TreeNode siNode = new TreeNode();
siNode.setId("sysint" + i);
someItem ci = itemList.get(i);
Hyperlink hyp_si = new Hyperlink();
hyp_si.setUrl("/faces/someJspPage.jsp;
hyp_si.setTarget("someName"); // Sets the target of the linked page
hyp_si.setText(siNode.getid().toString());
siNode.getFacets().put(TreeNode.CONTENT_FACET_KEY, hyp_si);
ImageHyperlink img = new ImageHyperlink();
img.setImageURL("resources/someImage.gif");
siNode.getFacets().put(TreeNode.IMAGE_FACET_KEY, img);
innerchildren.add(siNode);

}



Hope it helps

Oddvard
Quote:

-----Original Message-----
From: Billy Draper [mailto:netbeansbilly@gmail.com (netbeansbilly@gmail.com)]
Sent: Monday, June 09, 2008 3:00 PM
To: nbusers@netbeans.org (nbusers@netbeans.org)
Subject: [nbusers] VWP How to set the turner icon on the the Woodstock tree component.
Hello everybody!

Could I get those of you who are familiar with the Woodstock tree component to point me to a good tutorial or provide hints on how to set the turner icon for dynamically created tree nodes. Unfortunately, the tutorial on the site does not provide guidance on that aspect. I have searched the net for 2 days with nothing to show for. I would really appreciate any code samples or guidance the community members could offer.

Thanks!

Billy
Back to top
Billy Draper
Posted via mailing list.





PostPosted: Mon Jun 23, 2008 2:06 pm    Post subject: VWP How to set the turner icon on the the Woodstock tree com Reply with quote

Thanks Alex,

Since resolving the issue I did not get a chance to look at the NBUsers emails. Thanks for the links, I'll go through them as soon as I can.

Have a good one!
Billy

On Tue, Jun 10, 2008 at 7:27 PM, Alex Sherwin <alex.sherwin@acadiasoft.com (alex.sherwin@acadiasoft.com)> wrote:
Quote:

It's pretty easy to override this using the theme settings rather then doing it explicitly on each component (that is, if you want to apply it to all trees).

The docs on doing this: http://webdev2.sun.com/woodstock-theme-doc/
Some more info on some of the properties used for each component: http://webdev2.sun.com/woodstock-theme-doc/theme-properties-table.html

It took me a few hours to get it worked out with the client side stuff, but once you override the theme properties in both the bundle and the JS bundle properties, it's pretty easy to do.


Alex Sherwin
alex.sherwin@acadiasoft.com (alex.sherwin@acadiasoft.com)

From: Billy Draper [mailto:netbeansbilly@gmail.com (netbeansbilly@gmail.com)]
Sent: Tuesday, June 10, 2008 9:07 AM
To: nbusers@netbeans.org (nbusers@netbeans.org)
Subject: Re: [nbusers] VWP How to set the turner icon on the the Woodstock tree component.



Oddvard,

Thanks for the code sample and the additional info when the component is client side. I'm sure I would have gotten frustrated when I ran into that situation because I am setting the tree to be client side. Again, thanks for the assistance.

Billy
On Mon, Jun 9, 2008 at 1:52 PM, Oddvard Myrnes <oddvardm@doremitechno.com (oddvardm@doremitechno.com)> wrote:
Hi Billy,



This piece of code can be used as a template:



List innerchildren = tree.getChildren();
if(!innerchildren.isEmpty())
{
// The tree has its "clientside" property set which means that expand and collapse
// events are handled in the browser. We need to clear the list for every paint
// so that we donn't add simular nodes to the list causing a server failiure
innerchildren.clear();
}
for(int i = 0; i < itemList.size(); i++) // itemList is some objct list
{
TreeNode siNode = new TreeNode();
siNode.setId("sysint" + i);
someItem ci = itemList.get(i);
Hyperlink hyp_si = new Hyperlink();
hyp_si.setUrl("/faces/someJspPage.jsp;
hyp_si.setTarget("someName"); // Sets the target of the linked page
hyp_si.setText(siNode.getid().toString());
siNode.getFacets().put(TreeNode.CONTENT_FACET_KEY, hyp_si);
ImageHyperlink img = new ImageHyperlink();
img.setImageURL("resources/someImage.gif");
siNode.getFacets().put(TreeNode.IMAGE_FACET_KEY, img);
innerchildren.add(siNode);

}



Hope it helps

Oddvard
Quote:

-----Original Message-----
From: Billy Draper [mailto:netbeansbilly@gmail.com (netbeansbilly@gmail.com)]
Sent: Monday, June 09, 2008 3:00 PM
To: nbusers@netbeans.org (nbusers@netbeans.org)
Subject: [nbusers] VWP How to set the turner icon on the the Woodstock tree component.
Hello everybody!

Could I get those of you who are familiar with the Woodstock tree component to point me to a good tutorial or provide hints on how to set the turner icon for dynamically created tree nodes. Unfortunately, the tutorial on the site does not provide guidance on that aspect. I have searched the net for 2 days with nothing to show for. I would really appreciate any code samples or guidance the community members could offer.

Thanks!

Billy









Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo