Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Getting all visible Elements in a Tree
Getting all visible Elements in a Tree [message #462361] Sat, 27 January 2007 17:37 Go to next message
Eclipse UserFriend
Originally posted by: florianwendland.freenet.de

Hello,
I have a tree inside a view. I have defined some FontFieldEditors within
my preference pages, where i can customize the font of the tree
elements. Therefore, I use the Interface ITableFontProvider.

This works perfect, when I call viewer.refresh() within the
propertyChange-Method.

if(event.getProperty().equals("edt_usr_host_font")){
viewer.refresh(true);
}

But, refresh forces the tree to be restructured againg. IMHO, this is
not necessary. I think, the update(Elements[])-Method will do the same
work. But how can i get all the visible Elements in the tree, which are
possibly forced to be redrawn? I tried with getExpandedElements(), but
this does not work.

I want to do this:

if(event.getProperty().equals("edt_usr_host_font")){
viewer.update(#viewer.getAllVisibleElements());
}

Hope, some one can help me.

Thx

Florian
Re: Getting all visible Elements in a Tree [message #462369 is a reply to message #462361] Sat, 27 January 2007 18:07 Go to previous message
Ilya Shinkarenko is currently offline Ilya ShinkarenkoFriend
Messages: 22
Registered: July 2009
Junior Member
Hi Florian,

try to ask in SWT newsgroup.

My opinion on that: I am not sure whether it's a good idea to update
your components based on their current visibility in a table. If user
would scroll, you would have to react upon that and accordingly update
newly revealed elements, since you have no guarantee that those elements
are not stale.

Try to look at KTable, I am not sure but maybe KTable has some support
for that.

Greetz
Ilya



Florian Wendland wrote:
> Hello,
> I have a tree inside a view. I have defined some FontFieldEditors within
> my preference pages, where i can customize the font of the tree
> elements. Therefore, I use the Interface ITableFontProvider.
>
> This works perfect, when I call viewer.refresh() within the
> propertyChange-Method.
>
> if(event.getProperty().equals("edt_usr_host_font")){
> viewer.refresh(true);
> }
>
> But, refresh forces the tree to be restructured againg. IMHO, this is
> not necessary. I think, the update(Elements[])-Method will do the same
> work. But how can i get all the visible Elements in the tree, which are
> possibly forced to be redrawn? I tried with getExpandedElements(), but
> this does not work.
>
> I want to do this:
>
> if(event.getProperty().equals("edt_usr_host_font")){
> viewer.update(#viewer.getAllVisibleElements());
> }
>
> Hope, some one can help me.
>
> Thx
>
> Florian
Previous Topic:Help with fullscreen eclipse application
Next Topic:How can I specify my own perspective as my RCP's default perspective?
Goto Forum:
  


Current Time: Mon Oct 07 21:24:09 GMT 2024

Powered by FUDForum. Page generated in 0.03567 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top